| | |
| | | import {
|
| | | downloadHistoryImportTemplate,
|
| | | downloadErrorFile,
|
| | | getHistoryLeftTree,
|
| | | importDataShow,
|
| | | downloadBatchImportApplyTemplate,
|
| | | downloadBatchApplyCodeTemplate,
|
| | | } from "../../api/batchImport/index";
|
| | |
| | | },
|
| | | methods: {
|
| | | async beforeUpload(file) {
|
| | | console.log(file, 'file');
|
| | | const fileType = file.name.split(".").pop();
|
| | | if (fileType !== "xlsx" && fileType !== "xls") {
|
| | | // 上传格式不符合要求,提示错误信息并取消上传
|
| | |
| | | });
|
| | | },
|
| | | 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("请下载错误信息文件进行查看!");
|
| | |
| | | }
|
| | | 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,
|
| | |
| | | }
|
| | | },
|
| | | uploadChange(file) {
|
| | | console.log(file, 'file', file.status === "success");
|
| | | if (file.status === "success" || file.status === "error") {
|
| | | this.pageLoading.close();
|
| | | }
|