123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- import request from '@/utils/request'
- // 根据url直接获取type
- function getTypeFromUrl(url) {
- // 使用正则表达式或其他方法从 URL 中提取 type 参数
- const params = new URLSearchParams(url.split('?')[1]);
- return params.get('type');
- }
- export function getEngineeIndustryList(sata) {
- sata.type = getTypeFromUrl(window.location.href)
- return request({
- url: `/zdsz/engineeringIndustry/list`,
- method: 'get',
- params:sata
- })
- }
- export function addEngineeEngineeIndustry(data) {
- return request({
- url: '/zdsz/engineeringIndustry',
- method: 'post',
- data
- })
- }
- export function putEngineeEngineeIndustry(id) {
- return request({
- url: `/zdsz/engineeringIndustry/${id}`,
- method: 'get',
- })
- }
- export function EditEngineeEngineeIndustry(data) {
- return request({
- url: '/zdsz/engineeringIndustry',
- method: 'put',
- data
- })
- }
- export function DelEngineeEngineeIndustry(id) {
- return request({
- url: `/zdsz/engineeringIndustry/${id}`,
- method: 'delete',
- })
- }
- export function QueryEngineeIndustry({id, type}) {
- // alert(`${id}`)
- // alert(`${type}`)
- return request({
- // url: `/zdsz/engineeringIndustry/${id}/1`,
- url: `/zdsz/engineeringIndustry/${id}/${type}`,
- method: 'get',
- })
- }
- export function QueryEngineeIndustrys({id, type}) {
- return request({
- url: `/zdsz/engineeringIndustry/query/${id}/${type}`,
- method: 'get',
- })
- }
- export function UpdateEngineeIndustry(data) {
- return request({
- url: '/zdsz/engineeringIndustry/updateNodeByBo',
- method: 'put',
- data
- })
- }
|