소스 검색

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

qinhouyu 1 년 전
부모
커밋
d9f26e06e0

+ 50 - 0
src/api/zdsz/touchOperationEngineering.js

@@ -0,0 +1,50 @@
+import request from '@/utils/request'
+
+// 查询碰口作业列表
+export function listTouchOperationEngineering(query) {
+  return request({
+    url: '/zdsz/touchOperationEngineering/list',
+    method: 'get',
+    params: query
+  })
+}
+
+export function QueryTouchOperationEngineering({id, type}) {
+  return request({
+    url: `/zdsz/touchOperationEngineering/query/${id}/${type}`,
+    method: 'get',
+  })
+}
+// 查询碰口作业详细
+export function getTouchOperationEngineering(id) {
+  return request({
+    url: '/zdsz/touchOperationEngineering/' + id,
+    method: 'get'
+  })
+}
+
+// 新增碰口作业
+export function addTouchOperationEngineering(data) {
+  return request({
+    url: '/zdsz/touchOperationEngineering',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改碰口作业
+export function updateTouchOperationEngineering(data) {
+  return request({
+    url: '/zdsz/touchOperationEngineering',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除碰口作业
+export function delTouchOperationEngineering(id) {
+  return request({
+    url: '/zdsz/touchOperationEngineering/' + id,
+    method: 'delete'
+  })
+}

+ 546 - 0
src/components/ConstructionDetails/indexPK.vue

@@ -0,0 +1,546 @@
+<!--
+   *@description: 工程历史详情
+   *@author: yh Fu
+   *@date: 2024-1-8 10:04:23
+   *@version: V1.0.5
+-->
+
+<template>
+  <div style="width: 100%;height: 100%;">
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :title="titleName"
+      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-checkbox-group v-model="checkList">
+            <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%;">
+                    <el-checkbox :label="e.id" @change="handleCheckedCitiesChange">
+                      <h2 style="margin-left: 1%;font-weight: 700;">{{ e.updateTime }}</h2>
+                    </el-checkbox>
+                    <h2 style="margin-left: 20%;font-weight: 700;" v-if="['review','put'].includes(status)">
+                      {{ e.state == '0' ? "该施工信息审核未通过" : "" }}</h2>
+                    <h2 style="margin-left: 20%;font-weight: 700; color: #1ab394" v-if="['review','put'].includes(status)">
+                      {{ e.state == 1 ? "该施工信息审核通过" : "" }}</h2>
+                  </div>
+                </template>
+                <div class="personInfo">
+                  <span>施工人:{{ userNames[idx].nickName }}</span>
+                  <span>施工人电话:{{ userNames[idx].phonenumber }}</span>
+                </div>
+                <hr>
+                <el-form :model="e">
+                  <el-form-item
+                    :prop="e.remark"
+                    :class="'labelWidth'"
+                    label="施工内容"
+                    label-width="95px"
+                  >
+                    <div class="block" style="display: inline-block; margin-right: 20px;">
+                      <el-input v-model="e.remark" placeholder="请输入施工内容" style="width: 100%" maxlength="100"
+                                type="textarea" :readonly="['review','read-only'].includes(status)"></el-input>
+                    </div>
+                  </el-form-item>
+                </el-form>
+                <!--  用料明细 -->
+                <div style="display: flex;width: 100%;height: 100%;">
+                  <h3 style="width: 95px;font-weight: 600;text-align: left;text-indent: 25px;">图片</h3>
+                  <ObsImageUpload
+                    :class=" (status == 'read-only' || status == 'review' )? 'obsImageUploads' : '' "
+                    ref="obsImageUpload"
+                    :limit="11"
+                    :fileType="['png', 'jpg', 'jpeg']"
+                    @input="getUrl(arguments,idx)"
+                    :value="e.zEngiineeringPhotoBoList"
+                    :disabled="['review','read-only'].includes(status)"
+                  ></ObsImageUpload>
+                </div>
+                <div style="display: flex;  justify-content: flex-end; width: 100%;height: 100%;"
+                     v-if="status == 'put'">
+                  <el-button plain type="danger" @click=" handleDelete(e)"
+                             v-hasPermi="['zdsz:engineeringCivilNode:remove']" style="width: 94px;">删除
+                  </el-button>
+                </div>
+              </el-collapse-item>
+            </el-collapse>
+          </el-checkbox-group>
+        </el-tab-pane>
+        <el-button class="check" plain type="danger" @click="checkWorking"
+                   v-if="status == 'review' " style="width: 80px;"
+                   :disabled="currentCollapses.length == 0">审核
+        </el-button>
+        <el-button class="check" plain type="danger" @click="updateNodeOption" style="width: 94px;cursor: pointer;"
+                   v-if="status == 'put' ">修改
+        </el-button>
+      </el-tabs>
+    </el-dialog>
+    <!-- 审核 -->
+    <el-dialog
+      title="审核"
+      :visible.sync="checkingVisible"
+      :title="titleName"
+      width="30%"
+      class="checkingDialog"
+      :before-close="handleChecking">
+      <el-form :model="checkingInfo" ref="checking" :rules="checkingRule" class="nodeForm">
+        <el-form-item
+          label-width="85px"
+          label="审核状态"
+          prop="reviewStatus"
+        >
+          <el-select v-model="checkingInfo.reviewStatus" placeholder="请选择审核状态" style="width: 100%"
+                     label="审核状态" @change="validateCHanged">
+            <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="85px"
+          label="审核内容"
+          prop="reviewContent"
+        >
+          <div class="block" style="display: inline-block; margin-right: 20px;">
+            <el-input
+              v-model="checkingInfo.reviewContent"
+              placeholder="请输入审核内容"
+              type="textarea"
+              style="width: 97%"/>
+          </div>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="handleChecking">取 消</el-button>
+        <el-button type="primary" @click=checkingSubmit>确 定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+
+</template>
+
+<script>
+import {
+  deleteinfoById,
+  getEnginMaterialQualityList,                    // 材质
+  getEnginSpecificationsList,                     // 规格
+
+} from '@/api/zdsz/enginee'
+import {selectUserByUserName} from '@/api/system/user'
+import ObsVideoUpload from "@/components/ObsVideoUpload/index.vue";
+
+export default {
+  name: 'PKinfo',
+  dicts: ['tapping_operation','bury_the_wrench_hole','aerial_wrench_hole','shutdown_operation','pe_plugging','the_steel_pipe_sealed_with_gas'],
+  components: {ObsVideoUpload},
+  props: ['currentCollapses', 'nodeDetailType', 'enginType', 'zEngineeringNodeBo'],
+  data() {
+    return {
+      kind: null,
+      status: null,
+      userNames: [],
+      checkList: [],
+      enginNode: '',
+      currentDicts: [],              // 当前类型工程节点项
+      dialogVisible: false,
+      activeNames: '',
+      titleName: '',
+      reviewStatusList: [
+        {
+          value: '1',
+          label: '通过'
+        },
+        {
+          value: '0',
+          label: '不通过'
+        }
+      ],
+      nodesource: '',// 审核状态option
+      materialQualityList: [],                     // 材质
+      specificationsList: [],                      // 规格
+      materialComponList: [],
+      engineType: null,
+      enginClassification: null,
+      nodeInfo: {
+        backfillTime: '',                       // 回填时间
+        constructTime: '',
+        constructAccordingDrawings: '',
+        segmentedCompressionQualified: '',
+        zEngiineeringPhotoBoList: [],            // 照片集合
+        zEngiineeringPhotoBoListOne: [],            // 照片集合
+        zEngiineeringPhotoBoListTwo: [],            // 照片集合
+        zEngiineeringPhotoBoListThree: [],            // 照片集合
+        zEngineeringMaterialBo: [],              // 用料集合
+        remark: '',
+        constructAddre: ''
+      },
+      checkingInfo: {
+        reviewStatus: '',               // 审核状态
+        reviewContent: '',              // 审核内容
+        engInfoId: '',                  // 节点Id
+        createTime: '',                 // 工程创建时间
+      },
+      currentStatus: null,
+      checkingVisible: null,
+      isChecking: true,
+      currentEnginId: null,
+      reviewStatus: null,
+      corrosionLevelListAll: [],
+      infoIdList: [],
+      delinfoidList: [],
+      checkingRule: {
+        reviewStatus: [
+          {required: true, message: "审核状态不能为空", trigger: "blur"}
+        ],
+        reviewContent: [
+          {required: true, message: "审核内容不能为空", trigger: "change"}
+        ],
+      },
+      node: null
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+    this.getGoods()
+  },
+  watch: {
+    // 此处监听variable变量,当期有变化时执行
+    currentDicts(item1, item2) {
+      this.activeNames = item1[0].value
+      this.$parent.viewNodeSource(item1[0].value)
+    },
+    currentCollapses() {
+      console.log('currentCollapses', this.currentCollapses)
+      this.userNames = [];
+      for (let i in this.currentCollapses) {
+        selectUserByUserName(this.currentCollapses[i].createBy).then(res => {
+          this.userNames.push(res);
+        })
+      }
+      try {
+        this.currentCollapses[0].zEngineeringReviewBo.reviewStatus != 1 ? this.isChecking = true : false
+      } catch (error) {
+        this.isChecking = true
+      }
+
+    }
+  },
+  methods: {
+    getGoods() {
+      // 获取材质
+      let enginType = '市政工程'
+      getEnginMaterialQualityList({enginType: enginType}).then(res => {
+        this.materialQualityList = res.data
+      })
+      // 获取规格
+      getEnginSpecificationsList().then(res => {
+        this.corrosionLevelListAll = res.data
+      })
+    },
+    handleCheckedCitiesChange(e) {
+      this.infoIdList = this.currentCollapses.filter(item => this.checkList.indexOf(item.id) > -1)
+      this.delinfoidList = this.currentCollapses.map(item => item.id).filter(item => this.checkList.indexOf(item) == -1)
+    },
+    validateCHanged(e) {
+      this.reviewStatusList[e].label == '通过' ? this.checkingRule.reviewContent[0].required = true : this.checkingRule.reviewContent[0].required = false
+    },
+    handleChecking() {
+      this.checkingVisible = false
+      this.checkingInfo = {
+        reviewStatus: '',               // 审核状态
+        reviewContent: '',              // 审核内容
+        engInfoId: '',                  // 节点Id
+        createTime: '',                 // 工程创建时间
+      }
+      this.$refs.checking.resetFields()
+    },
+    // 保存节点Id
+    setEngineId(e) {
+      this.currentEnginId = e
+    },
+    // 提交审核
+    checkingSubmit() {
+      this.$confirm('此操作将删除其他施工信息, 是否继续?', '提示', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        this.shenhe()
+      }).catch(() => {
+      });
+    },
+    shenhe() {
+      this.$refs.checking.validate(valid => {
+        if (valid) {
+          try {
+            this.checkingInfo.engInfoId = this.currentEnginId
+            this.checkingInfo.delInfoIdList = this.delinfoidList
+            this.checkingInfo.infoIdList = this.infoIdList
+            this.$emit('checkWorking', this.checkingInfo)
+            this.checkList = []
+          } catch (error) {
+            this.checkingInfo.engInfoId = null
+          }
+          this.checkingVisible = false
+          this.checkingInfo = {
+            reviewStatus: '',               // 审核状态
+            reviewContent: '',              // 审核内容
+            engInfoId: '',                  // 节点Id
+            createTime: '',                 // 工程创建时间
+          }
+        } else {
+          this.$message({
+            message: '请完善信息',
+            type: 'error'
+          });
+          throw 'valid Failed'
+        }
+      })
+    },
+    // 查看单节点历史
+    viewSource(e) {
+      console.log('节点', e)
+      this.node = e.name
+      this.nodesource = e
+      let data = {enginType: this.enginType}
+      getEnginMaterialQualityList(data).then(res => {
+        this.materialQualityList = res.data
+      })
+      this.$parent.viewNodeSource(e.name)
+    },
+    // 单项审核
+    checkWorking() {
+      if (this.checkList.length == 0) {
+        this.$message.warning("请选择需要审核通过的施工信息")
+        return
+      }
+      if (this.status == 'review') {
+        this.checkingVisible = true
+      }
+    },
+    updateNodeOption() {
+      if (this.checkList.length == 0) {
+        this.$message.warning("请选择需要修改的施工信息")
+        return
+      }
+      const intersection = this.currentCollapses.filter(value => this.checkList.includes(value.id));
+      this.$emit('updateNodeOption', intersection)
+    },
+    deleteById(e) {
+      deleteinfoById(e).then(res => {
+        this.viewSource(this.nodesource)
+      })
+
+    },
+    handleDelete(row) {
+      this.$modal.confirm('是否确认删除所选数据项?').then(() => {
+        this.loading = true;
+        return this.deleteById(row)
+      }).then(() => {
+        this.loading = false;
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    /**
+     * 查看历史
+     * @param dicts 节点集合
+     * @param currentStatus
+     * @param title 标题
+     * @param enginType 工程分类
+     * @param status 页面状态
+     */
+    open(dicts, currentStatus = null, title = null, enginType, status) {
+      this.checkList = []
+      this.status = status;
+      if (dicts && dicts[0]) {
+        this.node = dicts[0].value
+      }
+      this.titleName = title
+      this.checkingVisible = false
+      this.currentDicts = dicts
+      this.$parent.viewNodeSource()
+      this.dialogVisible = true
+      this.$forceUpdate()
+    },
+    // 获取材质规格
+    getEnginSpecificationsList(e, idx, parentIndex) {
+      // 重置规格
+      this.currentCollapses[parentIndex].zEngineeringMaterialBo[idx].specifications = ''
+      getEnginSpecificationsList({materId: e.materialQuality}).then(res => {
+        console.log('规格', res.data)
+        this.specificationsList = res.data
+      })
+    },
+    getUrl(_, idx) {
+      this.currentCollapses[idx].zEngiineeringPhotoBoList = [...arguments][0][0].map(e => e.url) || [];
+    },
+    getUrl1(_, idx) {
+      this.currentCollapses[idx].zEngiineeringPhotoBoListOne = [...arguments][0][0].map(e => e.url) || [];
+    },
+    getUrl2(_, idx) {
+      this.currentCollapses[idx].zEngiineeringPhotoBoListTwo = [...arguments][0][0].map(e => e.url) || [];
+    },
+    getUrl3(_, idx) {
+      this.currentCollapses[idx].zEngiineeringPhotoBoListThree = [...arguments][0][0].map(e => e.url) || [];
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep .nodeForm {
+  .el-form-item__content {
+    display: flex;
+  }
+}
+
+::v-deep .materialForm {
+  display: flex !important;
+  flex-wrap: wrap;
+
+  .el-form-item {
+    width: 320px;
+  }
+}
+
+::v-deep .obsImageUpload {
+  .el-upload--picture-card {
+    display: block !important;
+  }
+}
+
+::v-deep .obsImageUpload > div {
+  display: flex;
+}
+
+::v-deep .el-dialog {
+  height: 85%;
+
+  .el-dialog__body {
+    overflow: hidden;
+    height: 91%;
+  }
+}
+
+::v-deep .el-upload-notShow {
+  .el-upload--picture-card {
+    display: none;
+  }
+}
+
+::v-deep .labelWidth {
+  .el-form-item__label {
+    width: 100px;
+  }
+}
+
+::v-deep .obsImageUploads {
+  .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 #a3d3ff;
+      border-radius: 5px;
+    }
+
+    ::v-deep .el-tabs__item.is-active {
+      background-color: #e8f4ff;
+      color: #1890ff;
+    }
+
+    ::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;
+    }
+  }
+
+  .projectTabs::-webkit-scrollbar {
+    display: none;
+  }
+
+  ::v-deep .rmOldPie {
+
+    .el-collapse-item {
+      border: none;
+    }
+  }
+}
+
+.personInfo > span:not(:nth-child(1)) {
+  margin-left: 50px;
+}
+
+::v-deep .checkingDialog {
+  height: 50%;
+  margin-top: 6%;
+
+  .el-dialog__body {
+    height: 72%;
+  }
+
+  .el-textarea__inner {
+    width: 246%;
+    height: 140px;
+  }
+}
+</style>

+ 137 - 0
src/components/EnginNodeInfo/indexPK.vue

@@ -0,0 +1,137 @@
+<!--
+ *@description: 节点信息form(新)
+ *@author: yh Fu
+ *@date: 2024-01-10 14:44:14
+ *@version: V1.0.5
+ -->
+<template>
+  <div style="width: 100%; height: 100%;">
+    <!-- 节点表单 -->
+    <el-form ref="fangxianForm" :model="nodeInfo" :rules="nodeRules" label-width="100px">
+      <h2 style="margin-left: 5%;font-weight: 800;">{{ name }}</h2>
+      <el-form-item label="照片" prop="zEngiineeringPhotoBoList" class="obsImage">
+        <ObsImageUpload ref="obsImageUpload" :limit="9999" :fileType="['png', 'jpg', 'jpeg']"
+                        :value="nodeInfo.zEngiineeringPhotoBoList"
+                        @input="getUrl"></ObsImageUpload>
+      </el-form-item>
+      <el-form-item label="施工内容" prop="remark">
+        <el-input
+          style="width: 100%"
+          v-model="nodeInfo.remark"
+          type="textarea"
+          placeholder="请输入施工内容"
+          maxlength="255"
+        />
+      </el-form-item>
+      <hr style="position: relative;">
+    </el-form>
+
+  </div>
+</template>
+
+<script>
+import ObsVideoUpload from "@/components/ObsVideoUpload/index.vue";
+
+export default {
+  name: 'EnginNodeInfo',
+  props: ['types', 'enginType', 'enginSort', 'enginNode', 'name', 'currentContain', 'updateOption', 'status'],
+  dicts: [
+    'visit_type',
+    'self_closing_valve_type',
+    'brand',
+    'construct_addre'
+  ],
+  components: {ObsVideoUpload},
+  data() {
+    return {
+      nodeInfo: {
+        zEngiineeringPhotoBoList: [],            // 照片集合
+        remark: '',
+      },
+      nodeInfoBo: {
+        zEngineeringInfoBo: {}
+      },                                         //  节点信息
+      zEngineeringMaterialBo: [],                                         //  用料信息
+      nodeRules: {
+        zEngiineeringPhotoBoList: [
+          {required: true, message: "至少上传一张图片", trigger: "change"}
+        ],
+      }
+    }
+  },
+  created() {
+
+  },
+  mounted() {
+
+  },
+  methods: {
+    selectBlur(_, index, name) {
+      this.zEngineeringMaterialBo[index][name] = [...arguments][0][0].target.value
+    },
+    // 收集节点信息
+    infoCollection() {
+      let result = null
+      console.log(this.$refs.fangxianForm)
+      this.$refs.fangxianForm.validate(valid => {
+        if (valid) {
+          debugger
+          this.nodeInfoBo.type = this.name
+          // 接口数据格式修改 图片和用料放到nodeInfoBo节点详情对象中
+          this.nodeInfoBo.zEngineeringInfoBo = this.nodeInfo
+          console.log('即将返回的节点Info', this.nodeInfoBo)
+          result = this.nodeInfoBo
+        } else {
+          this.$message({
+            message: '请完善信息',
+            type: 'error'
+          });
+          throw 'valid Failed'
+        }
+      })
+      return result
+    },
+    addMaterial() {
+      let materialBo = {}
+      // this.materialComponList.forEach(e => {
+      //   materialBo[e] = null
+      // })
+      this.zEngineeringMaterialBo.push(materialBo)
+      this.nodeInfo.zEngineeringMaterialBo.push(materialBo)
+      // console.log('节点用料参数对象',this.zEngineeringMaterialBo)
+    },
+    addzEngineeringMaterialBo(option, params) {
+      let material = {}
+      params.forEach(e => {
+        material[e] = ""
+      })
+      this[option].zEngineeringMaterialBo.push(
+        material
+      )
+    },
+    removezEngineeringMaterialBo(index) {
+      this.zEngineeringMaterialBo.splice(index, 1);
+    },
+    // 填充已有数据
+    updateInfo(e) {
+      console.log('填充', e)
+    },
+    getUrl(url) {
+      this.nodeInfo.zEngiineeringPhotoBoList = this.$refs.obsImageUpload.fileList ? this.$refs.obsImageUpload.fileList.map(e => e.url) : [];
+    },
+    getUrl1(url) {
+      this.nodeInfo.zEngiineeringPhotoBoListOne = this.$refs.obsImageUpload1.fileList ? this.$refs.obsImageUpload1.fileList.map(e => e.url) : [];
+    },
+    getUrl2(url) {
+      this.nodeInfo.zEngiineeringPhotoBoListTwo = this.$refs.obsImageUpload2.fileList ? this.$refs.obsImageUpload2.fileList.map(e => e.url) : [];
+    },
+    getUrl3(url) {
+      this.nodeInfo.zEngiineeringPhotoBoListThree = this.$refs.obsImageUpload3.fileList ? this.$refs.obsImageUpload3.fileList.map(e => e.url) : [];
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+</style>

+ 584 - 0
src/views/zdsz/touchOperationEngineering/index.vue

@@ -0,0 +1,584 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="作业方式" prop="modeOperation">
+        <el-select v-model="queryParams.modeOperation" placeholder="请选择作业方式" clearable>
+          <el-option
+            v-for="dict in dict.type.tapping_operation"
+            :key="dict.value"
+            :label="dict.label"
+            :value="dict.value"
+          />
+        </el-select>
+      </el-form-item>
+      <el-form-item label="工程名称" prop="enginName">
+        <el-input
+          v-model="queryParams.enginName"
+          placeholder="请输入工程名称"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="工程地点" prop="locations">
+        <el-input
+          v-model="queryParams.locations"
+          placeholder="请输入工程地点"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+          v-hasPermi="['zdsz:touchOperationEngineering:add']"
+        >新增
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="success"
+          plain
+          icon="el-icon-edit"
+          size="mini"
+          :disabled="single"
+          @click="handleUpdate"
+          v-hasPermi="['zdsz:touchOperationEngineering:edit']"
+        >修改
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="danger"
+          plain
+          icon="el-icon-delete"
+          size="mini"
+          :disabled="multiple"
+          @click="handleDelete"
+          v-hasPermi="['zdsz:touchOperationEngineering:remove']"
+        >删除
+        </el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          type="warning"
+          plain
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+          v-hasPermi="['zdsz:touchOperationEngineering:export']"
+        >导出
+        </el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="touchOperationEngineeringList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center"/>
+      <el-table-column label="" align="center" prop="id" v-if="false"/>
+      <el-table-column label="作业方式" align="center" prop="modeOperation">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.tapping_operation" :value="scope.row.modeOperation"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="工程名称" align="center" prop="enginName"/>
+      <el-table-column label="工程地点" align="center" prop="locations"/>
+      <el-table-column label="审核状态" align="center" prop="nodeReViewStateList" width="250">
+        <template slot-scope="scope">
+          <div style="text-align:center">
+            <el-popover
+              v-for="item in scope.row.nodeReViewStateList"
+              placement="top-start"
+              trigger="hover"
+              :content="item.Type">
+              <span slot="reference" v-if="(item.state == '1'||item.state == '2')"
+                    style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #30B08F;"></span>
+              <span slot="reference" v-if="item.state == '0' "
+                    style="height: 20px;margin-right: 5px;width: 20px; border-radius: 50%; display: inline-block; background-color: #C03639;"></span>
+            </el-popover>
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="备注" align="center" prop="remark"/>
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+            v-hasPermi="['zdsz:touchOperationEngineering:edit']"
+          >修改工程信息
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="updateviewSource(scope.row)"
+            v-hasPermi="['zdsz:touchOperationEngineering:edit']"
+          >修改施工信息
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-add"
+            @click="handleAddYL(scope.row)"
+            v-hasPermi="['zdsz:touchOperationEngineering:edit']"
+          >添加用料
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-time"
+            @click="handleHistory(scope.row)"
+            v-hasPermi="['zdsz:touchOperationEngineering:edit']"
+          >历史施工
+          </el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+            v-hasPermi="['zdsz:touchOperationEngineering:remove']"
+          >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改碰口作业对话框 -->
+    <el-dialog :title="title" :visible.sync="open" :width="title == '添加碰口作业用料信息'?'1500px':'800px'"
+               append-to-body>
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px" >
+        <el-row :gutter="24">
+          <el-col :span="12">
+            <el-form-item label="作业方式" prop="modeOperation">
+              <el-select v-model="form.modeOperation" placeholder="请选择作业方式" style="width: 100%" :disabled="title == '添加碰口作业用料信息'">
+                <el-option
+                  v-for="dict in dict.type.tapping_operation"
+                  :key="dict.value"
+                  :label="dict.label"
+                  :value="dict.value"
+                ></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="工程名称" prop="enginName">
+              <el-input v-model="form.enginName" placeholder="请输入工程名称" :disabled="title == '添加碰口作业用料信息'"/>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12">
+          <el-form-item label="工程地点" prop="locations">
+            <el-input v-model="form.locations" placeholder="请输入地点" :disabled="title == '添加碰口作业用料信息'"/>
+          </el-form-item>
+          </el-col>
+          <el-col :span="12">
+            <el-form-item label="备注" prop="remark">
+              <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" :disabled="title == '添加碰口作业用料信息'"/>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row v-if="title=='添加碰口作业用料信息'">
+          <el-col :span="24">
+            <el-form-item label="环节">
+              <el-checkbox-group v-model="currentCheckList">
+                <el-checkbox
+                  :label="item.dictValue"
+                  v-for="item in nodeList"
+                  :key="item.dictValue"
+                ></el-checkbox>
+              </el-checkbox-group>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <EnginNodeInfo
+          v-if="title=='添加碰口作业用料信息'"
+          v-for="(e,idx) in currentCheckList"
+          :key="idx"
+          :name="e"
+          :ref="'EnginNodeInfo'+idx"
+          :types="currentCheckList"
+          :currentContain="currentCheckList"
+          :enginType="'碰口作业工程'"
+          :enginSort="form.enginType"
+        />
+      </el-form>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button :loading="buttonLoading" type="primary" v-if="title == '添加碰口作业用料信息'" @click="addForm">添加用料</el-button>
+        <el-button :loading="buttonLoading" type="primary" v-else @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <ConstructionDetails
+      ref="ConstructionDetails"
+      :currentCollapses="currentCollapses"
+      :zEngineeringNodeBo="zEngineeringNodeBo"
+      @updateNodeOption="updateNodeOption"
+      @checkWorking="checkWorking"
+      :enginType="'碰口作业'"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  listTouchOperationEngineering,
+  getTouchOperationEngineering,
+  delTouchOperationEngineering,
+  addTouchOperationEngineering,
+  updateTouchOperationEngineering, QueryTouchOperationEngineering
+} from "@/api/zdsz/touchOperationEngineering";
+import {getDicts} from "@/api/system/dict/data";
+import EnginNodeInfo from "@/components/EnginNodeInfo/indexPK.vue";
+import ConstructionDetails from "@/components/ConstructionDetails/indexPK.vue";
+import {EditEngineeEngineeIndustry, QueryEngineeIndustry} from "@/api/zdsz/engineeringIndustry";
+import {insertReview} from "@/api/zdsz/enginee";
+
+export default {
+  name: "TouchOperationEngineering",
+  components: {ConstructionDetails, EnginNodeInfo},
+  dicts: ['tapping_operation', 'bury_the_wrench_hole', 'aerial_wrench_hole', 'shutdown_operation', 'pe_plugging', 'the_steel_pipe_sealed_with_gas'],
+  data() {
+    return {
+      // 按钮loading
+      buttonLoading: false,
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      currentCheckList: [],
+      currentCollapses: [],
+      zEngineeringNodeBo: {},
+      nodeList: [],
+      status: null,
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 碰口作业表格数据
+      touchOperationEngineeringList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        modeOperation: undefined,
+        enginName: undefined,
+        locations: undefined,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        id: [
+          {required: true, message: "不能为空", trigger: "blur"}
+        ],
+        modeOperation: [
+          {required: true, message: "作业方式不能为空", trigger: "change"}
+        ],
+        enginName: [
+          {required: true, message: "工程名称不能为空", trigger: "blur"}
+        ],
+        locations: [
+          {required: true, message: "工程地点不能为空", trigger: "blur"}
+        ],
+      }
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    // 节点审核
+    checkWorking(checkingInfo) {
+      let params = checkingInfo
+      params.createTime = this.createTime
+      console.log('节点审核 checkingInfo===', params)
+      insertReview(params).then(res => {
+        if (res.code == 200) {
+          this.$message({
+            message: '审核成功',
+            type: 'success'
+          });
+          this.$refs.ConstructionDetails.dialogVisible = false
+          this.getList()
+        }
+      })
+    },
+    updateNodeOption(value) {
+      try {
+        this.form.zEngineeringNodeBo.zEngineeringInfoBoList = this.form.zEngineeringNodeBo.zEngineeringInfoBoList.filter(obj => value.map(o => o.id).includes(obj.id))
+      } catch (e) {
+      }
+      this.form.files = this.form.pics
+      updateTouchOperationEngineering(this.form).then(res => {
+        this.$modal.msgSuccess("修改成功");
+        this.$refs.ConstructionDetails.dialogVisible = false
+      })
+      this.getList();
+    },
+    viewNodeSource(e) {
+      this.currentCollapses = []
+      if (!e) return
+      // todo: 获取数据
+      QueryTouchOperationEngineering({
+        id: this.currentId,
+        type: e
+      }).then(res => {
+        this.createTime = res.data.createTime
+        this.form = res.data
+        try {
+          this.currentCollapses = res.data.zEngineeringNodeBo.zEngineeringInfoBoList
+          this.$refs.ConstructionDetails.setEngineId(res.data.zEngineeringNodeBo.id || null)
+        } catch (error) {
+          this.currentCollapses = [];
+        }
+      })
+    },
+    updateviewSource(e) {
+      this.currentId = e.id
+      let dists ;
+      if ("地埋扳孔"  == e.modeOperation){
+        dists="bury_the_wrench_hole";
+      }else if ("架空扳孔"  == e.modeOperation){
+        dists="aerial_wrench_hole";
+      }else if ("停气作业"  == e.modeOperation){
+        dists="shutdown_operation";
+      }else if ("PE 封堵"  == e.modeOperation){
+        dists="pe_plugging";
+      }else if ("钢管带气封堵"  == e.modeOperation){
+        dists="the_steel_pipe_sealed_with_gas";
+      }
+      getDicts(dists).then(res => {
+        this.nodeList = res.data
+        let dict = []
+        for (let i = 0; i < this.nodeList.length; i++) {
+          dict.push({
+            label: this.nodeList[i].dictLabel,
+            value: this.nodeList[i].dictValue
+          })
+        }
+        this.status = 'put'
+        this.$refs.ConstructionDetails.open(dict, null, "修改施工信息", null, this.status)
+      })
+
+    },
+    handleHistory(e, type = null){
+      this.currentId = e.id
+      let dict = []
+      let dists ;
+      if ("地埋扳孔"  == e.modeOperation){
+        dists="bury_the_wrench_hole";
+      }else if ("架空扳孔"  == e.modeOperation){
+        dists="aerial_wrench_hole";
+      }else if ("停气作业"  == e.modeOperation){
+        dists="shutdown_operation";
+      }else if ("PE 封堵"  == e.modeOperation){
+        dists="pe_plugging";
+      }else if ("钢管带气封堵"  == e.modeOperation){
+        dists="the_steel_pipe_sealed_with_gas";
+      }
+      getDicts(dists).then(res => {
+        this.nodeList = res.data
+        for (let i = 0; i < this.nodeList.length; i++) {
+          dict.push({
+            label: this.nodeList[i].dictLabel,
+            value: this.nodeList[i].dictValue
+          })
+        }
+        if (type) {
+          this.status = 'review'
+        } else {
+          this.status = 'read-only'
+        }
+        this.$refs.ConstructionDetails.open(dict, null, "历史施工信息", null, this.status)
+      })
+    },
+    addForm(){
+      // 收集节点信息
+      let nodeCollection = []
+      this.currentCheckList.forEach((e,idx) => {
+        let nodeItem = this.$refs['EnginNodeInfo'+ idx][0].infoCollection()
+        //  console.log(nodeItem)
+        nodeCollection.push(nodeItem)
+      })
+      this.form.zEngineeringNodeBoList = nodeCollection
+      addTouchOperationEngineering(this.form).then(response => {
+        this.$modal.msgSuccess("添加用料成功");
+        this.cancel()
+        this.getList();
+      }).finally(() => {
+        this.buttonLoading = false;
+      });
+    },
+    /** 查询碰口作业列表 */
+    getList() {
+      this.loading = true;
+      listTouchOperationEngineering(this.queryParams).then(response => {
+        this.touchOperationEngineeringList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false;
+      this.title = "";
+      this.reset();
+    },
+    // 表单重置
+    reset() {
+      this.currentCheckList=[]
+      this.nodeList=[]
+      this.form = {
+        id: undefined,
+        modeOperation: undefined,
+        enginName: undefined,
+        locations: undefined,
+        remark: undefined,
+        delFlag: undefined,
+        createBy: undefined,
+        createTime: undefined,
+        updateBy: undefined,
+        updateTime: undefined,
+        updateInfoTime: undefined
+      };
+      this.resetForm("form");
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset();
+      this.open = true;
+      this.title = "添加碰口作业";
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.loading = true;
+      this.reset();
+      const id = row.id || this.ids
+      getTouchOperationEngineering(id).then(response => {
+        this.loading = false;
+        this.form = response.data;
+        this.open = true;
+        this.title = "修改碰口作业";
+      });
+    },
+    handleAddYL(row) {
+      this.loading = true;
+      this.reset();
+      const id = row.id || this.ids
+      getTouchOperationEngineering(id).then(response => {
+        this.loading = false;
+        this.form = response.data;
+        this.open = true;
+        this.title = "添加碰口作业用料信息";
+        let dists ;
+        if ("地埋扳孔"  == response.data.modeOperation){
+          dists="bury_the_wrench_hole";
+        }else if ("架空扳孔"  == response.data.modeOperation){
+          dists="aerial_wrench_hole";
+        }else if ("停气作业"  == response.data.modeOperation){
+          dists="shutdown_operation";
+        }else if ("PE 封堵"  == response.data.modeOperation){
+          dists="pe_plugging";
+        }else if ("钢管带气封堵"  == response.data.modeOperation){
+          dists="the_steel_pipe_sealed_with_gas";
+        }
+        getDicts(dists).then(res => {
+          this.nodeList = res.data
+        })
+      });
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate(valid => {
+        if (valid) {
+          this.buttonLoading = true;
+          if (this.form.id != null) {
+            updateTouchOperationEngineering(this.form).then(response => {
+              this.$modal.msgSuccess("修改成功");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          } else {
+            addTouchOperationEngineering(this.form).then(response => {
+              this.$modal.msgSuccess("新增成功");
+              this.open = false;
+              this.getList();
+            }).finally(() => {
+              this.buttonLoading = false;
+            });
+          }
+        }
+      });
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids;
+      this.$modal.confirm('是否确认删除碰口作业编号为"' + ids + '"的数据项?').then(() => {
+        this.loading = true;
+        return delTouchOperationEngineering(ids);
+      }).then(() => {
+        this.loading = false;
+        this.getList();
+        this.$modal.msgSuccess("删除成功");
+      }).catch(() => {
+      }).finally(() => {
+        this.loading = false;
+      });
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download('zdsz/touchOperationEngineering/export', {
+        ...this.queryParams
+      }, `touchOperationEngineering_${new Date().getTime()}.xlsx`)
+    }
+  }
+};
+</script>