gaoluyang
2025-03-07 573265f7d79341298ba4287be38f00ddbc66e7ec
src/views/CNAS/systemManagement/documentRecords/distributionCollectionRecord.vue
@@ -20,9 +20,9 @@
      </div>
      <div class="btn">
        <el-button size="small" type="primary" @click="openAdd">新增</el-button>
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx' :headers="headers"
          :on-change="beforeUpload" :on-error="onError" ref='upload' :on-success="handleSuccessUp"
          style="display:inline-block;margin-left: 20px;">
        <el-upload :action="action" :multiple="false" :show-file-list="false" accept='.doc,.docx'
          :headers="uploadHeader" :on-change="beforeUpload" :on-error="onError" ref='upload'
          :on-success="handleSuccessUp" style="display:inline-block;margin-left: 20px;">
          <el-button type="primary" size="small">导入</el-button></el-upload>
        <el-button size="small" type="primary" @click="handleDown" :loading="outLoading"
          style="display:inline-block;margin-left: 20px;">导出</el-button>
@@ -133,7 +133,6 @@
import {
  getYearAndMonthAndDays
} from '@/utils/date'
import { getToken } from "@/utils/auth";
import {
  selectUserCondition,
} from "@/api/business/inspectionTask.js";
@@ -232,11 +231,6 @@
  },
  // 用于上传文件的信息
  computed: {
    headers() {
      return {
        'Authorization': "Bearer " + getToken()
      }
    },
    action() {
      return this.javaApi + '/manageRecordIssueRecycle/exportInManageRecordIssueRecycle'
    },
@@ -306,10 +300,7 @@
      this.outLoading = true
      exportOutManageRecordIssueRecycle(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        this.$message.success('导出成功')
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, '文件发放与回收记录')
        this.$download.downloadFileFromUrl(res.data, '文件发放与回收记录')
      })
    },
    getList() {
@@ -372,7 +363,7 @@
      this.upLoading = false;
      if (response.code == 200) {
        this.$message.success('上传成功');
        this.refreshTable()()
        this.refreshTable()
      } else {
        this.$message.error('上传失败');
      }
@@ -416,9 +407,6 @@
      if (this.title == '新增') {
        addManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -429,9 +417,6 @@
      } else {
        doManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -453,9 +438,6 @@
        obj = { id, documentCode, documentName, documentVersion, pages, documentType, number, receiveUser, receiveDate, departLims, signedDate: getYearAndMonthAndDays(), signedUser: this.userId }
        doManageRecordIssueRecycle(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -479,7 +461,6 @@
      })
        .then(() => {
          delManageRecordIssueRecycle({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });