Browse Source

202406市政审核

qinhouyu 1 year ago
parent
commit
ef4a9ed731

+ 14 - 20
src/components/ConstructionDetails/indexSZ.vue

@@ -32,9 +32,9 @@
                     <el-checkbox :label="e.id" @change="handleCheckedCitiesChange">
                       <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
                     </el-checkbox>
-                    <h2 style="margin-left: 20%;font-weight: 700;" v-if="e.state=='0'">
+                    <h2 style="margin-left: 20%;font-weight: 700;" v-if="['review','put'].includes(status)">
                       {{ e.state == '0' ? "该施工信息审核未通过" : "" }}</h2>
-                    <h2 style="margin-left: 20%;font-weight: 700; color: #1ab394" v-if="e.state==1">
+                    <h2 style="margin-left: 20%;font-weight: 700; color: #1ab394" v-if="['review','put'].includes(status)">
                       {{ e.state == 1 ? "该施工信息审核通过" : "" }}</h2>
                   </div>
                 </template>
@@ -52,7 +52,7 @@
                   >
                     <div class="block" style="display: inline-block; margin-right: 20px;">
                       <el-input v-model="e.remark" placeholder="请输入施工内容" style="width: 100%" maxlength="100"
-                                type="textarea" :readonly="status == 'read-only'"></el-input>
+                                type="textarea" :readonly="['review','read-only'].includes(status)"></el-input>
                     </div>
                   </el-form-item>
                 </el-form>
@@ -69,7 +69,7 @@
                       label-width="95px"
                     >
                       <el-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%"
-                                 @change="getEnginSpecificationsList(i, index,idx)" :disabled="status == 'read-only' ">
+                                 @change="getEnginSpecificationsList(i, index,idx)" :disabled="['review','read-only'].includes(status)">
                         <el-option
                           v-for="e in materialQualityList"
                           :key="e.id"
@@ -86,7 +86,7 @@
 
                     >
                       <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%"
-                                 :disabled="status == 'read-only' ">
+                                 :disabled="['review','read-only'].includes(status)">
                         <el-option
                           v-for="e in corrosionLevelListAll.filter(o => o.materId == i.materialQuality)"
                           :key="e.id"
@@ -116,7 +116,7 @@
                       <div class="block" style="display: inline-block; margin-right: 20px;">
                         <el-input v-model="i.number" placeholder="请输入米数" style="width: 100%"
                                   oninput="value=value.match(/\d+(\.\d{0,1})?/) ? value.match(/\d+(\.\d{0,1})?/)[0] : ''"
-                                  max="999999999" :disabled="status == 'read-only'"></el-input>
+                                  max="999999999" :disabled="['review','read-only'].includes(status)"></el-input>
                       </div>
                     </el-form-item>
                     <!--                    <el-form-item-->
@@ -142,24 +142,24 @@
                       label-width="95px"
                     >
                       <el-input v-model="i.remark" placeholder="请输入型号" style="width: 100%" maxlength="100"
-                                type="textarea" :readonly="status == 'read-only'"></el-input>
+                                type="textarea" :disabled="['review','read-only'].includes(status)"></el-input>
                     </el-form-item>
                   </el-form>
                 </div>
                 <div style="display: flex;width: 100%;height: 100%;">
                   <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">图片</h3>
                   <ObsImageUpload
-                    :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                    :class=" (status == 'read-only' || status == 'review' )? 'obsImageUploads' : '' "
                     ref="obsImageUpload"
                     :limit="11"
                     :fileType="['png', 'jpg', 'jpeg']"
                     @input="getUrl(arguments,idx)"
                     :value="e.zEngiineeringPhotoBoList"
-                    :disabled="status == 'read-only' "
+                    :disabled="['review','read-only'].includes(status)"
                   ></ObsImageUpload>
                 </div>
                 <div style="display: flex;  justify-content: flex-end; width: 100%;height: 100%;"
-                     v-if="status != 'read-only'">
+                     v-if="status == 'put'">
                   <el-button plain type="danger" @click=" handleDelete(e)"
                              v-hasPermi="['zdsz:engineeringCivilNode:remove']" style="width: 94px;">删除
                   </el-button>
@@ -169,7 +169,7 @@
           </el-checkbox-group>
         </el-tab-pane>
         <el-button class="check" plain type="danger" @click="checkWorking"
-                   v-show="currentStatus == 'check'  && isChecking " style="width: 80px;"
+                   v-if="status == 'review' " style="width: 80px;"
                    :disabled="currentCollapses.length == 0">审核
         </el-button>
         <el-button class="check" plain type="danger" @click="updateNodeOption" style="width: 94px;cursor: pointer;"
@@ -261,13 +261,9 @@ export default {
         }
       ],
       nodesource: '',// 审核状态option
-      materialQualityList_zbf: [],                      // 自闭阀option
-      materialQualityList_zjg: [],                      // 灶具管option
       materialQualityList: [],                     // 材质
       specificationsList: [],                      // 规格
       materialComponList: [],
