|
@@ -337,6 +337,9 @@ export default {
|
|
|
this.getRoleList();
|
|
|
this.getListByDept();
|
|
|
this.getDict();
|
|
|
+
|
|
|
+ // 获取上次导出的数据信息
|
|
|
+ this.getExportInfoStatus();
|
|
|
},
|
|
|
mounted() {
|
|
|
// 50 隐藏沟通专员
|
|
@@ -348,9 +351,6 @@ export default {
|
|
|
console.log(res);
|
|
|
if (res.data.code === 0 && res.data.data) {
|
|
|
this.getExportInfoStatus();
|
|
|
- this.downShow = true;
|
|
|
- this.exportUserInfoText = '数据生成中';
|
|
|
- this.exportUserInfoDisabled = true;
|
|
|
}
|
|
|
},
|
|
|
// 获取导出状态
|
|
@@ -359,10 +359,9 @@ export default {
|
|
|
const res = await getExportResult({
|
|
|
type: 'USER'
|
|
|
});
|
|
|
-
|
|
|
if (res.data.code === 0) {
|
|
|
+ this.downShow = true;
|
|
|
const status = res.data.data.status;
|
|
|
-
|
|
|
if (status === 'GENERATING') {
|
|
|
this.exportUserInfoText = '数据生成中';
|
|
|
this.exportUserInfoDisabled = true;
|
|
@@ -371,11 +370,13 @@ export default {
|
|
|
this.exportUserInfoText = '下载数据';
|
|
|
this.exportUserInfoDisabled = false;
|
|
|
clearInterval(timer);
|
|
|
- } else {
|
|
|
+ } else if (status === 'ERROR') {
|
|
|
// 可选:处理其他状态
|
|
|
- this.exportUserInfoText = '导出失败';
|
|
|
+ this.exportUserInfoText = res.data.data.errorMsg;
|
|
|
this.exportUserInfoDisabled = false;
|
|
|
clearInterval(timer);
|
|
|
+ }else {
|
|
|
+ this.downShow = fasle;
|
|
|
}
|
|
|
} else {
|
|
|
// 接口报错处理
|