优化服务

This commit is contained in:
24kycj
2024-11-19 21:13:18 +08:00
parent 1707dfdbcc
commit 8eb94d7c5d
6 changed files with 328 additions and 195 deletions
+23 -13
View File
@@ -398,10 +398,7 @@ export default {
}
},
mounted() {
this.getTemplates()
this.form.task_uuid = this.genTaskUUID()
this.csvForm.req_info.uuid = this.genTaskUUID()
this.form.label = dayjs().format('YYYY-MM-DD')
},
methods: {
// 进度条处理
@@ -539,7 +536,11 @@ export default {
let csv1 = that.soonList.map(item => item.origin_name).join(',')
let csv2 = that.soonList.map(item => item.val).join(',')
that.csvForm.req_info.file_text = csv1 + '\n' + csv2
that.$store.dispatch('chat/websocketsend', that.csvForm)
that.$store.dispatch('chat/websocketsend', that.csvForm).then(() => {
}).catch(() => {
})
}
that.submitLoading = true
if (that.form.json_file) that.form.has_print_task = true
@@ -547,15 +548,18 @@ export default {
let theForm = { ...that.form }
if (!theForm.udf_file) delete theForm.udf_file
that.testForm.req_info = theForm
that.$store.dispatch('chat/websocketsend', that.testForm)
setTimeout(() => {
that.$message({
message: '新建作业成功',
type: 'success'
})
that.$store.dispatch('chat/websocketsend', that.testForm).then(() => {
setTimeout(() => {
that.$message({
message: '新建作业成功',
type: 'success'
})
that.submitLoading = false
that.close()
}, 1500)
}).catch(() => {
that.submitLoading = false
that.close()
}, 2000)
})
},
// 获取模板文件列表
getTemplates() {
@@ -711,9 +715,15 @@ export default {
},
show() {
this.addShow = true
this.getTemplates()
this.form.task_uuid = this.genTaskUUID()
this.csvForm.req_info.uuid = this.form.task_uuid
this.form.label = dayjs().format('YYYY-MM-DD')
console.log(this.form.task_uuid)
},
close() {
this.addShow = false
this.$emit('close')
},
// 高级设置
setCancel() {