12 Commits

Author SHA1 Message Date
sjl
59489aaafa 微调 2026-01-30 15:01:19 +08:00
guanj
5d0421dd40 Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx 2026-01-29 14:10:32 +08:00
guanj
6d7ef7cf5d 修改终端型号 2026-01-29 14:10:18 +08:00
sjl
8d9ccf97a7 前置管理分配终端 2026-01-29 13:44:12 +08:00
sjl
7188e3e681 微调 2026-01-28 14:33:42 +08:00
sjl
a9fc77eb8b 区域概览未关联暂降次数和已关联处理事件合并 2026-01-28 10:33:59 +08:00
sjl
87af11288d 微调 2026-01-28 08:45:38 +08:00
sjl
0763187744 前置管理重启,稳态统计报表重置 2026-01-23 13:46:00 +08:00
sjl
ae641604ba 区域概览表格sarfi9总计 2026-01-23 09:20:57 +08:00
sjl
564e6ef4ab Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx
# Conflicts:
#	src/views/pqs/voltageSags/Region/components/echart.vue
2026-01-23 09:07:11 +08:00
sjl
c84c5dae3b 微调 2026-01-23 09:04:08 +08:00
guanj
c902dabb73 微调 2026-01-23 09:03:37 +08:00
28 changed files with 360 additions and 191 deletions

View File

@@ -206,3 +206,11 @@ export function exportTerminalBase() {
responseType: 'blob' responseType: 'blob'
}) })
} }
//一键分配终端
export function allotTerminal(data: any) {
return createAxios({
url: '/device-boot/nodeDevice/oneKeyDistribution',
method: 'post',
params: data
})
}

View File

@@ -17,6 +17,7 @@ const config = useConfig()
// import { nextTick } from 'process' // import { nextTick } from 'process'
const emit = defineEmits(['triggerPoint', 'group', 'echartClick']) const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
color[0] = config.layout.elementUiPrimary[0] color[0] = config.layout.elementUiPrimary[0]
const chartRef = ref<HTMLDivElement>() const chartRef = ref<HTMLDivElement>()
const props = defineProps(['options', 'isInterVal', 'pieInterVal']) const props = defineProps(['options', 'isInterVal', 'pieInterVal'])

View File

@@ -79,7 +79,7 @@ const init = async () => {
// 设置消息接收回调 // 设置消息接收回调
mqttClient.onMessage((topic, message) => { mqttClient.onMessage((topic, message) => {
const msg = JSON.parse(message.toString()) const msg = JSON.parse(message.toString())
console.log('🚀 ~ init ~ msg:', msg) // console.log('🚀 ~ init ~ msg:', msg)
if (msg.deptList.includes(adminInfo.$state.deptId)) { if (msg.deptList.includes(adminInfo.$state.deptId)) {
drawer.value = true drawer.value = true
isLoading.value = true isLoading.value = true

View File

@@ -38,6 +38,7 @@ const tableStore = new TableStore({
echarts.value.Grade(tableStore.table.data.voltageStatistics) echarts.value.Grade(tableStore.table.data.voltageStatistics)
echarts.value.Relation(tableStore.table.data.monthlyStatistics) echarts.value.Relation(tableStore.table.data.monthlyStatistics)
table.value.info(tableStore.table.data) table.value.info(tableStore.table.data)
} }
}) })
provide('tableStore', tableStore) provide('tableStore', tableStore)

View File

@@ -259,7 +259,7 @@ const tableStore: any = new TableStore({
], ],
loadCallback: () => { loadCallback: () => {
console.log(tableStore.table.data)
} }
}) })

View File

