修改测试问题
This commit is contained in:
@@ -58,7 +58,7 @@
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
<el-button type="primary" @click="submit" :loading="loading">确定</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
@@ -80,6 +80,7 @@ const devModelOptions: any = ref([])
|
||||
const fileList: any = ref([])
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const loading = ref(false)
|
||||
const form = reactive<any>({
|
||||
devType: null,
|
||||
devTypeName: null,
|
||||
@@ -219,10 +220,12 @@ const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
// console.log(valid)
|
||||
if (valid) {
|
||||
|
||||
if (fileList.value.length == 0) {
|
||||
ElMessage.warning('请上传升级文件')
|
||||
return
|
||||
}
|
||||
loading.value = true
|
||||
let submitForm = new FormData()
|
||||
for (let key in form) {
|
||||
submitForm.append(key, form[key])
|
||||
@@ -236,6 +239,7 @@ const submit = () => {
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
emit('closePopup')
|
||||
loading.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user