|
@@ -0,0 +1,69 @@
|
|
|
+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 getEngineeGasOpeningList(data) {
|
|
|
+ data.type = getTypeFromUrl(window.location.href)
|
|
|
+ return request({
|
|
|
+ url: `/zdsz/engineeringGasOpening/list`,
|
|
|
+ method: 'get',
|
|
|
+ params:data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function addEngineeEngineeGasOpening(data) {
|
|
|
+ return request({
|
|
|
+ url: '/zdsz/engineeringGasOpening',
|
|
|
+ method: 'post',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function putEngineeGasOpening(id) {
|
|
|
+ return request({
|
|
|
+ url: `/zdsz/engineeringGasOpening/${id}`,
|
|
|
+ method: 'get',
|
|
|
+
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function EditEngineeGasOpening(data) {
|
|
|
+ return request({
|
|
|
+ url: '/zdsz/engineeringGasOpening',
|
|
|
+ method: 'put',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function DelEngineeGasOpening(id) {
|
|
|
+ return request({
|
|
|
+ url: `/zdsz/engineeringGasOpening/${id}`,
|
|
|
+ method: 'delete',
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function QueryEngineeGasOpening({id, type}) {
|
|
|
+ // alert(`${id}`)
|
|
|
+ // alert(`${type}`)
|
|
|
+ return request({
|
|
|
+ // url: `/zdsz/engineeringGasOpening/${id}/${type}`,
|
|
|
+ url: `/zdsz/engineeringGasOpening/${id}/${type}`,
|
|
|
+ method: 'get',
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+export function UpdateEngineeGasOpening(data) {
|
|
|
+ console.log("UpdateEngineeGasOpening=",data)
|
|
|
+ return request({
|
|
|
+ url: '/zdsz/engineeringGasOpening/updateNodeByBo',
|
|
|
+ method: 'put',
|
|
|
+ data
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|