Преглед на файлове

Merge branch 'zdsz3.0' of http://192.168.10.18:3000/sunwei/zdsz_vue into zdsz3.0

付宇航 преди 1 година
родител
ревизия
d3039d144b
променени са 5 файла, в които са добавени 336 реда и са изтрити 375 реда
  1. 2 7
      src/api/rules.js
  2. 1 4
      src/api/zdsz/enginee.js
  3. 228 238
      src/views/zdsz/engineeringCivil/index.vue
  4. 79 100
      src/views/zdsz/engineeringIndustry/index.vue
  5. 26 26
      src/views/zdsz/engineeringInfrastructure/index.vue

+ 2 - 7
src/api/rules.js

@@ -11,14 +11,9 @@ export function validPhoneMobile(rule, value, callback){
     } else {
       let regPone;
       let mobile = /^1([3456789])\d{9}$/; //最新16手机正则
-      let tel = /^(0\d{2,3}-){0,1}\d{7,8}$/; //座机
-      if (value.charAt(0) == 0) {    // charAt查找第一个字符方法,用来判断输入的是座机还是手机号
-        regPone = tel;
-      } else {
-        regPone = mobile;
-      }
+      regPone = mobile;
       if (!regPone.test(value)) {
-        callback(new Error("请填写11位手机号或座机号(座机格式为 区号-座机号码)"))
+        callback(new Error("请填写11位手机号"))
       }
       callback();
     }

+ 1 - 4
src/api/zdsz/enginee.js

