spring
2025-04-02 235f0b0e3605082bb2127dc6d87f4a7eef33c6de
src/views/standard/standardLibrary/audit.vue
@@ -18,6 +18,10 @@
</template>
<script>
import {
  standardProductListRecordPage,
  productListCheck,
} from "@/api/standard/standardLibrary";
import limsTable from "@/components/Table/lims-table.vue";
export default {
  components: {
@@ -28,21 +32,39 @@
      queryParams: {},
      tableData: [],
      column: [
        { label: "更新原因", prop: "number" },
        { label: "更新时间", prop: "name" },
        { label: "更新原因", prop: "remark" },
        { label: "更新时间", prop: "updateTime" },
        { label: "更新人", prop: "remark" },
        { label: "状态", prop: "remark" },
        {
          label: "状态", prop: "checkStatus",
          dataType: "tag",
          formatData: (params) => {
            let obj = this.checkStatusList.find((m) => m.value == params)
            if (obj) {
              return obj.label
            }
          },
          formatType: (params) => {
            let obj = this.checkStatusList.find((m) => m.value == params)
            if (obj) {
              return obj.type
            }
          }
        },
        {
          dataType: "action",
          label: "操作",
          operation: [
            {
              name: "上传附件",
              name: "上传",
              type: "upload",
              accept: '.jpg,.jpeg,.png,.gif,.doc,.docx,.xls,.xlsx,.pdf',
              url: '/insReport/inReport',
              url: '/updateRecord/uploadRecordFile',
              uploadIdFun: (row) => {
                return row.id
              },
              handleSuccessUp: () => {
                this.getList()
              }
            },
            {
@@ -59,7 +81,12 @@
              name: "查看",
              type: "text",
              clickFun: (row) => {
                this.handleLook(row);
                this.$tab.closeRightPage();
                this.$router.push({
                  path: "/audit/auditDetail", query: {
                    auditId: row.id
                  }
                });
              },
            },
            {
@@ -78,14 +105,39 @@
        current: 0,
      },
      tableLoading: false,
      checkStatusList: [
        {
          value: 0,
          label: '未提交',
          type: 'danger'
        },
        {
          value: 1,
          label: '待审核',
          type: 'warning'
        },
        {
          value: 2,
          label: '通过',
          type: 'success'
        },
        {
          value: 3,
          label: '不通过',
          type: 'danger'
        },
      ],
    }
  },
  mounted() {
    this.getList()
  },
  methods: {
    getList() {
      this.tableLoading = true;
      let param = { ...this.queryParams, ...this.page };
      delete param.total;
      selectStandardTemplatePageList({ ...param })
      standardProductListRecordPage({ ...param })
        .then((res) => {
          this.tableLoading = false;
          if (res.code === 200) {
@@ -122,10 +174,26 @@
        beforeClose: (action, instance, done) => {
          if (action === 'confirm') {
            // 通过
            this.refresh();
            productListCheck({
              checkStatus: 2,
              id: row.id
            }).then(res => {
              if (res.code == 200) {
                this.refresh()
                done();
              }
            })
          } else if (action === 'cancel') {
            // 不通过
            this.refresh();
            productListCheck({
              checkStatus: 3,
              id: row.id
            }).then(res => {
              if (res.code == 200) {
                this.refresh()
                done();
              }
            })
          } else if (action === 'close') {
            // 点击“×”按钮,不允许关闭
            done();
@@ -134,11 +202,9 @@
        }
      })
    },
    // 查看
    handleLook(row) { },
    // 下载附件
    handleDown(row) {
      this.$download.saveAs(row.fileUrl, row.fileName);
      this.$download.saveAs(row.filePath, row.fileName);
    },
  }
}