修改台账
This commit is contained in:
@@ -144,11 +144,3 @@ export function queryPushResult() {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//监测设备接入
|
|
||||||
export function onlineRegister(data: any) {
|
|
||||||
return createAxios({
|
|
||||||
url: '/access-boot/device/onlineRegister',
|
|
||||||
method: 'post',
|
|
||||||
params: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -103,3 +103,11 @@ export function engineeringProject() {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//监测设备接入
|
||||||
|
export function onlineRegister(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/access-boot/device/onlineRegister',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -405,9 +405,10 @@
|
|||||||
pageStatus == 2)
|
pageStatus == 2)
|
||||||
)
|
)
|
||||||
"
|
"
|
||||||
|
@change="busItem.devModel = ''"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in [...formDevTypeOptions, ...devTypeOptions]"
|
v-for="item in formDevTypeOptions"
|
||||||
:key="item.value"
|
:key="item.value"
|
||||||
:label="item.label || item.name"
|
:label="item.label || item.name"
|
||||||
:value="item.value || item.id"
|
:value="item.value || item.id"
|
||||||
@@ -438,7 +439,9 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="option in [...devCLD, ...devModelOptions]"
|
v-for="option in devModelOptions.filter(
|
||||||
|
item => item.pid == busItem.devType
|
||||||
|
)"
|
||||||
:key="option.id"
|
:key="option.id"
|
||||||
:label="option.name"
|
:label="option.name"
|
||||||
:value="option.id"
|
:value="option.id"
|
||||||
@@ -595,7 +598,7 @@
|
|||||||
<el-option label="停用" :value="0"></el-option>
|
<el-option label="停用" :value="0"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item
|
<!-- <el-form-item
|
||||||
label="接入:"
|
label="接入:"
|
||||||
v-if="connectionMethod == 'MQTT' && busItem?.id"
|
v-if="connectionMethod == 'MQTT' && busItem?.id"
|
||||||
>
|
>
|
||||||
@@ -608,7 +611,7 @@
|
|||||||
>
|
>
|
||||||
{{ accessLoading ? '接入中' : '接入' }}
|
{{ accessLoading ? '接入中' : '接入' }}
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
<el-form-item
|
<el-form-item
|
||||||
class="form-item"
|
class="form-item"
|
||||||
label="排序:"
|
label="排序:"
|
||||||
@@ -1454,7 +1457,7 @@ import {
|
|||||||
updateLine,
|
updateLine,
|
||||||
pushLog,
|
pushLog,
|
||||||
queryPushResult,
|
queryPushResult,
|
||||||
onlineRegister
|
|
||||||
} from '@/api/cs-device-boot/cloudDeviceEntry'
|
} from '@/api/cs-device-boot/cloudDeviceEntry'
|
||||||
import { getTopoTemplate } from '@/api/cs-device-boot/topologyTemplate'
|
import { getTopoTemplate } from '@/api/cs-device-boot/topologyTemplate'
|
||||||
import { getFileUrl } from '@/api/system-boot/file'
|
import { getFileUrl } from '@/api/system-boot/file'
|
||||||
@@ -1654,7 +1657,7 @@ const cityOptions = computed(() => {
|
|||||||
})
|
})
|
||||||
|
|
||||||
const formDevTypeOptions = computed(() => {
|
const formDevTypeOptions = computed(() => {
|
||||||
return [devTypeOptions2.value]
|
return devTypeOptions.value //[devTypeOptions2.value]
|
||||||
})
|
})
|
||||||
|
|
||||||
// 电压等级选项,用于显示带单位的名称
|
// 电压等级选项,用于显示带单位的名称
|
||||||
@@ -3319,12 +3322,10 @@ const area = async () => {
|
|||||||
queryByCode('DEV_CLD')
|
queryByCode('DEV_CLD')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
devTypeOptions2.value = res.data
|
devTypeOptions2.value = res.data
|
||||||
return queryCsDictTree(res.data.id).then(res => {
|
queryCsDictTree(res.data.id).then(res => {
|
||||||
devCLD.value = res.data
|
devCLD.value = res.data
|
||||||
})
|
})
|
||||||
})
|
queryByCode('Device_Type').then(res => {
|
||||||
.then(() => {
|
|
||||||
return queryByCode('Device_Type').then(res => {
|
|
||||||
queryByid(res.data.id).then((list: any) => {
|
queryByid(res.data.id).then((list: any) => {
|
||||||
devModelOptions.value = list.data.map((item: any, index: any) => {
|
devModelOptions.value = list.data.map((item: any, index: any) => {
|
||||||
return {
|
return {
|
||||||
@@ -3340,6 +3341,9 @@ const area = async () => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
// .then(() => {
|
||||||
|
// return
|
||||||
|
// })
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('查询过程中出现错误:', error)
|
console.error('查询过程中出现错误:', error)
|
||||||
})
|
})
|
||||||
@@ -3353,22 +3357,6 @@ const area = async () => {
|
|||||||
}
|
}
|
||||||
const accessLoading = ref(false)
|
const accessLoading = ref(false)
|
||||||
// 接入
|
// 接入
|
||||||
const access = (item: any) => {
|
|
||||||
accessLoading.value = true
|
|
||||||
onlineRegister({
|
|
||||||
projectId: formData.value.projectInfoList[0].id,
|
|
||||||
nDid: item.ndid
|
|
||||||
})
|
|
||||||
.then((res: any) => {
|
|
||||||
if (res.code == 'A0000') {
|
|
||||||
ElMessage.success(res)
|
|
||||||
accessLoading.value = false
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(() => {
|
|
||||||
accessLoading.value = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
nodeData.value.level = 0
|
nodeData.value.level = 0
|
||||||
|
|||||||
@@ -218,7 +218,8 @@ import {
|
|||||||
portableDeviceRegister,
|
portableDeviceRegister,
|
||||||
portableDeviceAccess,
|
portableDeviceAccess,
|
||||||
getExcelTemplate,
|
getExcelTemplate,
|
||||||
engineeringProject
|
engineeringProject,
|
||||||
|
onlineRegister
|
||||||
} from '@/api/cs-system-boot/device'
|
} from '@/api/cs-system-boot/device'
|
||||||
import html2canvas from 'html2canvas'
|
import html2canvas from 'html2canvas'
|
||||||
import { fullUrl } from '@/utils/common'
|
import { fullUrl } from '@/utils/common'
|
||||||
@@ -271,7 +272,7 @@ const queryTheDictionary = () => {
|
|||||||
queryByCode('DEV_CLD')
|
queryByCode('DEV_CLD')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
devTypeOptions2.value = res.data
|
devTypeOptions2.value = res.data
|
||||||
return queryCsDictTree(res.data.id).then(res => {
|
queryCsDictTree(res.data.id).then(res => {
|
||||||
devModelOptions2.value = res.data.map((item: any) => {
|
devModelOptions2.value = res.data.map((item: any) => {
|
||||||
return {
|
return {
|
||||||
value: item.id,
|
value: item.id,
|
||||||
@@ -280,8 +281,6 @@ const queryTheDictionary = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
|
||||||
.then(() => {
|
|
||||||
queryByCode('Device_Type').then(async res => {
|
queryByCode('Device_Type').then(async res => {
|
||||||
const id = res.data.id
|
const id = res.data.id
|
||||||
await queryCsDictTree(id).then(res => {
|
await queryCsDictTree(id).then(res => {
|
||||||
@@ -315,6 +314,7 @@ const queryTheDictionary = () => {
|
|||||||
await tableStore.index()
|
await tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
.catch(error => {
|
.catch(error => {
|
||||||
console.error('查询过程中出现错误:', error)
|
console.error('查询过程中出现错误:', error)
|
||||||
})
|
})
|
||||||
@@ -611,12 +611,51 @@ const tableStore = new TableStore({
|
|||||||
// .catch(e => {})
|
// .catch(e => {})
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
|
// 在线设备注册
|
||||||
|
{
|
||||||
|
title: '接入',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-Grid',
|
||||||
|
render: 'basicButton',
|
||||||
|
loading: 'loading1',
|
||||||
|
disabled: row => {
|
||||||
|
return !(
|
||||||
|
row.devType == '123202e523be2b8defc8d0c2f118f232' &&
|
||||||
|
row.associatedProject != null &&
|
||||||
|
row.status != 3
|
||||||
|
)
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
// 便携式设备手动接入
|
||||||
|
ElMessageBox.confirm('确定接入该设备吗?', '提示', {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).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
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
//便携式设备手动接入
|
//便携式设备手动接入
|
||||||
{
|
{
|
||||||
title: '接入',
|
title: '接入',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Grid',
|
icon: 'el-icon-Grid',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
loading: 'loading1',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return (
|
return (
|
||||||
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||||
@@ -632,14 +671,18 @@ const tableStore = new TableStore({
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
|
row.loading1 = true
|
||||||
portableDeviceAccess({
|
portableDeviceAccess({
|
||||||
nDid: row.ndid
|
nDid: row.ndid
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
ElMessage.success(res.message)
|
ElMessage.success(res.message)
|
||||||
|
row.loading1 = false
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
.catch(e => {})
|
.catch(e => {
|
||||||
|
row.loading1 = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -647,6 +690,7 @@ const tableStore = new TableStore({
|
|||||||
type: 'primary',
|
type: 'primary',
|
||||||
icon: 'el-icon-Grid',
|
icon: 'el-icon-Grid',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
|
loading: 'loading1',
|
||||||
disabled: row => {
|
disabled: row => {
|
||||||
return (
|
return (
|
||||||
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
(row.devType != '8b45cf6b7f5266e777d07c166ad5fa77' &&
|
||||||
@@ -662,24 +706,20 @@ const tableStore = new TableStore({
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
}).then(() => {
|
||||||
.then(() => {
|
row.loading1 = true
|
||||||
loading.value = true
|
portableDeviceRegister({
|
||||||
portableDeviceRegister({
|
nDid: row.ndid
|
||||||
nDid: row.ndid
|
})
|
||||||
|
.then(res => {
|
||||||
|
row.loading1 = false
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
tableStore.index()
|
||||||
})
|
})
|
||||||
.then(res => {
|
.catch(e => {
|
||||||
loading.value = false
|
row.loading1 = false
|
||||||
ElMessage.success(res.message)
|
})
|
||||||
tableStore.index()
|
})
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
loading.value = false
|
|
||||||
})
|
|
||||||
})
|
|
||||||
.catch(e => {
|
|
||||||
loading.value = false
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user