@@ -159,10 +159,7 @@ export function detailEngineeringPipeJacking({id ,type}) {
 
 // 查询民用工程列表
 export function getEngineeringCivil() {
-    return request({
-        url: `/zdsz/engineeringCivil/list`,
-        method: 'get',
-    })
+
 }
 
 // 新增民用工程

+ 228 - 238
src/views/zdsz/engineeringCivil/index.vue

@@ -154,7 +154,8 @@
             type="text"
             icon="el-icon-edit"
             @click="addNewPipe(scope.row)"
-          >新增顶管工程</el-button>
+          >新增顶管工程
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -168,132 +169,149 @@
     />
     <EngineePipe ref="enginPipe"/>
     <!-- 添加或修改民用工程对话框 -->
-    <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
+    <el-dialog :title="title" :visible.sync="open" width="500" append-to-body>
       <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
-        <el-form-item label="行政区" prop="district">
-          <el-select
-            v-model="queryParams.district"
-            placeholder="请选择行政区"
-            @change="districtHasChanged"
-          >
-            <el-option
-              v-for="e in dict.type.district"
-              :key="e.value"
-              :label="e.label"
-              :value="e.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="小区" prop="areaId">
-          <el-select
-            v-model="queryParams.areaId"
-            placeholder="请选择小区"
-            @change="communityHasChanged"
-          >
-            <el-option
-              v-for="e in communityOptions"
-              :key="e.id"
-              :label="e.name"
-              :value="e.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="楼栋" prop="buildingId">
-          <el-select
-            v-model="queryParams.buildingId"
-            placeholder="请选择楼栋"
-            @change="buildingHasChanged"
-          >
-            <el-option
-              v-for="e in buildingOptions"
-              :key="e.id"
-              :label="e.name"
-              :value="e.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="单元" prop="unitId">
-          <el-select
-            v-model="queryParams.unitId"
-            placeholder="请选择单元"
-            @change="unitHasChanged"
-          >
-            <el-option
-              v-for="e in unitOptions"
-              :key="e.id"
-              :label="e.name"
-              :value="e.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="房间" prop="houseId">
-          <el-select
-            v-model="queryParams.houseId"
-            placeholder="请选择房间"
-          >
-            <el-option
-              v-for="e in houseOptions"
-              :key="e.id"
-              :label="e.name"
-              :value="e.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- <el-form-item label="工程类型" prop="enginType">
-          <el-select
-              v-model="queryParams.enginType"
-              placeholder="请选择工程类型"
-              @change="enginTypeHasChanged"
+
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="行政区" prop="district">
+              <el-select
+                v-model="queryParams.district"
+                placeholder="请选择行政区"
+                @change="districtHasChanged"
+              >
+                <el-option
+                  v-for="e in dict.type.district"
+                  :key="e.value"
+                  :label="e.label"
+                  :value="e.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="小区" prop="areaId">
+              <el-select
+                v-model="queryParams.areaId"
+                placeholder="请选择小区"
+                @change="communityHasChanged"
+              >
+                <el-option
+                  v-for="e in communityOptions"
+                  :key="e.id"
+                  :label="e.name"
+                  :value="e.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="楼栋" prop="buildingId">
+              <el-select
+                v-model="queryParams.buildingId"
+                placeholder="请选择楼栋"
+                @change="buildingHasChanged"
+              >
+                <el-option
+                  v-for="e in buildingOptions"
+                  :key="e.id"
+                  :label="e.name"
+                  :value="e.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="单元" prop="unitId">
+              <el-select
+                v-model="queryParams.unitId"
+                placeholder="请选择单元"
+                @change="unitHasChanged"
+              >
+                <el-option
+                  v-for="e in unitOptions"
+                  :key="e.id"
+                  :label="e.name"
+                  :value="e.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="房间" prop="houseId">
+              <el-select
+                v-model="queryParams.houseId"
+                placeholder="请选择房间"
+              >
+                <el-option
+                  v-for="e in houseOptions"
+                  :key="e.id"
+                  :label="e.name"
+                  :value="e.id"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工程类型" prop="enginType">
+              <el-select
+                v-model="queryParams.enginType"
+                placeholder="请选择工程类型"
+                @change="enginTypeHasChanged"
+              >
+                <el-option
+                  v-for="e in enginTypeOption"
+                  :key="e.value"
+                  :label="e.label"
+                  :value="e.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="12">
+            <el-form-item label="工程分类" prop="currentEnginTypeChange">
+              <el-select
+                v-model="queryParams.currentEnginTypeChange"
+                placeholder="请选择工程分类"
               >
-            <el-option
-              v-for="e in enginTypeOption"
-              :key="e.value"
-              :label="e.label"
-              :value="e.value"
-            ></el-option>
-          </el-select>
-        </el-form-item> -->
-        <!-- <el-form-item label="工程类型">
-          <el-cascader
-            v-model="value"
-            :options="options"
-            @change="currentEnginTypeChange">
-          </el-cascader>
-        </el-form-item>
-        <el-form-item label="工程节点">
-          <el-select
-            v-model="enginClassification"
-            placeholder="请选择工程节点"
-          >
-            <el-option
-              v-for="e in enginClassificationOption"
-              :key="e.value"
-              :label="e.label"
-              :value="e.value"
-            ></el-option>
-          </el-select>
-        </el-form-item> -->
-        <el-form-item label="工程周期" prop="enginCycle">
-          <el-select
-            v-model="queryParams.enginCycle"
-            placeholder="请填写工程周期"
-          >
-            <el-option
-              v-for="e in dict.type.engin_cycle"
-              :key="e.value"
-              :label="e.label"
-              :value="e.value"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <!-- <el-form-item label="备注" prop="remark">
-          <el-input
-            v-model="queryParams.remark"
-            type="textarea"
-            placeholder="请输入内容"
-            class="remark_input"
-            />
-        </el-form-item> -->
+                <el-option
+                  v-for="e in currentEnginTypeChangeOptions"
+                  :key="e.dictValue"
+                  :label="e.dictLabel"
+                  :value="e.dictValue"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工程周期" prop="enginCycle">
+              <el-select
+                v-model="queryParams.enginCycle"
+                placeholder="请填写工程周期"
+                @change="q"
+              >
+                <el-option
+                  v-for="e in dict.type.engin_cycle"
+                  :key="e.value"
+                  :label="e.label"
+                  :value="e.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-tabs type="border-card">
+          <el-tab-pane label="用户管理">用户管理</el-tab-pane>
+          <el-tab-pane label="配置管理">配置管理</el-tab-pane>
+          <el-tab-pane label="角色管理">角色管理</el-tab-pane>
+          <el-tab-pane label="定时任务补偿">定时任务补偿</el-tab-pane>
+        </el-tabs>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
@@ -331,8 +349,10 @@ import {getUnits} from "@/api/zdsz/unit";
 import EngineeNode from '@/components/EngineeNode/index'
 import EngineePipe from "@/components/EngineePipe"
 import {resetForm} from "@/utils/ruoyi";
+import {getDicts} from "@/api/system/dict/data";
+
 export default {
-  components:{
+  components: {
     EngineeNode,
     EngineePipe
   },
@@ -342,60 +362,31 @@ export default {
     'is_repair',
     'engin_type',
     'self_closing_valve_type',
-    'visit_type','district',
+    'visit_type', 'district',
     'new_built_indoor_engin',
     "old_renovation_indoor_engin",
-    "old_renovation_courtyard_engin",
+    "old_renovation_courtyard",
     "old_renovation_overhead",
     "new_built_indoor_engin",
-    "new_built_courtyard_engin",
+    "new_built_courtyard",
     "new_built_overhead",
     "engin_cycle"],
   data() {
     return {
-      enginClassificationinfo:'',
-      enginClassification:'',
-      enginClassificationOption:[],
-      options: [
+      enginClassificationinfo: '',
+      enginClassification: '',
+      enginClassificationOption: [],
+      enginTypeOption: [
         {
           value: 'old_renovation',
-          label: '旧改',
-          children: [
-            {
-              value: 'old_renovation_indoor_engin',
-              label: '室内',
-
-            },
-            {
-              value: 'old_renovation_courtyard_engin',
-              label: '庭院',
-            },
-            {
-              value: 'old_renovation_overhead',
-              label: '架空',
-            }
-          ]
-        },
-        {
+          label: '旧改'
+        }, {
           value: 'new_built',
-          label: '新建',
-          children: [
-            {
-              value: 'new_built_indoor_engin',
-              label: '室内',
-
-            },
-            {
-              value: 'new_built_courtyard_engin',
-              label: '庭院',
-            },
-            {
-              value: 'new_built_overhead',
-              label: '架空',
-            }
-          ]
+          label: '新建'
         },
       ],
+      currentEnginTypeChangeOptions: [],
+
       // 按钮loading
       buttonLoading: false,
       // 遮罩层
@@ -447,7 +438,7 @@ export default {
           }
         }
       },
-      queryParams1:{
+      queryParams1: {
         pageNum: 1,
         pageSize: 10,
         district: undefined,
@@ -461,22 +452,22 @@ export default {
         completionStatus: undefined,
         imgUrl: undefined,
       },
-      zEngineeringInfoBo:{
-        constructAddre:'',        // 施工地址
-        constructPhone:'',        // 施工人电话
-        constructUser:'',         // 施工人
-        headName:'',              // 负责人
-        headPhone:'',             // 负责人电话
-        constructAccordingDrawings:'', // 是否按图纸施工
-        segmentedCompressionQualified:'', // 分段打压是否合格
-        selfClosingValveType:'',          // 自闭阀类型
-        visitType:'',                     // 上门类型
-        backfillTime:'',                  // 回填时间
-        constructTime:'',                  // 施工时间
-        zEngiineeringPhotoBoList:[],              // 图片列表
-        zEngineeringMaterialBo:[],// 用料对象
+      zEngineeringInfoBo: {
+        constructAddre: '',        // 施工地址
+        constructPhone: '',        // 施工人电话
+        constructUser: '',         // 施工人
+        headName: '',              // 负责人
+        headPhone: '',             // 负责人电话
+        constructAccordingDrawings: '', // 是否按图纸施工
+        segmentedCompressionQualified: '', // 分段打压是否合格
+        selfClosingValveType: '',          // 自闭阀类型
+        visitType: '',                     // 上门类型
+        backfillTime: '',                  // 回填时间
+        constructTime: '',                  // 施工时间
+        zEngiineeringPhotoBoList: [],              // 图片列表
+        zEngineeringMaterialBo: [],// 用料对象
       },
-      nodeList:[],
+      nodeList: [],
       // 表单参数
       form: {},
       value: [],
@@ -522,16 +513,15 @@ export default {
       areaList: [],
       buildingList: [],
       unitList: [],
-      currentDistrict:null,       // 当前行政区
-      currentCommunity:null,      // 当前小区
-      currentBuilding:null,       // 当前楼宇
-      currentUnit:null,           // 当前单元
-      communityOptions:[
-      ],
-      buildingOptions:[],         // 楼栋集合
-      unitOptions:[],             // 单元集合
-      houseOptions:[],            // 房间集合
-      enginClassification_list:[]// 室内节点
+      currentDistrict: null,       // 当前行政区
+      currentCommunity: null,      // 当前小区
+      currentBuilding: null,       // 当前楼宇
+      currentUnit: null,           // 当前单元
+      communityOptions: [],
+      buildingOptions: [],         // 楼栋集合
+      unitOptions: [],             // 单元集合
+      houseOptions: [],            // 房间集合
+      enginClassification_list: []// 室内节点
     };
   },
   created() {
@@ -551,12 +541,12 @@ export default {
       const enginDict = val[1]
       const enginType = val[0]
       this.queryParams.enginType = enginType
-      this.enginClassification=enginDict
+      this.enginClassification = enginDict
       this.enginClassificationOption = this.dict.type[enginDict]
       console.log(this.value)
     },
     // 当前所选行政区发生改变 查询当前小区集合
-    districtHasChanged(district){
+    districtHasChanged(district) {
       this.queryParams.areaId = null
       this.queryParams.buildingId = null
       this.queryParams.unitId = null
@@ -565,34 +555,34 @@ export default {
       })
     },
     // 当前所选小区发生改变 查询当前楼栋集合
-    communityHasChanged(areaId){
+    communityHasChanged(areaId) {
       this.queryParams.buildingId = null
       this.queryParams.unitId = null
       getBuildingList({areaId}).then(res => {
         this.buildingOptions = res.data
       })
     },
-    buildingHasChanged(buildingId){
+    buildingHasChanged(buildingId) {
       console.log(buildingId)
       this.queryParams.unitId = null
       getUnitList({buildingId}).then(res => {
         this.unitOptions = res.data
       })
     },
-    unitHasChanged(unitId){
+    unitHasChanged(unitId) {
       getHousesList({unitId}).then(res => {
         console.log(res)
         this.houseOptions = res.data
       })
     },
-    enginTypeHasChanged(val){
-      if(val == 'old_renovation'){
-
-      }else if(val == 'new_built'){
-
-      }
+    enginTypeHasChanged() {
+      this.queryParams.currentEnginTypeChange = undefined
+      this.currentEnginTypeChangeOptions = []
+      getDicts(this.queryParams.enginType).then(res => {
+        this.currentEnginTypeChangeOptions = res.data
+      })
     },
-    closeToSucceed(){
+    closeToSucceed() {
       this.open = false;
     },
     getAreaList(district) {
@@ -646,7 +636,7 @@ export default {
         updateBy: undefined,
         updateTime: undefined
       };
-      this.queryParams= {
+      this.queryParams = {
         district: undefined,
         areaId: undefined,
         buildingId: undefined,
@@ -676,7 +666,7 @@ export default {
         //   }
         // },
       }
-      this.enginClassification=null
+      this.enginClassification = null
       this.resetForm("form");
     },
     /** 搜索按钮操作 */
@@ -704,8 +694,8 @@ export default {
     nodeCancel(){
       this.nodeDetailVisible = false
     },
-    toNodeDetail(){
-      getDictList({enginType:['new_built','old_renovation']}).then(res => {
+    toNodeDetail() {
+      getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
         this.nodeList = res.data
         console.log('跳到详情前的queryParams',this.queryParams)
         console.log('跳到详情前的节点集合',this.nodeList)
@@ -725,7 +715,7 @@ export default {
         this.$refs.childNode.open(this.queryParams,0,this.nodeList)
         return
         this.$refs['form'].validate(e => {
-          if(e){
+          if (e) {
             this.nodeDetailVisible = true
           }
         })
@@ -740,7 +730,7 @@ export default {
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.loading = true;
-     // this.reset();
+      // this.reset();
       const id = row.id || this.ids
       // getEngineeringCivil(id).then(response => {
       //   this.loading = false;
@@ -755,32 +745,27 @@ export default {
         console.log(newData)
         console.log(res.data.zEngineeringNodeBoList[0].type)
         let zEngineeringNodeBo = {
-          type:res.data.zEngineeringNodeBoList[0].type,
-          zEngineeringInfoBo:res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
+          type: res.data.zEngineeringNodeBoList[0].type,
+          zEngineeringInfoBo: res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
         }
-        if (res.data.areaId!=''&&res.data.areaId!=null)
-        {
+        if (res.data.areaId != '' && res.data.areaId != null) {
           this.communityHasChanged(res.data.areaId)
         }
-        if (res.data.district!=''&&res.data.district!=null)
-        {
+        if (res.data.district != '' && res.data.district != null) {
           this.districtHasChanged(res.data.district)
         }
-        if (res.data.buildingId!=''&&res.data.buildingId!=null)
-        {
+        if (res.data.buildingId != '' && res.data.buildingId != null) {
           this.buildingHasChanged(res.data.buildingId)
         }
-        if (res.data.unitId!=''&&res.data.unitId!=null)
-        {
+        if (res.data.unitId != '' && res.data.unitId != null) {
           this.unitHasChanged(res.data.unitId)
         }
-        this.value[0]=res.data.enginType
-        this.value[1]=res.data.enginClassification
-        if (res.data.enginClassification!=null&&res.data.enginClassification!='')
-        {
+        this.value[0] = res.data.enginType
+        this.value[1] = res.data.enginClassification
+        if (res.data.enginClassification != null && res.data.enginClassification != '') {
           this.enginClassificationOption = this.dict.type[res.data.enginClassification]
         }
-        this.enginClassification=zEngineeringNodeBo.type
+        this.enginClassification = zEngineeringNodeBo.type
         newData.zEngineeringNodeBo = zEngineeringNodeBo
         this.currentType = 'put'
         this.queryParams = newData
@@ -841,52 +826,57 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
-::v-deep .appendElDialog{
+::v-deep .appendElDialog {
   width: 70%;
   height: 80%;
 
 
-  .el-dialog__body{
+  .el-dialog__body {
     height: 85%;
   }
 
-  .el-form-item{
+  .el-form-item {
     margin-bottom: 22px;
     width: 44%;
     display: inline-block;
   }
-  .el-form-item:nth-child(2n+2){
+
+  .el-form-item:nth-child(2n+2) {
     margin-left: 5%;
   }
-  .el-form-item:not(:nth-child(1):nth-child(2)){
+
+  .el-form-item:not(:nth-child(1):nth-child(2)) {
     margin-top: 0.5%;
   }
-  .remark_input{
-    .el-textarea__inner{
+
+  .remark_input {
+    .el-textarea__inner {
       width: 238%;
       height: 190px;
     }
   }
 }
 
-::v-deep .appendElNodeDialog{
+::v-deep .appendElNodeDialog {
   // width: 70%;
   height: 80%;
 
 
-  .el-dialog__body{
+  .el-dialog__body {
     height: 85%;
   }
 
-  .el-form-item{
+  .el-form-item {
     margin-bottom: 22px;
     width: 44%;
     display: inline-block;
   }
-  .el-form-item:nth-child(2n+2){
+
+  .el-form-item:nth-child(2n+2) {
     margin-left: 5%;
   }
-  .el-form-item:not(:nth-child(1):nth-child(2)){
+
+  .el-form-item:not(:nth-child(1):nth-child(2)) {
     margin-top: 0.5%;
   }
 }

+ 79 - 100
src/views/zdsz/engineeringIndustry/index.vue

@@ -142,7 +142,7 @@
           <el-input v-model="form.designHead" placeholder="请填写现场负责人" maxlength="20"></el-input>
         </el-form-item>
         <el-form-item label="设计联系方式" prop="designPhone">
-          <el-input v-model="form.designPhone" placeholder="请填写联系方式" maxlength="13"></el-input>
+          <el-input v-model="form.designPhone" placeholder="请填写设计联系方式" maxlength="11"></el-input>
         </el-form-item>
         <el-form-item label="监理单位" prop="supervisionUnit">
           <el-input v-model="form.supervisionUnit" placeholder="请填写监理单位" maxlength="50"/>
@@ -151,7 +151,7 @@
           <el-input v-model="form.supervisionHead" placeholder="请填写监理负责人" maxlength="20"></el-input>
         </el-form-item>
         <el-form-item label="监理联系电话" prop="supervisionPhone">
-          <el-input v-model="form.supervisionPhone" placeholder="请填写联系方式" maxlength="13"></el-input>
+          <el-input v-model="form.supervisionPhone" placeholder="请填写监理联系电话" maxlength="11"></el-input>
         </el-form-item>
         <el-form-item label="工程类型" prop="enginType">
           <el-select v-model="form.enginType" placeholder="请选择工程类型" style="width: 100%">
@@ -175,43 +175,24 @@
         </el-form-item>
         <el-row :gutter="20">
           <el-col :span="24">
-            <el-form-item label="文件" prop="" v-if="currentType==='put'">
+            <el-form-item label="文件" prop="" v-if="currentType==='put'" style="width: 100%">
               <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="form.pics"
               ></ObsFileUpload>
             </el-form-item>
-            <el-form-item label="文件" prop="" v-if="currentType==='add'">
+            <el-form-item label="文件" prop="" v-if="currentType==='add'" style="width: 100%">
               <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="form.files"
               ></ObsFileUpload>
             </el-form-item>
           </el-col>
         </el-row>
-<!--        <el-row>-->
-<!--          <el-form-item label="附件" prop="zEngineeringAttachmentsList" style="width: 100%;">-->
-<!--            <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :value="zEngineeringAttachmentsList"-->
-<!--                            @input="getUrl"></ObsImageUpload>-->
-<!--          </el-form-item>-->
-<!--        </el-row>-->
-
-<!--        <el-row>-->
-<!--          <el-form-item label="备注" prop="remark">-->
-<!--            <el-input-->
-<!--              v-model="form.remark"-->
-<!--              type="textarea"-->
-<!--              placeholder="请输入内容"-->
-<!--              class="remark_input"-->
-<!--              maxlength="200"-->
-<!--              show-word-limit-->
-<!--            />-->
-<!--          </el-form-item>-->
-<!--        </el-row>-->
+        <div style="width: 20%; float: right">
+          <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写施工信息</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </div>
       </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写施工信息</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
     </el-dialog>
     <!-- 施工信息dialog -->
-        <el-dialog :visible.sync="nodeDetailVisible" title="施工信息" append-to-body customClass="appendElNodeDialog" width="70% !important">
+    <el-dialog :visible.sync="nodeDetailVisible" title="施工信息" append-to-body customClass="appendElNodeDialog" width="70% !important">
           <!-- 节点表单 -->
           <el-form ref="nodeForm" :model="form.zEngineeringNodeBo.zEngineeringInfoBo" :rules="nodeRules" label-width="200px">
             <el-form-item label="施工时间" prop="constructTime">
@@ -226,68 +207,52 @@
             <el-form-item label="施工人" prop="constructUser" v-if="form.id">
               <el-input v-model="form.zEngineeringNodeBo.zEngineeringInfoBo.constructUser" placeholder="请填写施工人" maxlength="20" disabled></el-input>
             </el-form-item>
-<!--            <el-button icon="el-icon-plus" size="small" type="primary" @click="addzEngineeringMaterialBo()">添加用料</el-button>-->
-<!--            <el-row :gutter="10">-->
-<!--              <div v-for="(item, index) in form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo" :key="index" style="width: 100px;height: 100px;background-color: #0BB0DE">-->
-<!--                <el-col :span="7">-->
-<!--                  <div style="width: 100px;height: 100px;background-color: #0BB0DE">-->
-<!--                    <el-form-item-->
-<!--                      :prop="'zEngineeringInfoBo.zEngineeringMaterialBo.' + index + '.materialQuality'"-->
-<!--                      label="材质" + index-->
-<!--                      :rules="{required: true, message: '材质不能为空', trigger: 'blur'}">-->
-<!--                      <el-input v-model="item.materialQuality" placeholder="请填写材质" maxlength="20"/>-->
-<!--                    </el-form-item>-->
-<!--                  </div>-->
-<!--                </el-col>-->
-<!--                <el-col :span="7">-->
-<!--                  <div style="width: 100px;height: 100px;background-color: #0BB0DE">-->
-<!--                    <el-form-item-->
-<!--                      :prop="'zEngineeringInfoBo.zEngineeringMaterialBo.' + index + '.specifications'"-->
-<!--                      label="规格" + index-->
-<!--                      :rules="{required: true, message: '规格不能为空', trigger: 'blur'}">-->
-<!--                      <el-input v-model="item.specifications" placeholder="请填写材质" maxlength="20"/>-->
-<!--                    </el-form-item>-->
-<!--                  </div>-->
-<!--                </el-col>-->
-<!--                <el-col :span="7">-->
-<!--                  <div style="width: 100px;height: 100px;background-color: #0BB0DE">-->
-<!--                    <el-form-item-->
-<!--                      :prop="'zEngineeringInfoBo.zEngineeringMaterialBo.' + index + '.number'"-->
-<!--                      label="数量" + index-->
-<!--                      :rules="{required: true, message: '数量不能为空', trigger: 'blur'}">-->
-<!--                      <el-input v-model="item.number" placeholder="请填写数量" maxlength="8"/>-->
-<!--                    </el-form-item>-->
-<!--                  </div>-->
-<!--                </el-col>-->
-<!--                <el-col :span="3">-->
-<!--                  <div style="width: 100px;height: 100px;background-color: #0BB0DE">-->
-<!--                    <el-form-item>-->
-<!--                      <el-button type="danger" icon="el-icon-delete" @click.prevent="removezEngineeringMaterialBo(item,index)"/>-->
-<!--                    </el-form-item>-->
-<!--                  </div>-->
-<!--                </el-col>-->
-<!--              </div>-->
-<!--            </el-row>-->
             <el-row>
               <el-form-item label="照片" prop="zEngiineeringPhotoBoList" style="width: 100%;">
                 <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']" :value="form.zEngineeringNodeBo.zEngineeringInfoBo.zEngiineeringPhotoBoList"
                                 @input="getUrl"></ObsImageUpload>
               </el-form-item>
             </el-row>
-            <!-- 节点复选框 -->
-<!--            <el-checkbox-group v-model="currentNode" @change="currentNodeHasChanged">-->
-<!--              <el-checkbox-->
-<!--                :label="e"-->
-<!--                v-for="e in nodeList"-->
-<!--                :key="e"-->
-<!--              ></el-checkbox>-->
-<!--            </el-checkbox-group>-->
-<!--            <div style="display: flex;margin-top: 3%;">-->
-              <div style="width: 20%; float: right">
-                <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
-                <el-button @click="nodeCancel">取 消</el-button>
-              </div>
-<!--            </div>-->
+            <el-row v-for="(item, index) in form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo" :key="index">
+              <el-col :span="7">
+                <el-form-item
+                  :prop="'zEngineeringMaterialBo.' + index + '.materialQuality'"
+                  label-width="50px"
+                  label="材质"  :rules="{required: true, message: '请输入材质', trigger: 'blur'}">
+                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="7">
+                <el-form-item
+                  :prop="'zEngineeringMaterialBo.' + index + '.specifications'"
+                  label-width="50px"
+                  label="规格"  :rules="{required: true, message: '请输入规格', trigger: 'blur'}">
+                  <el-input v-model="item.specifications" placeholder="请输入规格" style="width: 100%"/>
+                </el-form-item>
+              </el-col>
+              <el-col :span="7">
+                <el-form-item
+                  :prop="'zEngineeringMaterialBo.' + index + '.number'"
+                  label-width="50px"
+                  label="数量"  :rules="{required: true, message: '请输入数量', trigger: 'change'}">
+                  <div class="block" style="display: inline-block; margin-right: 20px;">
+                    <el-input v-model="item.number" placeholder="请输入数量" style="width: 100%"/>
+                  </div>
+                </el-form-item>
+              </el-col>
+              <el-col :span="3">
+                <el-form-item style="margin-left: -120px;">
+                  <el-button v-if="form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.length > 1" @click="removezEngineeringMaterialBo(index)">
+                    删除
+                  </el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+            <div style="width: 25%; float: right">
+              <el-button @click="addzEngineeringMaterialBo">新增用料信息</el-button>
+              <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>
+              <el-button @click="nodeCancel">取 消</el-button>
+            </div>
           </el-form>
         </el-dialog>
     <ConstructionDetails
@@ -308,6 +273,8 @@ import {
 import EngineePipe from '@/components/EngineePipe'
 import { validPhoneMobile } from '@/api/rules'
 import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
+import { getEnginMaterialQualityList } from '@/api/zdsz/enginee'
+import { getEnginSpecificationsList } from '@/api/zdsz/enginSpecifications'
 
 export default {
   name: "openrepair",
@@ -481,10 +448,7 @@ export default {
       // 节点规则校验
       nodeRules: {
         // constructTime: [
-        //   {required: true, message: "施工时间不能为空", trigger: 'blur'}
-        // ],
-        // constructAddre: [
-        //   {required: true, message: "施工地址不能为空", trigger: 'blur'}
+        //   {required: true, message: "施工时间不能为空", trigger: ['blur','change']}
         // ],
         zEngiineeringPhotoBoList: [
           {required: true, message: "图片不能为空", trigger: 'change', validator: validatePicPass}
@@ -495,24 +459,31 @@ export default {
     };
   },
   created() {
-    this.getList();
     // 根据url获取type节点类型
     this.getType();
     if (this.form.type === '2') {
       this.engineeType = false
     }
+    this.getList();
+  },
+  mounted() {
+    // 手动渲染
+    setInterval(() =>{
+      this.$forceUpdate()
+    },500)
   },
   methods: {
-    // addzEngineeringMaterialBo(){
-    //   this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
-    //     materialQuality: '', // 用料材质
-    //     specifications: '', // 用料规格
-    //     number: '' // 用料数量
-    //   })
-    // },
-    // removezEngineeringMaterialBo(item, index){
-    //   this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.splice(index, 1)
-    // },
+    addzEngineeringMaterialBo(){
+      console.log(this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo)
+      this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.push({
+        materialQuality: '', // 用料材质
+        specifications: '', // 用料规格
+        number: '' // 用料数量
+      })
+    },
+    removezEngineeringMaterialBo(index){
+      this.form.zEngineeringNodeBo.zEngineeringInfoBo.zEngineeringMaterialBo.splice(index, 1)
+    },
     // 根据url获取type节点类型
     getType() {
       const queryString = window.location.search;
@@ -522,7 +493,6 @@ export default {
         this.form.type = type;
         this.form.zEngineeringNodeBo.type = (type === '1' ? "工业工程" : "市政工程")
       }
-
     },
     // 新增顶管工程
     addNewPipe(data) {
@@ -567,6 +537,15 @@ export default {
     /** 查询市政工程|工业工程列表 */
     getList() {
       this.loading = true;
+      let enginType = this.form.zEngineeringNodeBo.type;
+      // 获取材质 市政工程 1 - 工业工程 2
+      getEnginMaterialQualityList({enginType}).then(res => {
+        console.log(res);
+      });
+      // 获取材质规格
+      getEnginSpecificationsList('材质ID').then(res => {
+        console.log(res)
+      })
       getEngineeIndustryList({
         type: this.form.type
       }).then(res => {

+ 26 - 26
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -1,9 +1,9 @@
 
- <!-- 
+ <!--
  *@description: 基建工程
  *@author: yh Fu
  *@date: 2024-01-04 13:05:28
- *@version: V1.0.5 
+ *@version: V1.0.5
 -->
 
 <template>
@@ -143,11 +143,11 @@
         </el-form-item>
         <el-form-item label="计划工期" prop="plannedDuration">
           <el-input v-model="queryParams.plannedDuration" placeholder="请输入计划工期"></el-input>
-        </el-form-item>     
+        </el-form-item>
         <el-form-item label="备注" prop="remark">
-          <el-input 
-            v-model="queryParams.remark" 
-            type="textarea" 
+          <el-input
+            v-model="queryParams.remark"
+            type="textarea"
             placeholder="请输入内容"
             class="remark_input"
             />
@@ -160,13 +160,13 @@
       </div>
     </el-dialog>
     <!-- 节点信息dialog -->
-    <enginee-node 
+    <enginee-node
       ref="childNode"
       @closeToSucceed="closeToSucceed"
       />
 
     <!-- 查看历史 -->
-    <ConstructionDetails 
+    <ConstructionDetails
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
       />
@@ -181,7 +181,7 @@ import {getUnits} from "@/api/zdsz/unit";
 import {getAreas} from "@/api/zdsz/area";
 import {getHouses, listHouse} from "@/api/zdsz/house";
 import EngineeNode from '@/components/EngineeNode/index'
-import { 
+import {
   getEngineeringInfrastructure,              // 查询基建工程列表
   addEngineeringInfrastructure,              // 新增基建工程
   getAreaList,                               // 获取当前小区集合
@@ -194,7 +194,7 @@ import {
   getDictList
 } from "@/api/zdsz/enginee"
 import EngineePipe from "@/components/EngineePipe"
-import ConstructionDetails from "@/components/ConstructionDetails" 
+import ConstructionDetails from "@/components/ConstructionDetails"
 
 export default {
   name: "openrepair",
@@ -205,10 +205,10 @@ export default {
          'visit_type','district',
          'new_built_indoor_engin',
          "old_renovation_indoor_engin",
-         "old_renovation_courtyard_engin",
+         "old_renovation_courtyard",
          "old_renovation_overhead",
          "new_built_indoor_engin",
-         "new_built_courtyard_engin",
+         "new_built_courtyard",
          "new_built_overhead",
          "engin_cycle",
          "engineering_infrastructure",
@@ -307,7 +307,7 @@ export default {
           value:'0',
           label:'否'
         }
-      ],                          
+      ],
       segmentedCompressionQualifiedOption:[
         {
           value:'1',
@@ -317,7 +317,7 @@ export default {
           value:'0',
           label:'否'
         }
-      ],                          
+      ],
       nodeDetailVisible:false,
       // 表单参数
       form: {},
@@ -375,7 +375,7 @@ export default {
         ],
       //  remark: [
       //     { required: false, message: "备注不能为空", trigger: "blur" }
-      //   ], 
+      //   ],
       },
       // 节点规则校验
       nodeRules:{
@@ -467,10 +467,10 @@ export default {
           {
               value: 'old_renovation_indoor_engin',
               label: '室内',
-          
-          }, 
+
+          },
           {
-              value: 'old_renovation_courtyard_engin',
+              value: 'old_renovation_courtyard',
               label: '庭院',
           },
           {
@@ -478,7 +478,7 @@ export default {
               label: '架空',
           }
       ]
-  }, 
+  },
   {
     value: 'new_built',
     label: '新建',
@@ -486,10 +486,10 @@ export default {
           {
               value: 'new_built_indoor_engin',
               label: '室内',
-          
-          }, 
+
+          },
           {
-              value: 'new_built_courtyard_engin',
+              value: 'new_built_courtyard',
               label: '庭院',
           },
           {
@@ -497,7 +497,7 @@ export default {
               label: '架空',
           }
       ]
-  }, 
+  },
   ],
   enginClassificationOption:[],          // 工程节点集合
   currentType:null,
@@ -534,7 +534,7 @@ export default {
   },
   currentEnginTypeChange(val){
       const enginDict = val[1]
-      const enginType = val[0]    
+      const enginType = val[0]
       this.queryParams.enginType = enginType
       this.enginClassificationOption = this.dict.type[enginDict]
   },
@@ -569,7 +569,7 @@ export default {
   },
   enginTypeHasChanged(val){
       if(val == 'old_renovation'){
-          
+
       }else if(val == 'new_built'){
 
       }
@@ -583,7 +583,7 @@ export default {
     nodeCancel(){
       this.nodeDetailVisible = false
     },
-    toNodeDetail(){   
+    toNodeDetail(){
       getDictList({enginType:['engineering_infrastructure']}).then(res => {
         this.nodeList = res.data
         if(this.currentType == 'put'){