12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- 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() {
- const type = getTypeFromUrl(window.location.href);
- return request({
- url: `/zdsz/engineeringIndustry/list?type=${type}`,
- method: 'get',
- })
- }
- 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}) {
- return request({
- url: `/zdsz/engineeringIndustry/${id}`,
- method: 'get',
- })
- }
- export function UpdateEngineeIndustry(data) {
- return request({
- url: '/zdsz/engineeringIndustry/updateNodeByBo',
- method: 'put',
- data
- })
- }
|