From e888346ebcd8e3e099a15c7edd7bf367c057193a Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 04 三月 2025 15:33:33 +0800
Subject: [PATCH] Merge branch 'refs/heads/dev'

---
 src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue |  703 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 703 insertions(+), 0 deletions(-)

diff --git a/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue b/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue
new file mode 100644
index 0000000..e61df1a
--- /dev/null
+++ b/src/views/CNAS/systemManagement/documentControl/components/FileChangeRequest.vue
@@ -0,0 +1,703 @@
+<template>
+  <!-- 鏂囦欢鍙樻洿鐢宠 -->
+  <div class="file-change-request" style="height: 100%;">
+    <div class="search">
+      <div class="search_thing">
+        <div class="search_label">鐢宠鏂囦欢缂栧彿锛�</div>
+        <div class="search_input"><el-input v-model="queryParams.code" clearable placeholder="璇疯緭鍏�" size="small"
+            @keyup.enter.native="refreshTable()"></el-input></div>
+      </div>
+      <div class="search_thing" style="padding-left: 30px;">
+        <el-button size="small" @click="refresh()">閲� 缃�</el-button>
+        <el-button size="small" type="primary" @click="refreshTable()">鏌� 璇�</el-button>
+      </div>
+      <div class="btns">
+        <el-button size="small" type="primary"
+          @click="addDialogVisible = true, addInfo = {}, currentFile = {}, title = '鏂囦欢鍙樻洿鐢宠'">鏂囦欢鍙樻洿鐢宠</el-button>
+        <el-button :loading="outLoading" size="small" type="primary" @click="handleOut">瀵煎嚭</el-button>
+      </div>
+    </div>
+    <div class="table">
+      <lims-table :tableData="tableData" :column="column" :page="page" :tableLoading="tableLoading"
+        :height="'calc(100vh - 290px)'" @pagination="pagination"></lims-table>
+    </div>
+    <el-dialog :title="title" :visible.sync="addDialogVisible" top="0vh" width="950px">
+      <el-row>
+        <el-col :span="12" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label"><span style="color:red;margin-right: 4px;">*</span>鐢宠缂栧彿锛�</div>
+            <div class="search_input"><el-input v-model="addInfo.code" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="12" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">瀹℃壒浜猴細</div>
+            <div class="search_input">
+              <el-select v-model="addInfo.checkUser" :disabled="title == '瀹℃牳'" filterable size="small"
+                style="width: 100%;">
+                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="12" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">鏈熸湜鍙樻洿鏃堕棿锛�</div>
+            <div class="search_input">
+              <el-date-picker v-model="addInfo.expectAlterDate" :disabled="title == '瀹℃牳'" format="yyyy-MM-dd"
+                placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 100%;" type="date" value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="12" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">瀹為檯鍙樻洿鏃堕棿锛�</div>
+            <div class="search_input">
+              <el-date-picker v-model="addInfo.actuallyAlterDate" :disabled="title == '瀹℃牳'" format="yyyy-MM-dd"
+                placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 100%;" type="date" value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing">
+            <div class="search_label">閫夋嫨鏂囦欢锛�</div>
+            <div class="search_input">
+              <el-select v-model="addInfo.alterBeforeCode" :disabled="title == '瀹℃牳'" allow-create clearable filterable
+                size="small" style="width: 100%;" @change="getCurrentFile">
+                <el-option v-for="item in fileList" :key="item.documentCode" :label="item.title"
+                  :value="item.documentCode">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="24">
+          <h4 class="title">褰撳墠鏂囦欢淇℃伅</h4>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鏂囦欢缂栧彿锛�</div>
+            <div class="search_input"><el-input v-model="currentFile.documentCode" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鏂囦欢鍚嶇О锛�</div>
+            <div class="search_input"><el-input v-model="currentFile.name" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鏂囦欢鐗堟湰锛�</div>
+            <div class="search_input"><el-input v-model="currentFile.version" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鎻愪氦浜猴細</div>
+            <div class="search_input"><el-select v-model="currentFile.createUser" disabled filterable size="small"
+                style="width: 100%;">
+                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select></div>
+          </div>
+        </el-col>
+        <!-- <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">瀹℃牳浜猴細</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.version" disabled></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">浣滃簾浜猴細</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.version" disabled></el-input></div>
+          </div>
+        </el-col> -->
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鎻愪氦鏃堕棿锛�</div>
+            <div class="search_input"><el-input v-model="currentFile.createTime" clearable disabled placeholder="璇疯緭鍏�"
+                size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">瀹℃牳鏃堕棿锛�</div>
+            <div class="search_input"><el-input v-model="currentFile.effectiveDate" clearable disabled placeholder="璇疯緭鍏�"
+                size="small"></el-input></div>
+          </div>
+        </el-col>
+        <!-- <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">浣滃簾鏃堕棿锛�</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.version" disabled></el-input></div>
+          </div>
+        </el-col> -->
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鏂囦欢鐘舵�侊細</div>
+            <div class="search_input">
+              <el-select v-model="currentFile.state" disabled size="small" style="width: 100%;">
+                <el-option v-for="item in fileState" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </el-col>
+        <!-- <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鏂囦欢璇存槑锛�</div>
+            <div class="search_input"><el-input size="small" placeholder="璇疯緭鍏�" clearable v-model="addInfo.instructions" type="textarea"
+              :rows="2" disabled></el-input></div>
+          </div>
+        </el-col> -->
+        <el-col :span="24">
+          <h4 class="title">鏂囦欢鍙樻洿鐢宠</h4>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鍙樻洿鍚庣紪鍙凤細</div>
+            <div class="search_input"><el-input v-model="addInfo.alterAfterCode" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鍙樻洿鍚庡悕绉帮細</div>
+            <div class="search_input"><el-input v-model="addInfo.alterAfterName" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鍓嶄竴鐗堟湰澶勭悊锛�</div>
+            <div class="search_input">
+              <el-select v-model="addInfo.method" :disabled="title == '瀹℃牳'" size="small" style="width: 100%;">
+                <el-option label="浣滃簾" value="浣滃簾"></el-option>
+                <el-option label="瀛樻。涓嶅彲鐢�" value="瀛樻。涓嶅彲鐢�">
+                </el-option>
+              </el-select>
+            </div>
+          </div>
+        </el-col>
+        <el-col :span="8" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鍙樻洿鍚庣増鏈細</div>
+            <div class="search_input"><el-input v-model="addInfo.alterAfterVersion" :disabled="title == '瀹℃牳'" clearable
+                placeholder="璇疯緭鍏�" size="small"></el-input></div>
+          </div>
+        </el-col>
+        <el-col :span="16" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鍙樻洿璇存槑锛�</div>
+            <div class="search_input"><el-input v-model="addInfo.alterNote" :disabled="title == '瀹℃牳'" :rows="2"
+                clearable placeholder="璇疯緭鍏�" size="small" type="textarea"></el-input></div>
+          </div>
+        </el-col>
+        <el-col v-if="title != '瀹℃牳'" :span="24" style="margin-bottom: 16px;">
+          <div class="search_thing" style="width: 100%;">
+            <div class="search_label">鐩稿叧闄勪欢锛�</div>
+            <div class="search_input"><el-upload v-if="addDialogVisible" :auto-upload="false" :multiple="false"
+                :on-change="handleChangeUpload" accept='.pdf' action="#" style="margin: 8px 0 0px 50px;">
+                <el-button size="small" type="primary">涓婁紶闄勪欢</el-button>
+              </el-upload></div>
+          </div>
+        </el-col>
+        <UpPdfStamp v-if="title == '瀹℃牳' && addDialogVisible" ref="UpPdfStamp" :isUpFile="false" @uploadPDF="uploadPDF">
+        </UpPdfStamp>
+      </el-row>
+      <span v-if="title != '瀹℃牳'" slot="footer" class="dialog-footer">
+        <el-button @click="addDialogVisible = false">鍙� 娑�</el-button>
+        <el-button :loading="addLoading" type="primary" @click="handleAdd">纭� 瀹�</el-button>
+      </span>
+      <span v-else slot="footer" class="dialog-footer">
+        <el-button :loading="noCheckLoading" @click="handleCheckSub('涓嶉�氳繃')">涓嶉�氳繃</el-button>
+        <el-button :loading="checkLoading" type="primary" @click="handleCheckSub('閫氳繃')">閫� 杩�</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog :visible.sync="lookDialogVisible" fullscreen title="鏌ョ湅闄勪欢" top="5vh" width="800px">
+      <filePreview v-if="lookDialogVisible" :currentFile="{}" :fileUrl="javaApi + '/word/' + currentInfo.alterAfterUrl"
+        style="height: 90vh;overflow-y: auto;" />
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import limsTable from "@/components/Table/lims-table.vue";
+import UpPdfStamp from '@/components/UpPdfStamp/index.vue'
+import filePreview from '@/components/Preview/filePreview.vue'
+import {
+  selectUserCondition,
+} from "@/api/system/user.js";
+import {
+  exportManageDocumentAlter,
+  pageManageDocumentList,
+  addManageDocumentAlter,
+  doManageDocumentAlter,
+  checkManageDocumentAlterPdf,
+  checkManageDocumentAlter,
+  delManageDocumentAlter,
+  pageManageDocumentAlter,
+} from '@/api/cnas/systemManagement/documentControl.js'
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    limsTable,
+    filePreview,
+    UpPdfStamp,
+  },
+  computed: {
+    ...mapGetters(["userId"]),
+  },
+  data() {
+    return {
+      title: '鏂囦欢鍙樻洿鐢宠',
+      noCheckLoading: false,
+      checkLoading: false,
+      addDialogVisible: false,
+      addInfo: {},
+      addPower: false,
+      outPower: false,
+      outLoading: false,
+      personList: [],
+      fileList: [],
+      currentFile: {},
+      fileState: [],
+      file: null,
+      addLoading: false,
+      lookDialogVisible: false,
+      currentInfo: {
+      },
+      type: null,
+      fileName: null,
+      queryParams: {},
+      tableData: [],
+      column: [
+        { label: "鐢宠缂栧彿", prop: "code" },
+        { label: "鐢宠浜�", prop: "createUserName", width: "120px" },
+        {
+          label: "鍙樻洿璇存槑",
+          prop: "alterNote",
+        },
+        { label: "鏈熸湜鍙樻洿鏃堕棿", prop: "expectAlterDate" },
+        { label: "瀹為檯鍙樻洿鏃堕棿", prop: "actuallyAlterDate" },
+        {
+          label: "鐘舵��", prop: "state", dataType: "tag",
+          formatData: (params) => {
+            return params;
+          },
+          formatType: (params) => {
+            if (params == '閫氳繃') {
+              return 'success'
+            } else {
+              return 'danger'
+            }
+          },
+        },
+        {
+          dataType: "action",
+          fixed: "right",
+          label: "鎿嶄綔",
+          operation: [
+            {
+              name: "缂栬緫",
+              type: "text",
+              clickFun: (row) => {
+                this.handleUpdate(row);
+              },
+              disabled: (row, index) => {
+                return row.state == '閫氳繃'
+              }
+            },
+            {
+              name: "鍒犻櫎",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDelete(row);
+              },
+              disabled: (row, index) => {
+                return row.state == '閫氳繃'
+              }
+            },
+            {
+              name: "瀹℃牳",
+              type: "text",
+              clickFun: (row) => {
+                this.handleCheck(row);
+              },
+              disabled: (row, index) => {
+                return row.checkUser != this.userId || row.state == '閫氳繃'
+              }
+            },
+            {
+              name: "鏌ョ湅闄勪欢",
+              type: "text",
+              clickFun: (row) => {
+                this.handleLook(row);
+              },
+            },
+            {
+              name: "涓嬭浇闄勪欢",
+              type: "text",
+              clickFun: (row) => {
+                this.handleDown(row);
+              },
+            },
+          ],
+        },
+      ],
+      page: {
+        total: 0,
+        size: 10,
+        current: 0,
+      },
+      tableLoading: false,
+    }
+  },
+  mounted() {
+    this.getList()
+    this.getAuthorizedPerson()
+    this.getFileList()
+    this.selectEnumByCategory()
+  },
+  methods: {
+    getPower() {
+      let power = JSON.parse(sessionStorage.getItem('power'))
+      let up = false
+      let del = false
+      let add = false
+      let out = false
+      for (var i = 0; i < power.length; i++) {
+        if (power[i].menuMethod == 'addManageDocumentAlter') {
+          up = true
+        }
+        if (power[i].menuMethod == 'addManageDocumentAlter') {
+          add = true
+        }
+        if (power[i].menuMethod == 'delManageDocumentAlter') {
+          del = true
+        }
+        if (power[i].menuMethod == 'exportManageDocumentAlter') {
+          out = true
+        }
+      }
+      if (!del) {
+        this.componentData.do.splice(1, 1)
+      }
+      if (!up) {
+        this.componentData.do.splice(0, 1)
+      }
+      this.addPower = add
+      this.outPower = out
+    },
+    getList() {
+      this.tableLoading = true;
+      let param = { ...this.queryParams, ...this.page };
+      delete param.total;
+      pageManageDocumentAlter({ ...param })
+        .then((res) => {
+          this.tableLoading = false;
+          if (res.code === 200) {
+            this.tableData = res.data.records;
+            this.page.total = res.data.total;
+          }
+        })
+        .catch((err) => {
+          this.tableLoading = false;
+        });
+    },
+    pagination({ page, limit }) {
+      this.page.current = page;
+      this.page.size = limit;
+      this.getList();
+    },
+    refresh() {
+      this.queryParams = {};
+      this.page.current = 1;
+      this.getList();
+    },
+    refreshTable() {
+      this.page.current = 1;
+      this.getList();
+    },
+    // 瀵煎嚭
+    handleOut() {
+      this.outLoading = true
+      exportManageDocumentAlter(this.queryParams).then(res => {
+        this.outLoading = false
+        const blob = new Blob([res], { type: 'application/octet-stream' });
+        this.$download.saveAs(blob, '鏂囦欢鍙樻洿璁板綍.xlsx')
+      })
+    },
+    getAuthorizedPerson() {
+      selectUserCondition().then(res => {
+        let data = []
+        res.data.forEach(a => {
+          data.push({
+            label: a.name,
+            value: a.id
+          })
+        })
+        this.personList = data
+      })
+    },
+    // 鑾峰彇鏂囦欢鍒楄〃--鏂囦欢娓呭崟
+    getFileList() {
+      pageManageDocumentList({
+        current: -1,
+        size: -1
+      }).then(res => {
+        this.fileList = res.data.records.map(m => {
+          m.title = m.documentCode + ':' + m.name
+          return m
+        })
+      }).catch(err => { })
+    },
+    // 褰撳墠鏂囦欢
+    getCurrentFile(e) {
+      this.currentFile = this.fileList.find(m => m.documentCode == e)
+      if (!this.currentFile) {
+        this.currentFile = {}
+      }
+    },
+    selectEnumByCategory() {
+      // 鏂囦欢鐘舵��
+      this.getDicts("document_state").then((response) => {
+        this.fileState = this.dictToValue(response.data);
+      });
+    },
+    handleChangeUpload(file, fileLists) {
+      this.file = file
+      this.$set(this.addInfo, 'alterAfterName', file.name)
+    },
+    handleAdd() {
+      if (!this.addInfo.code) return this.$message({ type: 'error', message: "璇疯緭鍏ョ敵璇风紪鍙�" })
+      if (!this.addInfo.id) {
+        // 鏂板
+        let fd = new FormData();
+        //鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
+        if (this.file) {
+          fd.append("file", this.file.raw);
+        }
+        for (let m in this.addInfo) {
+          fd.append(m, this.addInfo[m])
+        }
+        let { name, version, documentCode } = this.currentFile;
+        fd.append("alterBeforeName", name);
+        fd.append("alterBeforeVersion", version);
+        // fd.append("alterBeforeCode",documentCode);
+        this.addLoading = true
+        addManageDocumentAlter(fd).then(res => {
+          this.addLoading = false
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '娣诲姞鎴愬姛'
+            })
+            this.refreshTable()
+            this.addDialogVisible = false
+          } else {
+            this.$message({
+              type: 'error',
+              message: '娣诲姞澶辫触'
+            })
+          }
+        })
+      } else {
+        // 淇敼
+        let fd = new FormData();
+        //鏂囦欢淇℃伅涓璻aw鎵嶆槸鐪熺殑鏂囦欢
+        if (this.file) {
+          fd.append("file", this.file.raw);
+        }
+        let { name, version } = this.currentFile;
+        fd.append("alterBeforeName", name);
+        fd.append("alterBeforeVersion", version);
+        let { code, checkUser, expectAlterDate, actuallyAlterDate, alterAfterCode, method, alterAfterVersion, alterNote, alterAfterName, id } = this.addInfo
+        fd.append("code", code);
+        fd.append("checkUser", checkUser);
+        fd.append("expectAlterDate", expectAlterDate);
+        fd.append("actuallyAlterDate", actuallyAlterDate);
+        fd.append("alterAfterCode", alterAfterCode);
+        fd.append("method", method);
+        fd.append("alterAfterVersion", alterAfterVersion);
+        fd.append("alterNote", alterNote);
+        fd.append("alterAfterName", alterAfterName);
+        fd.append("id", id);
+        this.addLoading = true
+        doManageDocumentAlter(fd).then(res => {
+          this.addLoading = false
+          if (res.code == 200) {
+            this.$message({
+              type: 'success',
+              message: '淇敼鎴愬姛'
+            })
+            this.refreshTable()
+            this.addDialogVisible = false
+          } else {
+            this.$message({
+              type: 'error',
+              message: '淇敼澶辫触'
+            })
+          }
+        })
+      }
+    },
+    // 缂栬緫
+    handleUpdate(row) {
+      this.title = '鏂囦欢鍙樻洿鐢宠'
+      this.addInfo = this.HaveJson(row)
+      let alterBeforeCode = this.addInfo.alterBeforeCode
+      this.getCurrentFile(alterBeforeCode)
+      this.addDialogVisible = true
+    },
+    // 棰勮
+    handleLook(row) {
+      this.currentInfo = this.HaveJson(row)
+      this.lookDialogVisible = true
+    },
+    // 涓嬭浇闄勪欢
+    handleDown(row) {
+      if (!row.alterAfterUrl) return this.$message.warning('鏂囦欢鏈笂浼�')
+      let url = this.javaApi + '/word/' + row.alterAfterUrl
+      this.$download.saveAs(url, row.alterAfterUrl)
+    },
+    // 鎵撳紑瀹℃牳寮规
+    handleCheck(row) {
+      this.title = '瀹℃牳'
+      this.fileName = row.alterAfterName
+      if (!row.alterAfterUrl) return this.$message.warning('鏂囦欢鏈笂浼�')
+      this.addInfo = this.HaveJson(row)
+      let alterBeforeCode = this.addInfo.alterBeforeCode
+      this.getCurrentFile(alterBeforeCode)
+      this.addDialogVisible = true
+      checkManageDocumentAlterPdf({ id: row.id }).then(res => {
+        //
+        const blob = new Blob([res]);
+        const file = new File([blob], row.name, { type: 'application/pdf' })
+        this.$refs.UpPdfStamp.lookFile(file)
+        this.currentInfo = row
+      }).catch(err => {
+        console.log(err)
+      })
+    },
+    // 瀹℃牳淇濆瓨
+    async uploadPDF(pdfBlob) {
+      const formData = new FormData();
+      formData.append('file', pdfBlob, this.fileName + '.pdf'); // 鏂囦欢瀛楁
+      formData.append('id', this.currentInfo.id); // 鏂囦欢鍚嶅瓧娈�
+      formData.append('state', this.type); // 鏂囦欢鍚嶅瓧娈�
+
+      let res = await checkManageDocumentAlter(formData)
+      this.checkLoading = false
+      this.noCheckLoading = false
+      if (res.code == 200) {
+        this.$message({ message: '鎿嶄綔鎴愬姛', type: 'success' });
+        this.addDialogVisible = false;
+        this.refreshTable()
+        return true
+      } else {
+        this.$message({ message: '鎿嶄綔澶辫触', type: 'error' });
+        return false
+      }
+    },
+    // 鎻愪氦瀹℃牳
+    handleCheckSub(type) {
+      this.type = type
+      if (type == '閫氳繃') {
+        this.checkLoading = true
+      } else {
+        this.noCheckLoading = true
+      }
+      this.addLoading = true
+      this.$refs['UpPdfStamp'].generatePDF()
+    },
+    handleDelete(row) {
+      this.$confirm("鏄惁鍒犻櫎璇ユ潯鏁版嵁?", "鎻愮ず", {
+        confirmButtonText: "纭畾",
+        cancelButtonText: "鍙栨秷",
+        type: "warning",
+      })
+        .then(() => {
+          delManageDocumentAlter({ id: row.id }).then((res) => {
+            if (res.code == 201) return;
+            this.$message.success("鍒犻櫎鎴愬姛");
+            this.refresh();
+          });
+        })
+        .catch(() => { });
+    },
+  }
+}
+</script>
+
+<style scoped>
+.title {
+  height: 60px;
+  line-height: 60px;
+}
+
+.search {
+  background-color: #fff;
+  height: 40px;
+  display: flex;
+  align-items: center;
+  position: relative;
+}
+
+.search_thing {
+  width: 350px;
+  display: flex;
+  align-items: center;
+}
+
+.search_label {
+  width: 110px;
+  font-size: 14px;
+  text-align: right;
+}
+
+.search_input {
+  width: calc(100% - 110px);
+}
+
+.table {
+  background-color: #fff;
+  height: calc(100% - 60px - 80px);
+  padding: 20px;
+}
+
+.btns {
+  position: absolute;
+  right: 20px;
+  top: 5px;
+}
+
+h4.title {
+  position: relative;
+  height: 30px;
+  line-height: 30px;
+  box-sizing: border-box;
+  padding-left: 16px;
+  margin-left: 10px;
+  margin-bottom: 10px;
+}
+
+h4.title::after {
+  content: '';
+  width: 4px;
+  height: 20px;
+  background: #3A7BFA;
+  position: absolute;
+  top: 5px;
+  left: 0;
+}
+</style>

--
Gitblit v1.9.3