ludc
2023-07-03 4b42ec4cf0fd085752b563b146aed696098b3d3a
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -84,7 +84,7 @@
import {
  downloadHistoryImportTemplate,
  downloadErrorFile,
  getHistoryLeftTree,
  importDataShow,
  downloadBatchImportApplyTemplate,
  downloadBatchApplyCodeTemplate,
} from "../../api/batchImport/index";
@@ -208,6 +208,7 @@
  },
  methods: {
    async beforeUpload(file) {
      console.log(file, 'file');
      const fileType = file.name.split(".").pop();
      if (fileType !== "xlsx" && fileType !== "xls") {
        // 上传格式不符合要求,提示错误信息并取消上传
@@ -243,6 +244,11 @@
        });
    },
    onSuccess(res) {
      if (Object.keys(res.data).length === 0) {
        this.$message.success(this.title + '导入成功!')
        this.dialogVisible = false
        return
      }
      let fileName = res.data.filePath.split("/").pop();
      if (res.data.fileOid) {
        this.$message.error("请下载错误信息文件进行查看!");
@@ -252,7 +258,7 @@
      }
      if (res.data.redisUuid) {
        this.redisOid = res.data.redisUuid;
        getHistoryLeftTree(res.data.redisUuid).then((res) => {
        importDataShow(res.data.redisUuid).then((res) => {
          this.leftTree = res.obj.map((item) => {
            return {
              ...item.codeClassifyTemplateVO,
@@ -264,6 +270,7 @@
      }
    },
    uploadChange(file) {
      console.log(file, 'file', file.status === "success");
      if (file.status === "success" || file.status === "error") {
        this.pageLoading.close();
      }