Commit 3208a148 by zhuxiaomei

生成的加载

parent 53b0f40f
......@@ -101,13 +101,24 @@ export default {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
loadingType: 'spinner',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) {
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.userList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
}
......@@ -150,13 +161,24 @@ export default {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
loadingType: 'spinner',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) {
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.locList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
}
......
......@@ -97,14 +97,24 @@ export default {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
loadingType: 'spinner',
forbidClick: true,
});
let result = await samplingPlan.generateSampler({count: this.count, planId: this.planId})
if (result) {
// this.$toast.clear();
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.userList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
}
......@@ -147,14 +157,24 @@ export default {
this.$toast.loading({
duration: 0,
message: '随机生成中...',
loadingType: 'spinner',
forbidClick: true,
});
let result = await samplingPlan.generatePlace({count: this.locCount, planId: this.planId})
if (result) {
// this.$toast.clear();
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.locList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment