修改测试BUG

This commit is contained in:
guanj
2026-06-18 16:35:16 +08:00
parent 13f11596e4
commit 8527939eb1
44 changed files with 1329 additions and 953 deletions

View File

@@ -1,5 +1,5 @@
<template>
<div v-loading="loading">
<div v-loading="loading">
<TableHeader>
<template v-slot:select>
<el-form-item label="关键字筛选">
@@ -90,8 +90,8 @@
</TableHeader>
<Table ref="tableRef" :checkbox-config="checkboxConfig" :key="tableKey" @sort-change="handleSortChange"></Table>
<FactoryForm ref="factoryFormRef" :engineering-list="engineeringList"
:dev-type-options="devTypeOptions" :dev-type-options2="devTypeOptions2" :dev-model-options="devModelOptions"
<FactoryForm ref="factoryFormRef" :engineering-list="engineeringList" :dev-type-options="devTypeOptions"
:dev-type-options2="devTypeOptions2" :dev-model-options="devModelOptions"
:dev-model-options2="devModelOptions2" @success="onFormSuccess" />
<div class="qrcode-label">
@@ -126,6 +126,7 @@ import {
resetFactory,
portableDeviceRegister,
portableDeviceAccess,
accessByUpdateMac
} from '@/api/cs-system-boot/device'
import html2canvas from 'html2canvas'
import { fullUrl } from '@/utils/common'
@@ -364,102 +365,7 @@ const tableStore = new TableStore({
width: 180,
render: 'buttons',
buttons: [
//直连设备注册
// {
// title: '注册',
// type: 'primary',
// icon: 'el-icon-Grid',
// render: 'basicButton',
// disabled: row => {
// return (
// (row.devType == '8b45cf6b7f5266e777d07c166ad5fa77' &&
// row.devModel == 'a0d4da4b5c17b2172362a3f5a27bf217') ||
// row.status == '1'
// )
// },
// click: row => {
// // 直连设备注册
// ElMessageBox.confirm('确定注册该设备吗?', '提示', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// governDeviceRegister({
// nDid: row.ndid,
// type: '4'
// }).then(res => {
// ElMessage.success(res.message)
// tableStore.onTableAction('search', {})
// })
// })
// .catch(e => {})
// }
// },
// //便携式设备注册
// {
// title: '注册',
// type: 'primary',
// icon: 'el-icon-Grid',
// render: 'basicButton',
// disabled: row => {
// // return (
// // (row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
// // row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
// // row.status != '1'
// // )
// return true
// },
// click: row => {
// // 便携式设备注册
// ElMessageBox.confirm('确定注册该设备吗?', '提示', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// portableDeviceRegister({
// nDid: row.ndid
// }).then(res => {
// ElMessage.success(res.message)
// tableStore.index()
// })
// })
// .catch(e => {})
// }
// },
//直连设备接入
// {
// title: '接入',
// type: 'primary',
// icon: 'el-icon-Grid',
// render: 'basicButton',
// disabled: row => {
// return (
// (row.devType == '8b45cf6b7f5266e777d07c166ad5fa77' &&
// row.devModel == 'a0d4da4b5c17b2172362a3f5a27bf217') ||
// row.status != '2'
// )
// },
// click: row => {
// // 直连设备接入
// ElMessageBox.confirm('确定接入该设备吗?', '提示', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// governDeviceRegister({
// nDid: row.ndid,
// type: '4'
// }).then(res => {
// ElMessage.success(res.message)
// tableStore.onTableAction('search', {})
// })
// })
// .catch(e => {})
// }
// },
// 在线设备注册
{
title: '接入',
@@ -469,9 +375,9 @@ const tableStore = new TableStore({
loading: 'loading1',
disabled: row => {
return !(
row.devType == '123202e523be2b8defc8d0c2f118f232' &&
(row.devType == '123202e523be2b8defc8d0c2f118f232' || row.devType != '8b45cf6b7f5266e777d07c166ad5fa77') &&
row.associatedProject != null &&
row.status != 3
(row.status == 5 || row.isAccess == 0)
)
},
click: row => {
@@ -483,57 +389,90 @@ const tableStore = new TableStore({
}).then(() => {
row.loading1 = true
onlineRegister({
projectId: row.associatedProject,
nDid: row.ndid
})
.then(res => {
ElMessage.success(res.message)
row.loading1 = false
tableStore.index()
})
.catch(() => {
row.loading1 = false
if (row.status == 5) {
// 在线设备注册
if (row.devType == '123202e523be2b8defc8d0c2f118f232') {
onlineRegister({
projectId: row.associatedProject,
nDid: row.ndid
})
.then(res => {
ElMessage.success(res.message)
row.loading1 = false
tableStore.index()
})
.catch(() => {
row.loading1 = false
})
} else {
// //便携式设备手动接入
portableDeviceRegister({
nDid: row.ndid
})
.then(res => {
row.loading1 = false
ElMessage.success(res.message)
tableStore.index()
})
.catch(e => {
row.loading1 = false
})
}
} else {
accessByUpdateMac({
nDid: row.ndid
})
.then(res => {
row.loading1 = false
ElMessage.success(res.message)
tableStore.index()
})
.catch(e => {
row.loading1 = false
})
}
})
}
},
//便携式设备手动接入
{
title: '接入',
type: 'primary',
icon: 'el-icon-Grid',
render: 'basicButton',
loading: 'loading1',
disabled: row => {
return (
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
row.status != '6'
)
},
click: row => {
// 便携式设备手动接入
ElMessageBox.confirm('确定接入该设备吗?', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
row.loading1 = true
portableDeviceAccess({
nDid: row.ndid
}).then(res => {
ElMessage.success(res.message)
row.loading1 = false
tableStore.index()
})
})
.catch(e => {
row.loading1 = false
})
}
},
// {
// title: '接入',
// type: 'primary',
// icon: 'el-icon-Grid',
// render: 'basicButton',
// loading: 'loading1',
// disabled: row => {
// return (
// (row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
// row.devModel != 'a0d4da4b5c17b2172362a3f5a27bf217') ||
// row.status != '6'
// )
// },
// click: row => {
// // 便携式设备手动接入
// ElMessageBox.confirm('确定接入该设备吗?', '提示', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// type: 'warning'
// })
// .then(() => {
// row.loading1 = true
// portableDeviceAccess({
// nDid: row.ndid
// }).then(res => {
// ElMessage.success(res.message)
// row.loading1 = false
// tableStore.index()
// })
// })
// .catch(e => {
// row.loading1 = false
// })
// }
// },
{
title: '接入',
type: 'primary',