瀏覽代碼

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

刘浩男 1 年之前
父節點
當前提交
a75d8a8e2f

+ 8 - 7
src/api/zdsz/enginee.js

@@ -197,6 +197,14 @@ export function putEngineeringCivil(data) {
     })
 }
 
+// 历史民用工程
+export function viewEngineeringCivilSource({id,type}) {
+    return request({
+      url: `/zdsz/engineeringCivil/${id}/${type}`,
+      method: 'get',
+    })
+}
+
 // 查询民用工程详情
 export function viewEngineeringCivil(id) {
     return request({
@@ -251,13 +259,6 @@ export function putEngineeringInfrastructure(data) {
 }
 
 // 历史基建工程
-export function viewEngineeringCivilSource({id,type}) {
-    return request({
-      url: `/zdsz/engineeringCivil/${id}/${type}`,
-      method: 'get',
-    })
-}
-// 历史基建工程
 export function viewEngineeringInfrastructureSource({id,type}) {
     return request({
       url: `/zdsz/engineeringInfrastructure/${id}/${type}`,

+ 201 - 38
src/components/ConstructionDetails/index.vue

@@ -43,62 +43,192 @@
             <hr>
             <!--  用料明细 -->
             <div
-              v-for="(i,idx) in e.zEngineeringMaterialBo"
-              :key="idx"
-            >
-
-              <el-input size="mini" v-if="i.brand" style="width: 80%" v-model="i.brand" placeholder="请输入品牌">
-                <template slot="prepend">品牌</template>
-              </el-input>
-              <el-input size="mini" v-if="i.materialQualityName" v-model="i.materialQualityName"
-                        placeholder="请输入品牌">
-                <template slot="prepend">材质</template>
-              </el-input>
-              <el-input size="mini" v-if="i.specificationsName" v-model="i.specificationsName" placeholder="请输入品牌">
-                <template slot="prepend">规格</template>
-              </el-input>
-              <el-input size="mini" v-if="i.number" v-model="i.number" placeholder="请输入品牌">
-                <template slot="prepend">数量</template>
-              </el-input>
-              <el-input v-if="i.visitType" size="mini" v-model="i.visitType" placeholder="请输入品牌">
-                <template slot="prepend">上门类型</template>
-              </el-input>
-              <el-input size="mini" v-if="i.corrosionLevel" v-model="i.corrosionLevel" placeholder="请输入品牌">
-                <template slot="prepend">腐蚀等级</template>
-              </el-input>
-              <el-input size="mini" v-if="i.selfClosingValveType" v-model="i.selfClosingValveType"
-                        placeholder="请输入品牌">
-                <template slot="prepend">自闭阀类型</template>
-              </el-input>
+                v-for="(i,index) in e.zEngineeringMaterialBo"
+                :key="index"
+              >
+                <el-form :model="nodeInfo" class="nodeForm">
+                    <el-form-item
+                      :prop="i.materialQuality"
+                      label-width="50px"
+                      label="材质"
+                      v-show="i.materialQuality != null"
+
+                      >
+                      <!--                  :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
+                      <!--                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
+                      <el-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                          <el-option
+                          v-for="e in materialQualityList"
+                          :key="e.id"
+                          :label="e.name"
+                          :value="e.id"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item
+                      :prop="i.specifications"
+                      label-width="50px"
+                      label="规格"
+                      v-show="i.specifications != null"
+
+                      >
+                      <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                          <el-option
+                          v-for="e in specificationsList"
+                          :key="e.id"
+                          :label="e.name"
+                          :value="e.id"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item
+                      :prop="i.number"
+                      label-width="50px"
+                      label="数量"
+
+                      >
+                      <div class="block" style="display: inline-block; margin-right: 20px;">
+                          <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" maxlength="8" type="number"/>
+                      </div>
+                    </el-form-item>
+
+                    <el-form-item
+                      :prop="i.corrosionLevel"
+                      label="腐蚀等级"
+                      v-show="i.corrosionLevel != null"
+
+                      >
+                      <!--                  :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
+                      <!--                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
+                      <el-select v-model="i.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                          <el-option
+                          v-for="e in corrosionLevelList"
+                          :key="e.dictValue"
+                          :label="e.dictLabel"
+                          :value="e.dictValue"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item
+                      :prop="i.visitType"
+                      label-width="50px"
+                      label="上门类型"
+                      v-show="i.visitType != null"
+
+                      >
+                      <!--                  :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
+                      <!--                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
+                      <el-select v-model="i.visitType" placeholder="请选择上门类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                          <el-option
+                          v-for="e in dict.type.visit_type"
+                          :key="e.value"
+                          :label="e.label"
+                          :value="e.value"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
+                    <el-form-item
+                      :prop="i.selfClosingValveType"
+                      label-width="50px"
+                      label="自闭阀类型"
+                      v-show="i.selfClosingValveType != null"
+
+                      >
+                      <!--                  :rules="{required: true, message: '请输入材质', trigger: 'blur'}"-->
+                      <!--                  <el-input v-model="item.materialQuality" placeholder="请输入材质" style="width: 100%"/>-->
+                      <el-select v-model="i.selfClosingValveType" placeholder="请选择自闭阀类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                          <el-option
+                          v-for="e in dict.type.self_closing_valve_type"
+                          :key="e.value"
+                          :label="e.label"
+                          :value="e.value"
+                          ></el-option>
+                      </el-select>
+                    </el-form-item>
+                </el-form>
+                <!-- <el-input size="mini" v-if="i.brand" style="width: 80%" v-model="i.brand" placeholder="请输入品牌">
+                  <template slot="prepend">品牌</template>
+                </el-input>
+                <el-input v-if="i.visitType" size="mini" v-model="i.visitType" placeholder="请输入品牌">
+                  <template slot="prepend">上门类型</template>
+                </el-input>
+                <el-input size="mini" v-if="i.corrosionLevel" v-model="i.corrosionLevel" placeholder="请输入品牌">
+                  <template slot="prepend">腐蚀等级</template>
+                </el-input>
+                <el-input size="mini" v-if="i.selfClosingValveType" v-model="i.selfClosingValveType"
+                          placeholder="请输入品牌">
+                  <template slot="prepend">自闭阀类型</template>
+                </el-input> -->
             </div>
+            <!-- <el-form-item label="照片" :prop="e.zEngiineeringPhotoBoList" class="obsImage"> -->
+              <ObsImageUpload
+                class="obsImageUpload"
+                ref="obsImageUpload"
+                :limit="9999"
+                :fileType="['png', 'jpg', 'jpeg']"
+                @input="getUrl"
+                :value="e.zEngiineeringPhotoBoList"
+                :disabled="false"
+              ></ObsImageUpload>
+            <!-- </el-form-item> -->
             <hr>
-
-            <ObsImageUpload
-              ref="obsImageUpload"
-              :limit="9999"
-              :fileType="['png', 'jpg', 'jpeg']"
-              disabled
-              :value="e.zEngiineeringPhotoBoList"
-            ></ObsImageUpload>
           </el-collapse-item>
         </el-collapse>
       </el-tab-pane>
       <!--                  <el-button class="check" @click="checkWorking">审核</el-button>-->
+      <button @click="updateNodeOption">修改</button>
     </el-tabs>
   </el-dialog>
 </template>
 
 <script>
+import { 
+    getEnginMaterialQualityList,                    // 材质
+    getEnginSpecificationsList,                     // 规格
+    getDictType,                                    // 腐蚀程度
+
+} from '@/api/zdsz/enginee'
 export default {
   name: 'ConstructionDetails',
-  props: ['currentCollapses'],
+  dicts:[
+      'visit_type',
+      'self_closing_valve_type',
+      
+  ],
+  props: ['currentCollapses','nodeDetailType','enginType'],
   data() {
     return {
       currentDicts: [],              // 当前类型工程节点项
       dialogVisible: false,
       activeNames: '',
+      corrosionLevelList:[],                      // 腐蚀等级option
+      materialQualityList:[],                     // 材质
+      specificationsList:[],                      // 规格
+      materialComponList:[],
+      nodeInfo:{
+          backfillTime:'',                        // 回填时间
+          constructTime:'',
+          constructAccordingDrawings:'',
+          segmentedCompressionQualified:'',
+          zEngiineeringPhotoBoList:[],            // 照片集合
+          zEngineeringMaterialBo:[],              // 用料集合
+          remark:'',
+      },
     }
   },
+  created(){
+      // 获取材质
+      getEnginMaterialQualityList({enginType:this.enginType}).then(res => {
+          console.log('材质',res)
+          this.materialQualityList = res.data
+      })
+      // 获取腐蚀等级
+      getDictType({dictType:'corrosion_level'}).then(res => {
+          console.log('腐蚀等级',res)
+          this.corrosionLevelList = res.data
+      })
+
+  },
   mounted() {
   },
   watch: {
@@ -109,7 +239,13 @@ export default {
       this.activeNames = item1[0].value
       this.$parent.viewNodeSource(item1[0].value)
     },
-    immediate: true // watch侦听操作内的函数会立刻被执行
+    currentCollapses(){
+      console.log(this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality)
+      getEnginSpecificationsList({materId:this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality}).then(res => {
+        console.log('规格',res.data)
+        this.specificationsList = res.data
+      })
+    }
   },
   methods: {
     // 查看单节点历史
@@ -121,6 +257,9 @@ export default {
     checkWorking() {
 
     },
+    updateNodeOption(){
+      console.log('最新面板',this.currentCollapses)
+    },
     // 查看历史
     open(dicts, type = null) {
 
@@ -149,12 +288,36 @@ export default {
       }
 
       this.dialogVisible = true
-    }
+    },
+    // 获取材质规格
+    getEnginSpecificationsList(e,idx){
+        getEnginSpecificationsList({materId:e.materialQuality}).then(res => {
+            console.log('规格',res.data)
+            this.specificationsList = res.data
+        })
+    },
+    getUrl(url,idx) {
+      this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e=>e.url):[];
+    },
   }
 }
 </script>
 
 <style lang="scss" scoped>
+
+::v-deep .nodeForm{
+  .el-form-item__content{
+    display: flex;
+  }
+}
+::v-deep .obsImageUpload{
+  .el-upload--picture-card{
+    display: block !important;
+  }
+}
+::v-deep .obsImageUpload >div{
+  display: flex;
+}
 ::v-deep .el-dialog {
   height: 85%;
 

+ 16 - 6
src/components/EnginNodeInfo/index.vue

@@ -135,10 +135,10 @@
                     <!--                  <el-input v-model="item.specifications" placeholder="请输入规格" style="width: 100%"/>-->
                     <el-select v-model="item.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%">
                         <el-option
-                        v-for="e in specificationsList"
-                        :key="e.id"
-                        :label="e.name"
-                        :value="e.id"
+                        v-for="e in corrosionLevelList"
+                        :key="e.dictValue"
+                        :label="e.dictLabel"
+                        :value="e.dictValue"
                         ></el-option>
                     </el-select>
                     </el-form-item>
@@ -202,6 +202,7 @@
 import { 
     getEnginMaterialQualityList,                    // 材质
     getEnginSpecificationsList,                     // 规格
+    getDictType,                                    // 腐蚀程度
 
 } from '@/api/zdsz/enginee'
 export default {
@@ -216,11 +217,11 @@ export default {
         return {
             constructAccordingDrawingsOption:[
               {
-                value:'1',
+                value:'Y',
                 label:'是'
               },
               {
-                value:'0',
+                value:'N',
                 label:'否'
               }
             ],
@@ -234,6 +235,7 @@ export default {
                 label:'不合格'
               }
             ],
+            corrosionLevelList:[],                      // 腐蚀等级option
             materialQualityList:[],                     // 材质
             specificationsList:[],                      // 规格
             materialComponList:[],
@@ -260,14 +262,22 @@ export default {
     created(){
         // 获取材质
         getEnginMaterialQualityList({enginType:this.enginType}).then(res => {
+            console.log('材质',res)
             this.materialQualityList = res.data
         })
+        // 获取腐蚀等级
+        getDictType({dictType:'corrosion_level'}).then(res => {
+            console.log('腐蚀等级',res)
+            this.corrosionLevelList = res.data
+        })
         console.log('update',this.updateOption)
     },
     mounted(){
         console.log('当前节点name',this.name)
         console.log('update',this.updateOption)
         console.log('当前节点currentContain',this.currentContain)
+        // 至少存在一条物料
+        this.addMaterial()
         this.materialComponList = this.currentContain.find(e => {
             if( e instanceof Array){
                 return e

+ 104 - 52
src/views/zdsz/engineeringCivil/index.vue

@@ -78,7 +78,7 @@
           :disabled="single"
           @click="handleUpdate"
           v-hasPermi="['zdsz:engineeringCivil:edit']"
-        >修改
+        >修改工程信息
         </el-button>
       </el-col>
       <el-col :span="1.5">
@@ -149,7 +149,15 @@
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['zdsz:engineeringCivil:edit']"
-          >修改
+          >修改工程信息
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="addNodeInfo(scope.row)"
+            v-hasPermi="['zdsz:engineeringCivil:edit']"
+          >填写节点信息
           </el-button>
           <el-button
             size="mini"
@@ -187,7 +195,7 @@
             type="text"
             icon="el-icon-edit"
             @click="addMaterial(scope.row)"
-          >新增物
+          >添加用
           </el-button>
         </template>
       </el-table-column>
@@ -348,7 +356,7 @@
           </el-col>
         </el-row>
         <el-row>
-          <el-col :span="24">
+          <el-col :span="24" v-if="title!=='修改民用工程'">
             <el-form-item label="节点">
               <el-checkbox-group v-model="currentCheckList">
                 <el-checkbox
@@ -387,8 +395,13 @@
     <ConstructionDetails
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
+      :type="nodeDetailType"
+      enginType="民用工程"
     />
 
+    <!-- 顶管工程新增 -->
+    <EngineePipe ref="enginPipe"/>
+
   </div>
 </template>
 
@@ -413,12 +426,14 @@ import {getBuildingList} from "@/api/zdsz/building";
 import {getUnits} from "@/api/zdsz/unit";
 import {getDicts} from "@/api/system/dict/data";
 import EnginNodeInfo from "@/components/EnginNodeInfo/index";
+import EngineePipe from '@/components/EngineePipe'
 import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
 
 export default {
   components: {
     ConstructionDetails,
-    EnginNodeInfo
+    EnginNodeInfo,
+    EngineePipe
   },
 
   name: "EngineeringCivil",
@@ -437,11 +452,35 @@ export default {
     "engin_cycle"],
   data() {
     return {
+      nodeDetailType:null,
       currentCollapses: [],
       enginId: undefined,
       updateOption: [],
       listContain: [
         {
+          name:'拆旧管',
+          components:[
+              [
+                'corrosionLevel',                        // 腐蚀等级
+              ],
+              'constructTime',                           // 施工时间
+              'zEngiineeringPhotoBoList',                // 照片
+            ]
+        },
+        {
+          name:'警器切断阀',
+          components:[
+              [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+              ],
+              'constructTime',                           // 施工时间
+              'zEngiineeringPhotoBoList',                // 照片
+              'remark',                                  // 施工内容
+            ]
+        },
+        {
           name: '放线',
           components: [
             [
@@ -786,6 +825,21 @@ export default {
     }
   },
   methods: {
+    addNodeInfo(e){
+      this.nodeDetailType = '修改'
+      this.enginId = e.id
+      let val = e.enginType + "_" + e.enginClassification
+      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(dict)
+      })
+    },
     viewNodeSource(e) {
       viewEngineeringCivilSource({
         id: this.enginId,
@@ -823,12 +877,12 @@ export default {
       this.$refs.enginPipe.openDialog({
         id: data.id,
         type: '民用工程'
-      }, 'add')
+      }, 'add',data)
     },
     // 新增物料
     addMaterial(data) {
       this.title = "添加用料";
-      // this.enginNodeStatus = '修改'
+      this.enginNodeStatus = '添加用料'
       this.loading = true;
       this.reset();
       const id = data.id || this.ids
@@ -912,7 +966,7 @@ export default {
       console.log(this.currentCheckList)
       this.currentCheckList = []
       this.checkList = []
-      this.$refs.nodeForm.resetFields()
+      this.reset()
     },
     closeToSucceed() {
       this.open = false;
@@ -1039,12 +1093,40 @@ export default {
         putEngineeringCivil(this.queryParams).then(res => {
           if (res.code == 200) {
             this.$message({
-              message: '修改成功',
+              message: '添加成功',
               type: 'success'
             });
             this.open = false
             console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
+            this.getList()
+            // this.$emit('closeToSucceed')
+          }
+        })
+      } else if(this.enginNodeStatus == '添加用料'){
+        addEngineeringCivil(this.queryParams).then(res => {
+          if(res.code == 200){
+            this.$message({
+              message: '添加成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合',this.currentCheckList)
+            this.currentCheckList = []
+            this.getList()
+            // this.$emit('closeToSucceed')
+          }
+        })
+      } else if(this.enginNodeStatus == '添加用料'){
+        addEngineeringCivil(this.queryParams).then(res => {
+          if(res.code == 200){
+            this.$message({
+              message: '添加成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合',this.currentCheckList)
+            this.currentCheckList = []
             // this.$emit('closeToSucceed')
           }
         })
@@ -1099,53 +1181,22 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      let that = this
       this.enginNodeStatus = '修改'
       this.loading = true;
-      // this.reset();
+      this.reset();
       const id = row.id || this.ids
       getEngineeringCivil(id).then(res => {
-        this.loading = false;
-        let newData = res.data
-        // 手动调用行政区发生改变
-        // this.districtHasChanged(newData.district)
-        this.queryParams = newData
-        this.updateOption = res.data.zEngineeringNodeBoList
-        console.log(this.queryParams.areaId)
-        // start update修改数据
-        res.data.zEngineeringNodeBoList.forEach((e, idx) => {
-          this.currentCheckList.push(e.type)
-        })
-        console.log('选中节点集合', this.currentCheckList)
-        // end
-        let zEngineeringNodeBo = {
-          type: res.data.zEngineeringNodeBoList[0].type,
-          zEngineeringInfoBo: res.data.zEngineeringNodeBoList[0].zEngineeringInfoBo
-        }
-        if (res.data.areaId != '' && res.data.areaId != null) {
-          this.communityHasChanged(res.data.areaId)
-        }
-        if (res.data.district != '' && res.data.district != null) {
-          this.districtHasChanged(res.data.district)
-        }
-        if (res.data.buildingId != '' && res.data.buildingId != null) {
-          this.buildingHasChanged(res.data.buildingId)
-        }
-        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.enginClassificationOption = this.dict.type[res.data.enginClassification]
-        }
-        this.enginClassification = zEngineeringNodeBo.type
-        newData.zEngineeringNodeBo = zEngineeringNodeBo
-        this.currentType = 'put'
-        console.log('修改queryparams传值', this.queryParams)
-        console.log(this.queryParams)
-        this.zEngineeringInfoBo = newData.zEngineeringNodeBo.zEngineeringInfoBo
-        this.open = true
-        this.title = "修改民用工程";
+        debugger
+        that.loading = false;
+        // let newData = res.data
+        // // 手动调用行政区发生改变
+        that.queryParams = res.data
+        let va = that.queryParams.enginClassification
+        that.enginTypeHasChanged(that.queryParams.enginType)
+        that.queryParams.enginClassification = va
+        that.open = true
+        that.title = "修改民用工程";
       })
     },
     /** 提交按钮 */
@@ -1157,6 +1208,7 @@ export default {
             updateEngineeringCivil(this.form).then(response => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
+              debugger
               this.getList();
             }).finally(() => {
               this.buttonLoading = false;

+ 348 - 53
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -72,7 +72,7 @@
       <el-table-column label="建设单位" align="center" prop="constructUnit" />
       <el-table-column label="开工时间" align="center" prop="startTime" />
       <el-table-column label="备注" align="center" prop="remark" show-overflow-tooltip/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400">
         <template slot-scope="scope">
           <el-button
             type="text"
@@ -100,6 +100,13 @@
             icon="el-icon-edit"
             @click="addNewPipe(scope.row)"
           >新增顶管工程</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="addMaterial(scope.row)"
+          >添加用料
+          </el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -114,7 +121,7 @@
     <!-- 顶管工程新增 -->
     <EngineePipe ref="enginPipe"/>
     <!-- 添加或修改开栓|安检|维修对话框 -->
-    <el-dialog :title="title" :visible.sync="open" append-to-body customClass="appendElDialog">
+    <el-dialog :title="title" ref="nodeForm" :visible.sync="open" append-to-body customClass="appendElDialog" @close="onClose">
       <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
         <el-form-item label="工程名称" prop="enginName">
           <el-input v-model="queryParams.enginName" placeholder="请输入工程名称"></el-input>
@@ -144,7 +151,11 @@
         <el-form-item label="计划工期" prop="plannedDuration">
           <el-input v-model="queryParams.plannedDuration" placeholder="请输入计划工期"></el-input>
         </el-form-item>
-        <el-form-item label="备注" prop="remark">
+        <el-form-item label="文件" prop="">
+          <ObsFileUpload ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.files"
+          ></ObsFileUpload>
+        </el-form-item>
+        <el-form-item label="工程内容" prop="remark">
           <el-input
             v-model="queryParams.remark"
             type="textarea"
@@ -152,10 +163,29 @@
             class="remark_input"
             />
         </el-form-item>
+        <el-form-item label="节点" style="width: 100%;margin-left: 0;">
+          <el-checkbox-group v-model="currentCheckList" @change="console.log(currentCheckList)">
+            <el-checkbox 
+              :label="item.label" 
+              v-for="item in checkList"
+              :key="item.label"
+              ></el-checkbox>
+          </el-checkbox-group>
+        </el-form-item>
+        <EnginNodeInfo 
+          v-for="(e,idx) in currentCheckList"
+          :key="idx"
+          :name="e"
+          :ref="'EnginNodeInfo'+idx"
+          :currentContain="(listContain.find(i => i.name == e)).components"
+          :types="currentCheckList"
+          :status="enginNodeStatus"
+          enginType="基建工程"
+        />
       </el-form>
       <div slot="footer" class="dialog-footer">
         <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">确定</el-button> -->
-        <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">填写节点信息</el-button>
+        <el-button :loading="buttonLoading" type="primary" @click="toNodeDetail">添加</el-button>
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -181,6 +211,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 EnginNodeInfo from "@/components/EnginNodeInfo/index";
 import {
   getEngineeringInfrastructure,              // 查询基建工程列表
   addEngineeringInfrastructure,              // 新增基建工程
@@ -216,7 +247,8 @@ export default {
   components:{
     EngineePipe,
     EngineeNode,
-    ConstructionDetails
+    ConstructionDetails,
+    EnginNodeInfo
   },
   data() {
     var validatePicPass = (rule, value, callback) => {
@@ -231,6 +263,153 @@ export default {
         }
     };
     return {
+      listContain:[
+        {
+          name:'施工进场',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'水电施工',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'瓦工',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'木工',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'防水',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'门窗',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'地板',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'油工',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'设备',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'灯具',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'保洁',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+        {
+          name:'竣工',
+          components:[
+            [
+                'materialQuality',                       // 材质
+                'specifications',                        // 规格
+                'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
+        },
+      ],
+      enginNodeStatus:null,
       currentCollapses:[],
       searchParams:{
         enginName:''
@@ -277,6 +456,7 @@ export default {
         completedTime:null,       // 竣工时间
         plannedDuration:null,     // 计划工期
         remark:null,
+        files:[],
         // zEngineeringNodeBo:{
         //   type:'',
         //   zEngineeringInfoBo:{},    //节点信息
@@ -459,55 +639,76 @@ export default {
           },
       ],
       value: [],
-  options: [
-      {
-    value: 'old_renovation',
-    label: '旧改',
-    children: [
+      options: [
           {
-              value: 'old_renovation_indoor_engin',
-              label: '室内',
+        value: 'old_renovation',
+        label: '旧改',
+        children: [
+              {
+                  value: 'old_renovation_indoor_engin',
+                  label: '室内',
 
-          },
-          {
-              value: 'old_renovation_courtyard',
-              label: '庭院',
-          },
-          {
-              value: 'old_renovation_overhead',
-              label: '架空',
-          }
-      ]
-  },
-  {
-    value: 'new_built',
-    label: '新建',
-    children: [
-          {
-              value: 'new_built_indoor_engin',
-              label: '室内',
+              },
+              {
+                  value: 'old_renovation_courtyard',
+                  label: '庭院',
+              },
+              {
+                  value: 'old_renovation_overhead',
+                  label: '架空',
+              }
+          ]
+      },
+      {
+        value: 'new_built',
+        label: '新建',
+        children: [
+              {
+                  value: 'new_built_indoor_engin',
+                  label: '室内',
 
-          },
-          {
-              value: 'new_built_courtyard',
-              label: '庭院',
-          },
-          {
-              value: 'new_built_overhead',
-              label: '架空',
-          }
-      ]
-  },
-  ],
-  enginClassificationOption:[],          // 工程节点集合
-  currentType:null,
-  nodeList:[]
+              },
+              {
+                  value: 'new_built_courtyard',
+                  label: '庭院',
+              },
+              {
+                  value: 'new_built_overhead',
+                  label: '架空',
+              }
+          ]
+      },
+      ],
+      enginClassificationOption:[],          // 工程节点集合
+      currentType:null,
+      nodeList:[],
+      currentCheckList:[],
+      checkList:[],
     };
   },
   created() {
     this.getList();
   },
+  mounted(){
+    console.log(this.dict.type.engineering_infrastructure)
+    this.checkList = this.dict.type.engineering_infrastructure
+  },
   methods: {
+  // 添加用料
+  addMaterial(data){
+    this.title = "添加用料";
+    this.enginNodeStatus = '添加用料'
+    this.loading = true;
+    this.reset();
+    const id = data.id || this.ids
+    viewEngineeringInfrastructure(id).then(res => {
+      this.loading = false;
+      let newData = res.data
+      this.queryParams = newData
+      this.currentType = 'addMaterial'
+      this.open = true
+    })
+  },
   // 查看历史
   viewSource(e){
     console.log(e)
@@ -528,6 +729,12 @@ export default {
       console.log('折叠面板info',this.currentCollapses)
     })
   },
+  onClose(){
+    console.log(this.currentCheckList)
+    this.currentCheckList = []
+    this.checkList =[]
+    this.$refs.nodeForm.resetFields()
+  },
   closeToSucceed(){
     this.open = false;
     this.getList()
@@ -584,6 +791,45 @@ export default {
       this.nodeDetailVisible = false
     },
     toNodeDetail(){
+      let nodeCollection = []
+      // 收集节点信息
+      this.currentCheckList.forEach((e,idx) => {
+         let nodeItem = this.$refs['EnginNodeInfo'+ idx][0].infoCollection()
+        //  console.log(nodeItem)
+         delete nodeItem.zEngiineeringPhotoBoList
+         nodeCollection.push(nodeItem)
+      })
+      this.queryParams.zEngineeringNodeBoList = nodeCollection
+
+      if(this.enginNodeStatus == '添加用料'){
+        delete this.queryParams.id
+        addEngineeringInfrastructure(this.queryParams).then(res => {
+          if(res.code == 200){
+            this.$message({
+              message: '添加成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合',this.currentCheckList)
+            this.currentCheckList = []
+            // this.$emit('closeToSucceed')
+          }
+        })
+      }else{
+        addEngineeringInfrastructure(this.queryParams).then(res => {
+          if(res.code == 200){
+            this.$message({
+              message: '新增成功',
+              type: 'success'
+            });
+            this.open = false
+            console.log('选中节点集合',this.currentCheckList)
+            this.currentCheckList = []
+            // this.$emit('closeToSucceed')
+          }
+        })
+      }
+      return
       getDictList({enginType:['engineering_infrastructure']}).then(res => {
         this.nodeList = res.data
         if(this.currentType == 'put'){
@@ -687,12 +933,58 @@ export default {
     },
     // 表单重置
     reset() {
-      this.$nextTick(() => {
-        this.$refs['form'].resetFields()
-        this.$refs['nodeForm'].resetFields()
-      })
+      this.form = {
+        id: undefined,
+        district: undefined,
+        areaId: undefined,
+        buildingId: undefined,
+        unitId: undefined,
+        houseId: undefined,
+        enginType: undefined,
+        enginClassification: undefined,
+        enginCycle: undefined,
+        completionStatus: undefined,
+        version: undefined,
+        imgUrl: undefined,
+        remark: undefined,
+        delFlag: undefined,
+        createBy: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateTime: undefined
+      };
+      this.queryParams = {
+        district: undefined,
+        areaId: undefined,
+        buildingId: undefined,
+        unitId: undefined,
+        houseId: undefined,
+        enginType: undefined,
+        enginClassification: undefined,
+        enginCycle: undefined,
+        completionStatus: undefined,
+        imgUrl: undefined,
+        // zEngineeringNodeBo: {
+        //   type: undefined,
+        //   zEngineeringInfoBo: {
+        //     constructAddre: undefined,        // 施工地址
+        //     constructPhone: undefined,        // 施工人电话
+        //     constructUser: undefined,         // 施工人
+        //     headName: undefined,              // 负责人
+        //     headPhone: undefined,             // 负责人电话
+        //     constructAccordingDrawings: undefined, // 是否按图纸施工
+        //     segmentedCompressionQualified: undefined, // 分段打压是否合格
+        //     selfClosingValveType: undefined,          // 自闭阀类型
+        //     visitType: undefined,                     // 上门类型
+        //     backfillTime: undefined,                  // 回填时间
+        //     constructTime: undefined,                  // 施工时间
+        //     zEngiineeringPhotoBoList: undefined,              // 图片列表
+        //     zEngineeringMaterialBo: undefined,// 用料对象,    //节点信息
+        //   }
+        // },
+      }
+      this.enginClassification = null
       this.resetForm("form");
-      this.resetForm("nodeForm");
     },
     /** 搜索按钮操作 */
     handleQuery() {
@@ -714,6 +1006,7 @@ export default {
     handleAdd() {
       this.reset();
       this.open = true;
+      this.enginNodeStatus == '新增'
       this.title = "新增工程";
     },
     /** 修改按钮操作 */
@@ -774,7 +1067,9 @@ height: 80%;
 
 
 .el-dialog__body{
-height: 85%;
+  overflow: hidden;
+  overflow-y: scroll;
+  height: 85%;
 }
 
 .el-form-item{
@@ -790,8 +1085,8 @@ margin-top: 0.5%;
 }
 .remark_input{
 .el-textarea__inner{
-  width: 238%;
-  height: 190px;
+  width: 100%;
+  height: 140px;
 }
 }
 }