fix:修复dashboard快照在没有图表时 未提示接口返回的消息
This commit is contained in:
@@ -92,12 +92,6 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
async startTimer () {
|
async startTimer () {
|
||||||
this.prevent_opt.import = true
|
this.prevent_opt.import = true
|
||||||
|
|
||||||
// 定时获取运行时间
|
|
||||||
this.timer = createWorker(() => {
|
|
||||||
this.elapsedTime += 100
|
|
||||||
}, 100)
|
|
||||||
|
|
||||||
const vars = this.$store.getters.getVariablesArr.map(item => {
|
const vars = this.$store.getters.getVariablesArr.map(item => {
|
||||||
return {
|
return {
|
||||||
name: item.name,
|
name: item.name,
|
||||||
@@ -114,8 +108,15 @@ export default {
|
|||||||
// 创建任务
|
// 创建任务
|
||||||
const res = await this.$post('/visual/dashboard/snapshot/task', params)
|
const res = await this.$post('/visual/dashboard/snapshot/task', params)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
|
// 定时获取运行时间
|
||||||
|
this.timer = createWorker(() => {
|
||||||
|
this.elapsedTime += 100
|
||||||
|
}, 100)
|
||||||
this.tid = res.data.tid
|
this.tid = res.data.tid
|
||||||
this.getResult()
|
this.getResult()
|
||||||
|
} else {
|
||||||
|
this.prevent_opt.import = false
|
||||||
|
this.$message.error(res.msg)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 任务进度查询
|
// 任务进度查询
|
||||||
|
|||||||
Reference in New Issue
Block a user