-      // The data property "enginType" is already declared as a prop.
-      // enginType:null, // Use prop default value instead.
       engineType: null,
       enginClassification: null,
       nodeInfo: {
@@ -438,7 +434,7 @@ export default {
         this.$message.warning("请选择需要审核通过的施工信息")
         return
       }
-      if (this.currentStatus == 'check') {
+      if (this.status == 'review') {
         this.checkingVisible = true
       }
     },
@@ -451,7 +447,6 @@ export default {
       this.$emit('updateNodeOption', intersection)
     },
     deleteById(e) {
-      console.log(e)
       deleteinfoById(e).then(res => {
         this.viewSource(this.nodesource)
       })
@@ -473,10 +468,10 @@ export default {
     /**
      * 查看历史
      * @param dicts 节点集合
-     * @param currentStatus 审核状态
+     * @param currentStatus
      * @param title 标题
      * @param enginType 工程分类
-     * @param status 页面禁用状态
+     * @param status 页面状态
      */
     open(dicts, currentStatus = null, title = null, enginType, status) {
       this.status = status;
@@ -485,7 +480,6 @@ export default {
       }
       this.engineType = enginType
       let data = {enginType: enginType}
-      data.enginStep = Array.isArray(dicts) ? dicts[0].value : null;
       getEnginMaterialQualityList(data).then(res => {
         this.materialQualityList = res.data
       })

+ 11 - 53
src/views/zdsz/engineeringIndustry/index.vue

@@ -83,7 +83,7 @@
               v-for="item in scope.row.nodeReViewStateList"
               placement="top-start"
               trigger="hover"
-              :content="changName(item.Type)">
+              :content="item.Type">
               <span slot="reference" v-if="(item.state == '1'||item.state == '2')"
                     style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
               <span slot="reference" v-if="item.state == '0' "
@@ -387,7 +387,7 @@ import {
   EditEngineeEngineeIndustry,
   getEngineeIndustryList,
   putEngineeEngineeIndustry,
-  QueryEngineeIndustry, QueryEngineeIndustrys, UpdateEngineeIndustry
+  QueryEngineeIndustry, UpdateEngineeIndustry
 } from '@/api/zdsz/engineeringIndustry'
 import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
@@ -554,54 +554,13 @@ export default {
   },
   methods: {
     download(name) {
-      // downloadZipForSZ(this.form.type=='1'?'工业工程':'市政工程',name)
-      this.$download.zip(`/zdsz/engineeringPipeJacking/downloadZip/${this.form.type == '1' ? '工业工程' : '市政工程'}/${name}`, name);
+      this.$download.zip(`/zdsz/engineeringPipeJacking/downloadZip/${'市政工程'}/${name}`, name);
     },
-    changName(val) {
-      if (this.form.type == '1')
-        return val;
-      let obj = this.dictArr.find(o => o.dictValue == val)
-      return obj ? obj.dictLabel : ''
-    },
-    // 节点单项审核
+    // 节点审核
     checkWorking(checkingInfo) {
-      console.log('checkingInfo===', checkingInfo)
-
-      function existsImg(arr) {
-        return arr != null && arr.length > 0;
-      }
-
-      function forInImg(arr, list) {
-        arr.forEach(o => {
-          list.push(o)
-        })
-        return list;
-      }
-
-      if (this.form.type == '2') {
-        checkingInfo.infoIdList.forEach(item => {
-          let listImg = [];
-          if (existsImg(item.welding)) {
-            listImg = forInImg(item.welding, listImg)
-          }
-          if (existsImg(item.aczoiling)) {
-            listImg = forInImg(item.aczoiling, listImg)
-          }
-          if (existsImg(item.piping)) {
-            listImg = forInImg(item.piping, listImg)
-          }
-          if (existsImg(item.warning)) {
-            listImg = forInImg(item.warning, listImg)
-          }
-          if (existsImg(item.backfilling)) {
-            listImg = forInImg(item.backfilling, listImg)
-          }
-          item.zEngiineeringPhotoBoList = listImg;
-          item.nodeName = this.dictArr.find(o => o.dictValue == this.$refs.ConstructionDetails.activeNames).dictLabel;
-        });
-      }
       let params = checkingInfo
       params.createTime = this.createTime
+      console.log('节点审核 checkingInfo===', params)
       insertReview(params).then(res => {
         if (res.code == 200) {
           this.$message({
@@ -776,7 +735,11 @@ export default {
           value: this.nodeList[i].dictValue
         })
       }
-      this.status = 'read-only'
+      if (type) {
+        this.status = 'review'
+      } else {
+        this.status = 'read-only'
+      }
       this.$refs.ConstructionDetails.open(dict, null, null, null, this.status)
     },
     updateviewSource(e) {
@@ -792,22 +755,17 @@ export default {
       this.$refs.ConstructionDetails.open(dict, null, null, null, this.status)
     },
     viewNodeSource(e) {
-      // alert('type='+e)
       if (!e) return
-      console.log('todo: 获取数据', e)
       // todo: 获取数据
-      let httpMethod = this.form.type == '1' ? QueryEngineeIndustrys : QueryEngineeIndustry;
-      httpMethod({
+      QueryEngineeIndustry({
         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 = [];
         }