Просмотр исходного кода

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

wangtong 1 год назад
Родитель
Сommit
28808add18

+ 15 - 2
src/components/EnginNodeInfo/index.vue

@@ -176,12 +176,12 @@
             </div>
           </el-form-item>
         </el-col>
-        <el-col :span="7" v-show="materialComponList.includes('brand')">
+        <el-col :span="7" v-if="materialComponList.includes('brand')">
           <el-form-item
             :prop="'zEngineeringMaterialBo.' + index + '.brand'"
             label-width="50px"
             label="品牌"
-
+            :rules="{ required: true, message: '请选择品牌', trigger: ['change','blur']} "
           >
             <!--                  :rules="{required: true, message: '请输入规格', trigger: 'blur'}"-->
             <!--                  <el-input v-model="item.specifications" placeholder="请输入规格" style="width: 100%"/>-->
@@ -265,6 +265,7 @@ export default {
 
   ],
   data(){
+    
     return {
       constructAccordingDrawingsOption:[
         {
@@ -314,6 +315,9 @@ export default {
         constructTime: [
           {required: true, message: "请选择施工时间", trigger: "change"}
         ],
+        brand:[
+          {required: true, message: "请选择品牌", trigger: "change"}
+        ]
       }
     }
   },
@@ -363,6 +367,14 @@ export default {
     // this.addMaterial()
   },
   methods:{
+     validatePass (rule, value, callback){
+      console.log(rule, value, callback)
+      if (value.length < 3) {
+        callback(new Error("密码不能小于3位"));
+      } else {
+        callback();
+      }
+    },
     selectBlur(_,index,name) {
       this.zEngineeringMaterialBo[index][name] = [...arguments][0][0].target.value
     },
@@ -403,6 +415,7 @@ export default {
         materialBo[e] = null
       })
       this.zEngineeringMaterialBo.push(materialBo)
+      this.nodeInfo.zEngineeringMaterialBo.push(materialBo)
       // console.log('节点用料参数对象',this.zEngineeringMaterialBo)
     },
     addzEngineeringMaterialBo(option,params){

+ 4 - 11
src/components/ObsImageUpload/indexFile.vue

@@ -125,7 +125,9 @@ export default {
           // 然后将数组转为对象数组
           return list.map(item => {
             if (typeof item == "object") {
-              item = { name: item.fileName, url: item.picUrl };
+              if (item.hasOwnProperty('fileName')&&item.hasOwnProperty('picUrl')) {
+                item = {name: item.fileName, url: item.picUrl};
+              }
             }
             return item;
           });
@@ -142,15 +144,6 @@ export default {
       link.download = file.name ? file.name : '文件'; // 可以指定下载后的文件名
       link.click();
     },
-    // 删除文件
-    handleDelete(index) {
-
-      const obj = this.fileList[index];
-      if (obj != null) {
-        this.fileList.splice(index, 1);
-      }
-      this.$emit("input", this.fileList);
-    },
     // 删除图片
     handleRemove(file, fileList) {
       const findex = this.fileList.map(f => f.url).indexOf(file.url);
@@ -158,7 +151,7 @@ export default {
         this.fileList.splice(findex, 1);
       }
 
-      this.$emit("removeFile", this.fileList);
+      this.$emit("input", this.fileList);
     },
     // 上传成功回调
     handleUploadSuccess(res) {

+ 11 - 11
src/views/zdsz/enginSpecifications/index.vue

@@ -61,17 +61,17 @@
         >删除
         </el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['zdsz:enginSpecifications:export']"
-        >导出
-        </el-button>
-      </el-col>
+<!--      <el-col :span="1.5">-->
+<!--        <el-button-->
+<!--          type="warning"-->
+<!--          plain-->
+<!--          icon="el-icon-download"-->
+<!--          size="mini"-->
+<!--          @click="handleExport"-->
+<!--          v-hasPermi="['zdsz:enginSpecifications:export']"-->
+<!--        >导出-->
+<!--        </el-button>-->
+<!--      </el-col>-->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 

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

@@ -1188,7 +1188,7 @@ export default {
             try {
               status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
             } catch (error) {
-              status = '1'
+              status = '0'
             }
             this.currentCheckingEnginList.push({
               label:e.type,
@@ -1533,6 +1533,7 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.currentCheckingEnginList = []
       this.enginNodeStatus = '新增'
       this.reset();
       this.open = true;

+ 2 - 2
src/views/zdsz/engineeringDangerous/index.vue

@@ -403,14 +403,12 @@
               <ObsFileUpload ref="obsFileUpload" :file-size="100"
                              :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']" :limit="9999"
                              :value="form.pics"
-                             @input="filesUpload"
               ></ObsFileUpload>
             </el-form-item>
             <el-form-item label="附件" prop="files" v-else>
               <ObsFileUpload ref="obsFileUpload" :file-size="100"
                              :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']" :limit="9999"
                              :value="form.files"
-                             @input="filesUpload"
               ></ObsFileUpload>
             </el-form-item>
           </el-col>
@@ -712,6 +710,8 @@ export default {
     },
     // 表单重置
     reset() {
+      this.form.pics = []
+      this.form.files = []
       this.form = {
         id: undefined,
         basicInformation: undefined,

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

@@ -80,11 +80,11 @@
     <el-table v-loading="loading" :data="comprehensiveList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="工程名称" align="center" prop="enginName"/>
-      <el-table-column label="建筑单位" align="center" prop="constructUnit"/>
-      <el-table-column label="项目负责人" align="center" prop="projectHead"/>
+      <el-table-column label="工程类型" align="center" prop="enginType"/>
+      <el-table-column label="工程名称" align="center" prop="enginName"/>
+      <el-table-column label="工程分类" align="center" prop="enginClassification"/>
       <el-table-column label="现场负责人" align="center" prop="sceneHead"/>
       <el-table-column label="设计负责人" align="center" prop="designHead"/>
-      <el-table-column label="设计单位" align="center" prop="designUnit"/>
       <el-table-column label="监理负责人" align="center" prop="supervisionHead"/>
       <el-table-column label="监理单位" align="center" prop="supervisionUnit"/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
@@ -204,7 +204,7 @@
         </el-form-item>
         <el-row :gutter="20">
           <el-col :span="24">
-            <el-form-item label="附件" prop="files" v-if="form.id" style="width: 100%">
+            <el-form-item label="附件" v-if="form.id" style="width: 100%">
               <ObsFileUpload ref="obsFileUpload" :file-size="100"
                              :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
                              :limit="9999"
@@ -212,7 +212,7 @@
                              @input="filesUpload"
               ></ObsFileUpload>
             </el-form-item>
-            <el-form-item label="附件" prop="files" v-else style="width: 100%">
+            <el-form-item label="附件" v-else style="width: 100%">
               <ObsFileUpload ref="obsFileUpload" :file-size="100"
                              :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']"
                              :limit="9999"

+ 40 - 5
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -167,7 +167,7 @@
           <el-input v-model="queryParams.plannedDuration" placeholder="请输入计划工期" maxlength="50" :disabled="title == '添加用料' "></el-input>
         </el-form-item>
         <el-form-item label="文件" prop="files" v-if="queryParams.id">
-          <ObsFileUpload ref="obsFileUpload" :disabled="title != '新增工程'" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']" :limit="9999"  :value="queryParams.pics" @input="filesUpload"
+          <ObsFileUpload ref="obsFileUpload" :disabled="title == '添加用料' " :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg','mp4']" :limit="9999"  :value="queryParams.pics" @input="filesUpload"
           ></ObsFileUpload>
         </el-form-item>
         <el-form-item label="文件" prop="files" v-else>
@@ -188,6 +188,7 @@
         <el-form-item label="环节" prop="currentCheckList" style="width: 100%;margin-left: 0;" v-if="title!=='修改基建工程'">
           <el-checkbox-group v-model="currentCheckList" @change="console.log(currentCheckList)" :rules="{required: true, message: '请输入材质', trigger: 'blur'}">
             <el-checkbox
+              :disabled=enginNodeStatusExecuted(item)
               :rules="{required: true, message: '请输入材质', trigger: 'blur'}"
               :label="item.label"
               v-for="item in checkList"
@@ -555,7 +556,7 @@ export default {
           { required: true, message: "工程内容不能为空", trigger: "blur" }
         ],
         files: [
-          { required: true, message: "至少上传一个文件", trigger: "blur" }
+          { required: false, message: "至少上传一个文件", trigger: "blur" }
         ],
 
       },
@@ -694,6 +695,8 @@ export default {
       zEngineeringNodeBo:{
 
       },
+      currentCheckingEnginList:[],
+      currentEnginName:null
 
     };
   },
@@ -705,6 +708,14 @@ export default {
     this.checkList = this.dict.type.engineering_infrastructure
   },
   methods: {
+    enginNodeStatusExecuted(item){
+      try {
+        let flag  
+        if(this.currentCheckingEnginList.filter(e => e.label == item.label)[0].status == '1') return true
+      } catch (error) {
+        return false
+      }
+    },
    // 节点单项审核
    checkWorking(checkingInfo){
     let params = checkingInfo
@@ -715,6 +726,9 @@ export default {
           message: '审核成功',
           type: 'success'
         });
+        setTimeout(() => {
+          this.viewNodeSource()
+        },1000)
       }
     })
   },
@@ -737,6 +751,24 @@ export default {
     this.reset();
     const id = data.id || this.ids
     viewEngineeringInfrastructure(id).then(res => {
+      this.currentCheckingEnginList = []
+        // 处理当前已审核通过的节点
+      try {
+        res.data.zEngineeringNodeBoList.forEach(e => {
+          let status
+          try {
+            status = e.zEngineeringInfoBoList[0].zEngineeringReviewBo.reviewStatus
+          } catch (error) {
+            status = '0'
+          }
+          this.currentCheckingEnginList.push({
+            label:e.type,
+            status
+          })
+        })
+      } catch (error) {
+        this.currentCheckingEnginList = []
+      }
       this.loading = false;
       let newData = res.data
       this.queryParams = newData
@@ -786,11 +818,13 @@ export default {
       }
     })
   },
-  viewNodeSource(e){
-    console.log(this.currentId)
+  viewNodeSource(e = null){
+    if(e){
+      this.currentEnginName = e
+    }
     viewEngineeringInfrastructureSource({
       id:this.currentId,
-      type:e
+      type:e || this.currentEnginName
     }).then(res => {
       this.createTime = res.data.createTime
       console.log(res)
@@ -1124,6 +1158,7 @@ export default {
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
+      this.currentCheckingEnginList = []
       this.open = true;
       this.enginNodeStatus == '新增'
       this.title = "新增工程";