Przeglądaj źródła

民用 基建审核完善

付宇航 1 rok temu
rodzic
commit
4ed3739ced

+ 16 - 14
src/components/ConstructionDetails/index.vue

@@ -196,7 +196,7 @@
           </el-collapse-item>
         </el-collapse>
       </el-tab-pane>
-      <el-button class="check" plain type="danger" @click="checkWorking" v-show="currentStatus == 'check' && reviewStatus && isChecking " style="width: 80px;">审核</el-button>
+      <el-button class="check" plain type="danger" @click="checkWorking" v-show="currentStatus == 'check' && reviewStatus && isChecking " style="width: 80px;" :disabled="currentCollapses.length == 0">审核</el-button>
       <el-button class="check" plain type="danger" @click="updateNodeOption" style="width: 94px;cursor: pointer;" v-if="currentStatus != 'check' && status != 'read-only'  ">修改</el-button>
     </el-tabs>
     </el-dialog>
@@ -296,6 +296,8 @@ export default {
       currentStatus:null,
       checkingVisible:null,
       isChecking:true,
+      currentEnginId:null,
+      reviewStatus:null,
     }
   },
   created(){
@@ -314,15 +316,7 @@ export default {
   mounted() {
   },
   computed:{
-    reviewStatus(){
-      let flag = null
-      try {
-        flag = currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
-      } catch (error) {
-        flag = true
-      }
-      return flag
-    }
+
   },
   watch: {
     // 此处监听variable变量,当期有变化时执行
@@ -345,6 +339,12 @@ export default {
       } catch (error) {
         materialQuality = []
       }
+      try {
+        this.reviewStatus = this.currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
+      } catch (error) {
+        this.reviewStatus = true
+      }
+      console.log(flag)
       if(materialQuality){
         getEnginSpecificationsList({materId:materialQuality}).then(res => {
           console.log('规格',res.data)
@@ -354,12 +354,14 @@ export default {
     }
   },
   methods: {
+    // 保存节点Id
+    setEngineId(e){
+      this.currentEnginId = e
+    },
     // 提交审核
     checkingSubmit(){
-      console.log('nodebo',this.zEngineeringNodeBo)
       try {
-        console.log("this.zEngineeringNodeBo",this.zEngineeringNodeBo)
-        this.checkingInfo.engInfoId = this.zEngineeringNodeBo.id
+        this.checkingInfo.engInfoId = this.currentEnginId
         this.$emit('checkWorking',this.checkingInfo)
       } catch (error) {
         this.checkingInfo.engInfoId = null
@@ -375,7 +377,7 @@ export default {
     },
     // 查看单节点历史
     viewSource(e) {
-      console.log(this.$parent)
+      console.log('节点',e)
       this.$parent.viewNodeSource(e.name)
     },
     // 单项审核

+ 1 - 0
src/views/zdsz/engineeringCivil/index.vue

@@ -1085,6 +1085,7 @@ export default {
         try {
           this.updateParams = res.data
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
         } catch (error) {
           this.currentCollapses = [];
         }

+ 1 - 0
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -791,6 +791,7 @@ export default {
       try {
         this.updateParams = res.data
         this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+        this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
         this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
       } catch (error) {
         this.currentCollapses = [];