@@ -139,9 +139,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top"> <el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
<el-input <el-input
v-model="formData.nodeDevNum" v-model.trim.number="formData.nodeDevNum"
onkeyup="value = value.replace(/[^0-9]/g,'')" onkeyup="value = value.replace(/[^0-9]/g,'')"
maxlength="5" maxlength="5"
placeholder="请输入最大终端数" placeholder="请输入最大终端数"
@@ -149,7 +149,7 @@
</el-form-item> </el-form-item>
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top"> <el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
<el-input <el-input
v-model="formData.maxProcessNum" v-model.trim.number="formData.maxProcessNum"
onkeyup="value = value.replace(/[^0-9]/g,'')" onkeyup="value = value.replace(/[^0-9]/g,'')"
maxlength="5" maxlength="5"
placeholder="请根据监测点规模填写合适进程数1个进程最大可承载200个监测点" placeholder="请根据监测点规模填写合适进程数1个进程最大可承载200个监测点"
@@ -209,7 +209,8 @@ import {
updateNode, updateNode,
nodeDeviceTree, nodeDeviceTree,
updateDeviceProcess, updateDeviceProcess,
askRestartProcess askRestartProcess,
allotTerminal
} from '@/api/device-boot/Business' } from '@/api/device-boot/Business'
import TableStore from '@/utils/tableStore' import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue' import Table from '@/components/table/index.vue'
@@ -289,7 +290,7 @@ const tableStore = new TableStore({
} }
}, },
{ {
title: '最大监测点数量', title: '最大终端数量',
field: 'nodeDevNum' field: 'nodeDevNum'
}, },
{ {
@@ -351,7 +352,7 @@ const tableStore = new TableStore({
}, },
click: row => { click: row => {
askRestartProcess({ askRestartProcess({
deviceRebootType: null, deviceRebootType: 1,
nodeId: row.id, nodeId: row.id,
processNo: 1 processNo: 1
}).then(res => { }).then(res => {
@@ -384,7 +385,32 @@ const tableStore = new TableStore({
tableStore.index() tableStore.index()
}) })
} }
} },
{
name: 'edit',
title: '分配终端',
type: 'primary',
icon: 'InfoFilled',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'primary',
title: '确定分配终端吗?'
},
click: row => {
if (!hasDevices.value) {
ElMessage.warning('此前置机下无设备,无法分配终端!');
return;
}
allotTerminal({
nodeId: row.id
}).then(res => {
ElMessage.success(res.message)
tableStore.index()
})
}
},
] ]
} }
], ],
@@ -452,9 +478,9 @@ const currentChangeEvent = () => {
const restart = (data: any) => { const restart = (data: any) => {
// console.log('🚀 ~ restart ~ data:', data) // console.log('🚀 ~ restart ~ data:', data)
askRestartProcess({ askRestartProcess({
deviceRebootType: data.processNo, deviceRebootType: null,
nodeId: nodeId.value, nodeId: nodeId.value,
processNo: 2 processNo: data.processNo
}).then(res => { }).then(res => {
ElMessage.success('重启成功') ElMessage.success('重启成功')
currentChangeEvent() currentChangeEvent()

View File

@@ -604,55 +604,73 @@ const maintenanceData = reactive({
//上节点选择 //上节点选择
const checkLeft = (checkedNodes: any, checkedKeys: any) => { const checkLeft = (checkedNodes: any, checkedKeys: any) => {
maintenanceData.upNode = checkedNodes.id maintenanceData.upNode = checkedNodes.id
if (maintenanceData.upNode === maintenanceData.downNode) { if (maintenanceData.upNode === maintenanceData.downNode) {
menuTreeRight.value?.setCheckedKeys([]) menuTreeRight.value?.setCheckedKeys([])
maintenanceData.downNode = '' maintenanceData.downNode = ''
} }
if (checkedKeys.checkedKeys.length > 1) { if (checkedKeys.checkedKeys.length > 1) {
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id]) menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
} }
} }
//下节点选择 //下节点选择
const checkRight = (checkedNodes: any, checkedKeys: any) => { const checkRight = (checkedNodes: any, checkedKeys: any) => {
maintenanceData.downNode = checkedNodes.id maintenanceData.downNode = checkedNodes.id
if (maintenanceData.downNode === maintenanceData.upNode) {
menuTreeLeft.value?.setCheckedKeys([]) if (maintenanceData.downNode === maintenanceData.upNode) {
maintenanceData.upNode = '' menuTreeLeft.value?.setCheckedKeys([])
} maintenanceData.upNode = ''
if (checkedKeys.checkedKeys.length > 1) { }
menuTreeRight.value?.setCheckedKeys([checkedNodes.id]) if (checkedKeys.checkedKeys.length > 1) {
} menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
}
} }
//节点维护提交 //节点维护提交
const maintenanceOnsubmit = () => { const maintenanceOnsubmit = () => {
for (let i = 0; i < bind.value.length; i++) {
if (bind.value[i][0] == maintenanceData.upNode) { if(maintenanceData.downNode == '' || maintenanceData.upNode == '') {
for (let j = 0; j < bind.value.length; j++) { ElMessage({
if (bind.value[j][1] == maintenanceData.downNode) { type: 'warning',
ElMessage({ message: '请确保上下节点各自选择一个母线!'
type: 'warning', })
message: '上下节点无法选择相同母线!!!' return
})
return
}
}
return
}
} }
if (bindLevel.value != 5) {
for (let i = 0; i < bind.value.length; i++) { if (maintenanceData.upNode == maintenanceData.downNode) {
if (maintenanceData.upNode == bind.value[i][1] && maintenanceData.downNode == bind.value[i][0]) { ElMessage({
ElMessage({ type: 'warning',
type: 'warning', message: '上下节点无法选择相同母线!'
message: '上下节点无法选择相同母线!!!' })
})
return
}
}
} }
// for (let i = 0; i < bind.value.length; i++) {
// if (bind.value[i] == maintenanceData.upNode) {
// for (let j = 0; j < bind.value.length; j++) {
// if (bind.value[j] == maintenanceData.downNode) {
// ElMessage({
// type: 'warning',
// message: '上下节点无法选择相同母线!!!'
// })
// return
// }
// }
// return
// }
// }
// if (bindLevel.value != 5) {
// for (let i = 0; i < bind.value.length; i++) {
// if (maintenanceData.upNode == bind.value[i] && maintenanceData.downNode == bind.value[i]) {
// ElMessage({
// type: 'warning',
// message: '上下节点无法选择相同母线!!!'
// })
// return
// }
// }
// }
nodeMaintenance(maintenanceData).then((res: any) => { nodeMaintenance(maintenanceData).then((res: any) => {
if (res.code == 'A0000') { if (res.code == 'A0000') {

View File

@@ -53,12 +53,12 @@
</el-col> </el-col>
<el-col :span="14"> <el-col :span="14">
<div class="box"> <div class="box">
<el-form :model="form" label-width="100px" ref="ruleFormRef"> <el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
<el-form-item label="名称:"> <el-form-item label="名称:" prop="tpName">
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input> <el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="描述:" class="mt20"> <el-form-item label="描述:" class="mt20">
<el-input v-model="form.tfDescribe" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input> <el-input v-model="form.tfDescribe" placeholder="请输入" ></el-input>
</el-form-item> </el-form-item>
<el-form-item class="mt20 ml20"> <el-form-item class="mt20 ml20">
<el-button @click="dialogFormVisible = false">取消</el-button> <el-button @click="dialogFormVisible = false">取消</el-button>
@@ -122,13 +122,8 @@ const menuTree = ref()
const TableHeaderRef = ref() const TableHeaderRef = ref()
const rules = reactive({ const rules = reactive({
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }], tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }],
nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }],
nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }],
maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }],
sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }],
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
}) })
const dialogFormVisible = ref(false) const dialogFormVisible = ref(false)

View File

@@ -8,7 +8,7 @@
<TableHeader :showReset="false" ref="TableHeaderRef"> <TableHeader :showReset="false" ref="TableHeaderRef">
<template #select> <template #select>
<el-form-item label="关键字"> <el-form-item label="关键字">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" /> <el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" maxlength="32" show-word-limit/>
</el-form-item> </el-form-item>
</template> </template>
<template #operation> <template #operation>

View File

@@ -920,11 +920,14 @@ const setRealData = () => {
} }
defineExpose({ setRealData }) defineExpose({ setRealData })
onMounted(() => { onMounted(() => {
init() init()
initRadioCharts() initRadioCharts()
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => { getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || '' ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
}) })
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
dataSocket.socketServe?.closeWs() dataSocket.socketServe?.closeWs()

View File

@@ -116,7 +116,7 @@ const tableStore = new TableStore({
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : '' item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
}) })
}) })
console.log(tableStore.table.data)
setTimeout(() => { setTimeout(() => {
luckysheet.create({ luckysheet.create({
container: 'luckysheet', container: 'luckysheet',
@@ -129,6 +129,13 @@ const tableStore = new TableStore({
data: tableStore.table.data data: tableStore.table.data
}) })
}, 10) }, 10)
},
resetCallback: () => {
// 重置模板策略为第一个选项
if (templatePolicy.value && templatePolicy.value.length > 0) {
Template.value = templatePolicy.value[0]
reportForm.value = templatePolicy.value[0]?.reportForm
}
} }
}) })
const loading = ref(false) const loading = ref(false)
@@ -154,7 +161,7 @@ const changetype = (val: any) => {
reportForm.value = val.reportForm reportForm.value = val.reportForm
} }
const selectChange = () => { const selectChange = () => {
console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length) //console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
if (tableStore.table.data.length != 0) { if (tableStore.table.data.length != 0) {
setTimeout(() => { setTimeout(() => {
luckysheet && luckysheet?.resize() luckysheet && luckysheet?.resize()
@@ -165,6 +172,13 @@ const selectChange = () => {
const handleNodeClick = (data: any, node: any) => { const handleNodeClick = (data: any, node: any) => {
if (data.level == 6) { if (data.level == 6) {
dotList.value = data dotList.value = data
TableHeaderRef.value.setTheDate(3)
// 重置模板策略为第一个选项
if (templatePolicy.value && templatePolicy.value.length > 0) {
Template.value = templatePolicy.value[0]
reportForm.value = templatePolicy.value[0]?.reportForm
}
tableStore.index() tableStore.index()
} }
} }

View File

@@ -134,7 +134,7 @@ const exportEvent = () => {
form.append('type', '0') form.append('type', '0')
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0]) form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1]) form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw) //console.log('🚀 ~ exportEvent ~ uploadList.value:', uploadList.value?.raw)
form.append('file', uploadList.value?.raw || '') form.append('file', uploadList.value?.raw || '')
// 特殊字符正则表达式 // 特殊字符正则表达式
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/ const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/

View File

@@ -100,10 +100,10 @@ const tableStore = new TableStore({
} }
}, },
{ field: 'areaName', title: '区域',minWidth: 100 }, { field: 'areaName', title: '区域',minWidth: 100 },
{ field: 'gdName', title: '地级区' ,minWidth: 100}, { field: 'gdName', title: '供电公司' ,minWidth: 100},
{ {
field: 'bdName', field: 'bdName',
title: '供电公司', title: '场站',
minWidth: 100 minWidth: 100
}, },
{ field: 'objName', title: '对象名称' , minWidth: 240}, { field: 'objName', title: '对象名称' , minWidth: 240},

View File

@@ -98,9 +98,9 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="评价筛选"> <!-- <el-form-item label="评价筛选">
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" /> <el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
</el-form-item> </el-form-item> -->
</template> </template>
</TableHeader> </TableHeader>
<Table ref="tableRef" /> <Table ref="tableRef" />
@@ -145,10 +145,10 @@ const tableStore = new TableStore({
} }
}, },
{ field: 'areaName', title: '区域', minWidth: 100 }, { field: 'areaName', title: '区域', minWidth: 100 },
{ field: 'gdName', title: '地级区', minWidth: 100 }, { field: 'gdName', title: '供电公司', minWidth: 100 },
{ {
field: 'bdName', field: 'bdName',
title: '供电公司', title: '场站',
minWidth: 100 minWidth: 100
}, },
{ field: 'manufacturer', title: '厂家', minWidth: 100 }, { field: 'manufacturer', title: '厂家', minWidth: 100 },
@@ -219,7 +219,7 @@ tableStore.table.params.statisticalType = classificationData[0]
tableStore.table.params.serverName = 'harmonic-boot' tableStore.table.params.serverName = 'harmonic-boot'
tableStore.table.params.comFlag = [] tableStore.table.params.comFlag = []
tableStore.table.params.runFlag = [] tableStore.table.params.runFlag = []
tableStore.table.params.evaluate = '' // tableStore.table.params.evaluate = ''
tableStore.table.params.powerFlag = 2 tableStore.table.params.powerFlag = 2
tableStore.table.params.monitorFlag = 2 tableStore.table.params.monitorFlag = 2
tableStore.table.params.scale = [] tableStore.table.params.scale = []

