jiangbiao 5 ماه پیش
والد
کامیت
c125c82b3f
41فایلهای تغییر یافته به همراه589 افزوده شده و 842 حذف شده
  1. 2 0
      master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFileController.java
  2. 14 4
      ui/src/views/pssr/airtight/index.vue
  3. 14 6
      ui/src/views/pssr/analyzer/index.vue
  4. 14 4
      ui/src/views/pssr/blind/index.vue
  5. 14 6
      ui/src/views/pssr/circuit/index.vue
  6. 17 1
      ui/src/views/pssr/cleaning/index.vue
  7. 35 570
      ui/src/views/pssr/file/index.vue
  8. 14 6
      ui/src/views/pssr/frame/index.vue
  9. 14 6
      ui/src/views/pssr/franklinism/index.vue
  10. 14 6
      ui/src/views/pssr/gasdetector/index.vue
  11. 14 6
      ui/src/views/pssr/hygiene/index.vue
  12. 14 6
      ui/src/views/pssr/instrumentCalibration/index.vue
  13. 14 6
      ui/src/views/pssr/instrumentCalibration/liquidometer.vue
  14. 14 6
      ui/src/views/pssr/instrumentCalibration/regulatingValve.vue
  15. 14 6
      ui/src/views/pssr/laboratory/index.vue
  16. 14 5
      ui/src/views/pssr/lighting/index.vue
  17. 14 5
      ui/src/views/pssr/lock/index.vue
  18. 14 4
      ui/src/views/pssr/material/index.vue
  19. 15 6
      ui/src/views/pssr/materialRaw/index.vue
  20. 14 6
      ui/src/views/pssr/measure/index.vue
  21. 14 5
      ui/src/views/pssr/moc/index.vue
  22. 14 6
      ui/src/views/pssr/motor/index.vue
  23. 14 6
      ui/src/views/pssr/nitrogen/index.vue
  24. 14 6
      ui/src/views/pssr/overhaulExchanger/index.vue
  25. 14 7
      ui/src/views/pssr/overhaulFilter/index.vue
  26. 14 6
      ui/src/views/pssr/overhaulTower/index.vue
  27. 16 8
      ui/src/views/pssr/overhaulValve/index.vue
  28. 14 4
      ui/src/views/pssr/pipe/index.vue
  29. 14 5
      ui/src/views/pssr/power/index.vue
  30. 14 6
      ui/src/views/pssr/protection/index.vue
  31. 14 5
      ui/src/views/pssr/public/index.vue
  32. 14 25
      ui/src/views/pssr/pumpCleaning/index.vue
  33. 14 25
      ui/src/views/pssr/pumpFill/index.vue
  34. 14 25
      ui/src/views/pssr/pumpOverhaul/index.vue
  35. 14 6
      ui/src/views/pssr/safetyBleed/index.vue
  36. 14 6
      ui/src/views/pssr/safetyBreath/index.vue
  37. 14 6
      ui/src/views/pssr/safetyBrust/index.vue
  38. 14 6
      ui/src/views/pssr/safetyFlamearrester/index.vue
  39. 14 5
      ui/src/views/pssr/safetyValve/index.vue
  40. 14 5
      ui/src/views/pssr/torchvoc/index.vue
  41. 14 4
      ui/src/views/pssr/vessel/index.vue

+ 2 - 0
master/src/main/java/com/ruoyi/project/pssr/controller/TPssrFileController.java

@@ -16,6 +16,8 @@ import org.springframework.web.bind.annotation.*;
 import org.springframework.web.multipart.MultipartFile;
 
 import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.List;
 

+ 14 - 4
ui/src/views/pssr/airtight/index.vue

@@ -360,6 +360,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -404,11 +405,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Airtight",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -428,6 +430,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -710,10 +713,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList = []
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/analyzer/index.vue

