Jelajahi Sumber

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

付宇航 1 tahun lalu
induk
melakukan
0e0c36db2b

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

@@ -71,7 +71,7 @@ export function getEnginMaterialQualityList({enginType}) {
 export function getEnginSpecificationsList(params) {
     return request({
         url: `/zdsz/enginSpecifications/getEnginSpecificationsList`,
-        method: 'get', 
+        method: 'get',
         params
     })
 }
@@ -259,6 +259,13 @@ 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}`,

+ 211 - 169
src/components/ConstructionDetails/index.vue

@@ -1,190 +1,232 @@
-
- <!--
-    *@description: 工程历史详情
-    *@author: yh Fu
-    *@date: 2024-1-8 10:04:23
-    *@version: V1.0.5
+<!--
+   *@description: 工程历史详情
+   *@author: yh Fu
+   *@date: 2024-1-8 10:04:23
+   *@version: V1.0.5
 -->
 
 <template>
-    <el-dialog
-        :visible.sync="dialogVisible"
-        title=""
-        width="60%"
-        append-to-body
-        custom-class="ConstructionDetailsDialog">
-        <el-tabs v-model="activeName" type="card" @tab-click="viewSource" class="projectTabs">
-            <el-tab-pane
-                :label="e.label"
-                :name="e.value"
-                v-for="(e,idx) in currentDicts"
-                :key="idx"
-                >
-                <el-collapse
-                    class="rmOldPie"
-                    v-for="(e,idx) in currentCollapses"
-                    :key="idx"
-                    >
-                    <el-collapse-item  :name="idx">
-                        <template slot="title">
-                            <div style="display: flex;width: 100%;height: 100%;">
-                                <div style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
-                                </div>
-                                <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
-                            </div>
-                        </template>
-                        <!--  人员信息 -->
-                        <div>
-                            负责人:{{ e.headName || '未知'}} &nbsp;&nbsp;
-                            施工人:{{ e.constructUser || '未知'}} &nbsp;&nbsp;
-                            负责人电话:{{ e.headPhone || '未知'}} &nbsp;&nbsp;
-                            施工人电话:{{ e.constructPhone || '未知'}}
-                        </div>
-                        <hr>
-                        <!--  用料明细 -->
-                        <div
-                            v-for="(i,idx) in e.zEngineeringMaterialBo"
-                            :key="idx"
-                        >
-                            品牌:{{ i.brand || '未知'}}
-                            材质:{{ i.corrosionLevel || '未知'}}
-                            上门类型:{{ i.visitType || '未知'}}
-                        </div>
-                        <hr>
-                        <!-- 照片墙 -->
-                        <!-- <div style="width: 100%;height: 100%;">
-                            <img :src=require(v) v-for="v in e.zEngiineeringPhotoBoList" :key="v">
-
-                        </div> -->
-                        <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>
-        </el-tabs>
-    </el-dialog>
+  <el-dialog
+    :visible.sync="dialogVisible"
+    title=""
+    width="60%"
+    append-to-body
+    custom-class="ConstructionDetailsDialog">
+    <el-tabs type="card" v-model="activeNames" @tab-click="viewSource" class="projectTabs">
+      <el-tab-pane
+        :label="e.label"
+        :name="e.value"
+        v-for="(e,idx) in currentDicts"
+        :key="idx"
+      >
+        <el-collapse
+          class="rmOldPie"
+          v-for="(e,idx) in currentCollapses"
+          :key="idx"
+        >
+          <el-collapse-item :name="idx">
+            <template slot="title">
+              <div style="display: flex;width: 100%;height: 100%;">
+                <div
+                  style="width: 3%;height: 29px;margin: auto 0;border-radius: 73%;background-color: rgb(0, 157, 217);box-shadow: 1px 1px #BFBFBF;">
+                </div>
+                <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
+              </div>
+            </template>
+            <!--  人员信息 -->
+            <div>
+              负责人:{{ e.headName }} &nbsp;&nbsp;
+              施工人:{{ e.constructUser }} &nbsp;&nbsp;
+              负责人电话:{{ e.headPhone }} &nbsp;&nbsp;
+              施工人电话:{{ e.constructPhone }}
+            </div>
+            <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>
+            </div>
+            <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>-->
+    </el-tabs>
+  </el-dialog>
 </template>
 
 <script>
 export default {
-    name:'ConstructionDetails',
-    props:['currentCollapses'],
-    data(){
-        return {
-            currentDicts:[],              // 当前类型工程节点项
-            dialogVisible:false,
-            activeNames: ['0'],
-        }
+  name: 'ConstructionDetails',
+  props: ['currentCollapses'],
+  data() {
+    return {
+      currentDicts: [],              // 当前类型工程节点项
+      dialogVisible: false,
+      activeNames: '',
+    }
+  },
+  mounted() {
+  },
+  watch: {
+    // 此处监听variable变量,当期有变化时执行
+    currentDicts(item1, item2) {
+      // item1为新值,item2为旧值
+      console.log('item1为新值,item2为旧值', item1[0].value)
+      this.activeNames = item1[0].value
+      this.$parent.viewNodeSource(item1[0].value)
     },
-    methods:{
-        // 查看单节点历史
-        viewSource(e){
-            console.log(this.$parent)
-            this.$parent.viewNodeSource(e.name)
-        },
-        // 单项审核
-        checkWorking(){
-
-        },
-        // 查看历史
-        open(dicts,type = null){
-
-            if(type == '1' || type == '2'){
-              // 工业 市政
-              this.$parent.viewNodeSource()
-              this.currentDicts = [
-                {
-                  value:"历史数据",
-                  label:"历史数据"
-                }
-              ]
-            } else if (type === '危险作业工程') {
-              this.$parent.viewNodeSource()
-              this.currentDicts = [
-                {
-                  value: "历史数据",
-                  label: "历史数据"
-                }
-              ]
-            }else{
-              console.log(dicts)
-              this.dialogVisible = true
-              this.currentDicts = dicts
-            }
-
-            this.dialogVisible = true
-        }
+    immediate: true // watch侦听操作内的函数会立刻被执行
+  },
+  methods: {
+    // 查看单节点历史
+    viewSource(e) {
+      console.log(this.$parent)
+      this.$parent.viewNodeSource(e.name)
+    },
+    // 单项审核
+    checkWorking() {
+
+    },
+    // 查看历史
+    open(dicts, type = null) {
+
+      if (type == '1' || type == '2') {
+        // 工业 市政
+        this.$parent.viewNodeSource()
+        this.currentDicts = [
+          {
+            value: "历史数据",
+            label: "历史数据"
+          }
+        ]
+      } else if (type === '危险作业工程') {
+        this.$parent.viewNodeSource()
+        this.currentDicts = [
+          {
+            value: "历史数据",
+            label: "历史数据"
+          }
+        ]
+      } else {
+        console.log(dicts)
+        debugger
+        this.dialogVisible = true
+        this.currentDicts = dicts
+      }
+
+      this.dialogVisible = true
     }
+  }
 }
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-dialog{
-    height: 85%;
-    .el-dialog__body{
-        overflow: hidden;
-        height: 94%;
-    }
+::v-deep .el-dialog {
+  height: 85%;
+
+  .el-dialog__body {
+    overflow: hidden;
+    height: 94%;
+  }
 }
 
-::v-deep .el-upload--picture-card{
-    display: none;
+::v-deep .el-upload--picture-card {
+  display: none;
 }
-.ConstructionDetailsDialog{
-    position: absolute;
-    .projectTabs{
-        height: 100%;
-        overflow: hidden;
-        overflow-y: scroll;
-        margin-top: 4%;
-        ::v-deep .el-tabs__content{
-            margin-top: 1%;
-        }
-        ::v-deep .el-tabs__nav{
-            border: none;
-            overflow: hidden;
-            overflow-x: scroll;
-        }
-        ::v-deep .el-tabs__item{
-            // width: 47%;
-            border: 1px solid #797979;
-            border-radius: 5px;
-        }
-        ::v-deep .el-tabs__item.is-active{
-            background-color: #169BD5;
-            color: #fff;
-        }
-        ::v-deep .el-tabs__header{
-            position: fixed;
-            width: 53%;
-            border: none;
-            top: 13%;
-        }
-        ::v-deep .el-collapse-item__wrap{
-            padding: 0 4%;
-        }
-        .check{
-            position: fixed;
-            right: 22.1%;
-            top: 13.1%;
-            height: 4.6%;
-            background-color: #CC9900;
-            color: #fff;
-        }
+
+.ConstructionDetailsDialog {
+  position: absolute;
+
+  .projectTabs {
+    height: 100%;
+    overflow: hidden;
+    overflow-y: scroll;
+    margin-top: 4%;
+
+    ::v-deep .el-tabs__content {
+      margin-top: 1%;
     }
-    .projectTabs::-webkit-scrollbar{
-        display: none;
+
+    ::v-deep .el-tabs__nav {
+      border: none;
+      overflow: hidden;
+      overflow-x: scroll;
+    }
+
+    ::v-deep .el-tabs__item {
+      // width: 47%;
+      border: 1px solid #797979;
+      border-radius: 5px;
+    }
+
+    ::v-deep .el-tabs__item.is-active {
+      background-color: #169BD5;
+      color: #fff;
+    }
+
+    ::v-deep .el-tabs__header {
+      position: fixed;
+      width: 53%;
+      border: none;
+      top: 13%;
     }
-    ::v-deep .rmOldPie{
-        .el-collapse-item{
-            border: none;
-        }
+
+    ::v-deep .el-collapse-item__wrap {
+      padding: 0 4%;
+    }
+
+    .check {
+      position: fixed;
+      right: 22.1%;
+      top: 13.1%;
+      height: 4.6%;
+      background-color: #CC9900;
+      color: #fff;
+    }
+  }
+
+  .projectTabs::-webkit-scrollbar {
+    display: none;
+  }
+
+  ::v-deep .rmOldPie {
+    .el-collapse-item {
+      border: none;
     }
+  }
 }
 </style>

+ 254 - 204
src/views/zdsz/engineeringCivil/index.vue

@@ -104,6 +104,16 @@
         >导出
         </el-button>
       </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          icon="el-icon-circle-check"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zdsz:engineeringCivil:export']"
+        >批量审核
+        </el-button>
+      </el-col>
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
 
@@ -130,8 +140,8 @@
           <dict-tag :options="dict.type.engin_cycle" :value="scope.row.enginCycle"/>
         </template>
       </el-table-column>
-      <el-table-column label="完工状态" align="center" prop="completionStatus"/>
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400">
+      <!--      <el-table-column label="完工状态" align="center" prop="completionStatus"/>-->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -152,6 +162,22 @@
           <el-button
             size="mini"
             type="text"
+            icon="el-icon-circle-check"
+            @click="viewSource(scope.row)"
+            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)"
           >新增顶管工程
@@ -175,7 +201,8 @@
       @pagination="getList"
     />
     <!-- 添加或修改民用工程对话框 -->
-    <el-dialog :title="title" ref="nodeForm" :visible.sync="open" width="500" append-to-body custom-class="addDialog" @close="onClose">
+    <el-dialog :title="title" ref="nodeForm" :visible.sync="open" width="500" append-to-body custom-class="addDialog"
+               @close="onClose">
       <el-form ref="form" :model="queryParams" :rules="rules" label-width="110px">
 
         <el-row>
@@ -324,16 +351,16 @@
           <el-col :span="24">
             <el-form-item label="节点">
               <el-checkbox-group v-model="currentCheckList">
-                <el-checkbox 
-                  :label="item.dictValue" 
+                <el-checkbox
+                  :label="item.dictValue"
                   v-for="item in checkList"
                   :key="item"
-                  ></el-checkbox>
+                ></el-checkbox>
               </el-checkbox-group>
             </el-form-item>
           </el-col>
         </el-row>
-        <EnginNodeInfo 
+        <EnginNodeInfo
           v-for="(e,idx) in currentCheckList"
           :key="idx"
           :name="e"
@@ -356,12 +383,12 @@
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
-
-    <!-- 历史 -->
+    <!-- 查看历史 -->
     <ConstructionDetails
       ref="ConstructionDetails"
       :currentCollapses="currentCollapses"
     />
+
   </div>
 </template>
 
@@ -379,22 +406,19 @@ import {
   putEngineeringCivil,                       // 民用工程修改
   viewEngineeringCivil,                      // 民用工程查看详情
   deleteEngineeringCivil,                    // 删除民用工程
-  getDictList,                               
-  viewEngineeringCivilSource                 // 民用历史
+  getDictList, viewEngineeringInfrastructureSource, viewEngineeringCivilSource
 } from "@/api/zdsz/enginee"
 import {getAreaList} from "@/api/zdsz/area";
 import {getBuildingList} from "@/api/zdsz/building";
 import {getUnits} from "@/api/zdsz/unit";
-import {resetForm} from "@/utils/ruoyi";
 import {getDicts} from "@/api/system/dict/data";
 import EnginNodeInfo from "@/components/EnginNodeInfo/index";
-import ConstructionDetails from '@/components/ConstructionDetails/index.vue'
-
+import ConstructionDetails from "@/components/ConstructionDetails/index.vue";
 
 export default {
   components: {
-    EnginNodeInfo,
-    ConstructionDetails
+    ConstructionDetails,
+    EnginNodeInfo
   },
 
   name: "EngineeringCivil",
@@ -413,9 +437,11 @@ export default {
     "engin_cycle"],
   data() {
     return {
+      currentCollapses: [],
+      enginId: undefined,
       currentCollapses:[],
-      updateOption:[],
-      listContain:[
+      updateOption: [],
+      listContain: [
         {
           name:'拆旧管',
           components:[
@@ -440,186 +466,186 @@ export default {
             ]
         },
         {
-          name:'放线',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '放线',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'挖沟',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '挖沟',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'焊接',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '焊接',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'下沟',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '下沟',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'回田',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'backfillTime',                            // 回填时间
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '回田',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'backfillTime',                            // 回填时间
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'打压',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'segmentedCompressionQualified',           // 分段打压
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '打压',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'segmentedCompressionQualified',           // 分段打压
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'除锈',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '除锈',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'刷油',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '刷油',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'打磨',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '打磨',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'打孔',
-          components:[
-              [
-                'corrosionLevel',                        // 孔径/腐蚀等级
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-            ]
+          name: '打孔',
+          components: [
+            [
+              'corrosionLevel',                        // 孔径/腐蚀等级
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
         },
         {
-          name:'立杠',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-            ]
+          name: '立杠',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
         },
         {
-          name:'挂表',
-          components:[
-              [
-                'brand',                                 // 品牌
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-              'remark',                                  // 施工内容
-            ]
+          name: '挂表',
+          components: [
+            [
+              'brand',                                 // 品牌
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+            'remark',                                  // 施工内容
+          ]
         },
         {
-          name:'表后管',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-              ],
-              'constructAccordingDrawings',              // 是否按图纸施工
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-            ]
+          name: '表后管',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+            ],
+            'constructAccordingDrawings',              // 是否按图纸施工
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
         },
         {
-          name:'阀管',
-          components:[
-              [
-                'materialQuality',                       // 材质
-                'specifications',                        // 规格
-                'number',                                // 数量
-                'visitType',                             // 上门类型
-                'selfClosingValveType',                  // 自闭阀类型
-              ],
-              'constructTime',                           // 施工时间
-              'zEngiineeringPhotoBoList',                // 照片
-            ]
+          name: '阀管',
+          components: [
+            [
+              'materialQuality',                       // 材质
+              'specifications',                        // 规格
+              'number',                                // 数量
+              'visitType',                             // 上门类型
+              'selfClosingValveType',                  // 自闭阀类型
+            ],
+            'constructTime',                           // 施工时间
+            'zEngiineeringPhotoBoList',                // 照片
+          ]
         },
       ],
-      currentCheckList:[],
+      currentCheckList: [],
       enginClassificationinfo: '',
       enginClassification: '',
       enginClassificationOption: [],
@@ -662,7 +688,6 @@ export default {
         unitId: undefined,
         houseId: undefined,
         enginType: undefined,
-        enginClassification: undefined,
         enginCycle: undefined,
         completionStatus: undefined,
         enginClassification: undefined,
@@ -771,7 +796,7 @@ export default {
       houseOptions: [],            // 房间集合
       enginClassification_list: [], // 室内节点,
       checkList: [],// 节点集合
-      enginNodeStatus:null
+      enginNodeStatus: null
     };
   },
   created() {
@@ -779,19 +804,44 @@ export default {
   },
   mounted() {
   },
-  computed:{
-    currentContain(e){
-      console.log('当前contain',e)
+  computed: {
+    currentContain(e) {
+      console.log('当前contain', e)
     }
   },
   methods: {
-    // 填写节点信息
-    addNodeInfo(data){
-      this.$refs.ConstructionDetails.open(this.dict.type.engineering_infrastructure)
-      // viewEngineeringCivilSource().then(res => {
-      //   console.log('历史',res)
-      // })
+    viewNodeSource(e) {
+      viewEngineeringCivilSource({
+        id: this.enginId,
+        type: e
+      }).then(res => {
+        try {
+          this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+        } catch (error) {
+          this.currentCollapses = [];
+        }
+        console.log('折叠面板info',this.currentCollapses)
+      })
+      this.$forceUpdate()
+    },
+    // 查看历史
+    viewSource(e) {
+      console.log(e)
+      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)
+      })
     },
+
+
     // 新增顶管工程
     addNewPipe(data) {
       this.$refs.enginPipe.openDialog({
@@ -800,7 +850,7 @@ export default {
       }, 'add')
     },
     // 新增物料
-    addMaterial(data){
+    addMaterial(data) {
       this.title = "添加用料";
       this.enginNodeStatus = '添加用料'
       this.loading = true;
@@ -812,7 +862,7 @@ export default {
         // 手动调用行政区发生改变
         this.districtHasChanged(newData.district)
         this.communityHasChanged(newData.areaId)
-        this.buildingHasChanged(newData.buildingId,newData.areaId)
+        this.buildingHasChanged(newData.buildingId, newData.areaId)
         this.unitHasChanged(newData.unitId)
         // 获取工程分类
         this.enginTypeHasChanged(newData.enginType)
@@ -821,10 +871,10 @@ export default {
         getDicts(val).then(res => {
           this.checkList = res.data
         })
-        
+
         this.queryParams = newData
         console.log(this.queryParams.areaId)
-        
+
         // console.log('选中节点集合',this.currentCheckList)
         // this.enginClassification = zEngineeringNodeBo.type
         // newData.zEngineeringNodeBo = zEngineeringNodeBo
@@ -861,10 +911,10 @@ export default {
         this.buildingOptions = res.data
       })
     },
-    buildingHasChanged(buildingId,areaId) {
+    buildingHasChanged(buildingId, areaId) {
       console.log(buildingId)
       this.queryParams.unitId = null
-      getUnits(areaId || this.queryParams.areaId,buildingId ).then(res => {
+      getUnits(areaId || this.queryParams.areaId, buildingId).then(res => {
         this.unitOptions = res.data
       })
     },
@@ -882,10 +932,10 @@ export default {
         this.currentEnginTypeChangeOptions = res.data
       })
     },
-    onClose(){
+    onClose() {
       console.log(this.currentCheckList)
       this.currentCheckList = []
-      this.checkList =[]
+      this.checkList = []
       this.$refs.nodeForm.resetFields()
     },
     closeToSucceed() {
@@ -1003,40 +1053,40 @@ export default {
     toNodeDetail() {
       let nodeCollection = []
       // 收集节点信息
-      this.currentCheckList.forEach((e,idx) => {
-         let nodeItem = this.$refs['EnginNodeInfo'+ idx][0].infoCollection()
+      this.currentCheckList.forEach((e, idx) => {
+        let nodeItem = this.$refs['EnginNodeInfo' + idx][0].infoCollection()
         //  console.log(nodeItem)
-         nodeCollection.push(nodeItem)
+        nodeCollection.push(nodeItem)
       })
       this.queryParams.zEngineeringNodeBoList = nodeCollection
-      if(this.enginNodeStatus == '添加用料'){
-        addEngineeringCivil(this.queryParams).then(res => {
-          if(res.code == 200){
+      if (this.enginNodeStatus == '修改') {
+        putEngineeringCivil(this.queryParams).then(res => {
+          if (res.code == 200) {
             this.$message({
               message: '添加成功',
               type: 'success'
             });
             this.open = false
-            console.log('选中节点集合',this.currentCheckList)
+            console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
             // this.$emit('closeToSucceed')
           }
         })
-      }else{
+      } else {
         addEngineeringCivil(this.queryParams).then(res => {
-          if(res.code == 200){
+          if (res.code == 200) {
             this.$message({
               message: '新增成功',
               type: 'success'
             });
             this.open = false
-            console.log('选中节点集合',this.currentCheckList)
+            console.log('选中节点集合', this.currentCheckList)
             this.currentCheckList = []
             // this.$emit('closeToSucceed')
           }
         })
       }
-      
+
       return
       getDictList({enginType: ['new_built', 'old_renovation']}).then(res => {
         this.nodeList = res.data
@@ -1086,11 +1136,10 @@ export default {
         this.updateOption = res.data.zEngineeringNodeBoList
         console.log(this.queryParams.areaId)
         // start update修改数据
-        res.data.zEngineeringNodeBoList.forEach((e,idx) => {
+        res.data.zEngineeringNodeBoList.forEach((e, idx) => {
           this.currentCheckList.push(e.type)
         })
-        
-        console.log('选中节点集合',this.currentCheckList)
+        console.log('选中节点集合', this.currentCheckList)
         // end
         let zEngineeringNodeBo = {
           type: res.data.zEngineeringNodeBoList[0].type,
@@ -1174,9 +1223,10 @@ export default {
 </script>
 <style lang="scss" scoped>
 
-::v-deep .addDialog{
+::v-deep .addDialog {
   width: 60%;
 }
+
 ::v-deep .appendElDialog {
   width: 70%;
   height: 80%;