e9466810 by 杨威
2 parents ddbf5e7d 2c8a791c
......@@ -647,44 +647,30 @@ export default {
},
open(hasGenerateCount,unGenerateCount) {
const h = this.$createElement;
this.$msgbox({
title: '消息',
message: h('p', null, [
h('span', null, '未生成单元号有 '+unGenerateCount+'户,'),
h('span', null, '已经生成单元号有 '+hasGenerateCount+'户,'),
h('span', null, '是否覆盖全部重新生成?'),
]),
showCancelButton: true,
this.$confirm('未生成单元号有'+unGenerateCount+'户,已经生成单元号有'+hasGenerateCount+'户,是否覆盖全部重新生成?', '确认信息', {
distinguishCancelAndClose: true,
confirmButtonText: '覆盖全部生成',
cancelButtonText: '跳过已生成单元号户',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
instance.confirmButtonLoading = true;
instance.confirmButtonText = '执行中...';
setTimeout(() => {
done();
setTimeout(() => {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,2).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
instance.confirmButtonLoading = false;
}, 300);
}, 3000);
} else {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
done();
}
}
cancelButtonText: '跳过已生成单元号户'
})
.then(() => {
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,2).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
})
.catch(action => {
if(action === 'cancel'){
batchGeneratorBdcdyh(this.$store.state.zrzh, this.pd[0].bsm,1).then(
(res) => {
if (res.code === 200) {
this.$message.success("生成完成!");
}
});
}
});
},
//获取各项单元状态统计数据
......