ソースを参照

Merge remote-tracking branch 'origin/zdsz3.0' into zdsz3.0

# Conflicts:
#	src/views/zdsz/engineeringIndustry/index.vue
JX.Li 1 年間 前
コミット
03d8a8bd70

+ 35 - 3
src/views/zdsz/engineeringAirWall/index.vue

@@ -124,6 +124,14 @@
           >新增顶管工程
           </el-button>
           <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-circle-check"
+              @click="viewSource(scope.row,'check')"
+              v-hasPermi="['zdsz:engineeringIndustry:review']"
+          >审核
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-edit"
             size="mini"
@@ -318,7 +326,9 @@
       ref="ConstructionDetails"
       :status="status"
       :currentCollapses="currentCollapses"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
       @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
       :enginType="enginType"
     />
   </div>
@@ -337,7 +347,7 @@ import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-import {getEnginMaterialQualityList} from '@/api/zdsz/enginee'
+import {getEnginMaterialQualityList , engineeringCivilReview} from '@/api/zdsz/enginee'
 import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 export default {
@@ -361,6 +371,8 @@ export default {
       })
     }
     return {
+      // 审核时间
+      createTime: null,
       // 按钮loading
       buttonLoading: false,
       // 遮罩层
@@ -505,6 +517,23 @@ export default {
     });
   },
   methods: {
+    // 节点单项审核
+    checkWorking(checkingInfo){
+      console.log('checkingInfo===',checkingInfo)
+      let params = checkingInfo
+      params.createTime = this.createTime
+      engineeringCivilReview(params).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.viewNodeSource()
+          },1000)
+        }
+      })
+    },
       parseDict(dictValue, dictionary) {
         const dict = this.dict.type[dictionary]
         for(let i = 0; i < dict.length; i++){
@@ -690,7 +719,7 @@ export default {
       }, 'add', data)
     },
     // 历史查询
-    viewSource(e) {
+    viewSource(e, type = null) {
       console.log('历史查询', e)
       console.log('历史查询e.enginType', e.enginType)
       this.currentId = e.id
@@ -710,7 +739,7 @@ export default {
         this.$refs.ConstructionDetails.open([{
           value: "历史数据",
           label: "历史数据"
-        }], e.enginType,null,e.enginName,null,null,null,e.enginType)
+        }], e.enginType,type,e.enginName,null,null,null,e.enginType)
         // this.$refs.ConstructionDetails.open(dict, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
         this.status = 'read-only'
       })
@@ -750,10 +779,13 @@ export default {
         id: this.currentId,
         type: e
       }).then(res => {
+        this.createTime = res.data.createTime
         console.log("{id, type}",res)
         this.form = res.data
         try {
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
+          // this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
         } catch (error) {
           this.currentCollapses = [];
         }

+ 34 - 20
src/views/zdsz/engineeringIndustry/index.vue

@@ -129,6 +129,14 @@
           >新增顶管工程
           </el-button>
           <el-button
+              size="mini"
+              type="text"
+              icon="el-icon-circle-check"
+              @click="viewSource(scope.row,'check')"
+              v-hasPermi="['zdsz:engineeringIndustry:review']"
+          >审核
+          </el-button>
+          <el-button
             type="text"
             icon="el-icon-edit"
             size="mini"
@@ -323,8 +331,9 @@
       ref="ConstructionDetails"
       :status="status"
       :currentCollapses="currentCollapses"
-      @checkWorking="checkWorking"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
       @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
       :enginType="this.$route.query.type == '1' ? '工业工程' : '市政工程'"
     />
   </div>
@@ -342,7 +351,7 @@ import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-import {getEnginMaterialQualityList, insertReview} from '@/api/zdsz/enginee'
+import {getEnginMaterialQualityList, insertReview, engineeringCivilReview} from '@/api/zdsz/enginee'
 import {getEnginSpecificationsList} from '@/api/zdsz/enginSpecifications'
 
 export default {
@@ -366,6 +375,8 @@ export default {
       })
     }
     return {
+      // 审核时间
+      createTime: null,
       // 按钮loading
       buttonLoading: false,
       // 遮罩层
@@ -506,6 +517,24 @@ export default {
     });
   },
   methods: {
+
+    // 节点单项审核
+    checkWorking(checkingInfo){
+      console.log('checkingInfo===',checkingInfo)
+      let params = checkingInfo
+      params.createTime = this.createTime
+      engineeringCivilReview(params).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          setTimeout(() => {
+            this.viewNodeSource()
+          },1000)
+        }
+      })
+    },
     filesUpload(url){
       console.log('upload successfully')
       this.form.files = url
@@ -683,24 +712,6 @@ export default {
         type: this.form.type
       }, 'add', data)
     },
-    // 节点单项审核
-    checkWorking(checkingInfo) {
-      debugger
-      console.log("// 节点单项审核",checkingInfo);
-      let params = checkingInfo
-      params.createTime = checkingInfo.infoIdList[0].createTime
-      params.engInfoId = this.currentId
-      insertReview(params).then(res => {
-        if (res.code == 200) {
-          this.$message({
-            message: '审核成功',
-            type: 'success'
-          });
-          this.$refs.ConstructionDetails.dialogVisible = false
-          this.getList()
-        }
-      })
-    },
     // 历史查询
     viewSource(e, type = null) {
       console.log('历史查询', e)
@@ -762,10 +773,13 @@ export default {
         id: this.currentId,
         type: e
       }).then(res => {
+        this.createTime = res.data.createTime
         console.log("{id, type}",res)
         this.form = res.data
         try {
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
+          // this.zEngineeringNodeBo=res.data.zEngineeringNodeBo
         } catch (error) {
           this.currentCollapses = [];
         }

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

@@ -718,6 +718,7 @@ export default {
     },
    // 节点单项审核
    checkWorking(checkingInfo){
+     console.log('checkingInfo===',checkingInfo)
     let params = checkingInfo
     params.createTime = this.createTime
     engineeringCivilReview(params).then(res => {
@@ -778,6 +779,8 @@ export default {
   },
   // 查看历史
   viewSource(e,type = null){
+    console.log('历史查询', e)
+    console.log('历史查询e.enginType', e.enginType)
     let params = this.dict.type.engineering_infrastructure
     if(type == 'check'){
       // 审核
@@ -827,7 +830,7 @@ export default {
       type:e || this.currentEnginName
     }).then(res => {
       this.createTime = res.data.createTime
-      console.log(res)
+      console.log('这个值是什么=',res)
       try {
         this.updateParams = res.data
         this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList