Sfoglia il codice sorgente

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

JX.Li 1 anno fa
parent
commit
743fba3fdd

+ 5 - 2
src/api/zdsz/engineeringIndustry.js

@@ -47,9 +47,12 @@ export function DelEngineeEngineeIndustry(id) {
   })
 }
 
-export function QueryEngineeIndustry({id}) {
+export function QueryEngineeIndustry({id, type}) {
+  // alert(`${id}`)
+  // alert(`${type}`)
   return request({
-    url: `/zdsz/engineeringIndustry/${id}/1`,
+    // url: `/zdsz/engineeringIndustry/${id}/1`,
+    url: `/zdsz/engineeringIndustry/${id}/${type}`,
     method: 'get',
   })
 }

+ 89 - 6
src/components/ConstructionDetails/index.vue

@@ -252,8 +252,8 @@
                 </el-input> -->
             </div>
             <!-- <el-form-item label="照片" prop="zEngiineeringPhotoBoList" class="obsImage"> -->
-              <div style="display: flex;width: 100%;height: 100%;" v-if="!(currentDicts.some(item=>item.label==='底腿'))&&!(node==='下沟')&&!(node=='回填')">
-                <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">图片</h3>
+              <div style="display: flex;width: 100%;height: 100%;" v-if="!(currentDicts.some(item=>item.label==='底腿'))&&!(node==='下沟')&&!(node=='回填')&&!(node=='trench_construction')&&!(node=='underditch_construction')">
+                <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">图片{{node}}</h3>
                 <ObsImageUpload
                   :class=" status == 'read-only' ? 'obsImageUploads' : '' "
                   ref="obsImageUpload"
@@ -264,6 +264,66 @@
                   :disabled="status == 'read-only' "
                 ></ObsImageUpload>
               </div>
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='trench_construction'">
+              <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">焊接照片</h3>
+              <ObsImageUpload
+                  :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                  ref="obsImageUpload"
+                  :limit="11"
+                  :fileType="['png', 'jpg', 'jpeg']"
+                  @input="getductalEpitheliumUrl(arguments,idx)"
+                  :value="e.welding"
+                  :disabled="status == 'read-only' "
+              ></ObsImageUpload>
+            </div>
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='trench_construction'">
+              <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">防腐照片</h3>
+              <ObsImageUpload
+                  :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                  ref="obsImageUpload"
+                  :limit="11"
+                  :fileType="['png', 'jpg', 'jpeg']"
+                  @input="getductalEpitheliumUrl(arguments,idx)"
+                  :value="e.aczoiling"
+                  :disabled="status == 'read-only' "
+              ></ObsImageUpload>
+            </div>
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='underditch_construction'">
+              <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">管道下沟</h3>
+              <ObsImageUpload
+                  :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                  ref="obsImageUpload"
+                  :limit="11"
+                  :fileType="['png', 'jpg', 'jpeg']"
+                  @input="getductalEpitheliumUrl(arguments,idx)"
+                  :value="e.piping"
+                  :disabled="status == 'read-only' "
+              ></ObsImageUpload>
+            </div>
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='underditch_construction'">
+              <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">警示铺设</h3>
+              <ObsImageUpload
+                  :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                  ref="obsImageUpload"
+                  :limit="11"
+                  :fileType="['png', 'jpg', 'jpeg']"
+                  @input="getductalEpitheliumUrl(arguments,idx)"
+                  :value="e.warning"
+                  :disabled="status == 'read-only' "
+              ></ObsImageUpload>
+            </div>
+            <div style="display: flex;width: 100%;height: 100%;" v-if="node==='underditch_construction'">
+              <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">回填照片</h3>
+              <ObsImageUpload
+                  :class=" status == 'read-only' ? 'obsImageUploads' : '' "
+                  ref="obsImageUpload"
+                  :limit="11"
+                  :fileType="['png', 'jpg', 'jpeg']"
+                  @input="getductalEpitheliumUrl(arguments,idx)"
+                  :value="e.backfilling"
+                  :disabled="status == 'read-only' "
+              ></ObsImageUpload>
+            </div>
             <div style="display: flex;width: 100%;height: 100%;" v-if="node==='下沟'">
               <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">管上皮深度测量照片</h3>
               <ObsImageUpload
@@ -560,26 +620,32 @@ export default {
       console.log('item1为新值,item2为旧值', item1[0].value)
       this.activeNames = item1[0].value
       this.$parent.viewNodeSource(item1[0].value)
+      // alert(item1[0].value)
     },
     currentCollapses(){
       try {
+        console.log(1)
         this.currentCollapses[0].zEngineeringReviewBo.reviewStatus != 1 ? this.isChecking = true : false
       } catch (error) {
         this.isChecking = true
       }
       console.log('isChecking',this.isChecking)
+      console.log('isChecking',this.isChecking)
       let materialQuality = []
       try {
+        console.log(2)
         materialQuality = this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality
       } catch (error) {
         materialQuality = []
       }
       try {
+        console.log(3)
         this.reviewStatus = this.currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
       } catch (error) {
         this.reviewStatus = true
       }
       if(materialQuality){
+        console.log(4)
         getEnginSpecificationsList({materId:materialQuality}).then(res => {
           console.log('规格',res.data)
           this.specificationsList = res.data
@@ -664,6 +730,7 @@ export default {
     },
     // 查看单节点历史
     viewSource(e) {
+      console.log('节点123',e)
       console.log('节点',e)
       this.node=e.name
       this.nodesource=e
@@ -735,8 +802,11 @@ export default {
      * @param enginType 工程大类名称
      */
     open(dicts, type = null,currentStatus = null,kind = null,title= null,enginClassification,enginSort,enginType) {
+      if(dicts && dicts[0]){
+        this.node = dicts[0].value
+      }
       console.log(1)
-      console.log(dicts)
+      console.log(currentStatus)
       console.log(type)
       console.log(kind)
       console.log(2)
@@ -766,15 +836,28 @@ export default {
       this.titleName = title
       this.checkingVisible = false
       console.log(this.reviewStatus,this.currentStatus,this.isChecking)
-      if (type == '1' || type == '2') {
-        // 工业 市政
-        this.$parent.viewNodeSource()
+
+      if (type == '1') {
+        // 工业
+        // alert('工业='+dicts)
         this.currentDicts = [
           {
             value: "历史数据",
             label: "历史数据"
           }
         ]
+        this.$parent.viewNodeSource()
+      }if (type == '2') {
+        // alert('市政='+dicts)
+        // 市政
+        // this.currentDicts = [
+        //   {
+        //     value: "历史数据",
+        //     label: "历史数据"
+        //   }
+        // ]
+        this.currentDicts = dicts
+        this.$parent.viewNodeSource()
       } else if (type === '危险作业工程') {
         this.$parent.viewNodeSource()
         this.currentDicts = [

+ 11 - 10
src/views/zdsz/enginMaterialQuality/index.vue

@@ -182,7 +182,7 @@
     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
         <el-form-item label="所属工程" prop="enginType">
-          <el-select v-model="form.enginType" placeholder="请选择所属工程" filterable clearable
+          <el-select v-model="form.enginType" placeholder="请选择所属工程" filterable clearable multiple
                      style="width: 100%" @change="form.enginSort = '';form.enginNode = ''">
             <el-option
               v-for="dict in dict.type.engin_type"
@@ -192,7 +192,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="工程类别" prop="enginType" v-if="form.enginType === '民用工程'">
+        <el-form-item label="工程类别" prop="enginType" v-if="form.enginType.includes('民用工程')">
           <el-select v-model="form.enginSort" placeholder="请选择工程类别" filterable clearable
                      style="width: 100%" @change="form.enginNode = ''">
             <el-option
@@ -203,7 +203,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="工程环节" prop="enginType" v-if="form.enginType === '民用工程'">
+        <el-form-item label="工程环节" prop="enginType" v-if="form.enginType.includes('民用工程')">
           <el-select v-model="form.enginNode" placeholder="请选择工程环节" filterable clearable
                      style="width: 100%">
             <el-option
@@ -214,7 +214,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="工程步骤" prop="enginStep" v-if="form.enginType === '民用工程'">
+        <el-form-item label="工程步骤" prop="enginStep" v-if="form.enginType.includes('民用工程')">
           <el-select v-model="form.enginStep" placeholder="请选择工程步骤" filterable clearable
                      style="width: 100%">
             <el-option
@@ -292,7 +292,9 @@ export default {
         name: undefined,
       },
       // 表单参数
-      form: {},
+      form: {
+        enginType:[]
+      },
       // 表单校验
       rules: {
         id: [
@@ -329,7 +331,7 @@ export default {
     reset() {
       this.form = {
         id: undefined,
-        enginType: undefined,
+        enginType: [],
         name: undefined,
         delFlag: undefined,
         createBy: undefined,
@@ -379,7 +381,7 @@ export default {
       getEnginMaterialQuality(id).then(response => {
         this.loading = false;
         this.form = response.data;
-        // this.form.enginType = this.form.enginType.split(",")
+        this.form.enginType = this.form.enginType.split(",")
         this.open = true;
         this.title = "修改工程材质";
       });
@@ -389,9 +391,8 @@ export default {
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.buttonLoading = true;
-          // let eng = this.form.enginType
           if (this.form.id != null) {
-            // this.form.enginType = this.form.enginType.join()
+            this.form.enginType = this.form.enginType.join(",")
             updateEnginMaterialQuality(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
@@ -402,7 +403,7 @@ export default {
               // this.form.enginType = eng
             });
           } else {
-            // this.form.enginType = this.form.enginType.join()
+            this.form.enginType = this.form.enginType.join(",")
             addEnginMaterialQuality(this.form).then(response => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;

+ 38 - 35
src/views/zdsz/engineeringIndustry/index.vue

@@ -193,7 +193,7 @@
           </el-select>
         </el-form-item>
         <el-form-item label="工程分类" prop="enginClassification" v-if="form.type === '1'">
-          <el-select v-model="form.enginClassification" placeholder="请选择工程分类" style="width: 100%">
+          <el-select v-model="form.enginClassification" placeholder="请选择工程分类" multiple style="width: 100%">
             <el-option
               v-for="e in dict.type.engin_classification"
               :key="e.value"
@@ -329,6 +329,7 @@ import {
   putEngineeEngineeIndustry,
   QueryEngineeIndustry, UpdateEngineeIndustry
 } from '@/api/zdsz/engineeringIndustry'
+import {getDicts} from "@/api/system/dict/data";
 import EngineePipe from '@/components/EngineePipe'
 import {validPhoneMobile} from '@/api/rules'
 import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
@@ -407,7 +408,7 @@ export default {
         supervisionUnit: '', // 监理单位
         supervisionHead: '', // 监理负责人
         supervisionPhone: '', // 监理联系电话
-        enginClassification: '', // 工程分类
+        enginClassification: [], // 工程分类
         zEngineeringNodeBo: { // 工程节点
           type: '', // 节点类型
           zEngineeringInfoBo: { // 施工信息
@@ -444,44 +445,18 @@ export default {
       specificationsList: [], // 用料规格List
       // 表单校验
       rules: {
-        sceneHead: [
-          {required: true, message: "现场负责人不能为空", trigger: 'blur'}
-        ],
         enginName: [
           {required: true, message: "工程名称不能为空", trigger: 'blur'}
         ],
         enginClassification: [
           {required: true, message: "工程分类不能为空", trigger: 'blur'}
         ],
-        supervisionUnit: [
-          {required: true, message: "监理单位不能为空", trigger: 'blur'}
-        ],
         enginType: [
           {required: true, message: "工程类型不能为空", trigger: 'blur'}
         ],
-        supervisionPhone: [
-          {required: true, message: "监理联系电话不能为空", trigger: 'blur'},
-          {validator: validPhoneMobile, trigger: 'blur'}
-        ],
         constructUnit: [
           {required: true, message: "建筑单位不能为空", trigger: 'blur'}
         ],
-        projectHead: [
-          {required: true, message: "项目负责人不能为空", trigger: 'blur'}
-        ],
-        designHead: [
-          {required: true, message: "设计负责人不能为空", trigger: 'blur'}
-        ],
-        designUnit: [
-          {required: true, message: "设计单位不能为空", trigger: 'blur'}
-        ],
-        designPhone: [
-          {required: true, message: "联系方式不能为空", trigger: 'blur'},
-          {validator: validPhoneMobile, trigger: 'blur'}
-        ],
-        supervisionHead: [
-          {required: true, message: "监理负责人不能为空", trigger: 'blur'}
-        ],
         type: [
           {required: false, message: "类型不能为空", trigger: "blur"}
         ],
@@ -620,6 +595,9 @@ export default {
         if (this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == '' || this.zEngineeringMaterialBo[this.zEngineeringMaterialBo.length - 1]['number'] == null) {
           valid = false;
         }
+        if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
+          this.form.enginClassification = this.form.enginClassification.join(',');
+        }
         if (valid) {
           this.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
           this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
@@ -692,10 +670,30 @@ export default {
     },
     // 历史查询
     viewSource(e) {
-      console.log(e)
+      console.log('历史查询', e)
       this.currentId = e.id
-      this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
-      this.status = 'read-only'
+      let val = e.enginType + "_" + e.enginClassification
+      val = 'municipal_engineering_node'
+      // alert(val)
+      getDicts(val).then(res => {
+        let dict = []
+        for (let i = 0; i < res.data.length; i++) {
+          dict.push({
+            "label": res.data[i].dictLabel,
+            "value": res.data[i].dictValue,
+          })
+        }
+        // 市政工程功能已完成 工业工程请根据自己需求酌情修改此处代码
+        this.$refs.ConstructionDetails.open(this.form.type==2?dict:[
+          {
+            value: "历史数据",
+            label: "历史数据"
+          }
+        ], this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+        this.status = 'read-only'
+      })
+      // this.$refs.ConstructionDetails.open(_, this.form.type,null,null,null,null,null,this.form.type === '1' ? "工业工程" : "市政工程")
+      // this.status = 'read-only'
     },
     // 历史查询
     updateviewSource(e) {
@@ -704,10 +702,13 @@ export default {
       this.status = 'put'
     },
     viewNodeSource(e) {
-      console.log(e)
+      // alert('type='+e)
+      if(!e)return
+      console.log('todo: 获取数据', e)
       // todo: 获取数据
       QueryEngineeIndustry({
-        id: this.currentId
+        id: this.currentId,
+        type: e
       }).then(res => {
         console.log(res)
         this.form = res.data
@@ -807,7 +808,7 @@ export default {
             this.zEngineeringNodeBo.zEngineeringInfoBo = response.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList[0]
           }
         }
-
+        this.form.enginClassification = this.form.enginClassification.split(",");
 
         this.title = (this.form.type === '1' ? "修改工业工程" : "修改市政工程");
         this.currentType = 'put'
@@ -822,7 +823,9 @@ export default {
         this.form.zEngineeringNodeBo = this.zEngineeringNodeBo
         this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo = this.zEngineeringMaterialBo
       }
-
+      if (this.form.enginClassification != [] && this.form.enginClassification.length>0) {
+        this.form.enginClassification = this.form.enginClassification.join(',');
+      }
       this.$refs["form"].validate(valid => {
         if (valid) {
           this.form.files = this.$refs.obsFileUpload.fileList;

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

@@ -597,6 +597,7 @@ export default {
     },
     // 查看历史
     async viewSource(e,type = null){
+      console.log('查看历史 type=',type)
       const res = await getDicts('pipe_jack');
       const r = res.data!=null?res.data.map(o=>{return {label:o.dictLabel,value:o.dictValue}}):[];
       this.currentId = e.id