From 495da50c21fa91b3bd0d37d2ed158a0ba0d79335 Mon Sep 17 00:00:00 2001
From: 康东 <98470202+kangdong59@users.noreply.github.com>
Date: 星期一, 26 六月 2023 11:12:18 +0800
Subject: [PATCH] 业务类型Feign模糊查询
---
Source/UBCS-WEB/src/components/BatchImport/index.vue | 52 ++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 46 insertions(+), 6 deletions(-)
diff --git a/Source/UBCS-WEB/src/components/BatchImport/index.vue b/Source/UBCS-WEB/src/components/BatchImport/index.vue
index 3c674f4..fbfd844 100644
--- a/Source/UBCS-WEB/src/components/BatchImport/index.vue
+++ b/Source/UBCS-WEB/src/components/BatchImport/index.vue
@@ -29,6 +29,7 @@
:headers="uploadHeaders"
:on-success="onSuccess"
:show-file-list="false"
+ :on-change="uploadChange"
:data="{
codeClassifyOid: this.codeClassifyOid,
classifyAttr: this.classifyAttr,
@@ -46,9 +47,16 @@
:loading="downloadLoading"
>涓嬭浇瀵煎叆妯℃澘</el-button
>
- <el-button size="small" @click="visible = false">鍏抽棴</el-button>
+ <el-button size="small" @click="dialogVisible = false">鍏抽棴</el-button>
</template>
- <ShowImportData :visible="showVisible" v-if="showVisible"></ShowImportData>
+ <ShowImportData
+ :visible.sync="showVisible"
+ v-if="dialogVisible"
+ :leftTree="leftTree"
+ :classifyAttr="classifyAttr"
+ :codeClassifyOid="codeClassifyOid"
+ :redisOid="redisOid"
+ ></ShowImportData>
</el-dialog>
</template>
@@ -57,6 +65,7 @@
import {
downloadHistoryImportTemplate,
downloadErrorFile,
+ getHistoryLeftTree
} from "../../api/batchImport/index";
import { getToken } from "@/util/auth";
export default {
@@ -86,6 +95,9 @@
uploadParams: {},
downloadLoading: false,
showVisible: false,
+ leftTree: [],
+ redisOid:'',
+ pageLoading: null
};
},
computed: {
@@ -139,19 +151,47 @@
codeClassifyOid: this.codeClassifyOid,
})
.then((res) => {
- this.downloadLoading = false;
this.$utilFunc.downloadFileByBlob(res.data, "鍘嗗彶鏁版嵁瀵煎叆妯℃澘.xls");
+ this.downloadLoading = false;
})
.catch(() => {
this.downloadLoading = false;
});
},
onSuccess(res) {
- if (res.code === 400) {
- this.$message.error(`${res.msg}锛岃涓嬭浇閿欒淇℃伅杩涜鏌ョ湅锛乣);
+ let fileName = res.data.filePath.split('/').pop()
+ if (res.data.fileOid) {
+ this.$message.error("璇蜂笅杞介敊璇俊鎭枃浠惰繘琛屾煡鐪嬶紒");
+ downloadErrorFile({ uuid: res.data.fileOid }).then((res2) => {
+ this.$utilFunc.downloadFileByBlob(res2.data, fileName);
+ });
}
- downloadErrorFile({ uuid: res.data.fileOid });
+ if (res.data.redisUuid) {
+ this.redisOid = res.data.redisUuid
+ getHistoryLeftTree(res.data.redisUuid).then(res => {
+ this.leftTree = res.obj.map(item => {
+ return {
+ ...item.codeClassifyTemplateVO,
+ cloNamesList: item.cloNamesList
+ }
+ })
+ this.showVisible = true
+ })
+ }
},
+ uploadChange(file) {
+ if (file.status === 'ready') {
+ this.pageLoading = this.$loading({
+ lock: true,
+ text: '鏂囦欢涓婁紶涓�',
+ spinner: 'el-icon-loading',
+ background: 'rgba(0, 0, 0, 0.7)'
+ });
+ }
+ if (file.status === 'success' || file.status === 'error') {
+ this.pageLoading.close()
+ }
+ }
},
watch: {
visible: {
--
Gitblit v1.10.0