Kaynağa Gözat

民用 修改工程

JX.Li 1 yıl önce
ebeveyn
işleme
e25fa5411d
1 değiştirilmiş dosya ile 16 ekleme ve 45 silme
  1. 16 45
      src/views/zdsz/engineeringCivil/index.vue

+ 16 - 45
src/views/zdsz/engineeringCivil/index.vue

@@ -348,7 +348,7 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="24">
+          <el-col :span="24" v-if="title!=='修改民用工程'">
             <el-form-item label="节点">
               <el-checkbox-group v-model="currentCheckList">
                 <el-checkbox
@@ -912,7 +912,7 @@ export default {
       console.log(this.currentCheckList)
       this.currentCheckList = []
       this.checkList = []
-      this.$refs.nodeForm.resetFields()
+      this.reset()
     },
     closeToSucceed() {
       this.open = false;
@@ -1045,6 +1045,7 @@ export default {
             this.open = false
             console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
+            this.getList()
             // this.$emit('closeToSucceed')
           }
         })
@@ -1099,53 +1100,22 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let that = this
       this.enginNodeStatus = '修改'
       this.loading = true;
-      // this.reset();
+      this.reset();
       const id = row.id || this.ids
       getEngineeringCivil(id).then(res => {
-        this.loading = false;
-        let newData = res.data
-        // 手动调用行政区发生改变
-        // this.districtHasChanged(newData.district)
-        this.queryParams = newData
-        this.updateOption = res.data.zEngineeringNodeBoList
-        console.log(this.queryParams.areaId)
-        // start update修改数据
-        res.data.zEngineeringNodeBoList.forEach((e, idx) => {
-          this.currentCheckList.push(e.type)
-        })
-        console.log('选中节点集合', this.currentCheckList)
-        // end
-        let zEngineeringNodeBo = {
-          type: res.data.zEngineeringNodeBoList[0].type,
-          zEngineeringInfoBo: res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
-        }
-        if (res.data.areaId != '' && res.data.areaId != null) {
-          this.communityHasChanged(res.data.areaId)
-        }
-        if (res.data.district != '' && res.data.district != null) {
-          this.districtHasChanged(res.data.district)
-        }
-        if (res.data.buildingId != '' && res.data.buildingId != null) {
-          this.buildingHasChanged(res.data.buildingId)
-        }
-        if (res.data.unitId != '' && res.data.unitId != null) {
-          this.unitHasChanged(res.data.unitId)
-        }
-        this.value[0] = res.data.enginType
-        this.value[1] = res.data.enginClassification
-        if (res.data.enginClassification != null && res.data.enginClassification != '') {
-          this.enginClassificationOption = this.dict.type[res.data.enginClassification]
-        }
-        this.enginClassification = zEngineeringNodeBo.type
-        newData.zEngineeringNodeBo = zEngineeringNodeBo
-        this.currentType = 'put'
-        console.log('修改queryparams传值', this.queryParams)
-        console.log(this.queryParams)
-        this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
-        this.open = true
-        this.title = "修改民用工程";
+        debugger
+        that.loading = false;
+        // let newData = res.data
+        // // 手动调用行政区发生改变
+        that.queryParams = res.data
+        let va = that.queryParams.enginClassification
+        that.enginTypeHasChanged(that.queryParams.enginType)
+        that.queryParams.enginClassification = va
+        that.open = true
+        that.title = "修改民用工程";
       })
     },
     /** 提交按钮 */
@@ -1157,6 +1127,7 @@ export default {
             updateEngineeringCivil(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
+              debugger
               this.getList();
             }).finally(() => {
               this.buttonLoading = false;