fujunling
2023-07-05 5ef4fa687896d8d3e061a38b0e009e64b018cb79
Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -76,6 +76,8 @@
      :codeClassifyOid="codeClassifyOid"
      :redisOid="redisOid"
      :type="type"
      :title="title"
      :secDTOList="secDTOList"
    ></ShowImportData>
  </el-dialog>
</template>
@@ -135,7 +137,7 @@
      return this.currentTypeObj[this.type]["tipList"];
    },
    downloadTemplateApi() {
      console.log(this.currentTypeObj[this.type], 'this.type');
      console.log(this.currentTypeObj[this.type], "this.type");
      return this.currentTypeObj[this.type]["downloadTemplateFun"];
    },
    action() {
@@ -148,15 +150,16 @@
          classifyAttr: this.classifyAttr,
        };
      } else if (this.type === "batchImportApply") {
        const secDTOList = this.localSecVOList.map(item => {
            return {
              secOid: item.oid,
              secValue: this.codeApplyForm[item.id]
            }
          })
        // eslint-disable-next-line vue/no-side-effects-in-computed-properties
        this.secDTOList = this.localSecVOList.map((item) => {
          return {
            secOid: item.oid,
            secValue: this.codeApplyForm[item.id],
          };
        });
        return {
          codeClassifyOid: this.codeClassifyOid,
          secDTOList: JSON.stringify(secDTOList),
          secDTOList: JSON.stringify(this.secDTOList),
          ...this.codeApplyForm,
        };
      } else if (this.type === "batchApplyCode") {
@@ -212,6 +215,7 @@
          upParams: "classifyAttr",
        },
      },
      secDTOList: [],
    };
  },
  methods: {
@@ -252,9 +256,9 @@
    },
    onSuccess(res) {
      if (Object.keys(res.data).length === 0) {
        this.$message.success(this.title + '导入成功!')
        this.dialogVisible = false
        return
        this.$message.success(this.title + "导入成功!");
        this.dialogVisible = false;
        return;
      }
      if (res.data.fileOid) {
        const fileName = res.data.filePath.split("/").pop();
@@ -277,7 +281,7 @@
      }
    },
    onError(err) {
      console.log(err, 'err');
      console.log(err, "err");
      this.pageLoading.close();
    },
    uploadChange(file) {