Преглед на файлове

版本1.4.1 人员选择xx目录 修改

qinhouyu преди 1 година
родител
ревизия
e3874507fe

+ 2 - 2
src/api/gas/networkRelation.js

@@ -36,9 +36,9 @@ export function updateNetworkRelation(data) {
 }
 
 // 删除庭院管网目录中间
-export function delNetworkRelation(id) {
+export function delNetworkRelation(id,jobNum) {
   return request({
-    url: '/gas/networkRelation/' + id,
+    url: '/gas/networkRelation/' + id + '/' + jobNum,
     method: 'delete'
   })
 }

+ 2 - 2
src/api/gas/regulatorBoxRelation.js

@@ -44,9 +44,9 @@ export function updateRegulatorBoxRelation(data) {
 }
 
 // 删除调压箱目录中间
-export function delRegulatorBoxRelation(id) {
+export function delRegulatorBoxRelation(id,jobNum) {
   return request({
-    url: '/gas/regulatorBoxRelation/' + id,
+    url: '/gas/regulatorBoxRelation/' + id + '/' + jobNum,
     method: 'delete'
   })
 }

+ 2 - 2
src/api/gas/valvewellRelation.js

@@ -36,9 +36,9 @@ export function updateValvewellRelation(data) {
 }
 
 // 删除阀井目录中间
-export function delValvewellRelation(id) {
+export function delValvewellRelation(id,jobNum) {
   return request({
-    url: '/gas/valvewellRelation/' + id,
+    url: '/gas/valvewellRelation/' + id + '/' + jobNum,
     method: 'delete'
   })
 }

+ 32 - 2
src/views/gas/user/springIoc/area.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-dialog title="庭院管网目录" :visible.sync="show" width="1000px" append-to-body>
+    <el-dialog title="庭院管网目录" :visible.sync="show" width="1100px" append-to-body>
       <el-tabs  v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="庭院管网" name="1">
           <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
@@ -67,6 +67,17 @@
               </template>
             </el-table-column>
             <el-table-column label="小区规模" align="center" prop="areaSize"/>
+            <el-table-column label="操作" align="center" fixed>
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                >删除
+                </el-button>
+              </template>
+            </el-table-column>
           </el-table>
           <pagination
             v-show="total1>0"
@@ -85,9 +96,10 @@
 
 
 <script>
-import {addNetworkRelation, listNetworkRelation, myListArea} from "@/api/gas/networkRelation";
+import {addNetworkRelation, delNetworkRelation, listNetworkRelation, myListArea} from "@/api/gas/networkRelation";
 import Cookies from 'js-cookie'
 import {listArea} from "@/api/gas/area";
+import {addValvewellRelation} from "@/api/gas/valvewellRelation";
 export default {
   name: "areas",
   dicts: ['district'],
@@ -134,6 +146,19 @@ export default {
   },created() {
   },
   methods: {
+    handleDelete(row) {
+      const ids = row.id;
+      this.$modal.confirm('是否确认删除编号为"' + ids + '"的数据项?').then(() => {
+        this.loading1 = true;
+        return delNetworkRelation(ids,this.jobNum);
+      }).then(() => {
+        this.loading1 = false;
+        this.handleClick();
+        this.$modal.msgSuccess("删除成功");
+      }).finally(() => {
+        this.loading1 = false;
+      });
+    },
     handleClick(tab,event){
       console.log(this.activeName)
       this.loading1 = true;
@@ -154,7 +179,11 @@ export default {
         if (res.code===200){
           this.$msgbox.alert('添加成功')
           this.loading1=false
+          this.getList()
         }
+      }).catch(e=>{
+        this.loading1=false
+        this.getList()
       })
     },
     init(user){
@@ -184,6 +213,7 @@ export default {
     /** 查询调压箱管理列表 */
     getList(user) {
       this.loading = true;
+      this.queryParams.jobNum=this.jobNum
       listArea(this.queryParams).then(response => {
         this.list = response.rows;
         this.total = response.total;

+ 39 - 2
src/views/gas/user/springIoc/tyx.vue

@@ -1,5 +1,5 @@
 <template>
-    <el-dialog title="调压箱目录" :visible.sync="show" width="1000px" append-to-body>
+    <el-dialog title="调压箱目录" :visible.sync="show" width="1100px" append-to-body>
       <el-tabs  v-model="activeName" type="card" @tab-click="handleClick">
         <el-tab-pane label="调压箱目录" name="1">
           <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
@@ -107,6 +107,18 @@
             <el-table-column label="纬度" align="center" prop="latitude"/>
             <el-table-column label="巡检次数" align="center" prop="inspectionFrequency"/>
             <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
+            <el-table-column label="操作" align="center" fixed>
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                >删除
+                </el-button>
+              </template>
+            </el-table-column>
+
           </el-table>
           <pagination
             v-show="total1>0"
@@ -126,7 +138,13 @@
 
 <script>
 import {listPressureRegulatingBox} from "@/api/gas/pressureRegulatingBox";
-import {addRegulatorBoxRelation, listRegulatorBoxRelation, myListRegulatorBox} from "@/api/gas/regulatorBoxRelation";
+import {
+  addRegulatorBoxRelation,
+  delRegulatorBoxRelation,
+  listRegulatorBoxRelation,
+  myListRegulatorBox
+} from "@/api/gas/regulatorBoxRelation";
+import {delValveWellInspection} from "@/api/gas/valveWellInspection";
 export default {
   name: "tyx",
   dicts: ['administrative_office'],
@@ -146,6 +164,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         nature: undefined,
+        jobNum: undefined,
         type: undefined,
         numberOfRoutes: undefined,
         managementOffice: undefined,
@@ -196,6 +215,19 @@ export default {
     this.ids = []
   },
   methods: {
+    handleDelete(row) {
+      const ids = [row.id];
+      this.$modal.confirm('是否确认删除编号为"' + ids + '"的数据项?').then(() => {
+        this.loading1 = true;
+        return delRegulatorBoxRelation(ids,this.jobNum);
+      }).then(() => {
+        this.loading1 = false;
+        this.handleClick();
+        this.$modal.msgSuccess("删除成功");
+      }).finally(() => {
+        this.loading1 = false;
+      });
+    },
     handleClick(tab,event){
       console.log(this.activeName)
       this.loading1 = true;
@@ -216,7 +248,11 @@ export default {
         if (res.code===200){
           this.$msgbox.alert('添加成功')
           this.loading1=false
+          this.getList()
         }
+      }).catch(e=>{
+        this.loading1=false
+        this.getList()
       })
     },
     init(user){
@@ -245,6 +281,7 @@ export default {
     /** 查询调压箱管理列表 */
     getList(user) {
       this.loading = true;
+      this.queryParams.jobNum=this.jobNum
       listPressureRegulatingBox(this.queryParams).then(response => {
         this.list = response.rows;
         this.total = response.total;

+ 35 - 3
src/views/gas/user/springIoc/vw.vue

@@ -1,7 +1,7 @@
 <template>
-    <el-dialog title="庭院管网目录" :visible.sync="show" width="1000px" append-to-body>
+    <el-dialog title="阀井目录" :visible.sync="show" width="1100px" append-to-body>
       <el-tabs  v-model="activeName" type="card" @tab-click="handleClick">
-        <el-tab-pane label="庭院管网" name="1">
+        <el-tab-pane label="阀井目录" name="1">
           <el-form :model="queryParams" ref="queryForm" :inline="true">
             <el-form-item label="阀井名称" prop="valveWellName">
               <el-input
@@ -99,6 +99,17 @@
             <el-table-column label="压力等级" align="center" prop="pressureRating" />
             <el-table-column label="是否需要下井才能开关阀门" align="center" prop="isXyxjcnkg" />
             <el-table-column label="备注" align="center" prop="remarks" show-overflow-tooltip/>
+            <el-table-column label="操作" align="center" fixed>
+              <template slot-scope="scope">
+                <el-button
+                  size="mini"
+                  type="text"
+                  icon="el-icon-delete"
+                  @click="handleDelete(scope.row)"
+                >删除
+                </el-button>
+              </template>
+            </el-table-column>
           </el-table>
           <pagination
             v-show="total1>0"
@@ -120,8 +131,9 @@
 import {addNetworkRelation, listNetworkRelation, myListArea} from "@/api/gas/networkRelation";
 import Cookies from 'js-cookie'
 import {listArea} from "@/api/gas/area";
-import {addValvewellRelation, myListValveWell} from "@/api/gas/valvewellRelation";
+import {addValvewellRelation, delValvewellRelation, myListValveWell} from "@/api/gas/valvewellRelation";
 import {listValveWellPosition} from "@/api/gas/valveWellPosition";
+import {delRegulatorBoxRelation} from "@/api/gas/regulatorBoxRelation";
 export default {
   name: "vw",
   dicts: ['district'],
@@ -141,6 +153,7 @@ export default {
         pageNum: 1,
         pageSize: 10,
         valveWellName: undefined,
+        jobNum:undefined,
         position: undefined,
         longitude: undefined,
         latitude: undefined,
@@ -176,6 +189,7 @@ export default {
       queryParams1: {
         pageNum: 1,
         pageSize: 10,
+        jobNum:undefined,
         valveWellName: undefined,
         position: undefined,
         longitude: undefined,
@@ -193,6 +207,19 @@ export default {
   },created() {
   },
   methods: {
+    handleDelete(row) {
+      const ids = row.id;
+      this.$modal.confirm('是否确认删除编号为"' + ids + '"的数据项?').then(() => {
+        this.loading1 = true;
+        return delValvewellRelation(ids,this.jobNum);
+      }).then(() => {
+        this.loading1 = false;
+        this.handleClick();
+        this.$modal.msgSuccess("删除成功");
+      }).finally(() => {
+        this.loading1 = false;
+      });
+    },
     handleClick(tab,event){
       console.log(this.activeName)
       this.loading1 = true;
@@ -213,7 +240,11 @@ export default {
         if (res.code===200){
           this.$msgbox.alert('添加成功')
           this.loading1=false
+          this.getList()
         }
+      }).catch(e=>{
+        this.loading1=false
+        this.getList()
       })
     },
     init(user){
@@ -242,6 +273,7 @@ export default {
     /** 查询调压箱管理列表 */
     getList(user) {
       this.loading = true;
+      this.queryParams.jobNum=this.jobNum
       listValveWellPosition(this.queryParams).then(response => {
         this.list = response.rows;
         this.total = response.total;