Prechádzať zdrojové kódy

危险作业工程页面

zhaowenrui 1 rok pred
rodič
commit
da85f0ddb2

+ 7 - 0
src/api/zdsz/engineeringDangerous.js

@@ -42,3 +42,10 @@ export function delEngineeringDangerous(id) {
     method: 'delete'
   })
 }
+
+export function queryEngineeringDangerous({id}) {
+  return request({
+    url: `/zdsz/engineeringDangerous/${id}`,
+    method: 'get',
+  })
+}

+ 10 - 0
src/components/ConstructionDetails/index.vue

@@ -94,6 +94,7 @@ export default {
         },
         // 查看历史
         open(dicts,type = null){
+
             if(type == '1' || type == '2'){
               // 工业 市政
               this.$parent.viewNodeSource()
@@ -103,10 +104,19 @@ export default {
                   label:"历史数据"
                 }
               ]
+            } else if (type === '危险作业工程') {
+              this.$parent.viewNodeSource()
+              this.currentDicts = [
+                {
+                  value: "历史数据",
+                  label: "历史数据"
+                }
+              ]
             }else{
               console.log(dicts)
               this.currentDicts = dicts
             }
+
             this.dialogVisible = true
         }
     }

+ 31 - 2
src/views/zdsz/engineeringDangerous/index.vue

@@ -154,6 +154,12 @@
             @click="addNewPipe(scope.row)"
           >新增顶管工程
           </el-button>
+          <el-button
+            type="text"
+            icon="el-icon-edit"
+            size="mini"
+            @click="viewSource(scope.row)"
+          >历史</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -415,6 +421,10 @@
       @closeToSucceed="closeToSucceed"
     />
     <EngineePipe ref="enginPipe"/>
+    <ConstructionDetails
+      ref="ConstructionDetails"
+      :currentCollapses="currentCollapses"
+    />
   </div>
 </template>
 
@@ -422,12 +432,14 @@
 import {
   listEngineeringDangerous,
   getEngineeringDangerous,
-  delEngineeringDangerous,
+  delEngineeringDangerous, queryEngineeringDangerous,
 } from "@/api/zdsz/engineeringDangerous";
 import EngineeNode from "@/components/EngineeNode/index";
 import data from "@/views/system/dict/data.vue";
 import EngineePipe from '@/components/EngineePipe'
+import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
 import {validPhoneMobile,checkPositiveDecimal} from "@/api/rules";
+import {QueryEngineeIndustry} from "@/api/zdsz/engineeringIndustry";
 
 
 export default {
@@ -438,10 +450,11 @@ export default {
     }
   },
   components: {
-    EngineePipe, EngineeNode
+    EngineePipe, EngineeNode,ConstructionDetails
   },
   data() {
     return {
+      currentCollapses:[],
       nodeType: "危险作业工程",
       nodeDetailVisible: false,
       // 按钮loading
@@ -694,6 +707,22 @@ export default {
     this.getList();
   },
   methods: {
+    viewSource(e){
+      this.currentId = e.id
+      this.$refs.ConstructionDetails.open(_,"危险作业工程")
+    },
+    viewNodeSource(e){
+      // todo: 获取数据
+      queryEngineeringDangerous({
+        id:this.currentId
+      }).then(res => {
+        try {
+          this.currentCollapses = res.data.zEngineeringNodeBos[0].zEngineeringInfoBoList
+        } catch (error) {
+          this.currentCollapses = [];
+        }
+      })
+    },
     closeToSucceed() {
       this.open = false;
       this.getList()