@@ -330,6 +330,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -362,7 +363,6 @@ import {
   getAnalyzer,
   handleConfirmAnalyzer,
   handleTurnDownAnalyzer,
-  importTemplate,
   listAnalyzer,
   updateAnalyzer,
   updateAnalyzerBatch,
@@ -374,12 +374,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Analyzer",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -400,6 +400,7 @@ export default {
         // 是否显示弹出层(报告附件)
         open: false,
         fileList: [],
+        visible: false,
         queryParams: {
           itemId: null,
           subId: this.subId,
@@ -675,10 +676,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 4
ui/src/views/pssr/blind/index.vue

@@ -427,6 +427,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -469,11 +470,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Blind",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -493,6 +495,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -825,10 +828,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList = []
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/circuit/index.vue

@@ -396,6 +396,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -428,7 +429,6 @@ import {
   getCircuit,
   handleConfirmCircuit,
   handleTurnDownCircuit,
-  importTemplate,
   listCircuit,
   updateCircuit,
   updateCircuitBatch,
@@ -440,12 +440,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
 import {listFile} from "@/api/pssr/file";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Circuit",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -465,6 +465,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -753,10 +754,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 17 - 1
ui/src/views/pssr/cleaning/index.vue

@@ -379,6 +379,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -421,11 +422,12 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Cleaning",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   // components: { Editor },
   props: {
     subId: {
@@ -446,6 +448,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -662,6 +665,19 @@ export default {
         this.msgSuccess("删除成功");
       })
     },
+    handleDoc(row) {
+      this.doc.queryParams.itemId = row.id
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
+    },
     /** 导出按钮操作 */
     handleExport() {
       const queryParams = this.queryParams;

+ 35 - 570
ui/src/views/pssr/file/index.vue

@@ -1,597 +1,62 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="检查内容表id" prop="subId">
-        <el-input
-          v-model="queryParams.subId"
-          placeholder="请输入检查内容表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="子表id" prop="itemId">
-        <el-input
-          v-model="queryParams.itemId"
-          placeholder="请输入子表id"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="关联表简称" prop="forShort">
-        <el-input
-          v-model="queryParams.forShort"
-          placeholder="请输入关联表简称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="附件名称" prop="fileName">
-        <el-input
-          v-model="queryParams.fileName"
-          placeholder="请输入附件名称"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="附件地址" prop="fileUrl">
-        <el-input
-          v-model="queryParams.fileUrl"
-          placeholder="请输入附件地址"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="附件大小" prop="fileSize">
-        <el-input
-          v-model="queryParams.fileSize"
-          placeholder="请输入附件大小"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建人" prop="createrCode">
-        <el-input
-          v-model="queryParams.createrCode"
-          placeholder="请输入创建人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="创建时间" prop="createdate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.createdate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择创建时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="修改人" prop="updaterCode">
-        <el-input
-          v-model="queryParams.updaterCode"
-          placeholder="请输入修改人"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="修改时间" prop="updatedate">
-        <el-date-picker clearable size="small" style="width: 200px"
-          v-model="queryParams.updatedate"
-          type="date"
-          value-format="yyyy-MM-dd"
-          placeholder="选择修改时间">
-        </el-date-picker>
-      </el-form-item>
-      <el-form-item label="部门编号" prop="deptId">
-        <el-input
-          v-model="queryParams.deptId"
-          placeholder="请输入部门编号"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="备注" prop="remarks">
-        <el-input
-          v-model="queryParams.remarks"
-          placeholder="请输入备注"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="cyan" 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"
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['pssr:file:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['pssr:file:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['pssr:file:remove']"
-        >删除</el-button>
-      </el-col>
-        <el-col :span="1.5">
-            <el-button
-                    type="info"
-                    icon="el-icon-upload2"
-                    size="mini"
-                    @click="handleImport"
-                    v-hasPermi="['pssr:file:edit']"
-            >导入</el-button>
-        </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['pssr:file:export']"
-        >导出</el-button>
-      </el-col>
-	  <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row>
-
-    <el-table v-loading="loading" :data="fileList" @selection-change="handleSelectionChange" :height="clientHeight" border>
-      <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="附件id" align="center" prop="fileId" :show-overflow-tooltip="true"/>
-      <el-table-column label="检查内容表id" align="center" prop="subId" :show-overflow-tooltip="true"/>
-      <el-table-column label="子表id" align="center" prop="itemId" :show-overflow-tooltip="true"/>
-      <el-table-column label="关联表简称" align="center" prop="forShort" :show-overflow-tooltip="true"/>
-      <el-table-column label="附件名称" align="center" prop="fileName" :show-overflow-tooltip="true"/>
-      <el-table-column label="附件地址" align="center" prop="fileUrl" :show-overflow-tooltip="true"/>
-      <el-table-column label="附件大小" align="center" prop="fileSize" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建人" align="center" prop="createrCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="创建时间" align="center" prop="createdate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createdate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="修改人" align="center" prop="updaterCode" :show-overflow-tooltip="true"/>
-      <el-table-column label="修改时间" align="center" prop="updatedate" width="100">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.updatedate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="部门编号" align="center" prop="deptId" :show-overflow-tooltip="true"/>
-      <el-table-column label="备注" align="center" prop="remarks" :show-overflow-tooltip="true"/>
-      <el-table-column label="操作" align="center" fixed="right" width="120" 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="['pssr:file:edit']"
-          >修改</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['pssr:file: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"
-    />
-
-    <!-- 添加或修改PSSR附件对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="检查内容表id" prop="subId">
-          <el-input v-model="form.subId" placeholder="请输入检查内容表id" />
-        </el-form-item>
-        <el-form-item label="子表id" prop="itemId">
-          <el-input v-model="form.itemId" placeholder="请输入子表id" />
-        </el-form-item>
-        <el-form-item label="关联表简称" prop="forShort">
-          <el-input v-model="form.forShort" placeholder="请输入关联表简称" />
-        </el-form-item>
-        <el-form-item label="附件名称" prop="fileName">
-          <el-input v-model="form.fileName" placeholder="请输入附件名称" />
-        </el-form-item>
-        <el-form-item label="附件地址" prop="fileUrl">
-          <el-input v-model="form.fileUrl" placeholder="请输入附件地址" />
-        </el-form-item>
-        <el-form-item label="附件大小" prop="fileSize">
-          <el-input v-model="form.fileSize" placeholder="请输入附件大小" />
-        </el-form-item>
-        <el-form-item label="删除状态" prop="delFlag">
-          <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
-        </el-form-item>
-        <el-form-item label="创建人" prop="createrCode">
-          <el-input v-model="form.createrCode" placeholder="请输入创建人" />
-        </el-form-item>
-        <el-form-item label="创建时间" prop="createdate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.createdate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择创建时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="修改人" prop="updaterCode">
-          <el-input v-model="form.updaterCode" placeholder="请输入修改人" />
-        </el-form-item>
-        <el-form-item label="修改时间" prop="updatedate">
-          <el-date-picker clearable size="small" style="width: 200px"
-            v-model="form.updatedate"
-            type="date"
-            value-format="yyyy-MM-dd"
-            placeholder="选择修改时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="部门编号" prop="deptId">
-          <el-input v-model="form.deptId" placeholder="请输入部门编号" />
-        </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注" />
-        </el-form-item>
-          <el-form-item label="归属部门" prop="deptId">
-              <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="请选择归属部门" />
-          </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm">确 定</el-button>
-        <el-button @click="cancel">取 消</el-button>
-      </div>
-    </el-dialog>
-      <!-- 批量修改对话框 -->
-    <el-dialog :close-on-click-modal="false" title="批量修改" :visible.sync="openBatch" width="500px" append-to-body>
-      <el-form ref="form" :model="form" label-width="80px">
-        <el-form-item>
-          <span>已选择 {{ ids.length }} 条数据</span>
-        </el-form-item>
-        <el-form-item label="确认人1" prop="confirm1"
-                      v-if="isApprove==0">
-          <el-select v-model="form.confirm1" clearable filterable style="width: 100%;"
-                     placeholder="请选择确认人1">
-            <el-option v-for="user in userOptions"
-                       :label="user.nickName"
-                       :value="user.userId+''"
-                       :key="user.userId"/>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="确认人2" prop="confirm2"
-                      v-if="isApprove==0">
-          <el-select v-model="form.confirm2" clearable filterable style="width: 100%;"
-                     placeholder="请选择确认人2">
-            <el-option v-for="user in userOptions"
-                       :label="user.nickName"
-                       :value="user.userId+''"
-                       :key="user.userId"/>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="时间" prop="confirmationDate">
-          <el-date-picker clearable size="small" style="width: 200px"
-                          v-model="form.confirmationDate"
-                          type="date"
-                          value-format="yyyy-MM-dd"
-                          placeholder="选择时间">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="备注" prop="remarks">
-          <el-input v-model="form.remarks" placeholder="请输入备注"/>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitFormBatch">确 定</el-button>
-        <el-button @click="cancelBatch">取 消</el-button>
-      </div>
-    </el-dialog>
-      <!-- 用户导入对话框 -->
-      <el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
-          <el-upload
-                  ref="upload"
-                  :limit="1"
-                  accept=".xlsx, .xls"
-                  :headers="upload.headers"
-                  :action="upload.url + '?updateSupport=' + upload.updateSupport"
-                  :disabled="upload.isUploading"
-                  :on-progress="handleFileUploadProgress"
-                  :on-success="handleFileSuccess"
-                  :auto-upload="false"
-                  drag
-          >
-              <i class="el-icon-upload"></i>
-              <div class="el-upload__text">
-                  将文件拖到此处,或
-                  <em>点击上传</em>
-              </div>
-              <div class="el-upload__tip" slot="tip">
-                  <el-checkbox v-model="upload.updateSupport" />是否更新已经存在的用户数据
-                  <el-link type="info" style="font-size:12px" @click="importTemplate">下载模板</el-link>
-              </div>
-              <div class="el-upload__tip" style="color:red" slot="tip">提示:仅允许导入“xls”或“xlsx”格式文件!</div>
-          </el-upload>
-          <div slot="footer" class="dialog-footer">
-              <el-button type="primary" @click="submitFileForm">确 定</el-button>
-              <el-button @click="upload.open = false">取 消</el-button>
-          </div>
-      </el-dialog>
-
     <!-- 附件对话框 -->
-    <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
-               width="1000px">
-      <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
+    <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="open" append-to-body title="现场照片"
+               width="1000px" destroy-on-close :key="uploadKey">
+      <el-upload
+        :action="action"
+        :headers="headers"
+        list-type="picture-card"
+        :file-list="fileList"
+        :on-preview="handlePictureCardPreview"
+        :on-remove="handleRemove">
+        <i class="el-icon-plus"></i>
+      </el-upload>
+    </el-dialog>
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="">
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {addFile, delFile, exportFile, getFile, importTemplate, listFile, updateFile} from "@/api/pssr/file";
-import {treeselect} from "@/api/system/dept";
+import {delFile} from "@/api/pssr/file";
 import {getToken} from "@/utils/auth";
-import Treeselect from "@riophae/vue-treeselect";
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 
 export default {
-  name: "File",
-  components: { Treeselect },
+  name: "pssrFile",
   data() {
     return {
-      // 遮罩层
-      loading: true,
-      // 选中数组
-      ids: [],
-      // 非单个禁用
-      single: true,
-      // 非多个禁用
-      multiple: true,
-      // 显示搜索条件
-      showSearch: false,
-      // 总条数
-      total: 0,
       // PSSR附件表格数据
       fileList: [],
-      // 弹出层标题
-      title: "",
-      // 部门树选项
-      deptOptions: undefined,
-      clientHeight:300,
       // 是否显示弹出层
       open: false,
-      openBatch: false,
-        // 用户导入参数
-        upload: {
-            // 是否显示弹出层(用户导入)
-            open: false,
-            // 弹出层标题(用户导入)
-            title: "",
-            // 是否禁用上传
-            isUploading: false,
-            // 是否更新已经存在的用户数据
-            updateSupport: 0,
-            // 设置上传的请求头部
-            headers: { Authorization: "Bearer " + getToken() },
-            // 上传的地址
-            url: process.env.VUE_APP_BASE_API + "/pssr/file/importData"
-        },
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 20,
-        subId: null,
-        itemId: null,
-        forShort: null,
-        fileName: null,
-        fileUrl: null,
-        fileSize: null,
-        createrCode: null,
-        createdate: null,
-        updaterCode: null,
-        updatedate: null,
-        deptId: null,
-        remarks: null
-      },
-      // 表单参数
-      form: {},
-      // 表单校验
-      rules: {
-      }
+      uploadKey:null,
+      dialogImageUrl: '',
+      dialogVisible: false,
+      headers: {Authorization: "Bearer " + getToken()},
+      action: null,
     };
   },
-  watch: {
-        // 根据名称筛选部门树
-        deptName(val) {
-            this.$refs.tree.filter(val);
-        }
-   },
-  created() {
-      //设置表格高度对应屏幕高度
-      this.$nextTick(() => {
-          this.clientHeight = document.body.clientHeight -250
-      })
-    this.getList();
-    this.getTreeselect();
-  },
   methods: {
-    /** 查询PSSR附件列表 */
-    getList() {
-      this.loading = true;
-      listFile(this.queryParams).then(response => {
-        this.fileList = response.rows;
-        this.total = response.total;
-        this.loading = false;
-      });
-    },
-     /** 查询部门下拉树结构 */
-     getTreeselect() {
-          treeselect().then(response => {
-              this.deptOptions = response.data;
-          });
-     },
-    // 取消按钮
-    cancel() {
-      this.open = false;
-      this.reset();
-    },
-    // 表单重置
-    reset() {
-      this.form = {
-        fileId: null,
-        subId: null,
-        itemId: null,
-        forShort: null,
-        fileName: null,
-        fileUrl: null,
-        fileSize: null,
-        delFlag: null,
-        createrCode: null,
-        createdate: null,
-        updaterCode: null,
-        updatedate: null,
-        deptId: null,
-        remarks: null
-      };
-      this.resetForm("form");
-    },
-    /** 搜索按钮操作 */
-    handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
-    },
-    /** 重置按钮操作 */
-    resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
-    },
-    // 多选框选中数据
-    handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.fileId)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
-    },
-    /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
+    init(subId, forShort, itemId, fileList) {
       this.open = true;
-      this.title = "添加PSSR附件";
-    },
-    /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
-      const fileId = row.fileId || this.ids
-      getFile(fileId).then(response => {
-        this.form = response.data;
-        this.open = true;
-        this.title = "修改PSSR附件";
+      this.fileList = fileList;
+      this.uploadKey = Date.now();
+      this.fileList.forEach(item => {
+        item.url = process.env.VUE_APP_BASE_API + item.fileUrl;
+        item.name = item.fileName;
       });
+      this.action = process.env.VUE_APP_BASE_API + "/pssr/file/uploadFile?subId=" + subId + "&itemId=" + itemId
+        + "&forShort=" + forShort
     },
-    /** 提交按钮 */
-    submitForm() {
-      this.$refs["form"].validate(valid => {
-        if (valid) {
-          if (this.form.fileId != null) {
-            updateFile(this.form).then(response => {
-              this.msgSuccess("修改成功");
-              this.open = false;
-              this.getList();
-            });
-          } else {
-            addFile(this.form).then(response => {
-              this.msgSuccess("新增成功");
-              this.open = false;
-              this.getList();
-            });
-          }
-        }
-      });
-    },
-    /** 删除按钮操作 */
-    handleDelete(row) {
-      const fileIds = row.fileId || this.ids;
-      this.$confirm('是否确认删除?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delFile(fileIds);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        })
-    },
-    /** 导出按钮操作 */
-    handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有PSSR附件数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportFile(queryParams);
-        }).then(response => {
-          this.download(response.msg);
-        })
+    handleRemove(file, fileList) {
+      delFile(file.fileId)
     },
-      /** 导入按钮操作 */
-      handleImport() {
-          this.upload.title = "用户导入";
-          this.upload.open = true;
-      },
-      /** 下载模板操作 */
-      importTemplate() {
-          importTemplate().then(response => {
-              this.download(response.msg);
-          });
-      },
-      // 文件上传中处理
-      handleFileUploadProgress(event, file, fileList) {
-          this.upload.isUploading = true;
-      },
-      // 文件上传成功处理
-      handleFileSuccess(response, file, fileList) {
-          this.upload.open = false;
-          this.upload.isUploading = false;
-          this.$refs.upload.clearFiles();
-          this.$alert(response.msg, "导入结果", { dangerouslyUseHTMLString: true });
-          this.getList();
-      },
-      // 提交上传文件
-      submitFileForm() {
-          this.$refs.upload.submit();
-      }
+    handlePictureCardPreview(file) {
+      this.dialogImageUrl = file.url;
+      this.dialogVisible = true;
+    }
   }
 };
 </script>

+ 14 - 6
ui/src/views/pssr/frame/index.vue

@@ -371,6 +371,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -403,7 +404,6 @@ import {
   getFrame,
   handleConfirmFrame,
   handleTurnDownFrame,
-  importTemplate,
   listFrame,
   updateFrame,
   updateFrameBatch,
@@ -415,12 +415,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Frame",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -440,6 +440,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -697,10 +698,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/franklinism/index.vue

@@ -311,6 +311,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -342,7 +343,6 @@ import {
   getFranklinism,
   handleConfirmFranklinism,
   handleTurnDownFranklinism,
-  importTemplate,
   listFranklinism,
   updateFranklinism,
   updateFranklinismBatch,
@@ -354,12 +354,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Franklinism",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   // components: { Editor },
   props: {
     subId: {
@@ -380,6 +380,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -625,10 +626,17 @@ export default {
       },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/gasdetector/index.vue

@@ -320,6 +320,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -351,7 +352,6 @@ import {
   getGasdetector,
   handleConfirmGasdetector,
   handleTurnDownGasdetector,
-  importTemplate,
   listGasdetector,
   updateGasdetector,
   updateGasdetectorBatch,
@@ -363,12 +363,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Gasdetector",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -388,6 +388,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -635,10 +636,17 @@ export default {
       },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/hygiene/index.vue

@@ -385,6 +385,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -416,7 +417,6 @@ import {
   getHygiene,
   handleConfirmHygiene,
   handleTurnDownHygiene,
-  importTemplate,
   listHygiene,
   updateHygiene,
   updateHygieneBatch,
@@ -427,13 +427,13 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
-import {updateMaterialBatch} from "@/api/pssr/material";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Hygiene",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   // components: { Editor },
   props: {
     subId: {
@@ -454,6 +454,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -759,10 +760,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/instrumentCalibration/index.vue

@@ -333,6 +333,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -365,7 +366,6 @@ import {
   getInstrumentCalibration,
   handleConfirmInstrumentCalibration,
   handleTurnDownInstrumentCalibration,
-  importTemplate,
   listInstrumentCalibration,
   updateInstrumentCalibration,
   updateInstrumentCalibrationBatch,
@@ -377,12 +377,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "InstrumentCalibration",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -402,6 +402,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -684,10 +685,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/instrumentCalibration/liquidometer.vue

@@ -335,6 +335,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -367,7 +368,6 @@ import {
   getInstrumentCalibration,
   handleConfirmInstrumentCalibration,
   handleTurnDownInstrumentCalibration,
-  importTemplate,
   listInstrumentCalibration,
   updateInstrumentCalibration,
   updateInstrumentCalibrationBatch,
@@ -379,12 +379,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "liquidometer",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -404,6 +404,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -686,10 +687,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/instrumentCalibration/regulatingValve.vue

@@ -339,6 +339,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -371,7 +372,6 @@ import {
   getInstrumentCalibration,
   handleConfirmInstrumentCalibration,
   handleTurnDownInstrumentCalibration,
-  importTemplate,
   listInstrumentCalibration,
   updateInstrumentCalibration,
   updateInstrumentCalibrationBatch,
@@ -383,12 +383,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "regulatingValve",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -408,6 +408,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -693,10 +694,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/laboratory/index.vue

@@ -339,6 +339,7 @@
           </div>
       </el-dialog>
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -372,7 +373,6 @@ import {
   getLaboratory,
   handleConfirmLaboratory,
   handleTurnDownLaboratory,
-  importTemplate,
   listLaboratory,
   updateLaboratory,
   updateLaboratoryBatch,
@@ -383,13 +383,13 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Laboratory",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -406,6 +406,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -723,10 +724,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/lighting/index.vue

@@ -313,6 +313,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -356,12 +357,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Lighting",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   // components: { Editor },
   props: {
     subId: {
@@ -386,6 +387,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -660,10 +662,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/lock/index.vue

@@ -375,6 +375,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog :close-on-click-modal="false" v-dialogDrag title="现场照片" :visible.sync="doc.open" width="1000px"
                append-to-body>
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -419,12 +420,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {listLockPid} from "@/api/apply/lock";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Lock",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -444,6 +445,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -775,10 +777,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList = []
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 4
ui/src/views/pssr/material/index.vue

@@ -288,6 +288,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -332,11 +333,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Material",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -356,6 +358,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -602,10 +605,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 15 - 6
ui/src/views/pssr/materialRaw/index.vue

@@ -287,6 +287,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -315,7 +316,6 @@
 import {
   addMaterialRaw,
   delMaterialRaw,
-  exportMaterialRaw,
   getMaterialRaw,
   handleConfirmMaterialRaw,
   handleTurnDownMaterialRaw,
@@ -324,7 +324,7 @@ import {
   updateMaterialRaw,
   updateMaterialRawBatch
 } from "@/api/pssr/materialRaw";
-import { exportMaterial } from "@/api/pssr/material";
+import {exportMaterial} from "@/api/pssr/material";
 import {treeselect} from "@/api/system/dept";
 import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
@@ -332,11 +332,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "MaterialRaw",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -356,6 +357,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -625,10 +627,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/measure/index.vue

@@ -346,6 +346,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -378,7 +379,6 @@ import {
   getMeasure,
   handleConfirmMeasure,
   handleTurnDownMeasure,
-  importTemplate,
   listMeasure,
   updateMeasure,
   updateMeasureBatch,
@@ -390,11 +390,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMocBatch} from "@/api/pssr/moc";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   name: "Measure",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -414,6 +414,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -671,10 +672,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/moc/index.vue

@@ -363,6 +363,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -408,11 +409,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   name: "Moc",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -432,6 +433,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -707,10 +709,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList = []
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/motor/index.vue

@@ -327,6 +327,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -358,7 +359,6 @@ import {
   getMotor,
   handleConfirmMotor,
   handleTurnDownMotor,
-  importTemplate,
   listMotor,
   updateMotor,
   updateMotorBatch,
@@ -370,12 +370,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Motor",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   props: {
     subId: {
       type: Number,
@@ -395,6 +395,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -671,10 +672,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/nitrogen/index.vue

@@ -351,6 +351,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -382,7 +383,6 @@ import {
   getNitrogen,
   handleConfirmNitrogen,
   handleTurnDownNitrogen,
-  importTemplate,
   listNitrogen,
   updateNitrogen,
   updateNitrogenBatch,
@@ -394,12 +394,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Nitrogen",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -419,6 +419,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -678,10 +679,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/overhaulExchanger/index.vue

@@ -397,6 +397,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc_p.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc_p.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc_p.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -429,7 +430,6 @@ import {
   getOverhaulExchanger,
   handleConfirmApprove,
   handleTurnDownExchanger,
-  importTemplate,
   listOverhaulExchanger,
   updateOverhaulExchanger,
   updateOverhaulExchangerBatch,
@@ -444,12 +444,12 @@ import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {getSubcontent} from "@/api/pssr/subcontent";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "OverhaulExchanger",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -477,6 +477,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -823,10 +824,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDocP(row) {
-      this.doc_p.fileList = []
-      this.doc_p.open = true;
       this.doc_p.queryParams.itemId = row.id
-      this.getPFileList()
+      if (row.approveStatus == 0) {
+        this.doc_p.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc_p.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc_p.fileList = []
+        this.doc_p.open = true;
+        this.getPFileList()
+      }
     },
     getPFileList() {
       listFile(this.doc_p.queryParams).then(response => {

+ 14 - 7
ui/src/views/pssr/overhaulFilter/index.vue

@@ -334,6 +334,7 @@
       </div>
     </el-dialog>
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc_p.visible" ref="pssrFile"/>
     <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
                append-to-body>
       <el-upload v-show="isApprove==0"
@@ -440,7 +441,6 @@ import {
   getOverhaulFilter,
   handleConfirmApprove,
   handleTurnDownFilter,
-  importTemplate,
   listOverhaulFilter,
   updateOverhaulFilter,
   updateOverhaulFilterBatch,
@@ -450,18 +450,17 @@ import {getToken} from "@/utils/auth";
 import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {groupList} from "@/api/pssr/region";
-import {getSubcontent} from "@/api/pssr/subcontent";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 
 export default {
   dicts:['pssr_approve_status'],
   name: "OverhaulFilter",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -481,6 +480,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -802,10 +802,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDocP(row) {
-      this.doc_p.fileList = []
-      this.doc_p.open = true;
       this.doc_p.queryParams.itemId = row.id
-      this.getPFileList()
+      if (row.approveStatus == 0) {
+        this.doc_p.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc_p.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc_p.fileList = []
+        this.doc_p.open = true;
+        this.getPFileList()
+      }
     },
     getPFileList() {
       listFile(this.doc_p.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/overhaulTower/index.vue

@@ -324,6 +324,7 @@
       </div>
     </el-dialog>
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc_p.visible" ref="pssrFile"/>
     <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
                append-to-body>
       <el-upload v-show="isApprove==0"
@@ -429,7 +430,6 @@ import {
   getOverhaulTower,
   handleConfirmApprove,
   handleTurnDownTower,
-  importTemplate,
   listOverhaulTower,
   updateOverhaulTower,
   updateOverhaulTowerBatch,
@@ -444,13 +444,13 @@ import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {getSubcontent} from "@/api/pssr/subcontent";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 
 export default {
   dicts:['pssr_approve_status'],
   name: "OverhaulTower",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -470,6 +470,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -790,10 +791,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDocP(row) {
-      this.doc_p.fileList = []
-      this.doc_p.open = true;
       this.doc_p.queryParams.itemId = row.id
-      this.getPFileList()
+      if (row.approveStatus == 0) {
+        this.doc_p.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc_p.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc_p.fileList = []
+        this.doc_p.open = true;
+        this.getPFileList()
+      }
     },
     getPFileList() {
       listFile(this.doc_p.queryParams).then(response => {

+ 16 - 8
ui/src/views/pssr/overhaulValve/index.vue

@@ -319,6 +319,7 @@
       </div>
     </el-dialog>
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc_p.visible" ref="pssrFile"/>
     <el-dialog :close-on-click-modal="false" v-dialogDrag :title="doc.title" :visible.sync="doc.open" width="1000px"
                append-to-body>
       <el-upload v-show="isApprove==0"
@@ -423,7 +424,6 @@ import {
   getOverhaulValve,
   handleConfirmApprove,
   handleTurnDownValve,
-  importTemplate,
   listOverhaulValve,
   updateOverhaulValve,
   updateOverhaulValveBatch,
@@ -438,12 +438,12 @@ import {listFile} from "@/api/pssr/file";
 import {getSubcontent} from "@/api/pssr/subcontent";
 import {doApprove} from "@/api/pssr/approve";
 import {allFileList, delCommonfile} from "@/api/common/commonfile";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "OverhaulValve",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -463,6 +463,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -805,11 +806,18 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDocP(row) {
-      this.doc_p.fileList = []
-      this.doc_p.open = true;
-      this.doc_p.queryParams.itemId = row.id
-      this.getPFileList()
-    },
+        this.doc_p.queryParams.itemId = row.id
+        if (row.approveStatus == 0) {
+          this.doc_p.visible = true;
+          this.$nextTick(() => {
+            this.$refs.pssrFile.init(this.subId, this.doc_p.queryParams.forShort, row.id, row.fileList)
+          })
+        } else {
+          this.doc_p.fileList = []
+          this.doc_p.open = true;
+          this.getPFileList()
+        }
+      },
     getPFileList() {
       listFile(this.doc_p.queryParams).then(response => {
         this.doc_p.fileList = response.rows;

+ 14 - 4
ui/src/views/pssr/pipe/index.vue

@@ -390,6 +390,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -435,11 +436,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Pipe",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -459,6 +461,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -743,10 +746,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/power/index.vue

@@ -306,6 +306,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -348,12 +349,12 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   name: "Power",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   dicts:['pssr_approve_status'],
   props: {
     subId: {
@@ -375,6 +376,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -681,10 +683,17 @@ export default {
     },
   /** 报告附件按钮操作 */
   handleDoc(row) {
-    this.doc.fileList=[]
-    this.doc.open = true;
     this.doc.queryParams.itemId = row.id
-    this.getFileList()
+    if (row.approveStatus == 0) {
+      this.doc.visible = true;
+      this.$nextTick(() => {
+        this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+      })
+    } else {
+      this.doc.fileList = []
+      this.doc.open = true;
+      this.getFileList()
+    }
   },
   getFileList() {
     listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/protection/index.vue

@@ -316,6 +316,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -347,7 +348,6 @@ import {
   getProtection,
   handleConfirmProtection,
   handleTurnDownProtection,
-  importTemplate,
   listProtection,
   updateProtection,
   updateProtectionBatch,
@@ -359,12 +359,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "Protection",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   // components: { Editor },
   props: {
     subId: {
@@ -385,6 +385,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -632,10 +633,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/public/index.vue

@@ -373,6 +373,7 @@
           </div>
       </el-dialog>
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -415,13 +416,13 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Public",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   // components: { Editor },
   props: {
     subId: {
@@ -439,6 +440,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -746,10 +748,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 25
ui/src/views/pssr/pumpCleaning/index.vue

@@ -337,6 +337,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -368,7 +369,6 @@ import {
   getPumpCleaning,
   handleConfirmPumpCleaning,
   handleTurnDownPumpCleaning,
-  importTemplate,
   listPumpCleaning,
   updatePumpCleaning,
   updatePumpCleaningBatch,
@@ -380,12 +380,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "PumpCleaning",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -405,6 +405,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -660,29 +661,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
-    },
-    getFileList() {
-      listFile(this.doc.queryParams).then(response => {
-        this.doc.fileList = response.rows;
-        this.doc.fileList.forEach(item => {
-          item.fileUrl = process.env.VUE_APP_BASE_API + item.fileUrl;
-        });
-      });
-    },
-    // 提交上传文件
-    submitFileForm() {
-      this.$refs.upload.submit();
-    },
-    /** 报告附件按钮操作 */
-    handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
-      this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 25
ui/src/views/pssr/pumpFill/index.vue

@@ -345,6 +345,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -377,7 +378,6 @@ import {
   getPumpFill,
   handleConfirmPumpFill,
   handleTurnDownPumpFill,
-  importTemplate,
   listPumpFill,
   updatePumpFill,
   updatePumpFillBatch,
@@ -388,12 +388,12 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "PumpFill",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -413,6 +413,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -668,29 +669,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
-    },
-    getFileList() {
-      listFile(this.doc.queryParams).then(response => {
-        this.doc.fileList = response.rows;
-        this.doc.fileList.forEach(item => {
-          item.fileUrl = process.env.VUE_APP_BASE_API + item.fileUrl;
-        });
-      });
-    },
-    // 提交上传文件
-    submitFileForm() {
-      this.$refs.upload.submit();
-    },
-    /** 报告附件按钮操作 */
-    handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
-      this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 25
ui/src/views/pssr/pumpOverhaul/index.vue

@@ -334,6 +334,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -367,7 +368,6 @@ import {
   getPumpOverhaul,
   handleConfirmPumpOverhaul,
   handleTurnDownPumpOverhaul,
-  importTemplate,
   listPumpOverhaul,
   updatePumpOverhaul,
   updatePumpOverhaulBatch,
@@ -378,12 +378,12 @@ import Treeselect from "@riophae/vue-treeselect";
 import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "PumpOverhaul",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -403,6 +403,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -654,29 +655,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
-    },
-    getFileList() {
-      listFile(this.doc.queryParams).then(response => {
-        this.doc.fileList = response.rows;
-        this.doc.fileList.forEach(item => {
-          item.fileUrl = process.env.VUE_APP_BASE_API + item.fileUrl;
-        });
-      });
-    },
-    // 提交上传文件
-    submitFileForm() {
-      this.$refs.upload.submit();
-    },
-    /** 报告附件按钮操作 */
-    handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
-      this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/safetyBleed/index.vue

@@ -371,6 +371,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -401,7 +402,6 @@ import {
   delSafetyBleed,
   exportSafetyBleed,
   getSafetyBleed,
-  importTemplate,
   listSafetyBleed,
   updateSafetyBleed,
   updateSafetyBleedBatch,
@@ -414,12 +414,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {handleConfirmBleed, handleTurnDownBleed} from "@/api/pssr/safety";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "SafetyBleed",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -439,6 +439,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -700,10 +701,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/safetyBreath/index.vue

@@ -371,6 +371,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -401,7 +402,6 @@ import {
   delSafetyBreath,
   exportSafetyBreath,
   getSafetyBreath,
-  importTemplate,
   listSafetyBreath,
   updateSafetyBreath,
   updateSafetyBreathBatch,
@@ -414,12 +414,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {handleConfirmBreath, handleTurnDownBreath} from "@/api/pssr/safety";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "SafetyBreath",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -439,6 +439,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -696,10 +697,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/safetyBrust/index.vue

@@ -381,6 +381,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -411,7 +412,6 @@ import {
   delSafetyBrust,
   exportSafetyBrust,
   getSafetyBrust,
-  importTemplate,
   listSafetyBrust,
   updateSafetyBrust,
   updateSafetyBrustBatch,
@@ -424,12 +424,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
 import {handleConfirmBrust, handleTurnDownBrust} from "@/api/pssr/safety";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "SafetyBrust",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -449,6 +449,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -706,10 +707,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 6
ui/src/views/pssr/safetyFlamearrester/index.vue

@@ -357,6 +357,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -388,7 +389,6 @@ import {
   delSafetyFlamearrester,
   exportSafetyFlamearrester,
   getSafetyFlamearrester,
-  importTemplate,
   listSafetyFlamearrester,
   updateSafetyFlamearrester,
   updateSafetyFlamearresterBatch,
@@ -401,12 +401,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {handleconfirmFlamearrester, handleturnDownFlamearrester} from "@/api/pssr/safety";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "SafetyFlamearrester",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -426,6 +426,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -675,10 +676,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/safetyValve/index.vue

@@ -362,6 +362,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -405,12 +406,12 @@ import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {handleconfirmValve, handleturnDownValve} from "@/api/pssr/safety";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts: ['pssr_approve_status'],
   name: "SafetyValve",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -430,6 +431,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -687,10 +689,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 5
ui/src/views/pssr/torchvoc/index.vue

@@ -322,6 +322,7 @@
       </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -366,12 +367,12 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
 import {doApprove} from "@/api/pssr/approve";
-import {updateMaterialBatch} from "@/api/pssr/material";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   dicts:['pssr_approve_status'],
   name: "Torchvoc",
-  components: { Treeselect },
+  components: {PssrFile, Treeselect },
   // components: { Editor },
   props: {
     subId: {
@@ -396,6 +397,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -665,10 +667,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {

+ 14 - 4
ui/src/views/pssr/vessel/index.vue

@@ -379,6 +379,7 @@
     </el-dialog>
 
     <!-- 附件对话框 -->
+    <pssr-file v-if="doc.visible" ref="pssrFile"/>
     <el-dialog v-dialogDrag :close-on-click-modal="false" :visible.sync="doc.open" append-to-body title="现场照片"
                width="1000px">
       <el-image v-for="file in doc.fileList" :key="file.id" :src="file.fileUrl" lazy></el-image>
@@ -424,10 +425,11 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import {doApprove} from "@/api/pssr/approve";
 import {getPssrUser} from "@/api/pssr/aboveall";
 import {listFile} from "@/api/pssr/file";
+import PssrFile from "@/views/pssr/file/index.vue";
 
 export default {
   name: "Vessel",
-  components: {Treeselect},
+  components: {PssrFile, Treeselect},
   props: {
     subId: {
       type: Number,
@@ -447,6 +449,7 @@ export default {
         file: "",
         // 是否显示弹出层(报告附件)
         open: false,
+        visible: false,
         fileList: [],
         queryParams: {
           itemId: null,
@@ -703,10 +706,17 @@ export default {
     },
     /** 报告附件按钮操作 */
     handleDoc(row) {
-      this.doc.fileList=[]
-      this.doc.open = true;
       this.doc.queryParams.itemId = row.id
-      this.getFileList()
+      if (row.approveStatus == 0) {
+        this.doc.visible = true;
+        this.$nextTick(() => {
+          this.$refs.pssrFile.init(this.subId, this.doc.queryParams.forShort, row.id, row.fileList)
+        })
+      } else {
+        this.doc.fileList = []
+        this.doc.open = true;
+        this.getFileList()
+      }
     },
     getFileList() {
       listFile(this.doc.queryParams).then(response => {