Переглянути джерело

市政工程修改施工信息、历史施工

wangzhe 1 рік тому
батько
коміт
82563e7a9e

+ 8 - 1
src/components/ConstructionDetails/index.vue

@@ -947,7 +947,9 @@ export default {
   },
   created(){
       // 获取材质
-      getEnginMaterialQualityList({enginType:this.enginType,enginStep:this.activeNames}).then(res => {
+    // alert(this.enginType)
+      let enginStep = this.enginType == '市政工程' ? null : this.activeNames
+      getEnginMaterialQualityList({enginType:this.enginType,enginStep:enginStep}).then(res => {
           console.log('材质',res)
           this.materialQualityList = res.data
       })
@@ -1183,6 +1185,11 @@ export default {
         data.enginSort = enginSort
         data.enginNode = enginClassification
         data.enginStep = Array.isArray(dicts) ? dicts[0].value: null;
+      console.log("datadatadata=",data)
+        if(data.enginType == '市政工程'){
+          data.enginStep = null // "trench_construction"
+        }
+      console.log("datadatadata2=",data)
         getEnginMaterialQualityList(data).then(res => {
           this.materialQualityList = res.data
         })

+ 24 - 5
src/views/zdsz/engineeringIndustry/index.vue

@@ -674,9 +674,9 @@ export default {
         type: this.form.type
       }, 'add', data)
     },
-    // 历史查询
+    // #003 历史施工
     viewSource(e) {
-      console.log('历史查询', e)
+      console.log('历史施工', e)
       this.currentId = e.id
       let val = e.enginType + "_" + e.enginClassification
       val = 'municipal_engineering_node'
@@ -701,11 +701,30 @@ export default {
       // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
       // this.status = 'read-only'
     },
-    // 历史查询
+    // #002 修改施工信息
     updateviewSource(e) {
       this.currentId = e.id
-      this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
-      this.status = 'put'
+      // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+      let val = e.enginType + "_" + e.enginClassification
+      val = 'municipal_engineering_node'
+      // alert(val)
+      getDicts(val).then(res => {
+          let dict = []
+          for (let i = 0; i < res.data.length; i++) {
+            dict.push({
+              "label": res.data[i].dictLabel,
+              "value": res.data[i].dictValue,
+            })
+          }
+          // 市政工程功能已完成 工业工程请根据自己需求酌情修改此处代码
+          this.$refs.ConstructionDetails.open(this.form.type==2?dict:[
+            {
+              value: "历史数据",
+              label: "历史数据"
+            }
+          ], this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+        this.status = 'put'
+      })
     },
     viewNodeSource(e) {
       // alert('type='+e)