Quellcode durchsuchen

基建 修改工程 填写节点信息 审核
民用审核

付宇航 vor 1 Jahr
Ursprung
Commit
ace30fdf93

+ 9 - 5
src/api/zdsz/enginee.js

@@ -174,11 +174,6 @@ export function detailEngineeringPipeJacking({id ,type}) {
 }
 
 
-// 查询民用工程列表
-export function getEngineeringCivil() {
-
-}
-
 // 新增民用工程
 export function addEngineeringCivil(data) {
     return request({
@@ -188,6 +183,15 @@ export function addEngineeringCivil(data) {
     })
 }
 
+// 民用单项审核
+export function engineeringCivilReview(data) {
+    return request({
+      url: '/zdsz/engineeringCivil/Review',
+      method: 'post',
+      data
+    })
+}
+
 // 修改民用工程
 export function putEngineeringCivil(data) {
     return request({

+ 129 - 26
src/components/ConstructionDetails/index.vue

@@ -6,7 +6,8 @@
 -->
 
 <template>
-  <el-dialog
+  <div style="width: 100%;height: 100%;">
+    <el-dialog
     :visible.sync="dialogVisible"
     title=""
     width="60%"
@@ -43,7 +44,7 @@
             <hr>
             <!--  用料明细 -->
             <div
-                v-for="(i,index) in e.zEngineeringMaterialBo"
+                v-for="(i,index) in e.zEngineeringMaterialBo || [] "
                 :key="index"
               >
                 <el-form :model="nodeInfo" class="nodeForm">
@@ -52,11 +53,10 @@
                       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-select v-model="i.materialQuality" placeholder="请选择材质" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
                           <el-option
                           v-for="e in materialQualityList"
                           :key="e.id"
@@ -72,7 +72,7 @@
                       v-show="i.specifications != null"
 
                       >
-                      <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)">
+                      <el-select v-model="i.specifications" placeholder="请选择规格" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
                           <el-option
                           v-for="e in specificationsList"
                           :key="e.id"
@@ -82,13 +82,13 @@
                       </el-select>
                     </el-form-item>
                     <el-form-item
-                      :prop="i.number"
+                      :prop="i.number + ''"
                       label-width="50px"
                       label="数量"
-
+                      v-show="i.number != null"
                       >
                       <div class="block" style="display: inline-block; margin-right: 20px;">
-                          <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" maxlength="8" type="number"/>
+                          <el-input v-model="i.number" placeholder="请输入数量" style="width: 100%" type="number" :disabled="status == 'read-only' "/>
                       </div>
                     </el-form-item>
 
@@ -100,7 +100,7 @@
                       >
                       <!--                  :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-select v-model="i.corrosionLevel" placeholder="请选择腐蚀等级" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
                           <el-option
                           v-for="e in corrosionLevelList"
                           :key="e.dictValue"
@@ -118,7 +118,7 @@
                       >
                       <!--                  :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-select v-model="i.visitType" placeholder="请选择上门类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
                           <el-option
                           v-for="e in dict.type.visit_type"
                           :key="e.value"
@@ -136,7 +136,7 @@
                       >
                       <!--                  :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-select v-model="i.selfClosingValveType" placeholder="请选择自闭阀类型" style="width: 100%" @change="getEnginSpecificationsList(item, index)" :disabled="status == 'read-only' ">
                           <el-option
                           v-for="e in dict.type.self_closing_valve_type"
                           :key="e.value"
@@ -162,23 +162,65 @@
             </div>
             <!-- <el-form-item label="照片" :prop="e.zEngiineeringPhotoBoList" class="obsImage"> -->
               <ObsImageUpload
-                class="obsImageUpload"
+                :class=" status == 'read-only' ? '' : obsImageUpload"
                 ref="obsImageUpload"
                 :limit="9999"
                 :fileType="['png', 'jpg', 'jpeg']"
                 @input="getUrl"
                 :value="e.zEngiineeringPhotoBoList"
-                :disabled="false"
+                :disabled="status == 'read-only' "
               ></ObsImageUpload>
             <!-- </el-form-item> -->
             <hr>
           </el-collapse-item>
         </el-collapse>
       </el-tab-pane>
-      <!--                  <el-button class="check" @click="checkWorking">审核</el-button>-->
-      <button @click="updateNodeOption">修改</button>
+      <button class="check" @click="checkWorking" v-if="currentStatus == 'check' && reviewStatus " style="width: 80px;border: none;">审核</button>
+      <button class="check" @click="updateNodeOption" style="width: 94px;border: none;cursor: pointer;" v-if="currentStatus != 'check'">修改</button>
     </el-tabs>
-  </el-dialog>
+    </el-dialog>
+    <!-- 审核 -->
+    <el-dialog
+      title="审核"
+      :visible.sync="checkingVisible"
+      width="30%"
+      class="checkingDialog"
+      :before-close="handleClose">
+      <el-form :model="checkingInfo" ref="checking" class="nodeForm">
+        <el-form-item
+          label-width="70px"
+          label="审核状态"
+          >
+          <el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%" label="审核状态">
+              <el-option
+              v-for="e in reviewStatusList"
+              :key="e.label"
+              :label="e.label"
+              :value="e.value"
+              ></el-option>
+          </el-select>
+        </el-form-item>
+
+        <el-form-item
+          label-width="70px"
+          label="审核内容"
+          >
+          <div class="block" style="display: inline-block; margin-right: 20px;">
+              <el-input 
+                v-model="checkingInfo.reviewContent" 
+                placeholder="请输入审核内容" 
+                type="textarea"
+                style="width: 100%"/>
+          </div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="checkingVisible = false">取 消</el-button>
+        <el-button type="primary" @click=checkingSubmit>确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+  
 </template>
 
 <script>
@@ -195,12 +237,22 @@ export default {
       'self_closing_valve_type',
       
   ],
-  props: ['currentCollapses','nodeDetailType','enginType'],
+  props: ['currentCollapses','nodeDetailType','enginType','status'],
   data() {
     return {
       currentDicts: [],              // 当前类型工程节点项
       dialogVisible: false,
       activeNames: '',
+      reviewStatusList:[
+        {
+          value:'1',
+          label:'通过'
+        },
+        {
+          value:'0',
+          label:'不通过'
+        }
+      ],                                          // 审核状态option
       corrosionLevelList:[],                      // 腐蚀等级option
       materialQualityList:[],                     // 材质
       specificationsList:[],                      // 规格
@@ -214,6 +266,14 @@ export default {
           zEngineeringMaterialBo:[],              // 用料集合
           remark:'',
       },
+      checkingInfo:{
+        reviewStatus:'',               // 审核状态
+        reviewContent:'',              // 审核内容
+        engInfoId:'',                  // 节点Id
+        createTime:'',                 // 工程创建时间
+      },
+      currentStatus:null,
+      checkingVisible:null,
     }
   },
   created(){
@@ -231,6 +291,17 @@ export default {
   },
   mounted() {
   },
+  computed:{
+    reviewStatus(){
+      let flag = null
+      try {
+        flag = currentCollapses[0].zEngineeringReviewBo.reviewStatus != '1' ? true : false
+      } catch (error) {
+        flag = true
+      }
+      return flag
+    }
+  },
   watch: {
     // 此处监听variable变量,当期有变化时执行
     currentDicts(item1, item2) {
@@ -240,14 +311,30 @@ export default {
       this.$parent.viewNodeSource(item1[0].value)
     },
     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
-      })
+      let materialQuality = []
+      try {
+        materialQuality = this.currentCollapses[0].zEngineeringMaterialBo[0].materialQuality
+      } catch (error) {
+        materialQuality = []
+      }
+      if(materialQuality){
+        getEnginSpecificationsList({materId:materialQuality}).then(res => {
+          console.log('规格',res.data)
+          this.specificationsList = res.data
+        })
+      }
     }
   },
   methods: {
+    // 提交审核
+    checkingSubmit(){
+      try {
+        this.checkingInfo.engInfoId = this.currentCollapses[0].id
+      } catch (error) {
+        this.checkingInfo.engInfoId = null
+      }
+      this.$emit('checkWorking',this.checkingInfo)
+    },
     // 查看单节点历史
     viewSource(e) {
       console.log(this.$parent)
@@ -255,14 +342,19 @@ export default {
     },
     // 单项审核
     checkWorking() {
-
+      if(this.currentStatus == 'check'){
+        this.checkingVisible = true
+      }
     },
     updateNodeOption(){
+      console.log(this.activeNames)
       console.log('最新面板',this.currentCollapses)
+      this.$emit('updateNodeOption',this.currentCollapses)
     },
     // 查看历史
-    open(dicts, type = null) {
-
+    open(dicts, type = null,currentStatus = null) {
+      this.currentStatus = currentStatus
+      this.checkingVisible = false
       if (type == '1' || type == '2') {
         // 工业 市政
         this.$parent.viewNodeSource()
@@ -304,7 +396,6 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-
 ::v-deep .nodeForm{
   .el-form-item__content{
     display: flex;
@@ -392,4 +483,16 @@ export default {
     }
   }
 }
+
+::v-deep .checkingDialog{
+ height: 50%;
+ margin-top: 6%;
+ .el-dialog__body{
+  height: 72%;
+ } 
+ .el-textarea__inner{
+  width: 246%;
+  height: 140px;
+ }
+}
 </style>

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

@@ -105,6 +105,18 @@
                     </el-select>
                     </el-form-item>
                 </el-col>
+                <el-col :span="7" v-show="materialComponList.includes('number')">
+                    <el-form-item
+                    :prop="'zEngineeringMaterialBo.' + index + '.number'"
+                    label-width="50px"
+                    label="数量"
+                    >
+                    <!--                  :rules="[{required: true, message: '请输入数量', trigger: 'change'},{validator: [checkPositiveInteger], trigger: 'blur'}]"-->
+                    <div class="block" style="display: inline-block; margin-right: 20px;">
+                        <el-input v-model="item.number" placeholder="请输入数量" style="width: 100%" maxlength="8" type="number"/>
+                    </div>
+                    </el-form-item>
+                </el-col>
                 <el-col :span="7" v-show="materialComponList.includes('brand')">
                     <el-form-item
                     :prop="'zEngineeringMaterialBo.' + index + '.brand'"
@@ -124,10 +136,10 @@
                     </el-select>
                     </el-form-item>
                 </el-col>
-                <el-col :span="7" v-show="materialComponList.includes('corrosionLevel')">
+                <el-col :span="7" v-show="materialComponList.includes('corrosionLevel')" style="display: flex;position: relative;left: -8.7%;">
                     <el-form-item
                     :prop="'zEngineeringMaterialBo.' + index + '.corrosionLevel'"
-                    label-width="50px"
+                    label-width="150px"
                     label="腐蚀等级"
 
                     >
@@ -167,19 +179,7 @@
                         </el-select>
                     </el-form-item>
                 </el-col>
-                <el-col :span="7" v-show="materialComponList.includes('number')">
-                    <el-form-item
-                    :prop="'zEngineeringMaterialBo.' + index + '.number'"
-                    label-width="50px"
-                    label="数量"
-                    >
-                    <!--                  :rules="[{required: true, message: '请输入数量', trigger: 'change'},{validator: [checkPositiveInteger], trigger: 'blur'}]"-->
-                    <div class="block" style="display: inline-block; margin-right: 20px;">
-                        <el-input v-model="item.number" placeholder="请输入数量" style="width: 100%" maxlength="8" type="number"/>
-                    </div>
-                    </el-form-item>
-                </el-col>
-                <el-col :span="3">
+                <el-col :span="3" v-if="enginType != '民用工程'">
                     <el-form-item style="margin-left: -197px;">
                     <el-button v-if="zEngineeringMaterialBo.length > 0" @click="removezEngineeringMaterialBo(index)">
                         删除
@@ -187,7 +187,7 @@
                     </el-form-item>
                 </el-col>
                 </el-row>
-            <div style="width: 25%; float: right">
+            <div style="width: 25%; float: right" v-if="enginType != '民用工程'">
                 <!-- <el-button @click="addzEngineeringMaterialBo('nodeInfo',['materialQuality','specifications','number'])">新增用料信息</el-button> -->
                 <el-button @click="addMaterial()">新增用料信息</el-button>
                 <!-- <el-button :loading="buttonLoading" type="primary" @click="submitForm">提交</el-button>

+ 50 - 7
src/views/zdsz/engineeringCivil/index.vue

@@ -171,7 +171,7 @@
             size="mini"
             type="text"
             icon="el-icon-circle-check"
-            @click="viewSource(scope.row)"
+            @click="viewSource(scope.row,'check')"
             v-hasPermi="['zdsz:engineeringCivil:remove']"
           >审核
           </el-button>
@@ -396,6 +396,9 @@
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
       :type="nodeDetailType"
+      @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
+      :status="status"
       enginType="民用工程"
     />
 
@@ -419,7 +422,7 @@ import {
   putEngineeringCivil,                       // 民用工程修改
   viewEngineeringCivil,                      // 民用工程查看详情
   deleteEngineeringCivil,                    // 删除民用工程
-  getDictList, viewEngineeringInfrastructureSource, viewEngineeringCivilSource
+  getDictList, viewEngineeringInfrastructureSource, viewEngineeringCivilSource,engineeringCivilReview
 } from "@/api/zdsz/enginee"
 import {getAreaList} from "@/api/zdsz/area";
 import {getBuildingList} from "@/api/zdsz/building";
@@ -811,7 +814,10 @@ export default {
       houseOptions: [],            // 房间集合
       enginClassification_list: [], // 室内节点,
       checkList: [],// 节点集合
-      enginNodeStatus: null
+      enginNodeStatus: null,
+      updateParams:{},
+      status:null,
+      createTime:'',               // 工程创建时间
     };
   },
   created() {
@@ -825,9 +831,40 @@ export default {
     }
   },
   methods: {
+    // 节点单项审核
+    checkWorking(checkingInfo){
+      let params = checkingInfo
+      params.createTime = this.createTime
+      engineeringCivilReview(params).then(res => {
+        if(res.code == 200){
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+        }
+      })
+    },
+    // 填写节点信息
+    updateNodeOption(zEngineeringInfoBoList){
+      delete this.updateParams.zEngineeringNodeBoList
+      this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
+      putEngineeringCivil(this.updateParams).then(res => {
+        console.log(res)
+        if(res.code == 200){
+          this.$message({
+            message: '修改成功',
+            type: 'success'
+          });
+          this.$refs.ConstructionDetails.dialogVisible = false
+          this.updateParams = {}
+          
+        }
+      })
+    },
     addNodeInfo(e){
       this.nodeDetailType = '修改'
       this.enginId = e.id
+      this.status = 'put'
       let val = e.enginType + "_" + e.enginClassification
       getDicts(val).then(res => {
         let dict = []
@@ -843,9 +880,12 @@ export default {
     viewNodeSource(e) {
       viewEngineeringCivilSource({
         id: this.enginId,
-        type: e
+        type: e 
       }).then(res => {
+        console.log('______',res)
+        this.createTime = res.data.createTime
         try {
+          this.updateParams = res.data
           this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
         } catch (error) {
           this.currentCollapses = [];
@@ -855,8 +895,7 @@ export default {
       this.$forceUpdate()
     },
     // 查看历史
-    viewSource(e) {
-      console.log(e)
+    viewSource(e,type = null) {
       this.enginId = e.id
       let val = e.enginType + "_" + e.enginClassification
       getDicts(val).then(res => {
@@ -867,7 +906,8 @@ export default {
             "value": res.data[i].dictValue,
           })
         }
-        this.$refs.ConstructionDetails.open(dict)
+        this.$refs.ConstructionDetails.open(dict,_,type)
+        this.status = 'read-only'
       })
     },
 
@@ -1253,9 +1293,12 @@ export default {
 
 ::v-deep .addDialog {
   width: 60%;
+  height: 85%;
 }
 
 ::v-deep .appendElDialog {
+  overflow: hidden;
+  overflow-y: scroll;
   width: 70%;
   height: 80%;
 

+ 122 - 14
src/views/zdsz/engineeringInfrastructure/index.vue

@@ -40,6 +40,7 @@
           v-hasPermi="['zdsz:openbolt:edit']"
         >修改</el-button>
       </el-col>
+        
       <el-col :span="1.5">
         <el-button
           type="danger"
@@ -71,7 +72,7 @@
       <el-table-column label="工程地址" align="center" prop="enginAddre" />
       <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" prop="enginContent" show-overflow-tooltip/>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400">
         <template slot-scope="scope">
           <el-button
@@ -87,6 +88,23 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['zdsz:comprehensive:edit']"
           >修改</el-button>
+            <el-button
+              size="mini"
+              type="text"
+              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"
             type="text"
@@ -97,6 +115,22 @@
           <el-button
             size="mini"
             type="text"
+            icon="el-icon-circle-check"
+            @click="viewSource(scope.row,'check')"
+            v-hasPermi="['zdsz:engineeringCivil:remove']"
+          >审核
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-time"
+            @click="viewSource(scope.row)"
+            v-hasPermi="['zdsz:engineeringCivil:remove']"
+            >历史用料
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
             icon="el-icon-edit"
             @click="addNewPipe(scope.row)"
           >新增顶管工程</el-button>
@@ -152,18 +186,18 @@
           <el-input v-model="queryParams.plannedDuration" placeholder="请输入计划工期"></el-input>
         </el-form-item>
         <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 ref="obsFileUpload" :file-size="100" :file-type="['dwg','dwt','doc','docx','xls','xlsx','png', 'jpg', 'jpeg']" :limit="9999"  :value="queryParams.files" @input="filesUpload"
           ></ObsFileUpload>
         </el-form-item>
-        <el-form-item label="工程内容" prop="remark">
+        <el-form-item label="工程内容" prop="enginContent">
           <el-input
-            v-model="queryParams.remark"
+            v-model="queryParams.enginContent"
             type="textarea"
             placeholder="请输入内容"
             class="remark_input"
             />
         </el-form-item>
-        <el-form-item label="节点" style="width: 100%;margin-left: 0;">
+        <el-form-item label="节点" style="width: 100%;margin-left: 0;" v-if="title!=='修改基建工程'">
           <el-checkbox-group v-model="currentCheckList" @change="console.log(currentCheckList)">
             <el-checkbox 
               :label="item.label" 
@@ -199,6 +233,11 @@
     <ConstructionDetails
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
+      :type="nodeDetailType"
+      :status="status"
+      @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
+      enginType="基建工程"
       />
   </div>
 </template>
@@ -222,7 +261,9 @@ import {
   putEngineeringCivil,                       // 民用工程修改
   viewEngineeringInfrastructure,                      // 基建工程查看详情
   deleteEngineeringInfrastructure,                    // 删除民用工程
-  getDictList
+  getDictList,
+  putEngineeringInfrastructure,
+  engineeringCivilReview
 } from "@/api/zdsz/enginee"
 import EngineePipe from "@/components/EngineePipe"
 import ConstructionDetails from "@/components/ConstructionDetails"
@@ -455,7 +496,7 @@ export default {
         startTime:null,           // 开工时间
         completedTime:null,       // 竣工时间
         plannedDuration:null,     // 计划工期
-        remark:null,
+        enginContent:null,
         files:[],
         // zEngineeringNodeBo:{
         //   type:'',
@@ -553,7 +594,7 @@ export default {
         isQualified: [
           { required: true, message: "安检是否合格不能为空", trigger: "blur" }
         ],
-      //  remark: [
+      //  enginContent: [
       //     { required: false, message: "备注不能为空", trigger: "blur" }
       //   ],
       },
@@ -684,6 +725,12 @@ export default {
       nodeList:[],
       currentCheckList:[],
       checkList:[],
+      nodeDetailType:null,
+      enginId:null,
+      updateParams:{},
+      status:null,
+      createTime:''
+
     };
   },
   created() {
@@ -694,6 +741,28 @@ export default {
     this.checkList = this.dict.type.engineering_infrastructure
   },
   methods: {
+   // 节点单项审核
+   checkWorking(checkingInfo){
+    let params = checkingInfo
+    params.createTime = this.createTime
+    engineeringCivilReview(params).then(res => {
+      if(res.code == 200){
+        this.$message({
+          message: '审核成功',
+          type: 'success'
+        });
+      }
+    })
+  },
+  addNodeInfo(e){
+    this.status = 'put'
+    this.nodeDetailType = '修改'
+    this.currentId = e.id
+    this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure)
+  },
+  filesUpload(){
+
+  },
   // 添加用料
   addMaterial(data){
     this.title = "添加用料";
@@ -710,19 +779,40 @@ export default {
     })
   },
   // 查看历史
-  viewSource(e){
+  viewSource(e,type = null){
     console.log(e)
     this.currentId = e.id
-    this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure)
+    this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure,_,type)
+    this.status = 'read-only'
+  },
+  // 填写节点信息
+  updateNodeOption(zEngineeringInfoBoList){
+    delete this.updateParams.zEngineeringNodeBoList
+    this.updateParams.zEngineeringNodeBo.zEngineeringInfoBoList = zEngineeringInfoBoList
+    putEngineeringInfrastructure(this.updateParams).then(res => {
+      console.log(res)
+      if(res.code == 200){
+        this.$message({
+          message: '修改成功',
+          type: 'success'
+        });
+        this.$refs.ConstructionDetails.dialogVisible = false
+        this.updateParams = {}
+        
+      }
+    })
   },
   viewNodeSource(e){
+    console.log(this.currentId)
     viewEngineeringInfrastructureSource({
       id:this.currentId,
       type:e
     }).then(res => {
+      this.createTime = res.data.createTime
       console.log(res)
       try {
-        this.currentCollapses = res.data.zEngineeringNodeBoList[0].zEngineeringInfoBoList
+        this.updateParams = res.data
+        this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
       } catch (error) {
         this.currentCollapses = [];
       }
@@ -800,8 +890,24 @@ export default {
          nodeCollection.push(nodeItem)
       })
       this.queryParams.zEngineeringNodeBoList = nodeCollection
-
-      if(this.enginNodeStatus == '添加用料'){
+      console.log('queryParams',this.queryParams)
+      if (this.title == '修改基建工程') {
+        let param = this.queryParams
+        delete param.zEngineeringNodeBo
+        putEngineeringInfrastructure(param).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 == '添加用料'){
         delete this.queryParams.id
         addEngineeringInfrastructure(this.queryParams).then(res => {
           if(res.code == 200){
@@ -946,7 +1052,7 @@ export default {
         completionStatus: undefined,
         version: undefined,
         imgUrl: undefined,
-        remark: undefined,
+        enginContent: undefined,
         delFlag: undefined,
         createBy: undefined,
         createTime: undefined,
@@ -964,6 +1070,7 @@ export default {
         enginCycle: undefined,
         completionStatus: undefined,
         imgUrl: undefined,
+        files:[],
         // zEngineeringNodeBo: {
         //   type: undefined,
         //   zEngineeringInfoBo: {
@@ -1011,6 +1118,7 @@ export default {
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
+      this.title = "修改基建工程";
       viewEngineeringInfrastructure(row.id).then(res => {
         console.log(res)
         let newData = res.data