diff --git a/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue b/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue index 0e94a01..b65db1f 100644 --- a/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue +++ b/src/components/cockpit/exceedanceLevel/components/dailyTrendChart.vue @@ -135,7 +135,7 @@ onMounted(() => {}) const open = async (row: any) => { dialogVisible.value = true dialogTitle.value = row.name + '日趋势图' - dialogText.value = `监测点名称:${row.lineName}_越限时间:${row.time}_指标名称:${row.name}` + dialogText.value = `监测点名称:${row.lineName} 越限时间:${row.time} 指标名称:${row.name}` nextTick(() => { initData(row) }) diff --git a/src/components/cockpit/exceedanceLevel/index.vue b/src/components/cockpit/exceedanceLevel/index.vue index d45548b..931f2bf 100644 --- a/src/components/cockpit/exceedanceLevel/index.vue +++ b/src/components/cockpit/exceedanceLevel/index.vue @@ -6,7 +6,7 @@ :showReset="false" @selectChange="selectChange" datePicker - :timeKeyList="prop.timeKey" + :timeKeyList="prop.timeKey" v-if="fullscreen" > string[] }, + timeKey: { type: Array as () => string[] }, timeValue: { type: Object }, interval: { type: Number } }) @@ -117,40 +117,24 @@ const tableStore: any = new TableStore({ title: '越限程度(%)', field: 'extent', minWidth: '70', - render: 'customTemplate', - customTemplate: (row: any) => { - // 保留两个小数 - const extentValue = - row.extent !== null && row.extent !== undefined && row.extent !== '' - ? Math.floor(row.extent * 100) / 100 - : '/' - return `${extentValue}` + formatter: (row: any) => { + return Math.floor(row.cellValue * 100) / 100 } }, { title: '越限时间', field: 'time', minWidth: '60', - render: 'customTemplate', - customTemplate: (row: any) => { - if (row.time !== null && row.time !== undefined && row.time !== '') { - return `${row.time}` - } else { - return `/` - } + formatter: (row: any) => { + return row.cellValue || '/' } }, { title: '越限最高监测点', field: 'lineName', minWidth: '90', - render: 'customTemplate', - customTemplate: (row: any) => { - if (row.lineName !== null && row.lineName !== undefined && row.lineName !== '') { - return `${row.lineName}` - } else { - return `/` - } + formatter: (row: any) => { + return row.cellValue || '/' } } ], @@ -208,6 +192,7 @@ provide('tableStore', tableStore) // 点击行 const cellClickEvent = ({ row, column }: any) => { dialogTrendChart.value = true + if (column.field == 'maxValue' && row.lineId) { nextTick(() => { dailyTrendChartRef.value.open(row) diff --git a/src/components/echarts/rmsWorker.js b/src/components/echarts/rmsWorker.js index ae6bbdd..0a98a5f 100644 --- a/src/components/echarts/rmsWorker.js +++ b/src/components/echarts/rmsWorker.js @@ -266,7 +266,6 @@ self.onmessage = function (e) { } else if (boxoList.systemType == 'ZL') { titles = (boxoList.engineeringName == undefined ? '' : ' 项目名称:' + boxoList.engineeringName) + - ' 监测点名称:' + boxoList.equipmentName + ' 发生时刻:' + @@ -279,7 +278,6 @@ self.onmessage = function (e) { } else if (boxoList.systemType == 'YPT') { titles = (boxoList.engineeringName == undefined ? '' : ' 项目名称:' + boxoList.engineeringName) + - ' 监测点名称:' + boxoList.lineName + ' 发生时刻:' + @@ -291,15 +289,15 @@ self.onmessage = function (e) { 's' } else { titles = - '变电站名称:' + + ' 变电站名称:' + boxoList.subName + - ' 监测点名称:' + + ' 监测点名称:' + boxoList.lineName + - ' 发生时刻:' + + ' 发生时刻:' + boxoList.startTime + - ' 暂降(骤升)幅值:' + + ' 暂降(骤升)幅值:' + (boxoList.featureAmplitude * 100).toFixed(2) + - '% 持续时间:' + + '% 持续时间:' + boxoList.duration + 's' } diff --git a/src/components/echarts/shuWorker.js b/src/components/echarts/shuWorker.js index f52d3a9..9e8f064 100644 --- a/src/components/echarts/shuWorker.js +++ b/src/components/echarts/shuWorker.js @@ -127,13 +127,13 @@ self.addEventListener('message', function (e) { titles = '变电站名称:' + boxoList.powerStationName + - ' 监测点名称:' + + ' 监测点名称:' + boxoList.measurementPointName + - ' 发生时刻:' + + ' 发生时刻:' + boxoList.startTime + - ' 暂降(骤升)幅值:' + + ' 暂降(骤升)幅值:' + (boxoList.featureAmplitude * 100).toFixed(2) + - '% 持续时间:' + + '% 持续时间:' + boxoList.duration + 's' } else if (boxoList.systemType == 'ZL') { @@ -141,11 +141,11 @@ self.addEventListener('message', function (e) { (boxoList.engineeringName == undefined ? '' : ' 项目名称:' + boxoList.engineeringName) + ' 监测点名称:' + boxoList.equipmentName + - ' 发生时刻:' + + ' 发生时刻:' + boxoList.startTime + - ' 暂降(骤升)幅值:' + + ' 暂降(骤升)幅值:' + boxoList.evtParamVVaDepth + - '% 持续时间:' + + '% 持续时间:' + boxoList.evtParamTm + 's' } else if (boxoList.systemType == 'YPT') { diff --git a/src/utils/router.ts b/src/utils/router.ts index 545f3b0..d0cb0af 100644 --- a/src/utils/router.ts +++ b/src/utils/router.ts @@ -304,7 +304,7 @@ export const getMenu = () => { } handlerMenu(res.data) handleAdminRoute(res.data) - if (route.params.to) { + if (route?.params?.to) { const lastRoute = JSON.parse(route.params.to as string) if (lastRoute.path != adminBaseRoutePath) { let query = !isEmpty(lastRoute.query) ? lastRoute.query : {} diff --git a/src/views/pqs/cockpit/setUp/components/popup.vue b/src/views/pqs/cockpit/setUp/components/popup.vue index c6290f1..3e5b2a4 100644 --- a/src/views/pqs/cockpit/setUp/components/popup.vue +++ b/src/views/pqs/cockpit/setUp/components/popup.vue @@ -410,10 +410,15 @@ function dragEnd(row: any) { } // 保存 const onSubmit = () => { + layout.value = layout.value.filter(item => { + return item.y <= 6 && item.x <= 12 + }) + if (layout.value.length == 0) { return ElMessage.warning('页面设计不能为空!') } let repeat = findDuplicateNames(layout.value) || [] + console.log('🚀 ~ onSubmit ~ layout.value:', layout.value) if (repeat.length > 0) { return ElMessage.warning(repeat.join('、') + ' 组件重复,请删除重复组件!') }