Commit 3208a148 by zhuxiaomei

生成的加载

parent 53b0f40f
......@@ -101,12 +101,23 @@ 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('生成成功!')
this.userList = result
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.userList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
......@@ -150,12 +161,23 @@ 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('生成成功!')
this.locList = result
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.locList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
......
......@@ -97,13 +97,23 @@ 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();
this.$toast('生成成功!')
this.userList = result
let second = 3;
const timer = setInterval(() => {
second--;
if (second) {
//
} else {
clearInterval(timer);
// 手动清除 Toast
this.$toast('生成成功!')
this.userList = result
}
}, 1000);
}
} else {
this.$toast("请输入随机数量")
......@@ -147,13 +157,23 @@ 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();
this.$toast('生成成功!')
this.locList = result
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