Compare commits

...

2 Commits

Author SHA1 Message Date
刘泉佳 e4ae1d3c77 fix: 推送合规失败提示与拦截器重复弹出,合并为单条 2026-10-22 20:20:41 +08:00
刘泉佳 96783fcd7b feat: 推送合规按钮增加加载遮罩防重复操作 2026-10-22 20:08:02 +08:00
2 changed files with 36 additions and 20 deletions
+18 -10
View File
@@ -1771,6 +1771,12 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
const loading = this.$loading({
lock: true,
text: '正在推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
this.hcsRepushingId = row.id;
hcsRepush('contract', row.id)
.then(res => {
@@ -1781,14 +1787,12 @@ export default {
this.$message.success(res.data?.data || '推送合规成功');
this.onLoad(this.page, this.query);
})
.catch(error => {
// 拦截器已弹出后端 msg(如特批审核中禁止重推),此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
}
.catch(() => {
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
})
.finally(() => {
this.hcsRepushingId = null;
loading.close();
});
});
},
@@ -1808,6 +1812,12 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
const loading = this.$loading({
lock: true,
text: '正在批量推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
this.hcsRepushingId = 'batch';
hcsRepushBatch('contract', this.selectionList.map(item => item.id))
.then(res => {
@@ -1818,14 +1828,12 @@ export default {
this.$message.success(res.data?.data || '批量推送合规完成');
this.onLoad(this.page, this.query);
})
.catch(error => {
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
}
.catch(() => {
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
})
.finally(() => {
this.hcsRepushingId = null;
loading.close();
});
});
},
+18 -10
View File
@@ -1670,6 +1670,12 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
const loading = this.$loading({
lock: true,
text: '正在推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
this.hcsRepushingId = row.id;
hcsRepush('project', row.id)
.then(res => {
@@ -1680,14 +1686,12 @@ export default {
this.$message.success(res.data?.data || '推送合规成功');
this.onLoad(this.page, this.query);
})
.catch(error => {
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '推送合规失败');
}
.catch(() => {
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
})
.finally(() => {
this.hcsRepushingId = null;
loading.close();
});
});
},
@@ -1707,6 +1711,12 @@ export default {
cancelButtonText: '取消',
type: 'warning',
}).then(() => {
// 同步推送合规耗时较长,加遮罩防重复操作(照审批通过遮罩)
const loading = this.$loading({
lock: true,
text: '正在批量推送合规,请稍候…',
background: 'rgba(255, 255, 255, 0.6)',
});
this.hcsRepushingId = 'batch';
hcsRepushBatch('project', this.selectionList.map(item => item.id))
.then(res => {
@@ -1717,14 +1727,12 @@ export default {
this.$message.success(res.data?.data || '批量推送合规完成');
this.onLoad(this.page, this.query);
})
.catch(error => {
// 拦截器已弹出后端 msg,此处不再重复提示
if (!error?._notified) {
this.$message.error(error?.response?.data?.msg || '批量推送合规失败');
}
.catch(() => {
// 失败原因由 axios 拦截器统一弹出后端 msg,此处不再重复提示
})
.finally(() => {
this.hcsRepushingId = null;
loading.close();
});
});
},