修改台账
This commit is contained in:
@@ -574,6 +574,29 @@
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
label="是否启用:"
|
||||
:prop="'deviceInfoList[' + bIndex + '].usageStatus'"
|
||||
>
|
||||
<el-select
|
||||
clearable
|
||||
filterable
|
||||
v-model="busItem.usageStatus"
|
||||
placeholder="请选择日志等级"
|
||||
style="width: 100%"
|
||||
:disabled="
|
||||
!(
|
||||
(nodeLevel == 3 && pageStatus == 3) ||
|
||||
((nodeLevel == 2 || (nodeLevel == 1 && pageStatus == 2)) &&
|
||||
pageStatus == 2)
|
||||
)
|
||||
"
|
||||
>
|
||||
<el-option label="启用" :value="1"></el-option>
|
||||
<el-option label="停用" :value="0"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
class="form-item"
|
||||
label="排序:"
|
||||
@@ -1406,8 +1429,8 @@
|
||||
|
||||
<el-dialog
|
||||
v-model="resultDialogVisible"
|
||||
title="台账推送结果"
|
||||
width="50%"
|
||||
title="治理下发结果"
|
||||
width="700px"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:show-close="true"
|
||||
@@ -1416,13 +1439,13 @@
|
||||
<div v-if="pushResult" style="padding: 20px">
|
||||
<el-result
|
||||
:icon="pushResult.success ? 'success' : 'error'"
|
||||
:title="pushResult.success ? '推送成功' : '推送失败'"
|
||||
:title="pushResult.success ? '指令下发成功' : '指令下发失败'"
|
||||
:sub-title="pushResult.message"
|
||||
></el-result>
|
||||
|
||||
<!-- 日志展示区域 -->
|
||||
<div style="margin-top: 20px">
|
||||
<h3>推送日志:</h3>
|
||||
<h3>指令下发日志:</h3>
|
||||
<div
|
||||
style="
|
||||
max-height: 300px;
|
||||
@@ -1449,7 +1472,7 @@
|
||||
<el-icon :size="40" class="is-loading" style="color: #409eff">
|
||||
<Loading />
|
||||
</el-icon>
|
||||
<p style="margin-top: 15px; font-size: 16px">正在推送台账信息,请稍候...</p>
|
||||
<p style="margin-top: 15px; font-size: 16px">指令下发中,请稍候...</p>
|
||||
<!-- <p style="margin-top: 10px; color: #999">预计需要30秒左右</p>
|
||||
<p style="margin-top: 10px; color: #999">已等待: {{ countdown }}秒</p> -->
|
||||
</div>
|
||||
@@ -1619,6 +1642,7 @@ interface DeviceInfo {
|
||||
cntractNo: string
|
||||
sort: number
|
||||
nodeProcess: string
|
||||
usageStatus: number
|
||||
}
|
||||
// 设备信息列表
|
||||
//const deviceInfoList = ref<DeviceInfo[]>([])
|
||||
@@ -1850,7 +1874,7 @@ const onAdd = async () => {
|
||||
// 根据结果进行处理
|
||||
pushResult.value = {
|
||||
success: true,
|
||||
message: '台账推送成功',
|
||||
message: '',
|
||||
logs: logs.map((item: any) => ({
|
||||
message: item.message || JSON.stringify(item)
|
||||
}))
|
||||
@@ -1859,7 +1883,7 @@ const onAdd = async () => {
|
||||
} catch (error: any) {
|
||||
pushResult.value = {
|
||||
success: false,
|
||||
message: error.message || '推送过程中发生错误',
|
||||
message: error.message || '指令下发过程中发生错误',
|
||||
logs: [
|
||||
{
|
||||
message: error.message || '未知错误'
|
||||
@@ -2014,7 +2038,8 @@ const add = () => {
|
||||
nodeId: '',
|
||||
cntractNo: '',
|
||||
sort: 0,
|
||||
nodeProcess: ''
|
||||
nodeProcess: '',
|
||||
usageStatus: 0
|
||||
})
|
||||
busBarIndex.value = (formData.value.deviceInfoList.length - 1).toString()
|
||||
// 清理监测点数据
|
||||
@@ -2166,6 +2191,7 @@ const updateEquipmentFunc = (id: any) => {
|
||||
mac: currentDevice.mac,
|
||||
nodeId: currentDevice.nodeId,
|
||||
cntractNo: currentDevice.cntractNo,
|
||||
usageStatus: currentDevice.usageStatus,
|
||||
ndid: currentDevice.mac.replace(/:/g, ''),
|
||||
sort: currentDevice.sort
|
||||
}
|
||||
@@ -2401,7 +2427,8 @@ const next = async () => {
|
||||
nodeId: '',
|
||||
cntractNo: '',
|
||||
sort: 0,
|
||||
nodeProcess: ''
|
||||
nodeProcess: '',
|
||||
usageStatus: 0
|
||||
})
|
||||
busBarIndex.value = (formData.value.deviceInfoList.length - 1).toString()
|
||||
nextfalg.value = false
|
||||
@@ -2843,6 +2870,7 @@ const resetAllForms = () => {
|
||||
device.mac = ''
|
||||
device.nodeId = ''
|
||||
device.cntractNo = ''
|
||||
device.usageStatus = 0
|
||||
device.sort = 0
|
||||
})
|
||||
|
||||
@@ -2968,6 +2996,7 @@ const submitData = () => {
|
||||
mac: currentDevice.mac,
|
||||
nodeId: currentDevice.nodeId,
|
||||
cntractNo: currentDevice.cntractNo,
|
||||
usageStatus: currentDevice.usageStatus,
|
||||
ndid: currentDevice.mac.replace(/:/g, ''),
|
||||
sort: currentDevice.sort
|
||||
}
|
||||
@@ -3161,7 +3190,8 @@ const handleBusBarTabsEdit = (targetName: any, action: any) => {
|
||||
nodeId: '',
|
||||
cntractNo: '',
|
||||
sort: 0,
|
||||
nodeProcess: ''
|
||||
nodeProcess: '',
|
||||
usageStatus: 0
|
||||
})
|
||||
busBarIndex.value = (formData.value.deviceInfoList.length - 1).toString()
|
||||
} else if (action === 'remove') {
|
||||
|
||||
Reference in New Issue
Block a user