设备登记-接入添加loading
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div class="default-main" v-loading="loading">
|
||||
<TableHeader>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="设备类型">
|
||||
@@ -170,7 +170,7 @@ const rules = reactive({
|
||||
})
|
||||
const dialogFormVisible = ref(false)
|
||||
const dialogTitle = ref('新增设备')
|
||||
|
||||
const loading = ref<boolean>(false)
|
||||
const devModelOptions: any = ref([])
|
||||
queryByCode('Device_Type').then(res => {
|
||||
queryCsDictTree(res.data.id).then(res => {
|
||||
@@ -410,6 +410,7 @@ const tableStore = new TableStore({
|
||||
click: row => {
|
||||
// 便携式设备接入
|
||||
// portableDeviceAccess
|
||||
loading.value = true
|
||||
ElMessageBox.confirm('确定接入该设备吗?', '提示', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
@@ -418,12 +419,19 @@ const tableStore = new TableStore({
|
||||
.then(() => {
|
||||
portableDeviceRegister({
|
||||
nDid: row.ndid
|
||||
}).then(res => {
|
||||
})
|
||||
.then(res => {
|
||||
loading.value = false
|
||||
ElMessage.success(res.message)
|
||||
tableStore.index()
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
})
|
||||
})
|
||||
.catch(e => {
|
||||
loading.value = false
|
||||
})
|
||||
.catch(e => {})
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user