修改台账
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { number } from 'vue-types'
|
||||
|
||||
const dataProcessing = (arr: any[]) => {
|
||||
return arr
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div ref="refheader" v-show="!isWaveCharts" style="width: 100%;">
|
||||
<div ref="refheader" v-show="!isWaveCharts" style="width: 100%">
|
||||
<TableHeader datePicker showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="数据来源">
|
||||
@@ -141,10 +141,11 @@ const tableStore = new TableStore({
|
||||
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center', sortable: true },
|
||||
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
|
||||
|
||||
render: 'buttons',
|
||||
buttons: [
|
||||
{
|
||||
@@ -159,12 +160,12 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: async row => {
|
||||
row.loading1 = true
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
await analyseWave(row.id)
|
||||
.then(res => {
|
||||
row.loading1 = false
|
||||
if (res != undefined) {
|
||||
loading.value = true
|
||||
isWaveCharts.value = true
|
||||
boxoList.value = row
|
||||
boxoList.value.persistTime = row.evtParamTm
|
||||
boxoList.value.featureAmplitude =
|
||||
|
||||
@@ -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') {
|
||||
|
||||
@@ -20,14 +20,8 @@
|
||||
|
||||
<el-button @click="handleBack" :icon="Back">返回</el-button>
|
||||
</div>
|
||||
<!-- v-loading="loading" -->
|
||||
<el-tabs
|
||||
class="home_body"
|
||||
type="border-card"
|
||||
v-model.trim="activeName1"
|
||||
@tab-click="handleClick"
|
||||
|
||||
>
|
||||
<!-- v-loading="loading" -->
|
||||
<el-tabs class="home_body" type="border-card" v-model.trim="activeName1" @tab-click="handleClick">
|
||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: auto;'">
|
||||
<shushiboxi
|
||||
v-if="isWp && wp && activeName == 'ssbx' && showBoxi"
|
||||
@@ -110,9 +104,15 @@ const value = ref(1)
|
||||
const isWp = ref(false)
|
||||
const boxoList: any = ref([])
|
||||
const getWpData = (val: any, list: any) => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
wp.value = {}
|
||||
isWp.value = false
|
||||
boxoList.value = []
|
||||
|
||||
setTimeout(() => {
|
||||
wp.value = val
|
||||
isWp.value = true
|
||||
boxoList.value = list
|
||||
}, 100)
|
||||
}
|
||||
const changeView = () => {
|
||||
showBoxi.value = false
|
||||
@@ -140,7 +140,6 @@ const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
const setHeight = (h: any, vh: any, num = 1) => {
|
||||
console.log('🚀 ~ setHeight ~ h:', h)
|
||||
if (h != false) {
|
||||
parentHeight.value = h
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ import { mainHeight } from '@/utils/layout'
|
||||
import { getVisitorConfig, updateVisitorConfig } from '@/api/cs-device-boot/user'
|
||||
import { ref, onMounted } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { debounce } from 'lodash-es'
|
||||
const pageHeight = mainHeight(60)
|
||||
const loading = ref(true)
|
||||
const defaultCheckedKeys: any = ref([])
|
||||
@@ -35,6 +36,7 @@ const tableData = ref([])
|
||||
const treeRef = ref(null)
|
||||
const ignoreCheckChange = ref(false)
|
||||
const checkChange = (data: any) => {
|
||||
console.log('🚀 ~ checkChange ~ data:', data)
|
||||
if (data.data.pName == '便携式设备') {
|
||||
if (ignoreCheckChange.value) {
|
||||
ignoreCheckChange.value = false // 清除标记,不影响后续正常触发
|
||||
@@ -55,7 +57,7 @@ const checkChange = (data: any) => {
|
||||
updateVisitorConfigs()
|
||||
}
|
||||
}
|
||||
const updateVisitorConfigs = () => {
|
||||
const updateVisitorConfigs = debounce (() => {
|
||||
const result = Array.from(new Set(defaultCheckedKeys.value))
|
||||
updateVisitorConfig(
|
||||
result.map(item => {
|
||||
@@ -68,7 +70,7 @@ const updateVisitorConfigs = () => {
|
||||
getVisitorConfigs()
|
||||
}
|
||||
})
|
||||
}
|
||||
},500)
|
||||
const getVisitorConfigs = () => {
|
||||
getVisitorConfig().then((res: any) => {
|
||||
if (res.code === 'A0000') {
|
||||
|
||||
@@ -10,13 +10,13 @@
|
||||
placeholder="请输入设备名称/网络设备ID"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程阶段">
|
||||
<!-- <el-form-item label="流程阶段">
|
||||
<el-select v-model.trim="tableStore.table.params.process" clearable placeholder="请选择状态">
|
||||
<el-option label="功能调试" :value="2"></el-option>
|
||||
<el-option label="出厂调试" :value="3"></el-option>
|
||||
<el-option label="正式投运" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="物联状态">
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.connectStatus"
|
||||
@@ -772,7 +772,7 @@ const tableStore = new TableStore({
|
||||
tableStore.table.params.orderBy = 'desc'
|
||||
tableStore.table.params.devType = ''
|
||||
tableStore.table.params.devModel = ''
|
||||
tableStore.table.params.process = 2
|
||||
// tableStore.table.params.process = 2
|
||||
tableStore.table.params.devAccessMethod = ''
|
||||
tableStore.table.params.status = ''
|
||||
tableStore.table.params.sortBy = ''
|
||||
|
||||
@@ -9,13 +9,13 @@
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="流程阶段">
|
||||
<!-- <el-form-item label="流程阶段">
|
||||
<el-select v-model.trim="tableStore.table.params.process" clearable placeholder="请选择">
|
||||
<el-option label="功能调试" :value="2"></el-option>
|
||||
<el-option label="出厂调试" :value="3"></el-option>
|
||||
<el-option label="正式投运" :value="4"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
<template v-slot:operation>
|
||||
<el-button type="primary" icon="el-icon-Download" @click="exportTab">导出</el-button>
|
||||
@@ -147,7 +147,6 @@ const tableStore = new TableStore({
|
||||
item.process = item.process == 2 ? '功能调试' : item.process == 3 ? '出厂调试' : '正式投运'
|
||||
return item
|
||||
})
|
||||
console.log('🚀 ~ tableStore.table.allData:', tableStore.table.allData)
|
||||
},
|
||||
loadCallback: () => {
|
||||
let name = tableStore.table.params.name
|
||||
@@ -176,7 +175,7 @@ const tableStore = new TableStore({
|
||||
})
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
tableStore.table.params.process = 4
|
||||
// tableStore.table.params.process = 4
|
||||
tableStore.table.params.name = ''
|
||||
const tableRef = ref()
|
||||
const exportTab = () => {
|
||||
|
||||
Reference in New Issue
Block a user