Commit 3271ba26 authored by 何远江's avatar 何远江

优化提示

parent 3d96d180
...@@ -128,7 +128,7 @@ import type { VxeTableInstance } from 'vxe-table' ...@@ -128,7 +128,7 @@ import type { VxeTableInstance } from 'vxe-table'
import TemplateVariable from './components/TemplateVariable.vue' import TemplateVariable from './components/TemplateVariable.vue'
import { filterRunData2 } from '@/utils/excel' import { filterRunData2 } from '@/utils/excel'
import { uploadFile } from '@/api/excel' import { uploadFile } from '@/api/excel'
import { ElMessage } from 'element-plus' import { ElLoading, ElMessage } from 'element-plus'
import { exportExcel } from '@/utils/export-excel' import { exportExcel } from '@/utils/export-excel'
const loading = ref(false) const loading = ref(false)
...@@ -202,7 +202,15 @@ const changeUpload = (file: any) => { ...@@ -202,7 +202,15 @@ const changeUpload = (file: any) => {
}) })
} }
const toRun = async (row) => { const toRun = async (row) => {
const loading = ElLoading.service({
text: '解析中...',
background: 'rgba(0, 0, 0, 0.7)',
lock: true,
spinner: 'el-icon-loading'
})
try {
const { data } = await apiOrderVarRun(row.orderItemId) const { data } = await apiOrderVarRun(row.orderItemId)
if (data?.code == '200') { if (data?.code == '200') {
ElMessage.success(data.message || '解析成功!') ElMessage.success(data.message || '解析成功!')
importVisible.value = false importVisible.value = false
...@@ -210,6 +218,14 @@ const toRun = async (row) => { ...@@ -210,6 +218,14 @@ const toRun = async (row) => {
nextTick(() => { nextTick(() => {
handleShowVarRun(row) handleShowVarRun(row)
}) })
} else {
loading.close()
ElMessage.error(data.message || '解析失败!')
}
} catch {
nextTick(() => {
loading.close()
})
} }
} }
const submitImport = async () => { const submitImport = async () => {
......
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