gaoluyang
2025-03-14 f2fbb3b07155274408d68084e2d607760c765ad6
src/views/CNAS/systemManagement/documentRecords/cancellationRecord.vue
@@ -101,6 +101,7 @@
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
export default {
  name: 'CancellationRecord',
  components: {
    limsTable
  },
@@ -191,43 +192,6 @@
    this.getFileList()
  },
  methods: {
    getPower() {
      let power = JSON.parse(sessionStorage.getItem('power'))
      let add = false
      let del = false
      let up = false;
      let out = false;
      let ratify = false
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == 'addManageRecordCancel') {
          add = true
        }
        if (power[i].menuMethod == 'delManageRecordCancel') {
          del = true
        }
        if (power[i].menuMethod == 'exportInManageRecordCancel') {
          up = true
        }
        if (power[i].menuMethod == 'ratifyManageRecordCancel') {
          ratify = true
        }
        if (power[i].menuMethod == 'exportOutManageRecordCancel') {
          out = true
        }
      }
      if (!ratify) {
        this.componentData.do.splice(2, 1)
      }
      if (!add) {
        this.componentData.do.splice(1, 1)
      }
      if (!del) {
        this.componentData.do.splice(0, 1)
      }
      this.addPower = add
      this.outPower = out
      this.upPower = up
    },
    openAdd() {
      this.addInfo = {}
      this.title = '新增'
@@ -243,9 +207,7 @@
      this.outLoading = true
      exportOutManageRecordCancel(this.queryParams).then(res => {
        this.outLoading = false
        if (res.code == 201) return this.$message.error('导出失败')
        let url = this.javaApi + '/word/' + res.data
        this.$download.saveAs(url, "作废文件销毁记录");
        this.$download.saveAs(res.data, "作废文件销毁记录");
      })
    },
    getList() {
@@ -326,9 +288,6 @@
      if (this.title == '新增') {
        addManageRecordCancel(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -339,9 +298,6 @@
      } else {
        doManageRecordCancel(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -380,7 +336,6 @@
          if (action === 'confirm') {
            // 点击“确定”按钮,允许关闭
            ratifyManageRecordCancel({ id: row.id, ratifyState: '通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
              this.$message({
@@ -394,7 +349,6 @@
          } else if (action === 'cancel') {
            // 点击“取消”按钮,不允许关闭
            ratifyManageRecordCancel({ id: row.id, ratifyState: '不通过' }).then(res => {
              if (res.code === 201) return
              this.refreshTable()
              done();
              this.$message({
@@ -422,7 +376,6 @@
      })
        .then(() => {
          delManageRecordCancel({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refresh();
          });