gaoluyang
2025-03-14 f2fbb3b07155274408d68084e2d607760c765ad6
src/views/CNAS/systemManagement/documentRecords/regularReviewsRecord.vue
@@ -143,6 +143,7 @@
  pageManageDocumentList,
} from '@/api/cnas/systemManagement/documentControl.js'
export default {
  name: 'RegularReviewsRecord',
  components: {
    limsTable,
    filePreview
@@ -281,61 +282,14 @@
    }
  },
  mounted() {
    // this.entityCopy = this.HaveJson(this.componentData.entity);
    // this.entityCopy0 = this.HaveJson(this.componentData0.entity);
    this.getList()
    this.getList0()
    this.getFileList()
    this.selectEnumByCategory()
  },
  methods: {
    getPower() {
      let power = JSON.parse(sessionStorage.getItem('power'))
      let add = false
      let del = false
      let up = false;
      let out = false;
      let submit = false
      let ratify = false
      for (var i = 0; i < power.length; i++) {
        if (power[i].menuMethod == 'addManageRecordIntervals') {
          add = true
        }
        if (power[i].menuMethod == 'delManageRecordIntervals') {
          del = true
        }
        if (power[i].menuMethod == 'exportInManageRecordIntervals') {
          up = true
        }
        if (power[i].menuMethod == 'exportOutManageRecordIntervals') {
          out = true
        }
        if (power[i].menuMethod == 'submitManageRecordIntervalsTotal') {
          submit = true
        }
        if (power[i].menuMethod == 'ratifyManageRecordIntervalsTotal') {
          ratify = true
        }
      }
      if (!ratify) {
        this.componentData0.do.splice(3, 1)
      }
      if (!submit) {
        this.componentData0.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.$refs.ValueTable.openAddDia(this.$api.manageRecordIssueRecycle.addManageRecordIssueRecycle);
      this.addInfo = {}
      this.title = '新增'
      this.addDialogVisible = true;
@@ -345,7 +299,7 @@
      this.outLoading = true
      exportOutManageRecordIntervals(this.queryParams).then(res => {
        this.outLoading = false
        this.$download.downloadFileFromUrl(res.message, "文件定期审查记录");
        this.$download.saveAs(res.message, "文件定期审查记录");
      })
    },
    getList() {
@@ -474,9 +428,6 @@
      if (this.title == '新增') {
        addManageRecordIntervals(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -487,9 +438,6 @@
      } else {
        doManageRecordIntervals(obj).then(res => {
          this.addLoading = false
          if (res.code == 201) {
            return
          }
          this.addDialogVisible = false
          this.$message({
            type: 'success',
@@ -516,9 +464,6 @@
        ratifyState: state
      }).then(res => {
        this.checkLoading = false
        if (res.code == 201) {
          return
        }
        this.noCheckLoading = false
        this.$message({
          type: 'success',
@@ -541,7 +486,7 @@
      }
    },
    handleDown0(row) {
      this.$download.downloadFileFromUrl(row.url, "所有文件定期检查记录");
      this.$download.saveAs(row.url, "所有文件定期检查记录");
    },
    // 提交
    handleSubmit(row) {
@@ -553,7 +498,6 @@
        submitManageRecordIntervalsTotal({
          id: row.id
        }).then(res => {
          if (res.code === 201) return
          this.$message({
            type: 'success',
            message: '提交成功!'
@@ -575,7 +519,6 @@
      })
        .then(() => {
          delManageRecordIntervals({ id: row.id }).then((res) => {
            if (res.code == 201) return;
            this.$message.success("删除成功");
            this.refreshTable();
          });