View File

@@ -384,7 +384,7 @@ const startRunTest = () => {
// 下载报告 // 下载报告
const downloadTheReport = (url: string) => { const downloadTheReport = (url: string) => {
getFileNameAndFilePath({ filePath: url }).then((res: any) => { getFileNameAndFilePath({ filePath: url }).then((res: any) => {
console.log(res.data.url, 'res') //console.log(res.data.url, 'res')
const link = document.createElement('a') const link = document.createElement('a')
link.href = res.data.url link.href = res.data.url
link.download = res.data.name link.download = res.data.name

View File

@@ -46,6 +46,7 @@
import { ref, reactive, defineExpose, computed } from 'vue' import { ref, reactive, defineExpose, computed } from 'vue'
import { defaultAttribute } from '@/components/table/defaultAttribute' import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout' import { mainHeight } from '@/utils/layout'
import { Console } from 'console'
const areaData: any = ref([]) const areaData: any = ref([])
const levelData: any = ref([]) const levelData: any = ref([])
@@ -69,16 +70,23 @@ const tableHeaderLevel = ref<any[]>([
const frequency = ref<number>(875) const frequency = ref<number>(875)
const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaName: string) => { const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaName: string) => {
Time.value = [searchBeginTime, searchEndTime] Time.value = [searchBeginTime, searchEndTime]
frequency.value = list.areaStatistics.frequencySum frequency.value = list.areaStatistics.frequencySum
areaName.value = selectedAreaName // 更新区域名称 areaName.value = selectedAreaName // 更新区域名称
let allSarfi9 = 0
list.areaStatistics.areaCalculation.forEach((item: any) => {
allSarfi9 += item.sarfi9
})
areaData.value = [ areaData.value = [
{ {
areaName: '总计', areaName: '总计',
monitoringPoints: list.areaStatistics.monitoringPointSum, monitoringPoints: list.areaStatistics.monitoringPointSum,
frequency: list.areaStatistics.frequencySum, frequency: list.areaStatistics.frequencySum,
sarfi9: '/' sarfi9: allSarfi9,
}, },
...list.areaStatistics.areaCalculation ...list.areaStatistics.areaCalculation
] ]
@@ -98,12 +106,16 @@ const info = (list: any, searchBeginTime: any, searchEndTime: any,selectedAreaNa
list.monthlyStatistics.monthCalculation.forEach((item: any) => { list.monthlyStatistics.monthCalculation.forEach((item: any) => {
all += item.linked + item.notAssociated all += item.linked + item.notAssociated
}) })
shareData.value = [ shareData.value = [
{ {
month: '总计', month: '总计',
notAssociated: all.toFixed(2) notAssociated: all,
}, },
...list.monthlyStatistics.monthCalculation ...list.monthlyStatistics.monthCalculation.map((item: any) => ({
month: item.month,
notAssociated: item.notAssociated + item.linked
}))
] ]
} }

View File

@@ -22,11 +22,11 @@ const Processing = (list: any) => {
let echartsArr: string[] = [] let echartsArr: string[] = []
list.areaCalculation.forEach((item: any) => { list.areaCalculation.forEach((item: any) => {
echartsndArr.push(item.areaName) echartsndArr.push(item.areaName)
if (item.frequency == 0) { // if (item.frequency == 0) {
item.frequency = 1.1 // item.frequency = 1.1
} else if (item.frequency == 1) { // } else if (item.frequency == 1) {
item.frequency = 1.3 // item.frequency = 1.3
} // }
echartsArr.push(item.frequency) echartsArr.push(item.frequency)
}) })
areaStatistics.value = { areaStatistics.value = {
@@ -48,7 +48,7 @@ const Processing = (list: any) => {
return html return html
} }
}, },
color: ['#07CCCA'],
legend: { legend: {
data: ['暂降次数'] data: ['暂降次数']
}, },
@@ -68,7 +68,7 @@ const Processing = (list: any) => {
normal: { normal: {
//这里是颜色 //这里是颜色
color: function (params: any) { color: function (params: any) {
if (params.data == 1.1) { if (params.data == 0) {
return '#B3B3B3' return '#B3B3B3'
} else { } else {
return '#07CCCA ' return '#07CCCA '
@@ -90,11 +90,11 @@ const Grade = (list: any) => {
let echartsArr: string[] = [] let echartsArr: string[] = []
list.voltageLevelCalculation.forEach((item: any) => { list.voltageLevelCalculation.forEach((item: any) => {
echartsndArr.push(item.voltageLevel) echartsndArr.push(item.voltageLevel)
if (item.frequency == 0) { // if (item.frequency == 0) {
item.frequency = 1.1 // item.frequency = 1.1
} else if (item.frequency == 1) { // } else if (item.frequency == 1) {
item.frequency = 1.3 // item.frequency = 1.3
} // }
echartsArr.push(item.frequency) echartsArr.push(item.frequency)
}) })
@@ -117,7 +117,7 @@ const Grade = (list: any) => {
return html return html
} }
}, },
color: ['#07CCCA'],
legend: { legend: {
data: ['暂降次数'] data: ['暂降次数']
}, },
@@ -137,7 +137,7 @@ const Grade = (list: any) => {
normal: { normal: {
//这里是颜色 //这里是颜色
color: function (params: any) { color: function (params: any) {
if (params.data == 1.1) { if (params.data == 0) {
return '#B3B3B3' return '#B3B3B3'
} else { } else {
return '#07CCCA ' return '#07CCCA '
@@ -174,18 +174,21 @@ const Relation = (list: any, interval: number) => {
// item.linked = 3.14159; // item.linked = 3.14159;
// item.notAssociated = 3.14159; // item.notAssociated = 3.14159;
// } // }
if (item.linked == 0) { // if (item.linked == 0) {
item.linked = 1.1 // item.linked = 1.1
} else if (item.linked == 1) { // } else if (item.linked == 1) {
item.linked = 1.3 // item.linked = 1.3
} // }
echartsArr.push(item.linked) echartsArr.push(item.linked)
if (item.notAssociated == 0) { // if (item.notAssociated == 0) {
item.notAssociated = 1.1 // item.notAssociated = 1.1
} else if (item.notAssociated == 1) { // } else if (item.notAssociated == 1) {
item.notAssociated = 1.3 // item.notAssociated = 1.3
} // }
echartswArr.push(item.notAssociated) //echartswArr.push(item.notAssociated)
const total = item.notAssociated + item.linked
echartswArr.push(total)
}) })
monthlyStatistics.value = { monthlyStatistics.value = {
title: { title: {
@@ -208,9 +211,11 @@ const Relation = (list: any, interval: number) => {
}, },
legend: { legend: {
data: ['未关联暂降次数', '已关联处理事件'] data: ['暂降次数']
//data: ['未关联暂降次数', '已关联处理事件']
}, },
color: ['#07CCCA', '#Ff6600'], color: ['#07CCCA'],
//color: ['#07CCCA', '#Ff6600'],
xAxis: { xAxis: {
name: '月份', // 给X轴加单位 name: '月份', // 给X轴加单位
data: echartsndArr data: echartsndArr
@@ -221,11 +226,11 @@ const Relation = (list: any, interval: number) => {
options: { options: {
series: [ series: [
{ {
name: '未关联暂降次数', name: '暂降次数',
type: 'bar', type: 'bar',
barMaxWidth: 30, barMaxWidth: 30,
barMinHeight: 5, barMinHeight: 5,
data: echartswArr, data: echartswArr,
itemStyle: { itemStyle: {
normal: { normal: {
label: { label: {
@@ -238,7 +243,7 @@ const Relation = (list: any, interval: number) => {
} }
}, },
color: function (params: any) { color: function (params: any) {
if (params.data == 1.1) { if (params.data == 0) {
return '#B3B3B3' return '#B3B3B3'
} else { } else {
return '#07CCCA ' return '#07CCCA '
@@ -247,32 +252,32 @@ const Relation = (list: any, interval: number) => {
} }
} }
}, },
{ // {
name: '已关联处理事件', // name: '已关联处理事件',
type: 'bar', // type: 'bar',
barMaxWidth: 30, // barMaxWidth: 30,
data: echartsArr, // data: echartsArr,
itemStyle: { // itemStyle: {
normal: { // normal: {
label: { // label: {
// show: true, //数字开启显示 // // show: true, //数字开启显示
textStyle: { // textStyle: {
//数值样式 // //数值样式
color: '#fff', // color: '#fff',
fontSize: 14, // fontSize: 14,
fontWeight: 600 // fontWeight: 600
} // }
}, // },
color: function (params: any) { // color: function (params: any) {
if (params.data == 1.1) { // if (params.data == 0) {
return '#B3B3B3' // return '#B3B3B3'
} else { // } else {
return '#Ff6600' // return '#Ff6600'
} // }
} // }
} // }
} // }
} // }
] ]
} }
} }
@@ -291,3 +296,4 @@ const layout = mainHeight(150) as any
display: flex; display: flex;
} }
</style> </style>
>>>>>>> c902dabb73a92b43a23970969d750508558b5400

View File

@@ -39,6 +39,7 @@ const tableStore = new TableStore({
tableStore.table.params.searchEndTime, tableStore.table.params.searchEndTime,
currentAreaName.value // 传递当前区域名称 currentAreaName.value // 传递当前区域名称
) )
console.log('11111',tableStore.table.data)
echarts.value.Processing(tableStore.table.data.areaStatistics) echarts.value.Processing(tableStore.table.data.areaStatistics)
echarts.value.Grade(tableStore.table.data.voltageStatistics) echarts.value.Grade(tableStore.table.data.voltageStatistics)
echarts.value.Relation(JSON.parse(JSON.stringify(tableStore.table.data.monthlyStatistics))) echarts.value.Relation(JSON.parse(JSON.stringify(tableStore.table.data.monthlyStatistics)))

View File

@@ -240,7 +240,7 @@ const tableStore = new TableStore({
field: 'featureAmplitude', field: 'featureAmplitude',
title: '暂降(骤升)幅值(%)', title: '暂降(骤升)幅值(%)',
minWidth: '130', minWidth: '130',
formatter: ({ row }: any) => { formatter: (row: any) => {
return Math.floor(row.cellValue * 10000) / 100 return Math.floor(row.cellValue * 10000) / 100
} }
}, },

View File

@@ -29,6 +29,17 @@
</template> </template>
</vxe-column> </vxe-column>
</vxe-table> </vxe-table>
<el-pagination
class="mt10"
:currentPage="form.pageNum"
:page-size="form.pageSize"
:page-sizes="[10, 20, 50, 100]"
background
:layout="'sizes,total, ->, prev, pager, next, jumper'"
:total="total"
@size-change="onTableSizeChange"
@current-change="onTableCurrentChange"
></el-pagination>
</el-dialog> </el-dialog>
</div> </div>
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view"> <div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
@@ -168,7 +179,12 @@ tableStore.table.params.searchValue = ''
const bxactiveName = ref('ssbx') const bxactiveName = ref('ssbx')
const boxoList = ref({}) const boxoList = ref({})
const wp = ref({}) const wp = ref({})
const form = ref({
pageSize: 20,
pageNum: 1,
id: ''
})
const total = ref(0)
provide('tableStore', tableStore) provide('tableStore', tableStore)
onMounted(() => { onMounted(() => {
@@ -180,13 +196,47 @@ onMounted(() => {
}) })
}) })
//分析记录管理
const analysis1 = () => { // 分页
queryRelevantLogPage({}).then((res: any) => { const onTableSizeChange = (val: number) => {
form.value.pageSize = val
form.value.pageNum = 1 // 改变每页条数时回到第一页
loadAnalysisData() // 重新加载数据
}
const onTableCurrentChange = (val: number) => {
form.value.pageNum = val
loadAnalysisData() // 重新加载数据
}
// 封装数据加载逻辑
const loadAnalysisData = async () => {
try {
const params = {
pageNum: form.value.pageNum,
pageSize: form.value.pageSize
}
const res: any = await queryRelevantLogPage(params)
AnalysisData.value = res.data.records AnalysisData.value = res.data.records
}) total.value = res.data.total
} catch (error) {
console.error('获取分析记录失败:', error)
AnalysisData.value = []
total.value = 0
}
}
//分析记录管理
const analysis1 = async () => {
// 初始化分页参数
form.value.pageNum = 1
await loadAnalysisData()
dialogAnalysis.value = true dialogAnalysis.value = true
} }
// 启动关联分析 // 启动关联分析
const firing = () => { const firing = () => {
processEvents({ processEvents({
@@ -207,9 +257,8 @@ const details = (row: any) => {
type: 'success', type: 'success',
message: res.message message: res.message
}) })
queryRelevantLogPage({}).then((res: any) => { // 重新加载当前页的数据
AnalysisData.value = res.data.records loadAnalysisData()
})
}) })
} }
@@ -217,4 +266,6 @@ const backbxlb = () => {
view.value = true view.value = true
view2.value = false view2.value = false
} }
</script> </script>

View File

@@ -50,8 +50,8 @@ const init = () => {
getPlot(formData).then((res: any) => { getPlot(formData).then((res: any) => {
const gongData = gongfunction(res.data.voltageToleranceCurveDataList) const gongData = gongfunction(res.data.voltageToleranceCurveDataList)
data.gs = res.data.voltageToleranceCurveDataList.length data.gs = res.data.voltageToleranceCurveDataList.length
data.krr = gongData.pointI.length data.krr = gongData.pointF.length
data.bkrr = gongData.pointIun.length data.bkrr = gongData.pointFun.length
options.value = { options.value = {
// backgroundColor: "#f9f9f9", //地图背景色深蓝 // backgroundColor: "#f9f9f9", //地图背景色深蓝
@@ -251,12 +251,14 @@ function gongfunction(arr: any) {
} }
if (xx < 0.05) { if (xx < 0.05) {
standF++ standF++
pointF.push({ pointF.push({
value: point, value: point,
itemStyle: { normal: { color: 'green' } } itemStyle: { normal: { color: 'green' } }
}) })
} else if (xx < 0.2) { } else if (xx < 0.2) {
if (yy > 50) { if (yy > 50) {
standF++ standF++
pointF.push({ pointF.push({
@@ -272,6 +274,7 @@ function gongfunction(arr: any) {
} }
} else if (xx < 0.5) { } else if (xx < 0.5) {
if (yy > 70) { if (yy > 70) {
standF++ standF++
pointF.push({ pointF.push({
value: point, value: point,
@@ -286,6 +289,7 @@ function gongfunction(arr: any) {
} }
} else { } else {
if (yy > 80) { if (yy > 80) {
standF++ standF++
pointF.push({ pointF.push({
value: point, value: point,

View File

@@ -23,7 +23,7 @@
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" /> <el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="网公司标志:"> <el-form-item label="网公司标志">
<el-select <el-select
v-model="tableStore.table.params.monitorFlag" v-model="tableStore.table.params.monitorFlag"
collapse-tags collapse-tags
@@ -130,6 +130,7 @@ const tableStore = new TableStore({
width: '140', width: '140',
formatter: (row: any) => { formatter: (row: any) => {
// return (row.cellValue * 100).toFixed(0) // return (row.cellValue * 100).toFixed(0)
return Math.floor(row.cellValue * 10000) / 100 return Math.floor(row.cellValue * 10000) / 100
} }
}, },

View File

@@ -30,6 +30,7 @@ import { ref, onMounted, provide, nextTick } from 'vue'
import { mainHeight } from '@/utils/layout' import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData' import { useDictData } from '@/stores/dictData'
import MyEchart from '@/components/echarts/MyEchart.vue' import MyEchart from '@/components/echarts/MyEchart.vue'
const dictData = useDictData() const dictData = useDictData()
const tableRef = ref() const tableRef = ref()
const options = ref({}) const options = ref({})
@@ -88,6 +89,7 @@ const tableStore = new TableStore({
text: '暂降原因统计', text: '暂降原因统计',
top: '20' top: '20'
}, },
legend: { legend: {
type: 'scroll', type: 'scroll',
orient: 'vertical', orient: 'vertical',

View File

@@ -35,44 +35,44 @@ const height = mainHeight(80).height
const activeName = ref('1') const activeName = ref('1')
const activeName1 = ref('1') const activeName1 = ref('1')
const list = ref([ const list = ref([
// { {
// name: '暂态严重度统计', name: '暂态严重度统计',
// id: '3', id: '3',
// isGroup: true, isGroup: true,
// url: '/event-boot/report/getSeverity', url: '/event-boot/report/getSeverity',
// column: [ column: [
// { {
// title: '暂态事件严重度(前二十)', title: '暂态事件严重度(前二十)',
// children: [ children: [
// { {
// field: 'index', field: 'index',
// title: '序号', title: '序号',
// width: '80', width: '80',
// formatter: (row: any) => { formatter: (row: any) => {
// return ( return (
// (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
// row.rowIndex + row.rowIndex +
// 1 1
// ) )
// } }
// }, },
// { field: 'startTime', title: '暂态事件发生时刻', width: '200' }, { field: 'startTime', title: '暂态事件发生时刻', width: '200' },
// { field: 'gdName', title: '供电公司' }, { field: 'gdName', title: '供电公司' },
// { field: 'subName', title: '变电站' }, { field: 'subName', title: '变电站' },
// { field: 'lineName', title: '监测点' }, { field: 'lineName', title: '监测点' },
// { field: 'voltageScale', title: '监测点电压等级' }, { field: 'voltageScale', title: '监测点电压等级' },
// { field: 'loadType', title: '干扰源类型' }, { field: 'loadType', title: '干扰源类型' },
// { {
// field: 'featureAmplitude', field: 'featureAmplitude',
// title: '暂降(骤升)幅值(%)', title: '暂降(骤升)幅值(%)',
// formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2) formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
// }, },
// { field: 'duration', title: '持续时间(s)' }, { field: 'duration', title: '持续时间(s)' },
// { field: 'severity', title: '暂态事件严重度' } { field: 'severity', title: '暂态事件严重度' }
// ] ]
// } }
// ] ]
// }, },
{ {
name: '暂降事件列表', name: '暂降事件列表',
id: '4', id: '4',

View File

@@ -17,7 +17,7 @@
<el-button type="primary">上传文件</el-button> <el-button type="primary">上传文件</el-button>
</template> </template>
<template #tip> <template #tip>
<div>请上传xml文件</div> <div>请上传xml文件文件名不能包含空格</div>
</template> </template>
</el-upload> </el-upload>
</el-form-item> </el-form-item>
@@ -92,6 +92,12 @@ const isValidFile = (file: UploadRawFile) => {
return false return false
} }
// 检查文件名是否包含空格
if (file.name.includes(' ')) {
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
return false
}
return true return true
} }
// 上传报告 // 上传报告
@@ -102,6 +108,14 @@ const handleExceed: UploadProps['onExceed'] = files => {
uploadRef.value!.clearFiles() uploadRef.value!.clearFiles()
const file = files[0] as UploadRawFile const file = files[0] as UploadRawFile
file.uid = genFileId() file.uid = genFileId()
// 检查文件名是否包含空格
if (file.name.includes(' ')) {
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
return
}
uploadRef.value!.handleStart(file) uploadRef.value!.handleStart(file)
} }
@@ -116,6 +130,13 @@ const submit = async () => {
return ElMessage.warning('请上传icd文件') return ElMessage.warning('请上传icd文件')
} }
if (reportPath.value[0]?.raw != undefined) { if (reportPath.value[0]?.raw != undefined) {
// 检查文件名是否包含空格
if (reportPath.value[0].raw.name.includes(' ')) {
ElMessage.error('文件名不能包含空格,请重命名文件后再上传')
return
}
await uploadFile(reportPath.value[0].raw, '/icd/').then(res => { await uploadFile(reportPath.value[0].raw, '/icd/').then(res => {
//治理工程验收报告 //治理工程验收报告
form.fileName = res.data.fileName.split('.')[0] form.fileName = res.data.fileName.split('.')[0]

View File

@@ -9,7 +9,7 @@
maxlength="32" maxlength="32"
show-word-limit show-word-limit
clearable clearable
placeholder="请输入任务名称" placeholder="请输入icd名称"
/> />
</el-form-item> </el-form-item>
</template> </template>

View File

@@ -82,7 +82,8 @@ const tableStore: any = new TableStore({
{ field: 'updateBy', title: '修改人' }, { field: 'updateBy', title: '修改人' },
{ field: 'updateTime', title: '修改时间' }, { field: 'updateTime', title: '修改时间' },
{ {
title: '操作',fixed: 'right', title: '操作',
fixed: 'right',
width: '220', width: '220',
render: 'buttons', render: 'buttons',
buttons: [ buttons: [
@@ -147,9 +148,13 @@ const okRun = () => {
}) })
} }
onMounted(() => { onMounted(() => {
getIcdList().then(res => { getIcdList()
options.value = res.data .then(res => {
}) options.value = res.data
tableStore.index() tableStore.index()
})
.catch(err => {
tableStore.index()
})
}) })
</script> </script>

View File

@@ -33,10 +33,10 @@
style="width: 100%" style="width: 100%"
></el-input-number> ></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="会话超时时间():" prop="sessionTime"> <el-form-item label="会话超时时间(分钟):" prop="sessionTime">
<el-input-number v-model.number="form.sessionTime" :min="10" style="width: 100%"></el-input-number> <el-input-number v-model.number="form.sessionTime" :min="10" style="width: 100%"></el-input-number>
</el-form-item> </el-form-item>
<el-form-item label="token刷新时间():" prop="sessionRefreshTime"> <el-form-item label="token刷新时间(分钟):" prop="sessionRefreshTime">
<el-input-number <el-input-number
v-model.number="form.sessionRefreshTime" v-model.number="form.sessionRefreshTime"
:min="10" :min="10"