From e6b1613d91226b0a1f7b5b756eede8399c5745ed Mon Sep 17 00:00:00 2001 From: GGJ <357021191@qq.com> Date: Thu, 28 Mar 2024 15:21:58 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E6=89=BF=E8=BD=BD?= =?UTF-8?q?=E8=83=BD=E5=8A=9Bbug=20=20=E5=AE=8C=E6=88=90=E8=87=AA=E5=AE=9A?= =?UTF-8?q?=E4=B9=89=E6=8A=A5=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/echarts/waveForm.vue | 2 +- .../components/photovoltaic.vue | 47 ++- .../evaluationList/components/policy.vue | 4 +- .../bearingCapacity/evaluationList/index.vue | 12 +- .../bearingCapacity/userManagement/index.vue | 29 +- .../Region/components/Compatibility.vue | 1 + .../sagGovern/businessUser/event/sags3D.vue | 27 +- .../businessUser/event/toleranceCurve.vue | 376 +++++++++++++++++- src/views/system/reportForms/department.vue | 13 +- src/views/system/reportForms/form.vue | 1 - src/views/system/reportForms/index.vue | 20 +- src/views/system/reportForms/look.vue | 4 +- src/views/system/reportForms/luckysheet.vue | 2 +- 13 files changed, 469 insertions(+), 69 deletions(-) diff --git a/src/components/echarts/waveForm.vue b/src/components/echarts/waveForm.vue index 8309cdcc..3a07a9ef 100644 --- a/src/components/echarts/waveForm.vue +++ b/src/components/echarts/waveForm.vue @@ -64,7 +64,7 @@
高级分析 - 返回 + 返回
diff --git a/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue b/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue index 990d603b..33aba08e 100644 --- a/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue +++ b/src/views/pqs/bearingCapacity/evaluationList/components/photovoltaic.vue @@ -38,15 +38,10 @@ filterable :disabled="props.rowList.id != undefined" style="width: 240px" - value-key="id" + value-key="userId" @change="userChange" > - + @@ -88,7 +83,7 @@ ref="xTable" :data="tableData" > - + @@ -165,7 +160,7 @@ import { useDictData } from '@/stores/dictData' const props = defineProps(['rowList']) const monitoringPoint = useMonitoringPoint() -const size = ref(26) +const size = ref(20) const dictData = useDictData() const datePickerRef = ref() const height = mainHeight(80).height @@ -228,7 +223,7 @@ const dotList: any = ref({ onMounted(() => { const dom = document.getElementById('navigation-splitpanes') if (dom) { - size.value = Math.round((280 / dom.offsetHeight) * 100) + size.value = Math.round((180 / dom.offsetHeight) * 100) } datePickerRef.value.setTimeOptions([{ label: '周', value: 4 }]) datePickerRef.value.setInterval(4) @@ -246,7 +241,12 @@ const info = () => { }).then(res => { userList.value = res.data.records user.value = userList.value[0] || {} + console.log('🚀 ~ info ~ res.data.records:', res.data.records) + + console.log('🚀 ~ info ~ user.value:', user.value) + userData.value = res.data.records[0] || {} + console.log('🚀 ~ info ~ userData.value:', userData.value) }) } @@ -268,6 +268,10 @@ const onSubmit = async () => { options3.value = {} voltageList.value = [] showBtn.value = false + if (props.rowList.id != undefined) { + user.value = props.rowList + rendering(props.rowList) + } Promise.all([queryCarryCapacityData(form), queryCarryCapacityQData(form), queryCarryCapacityIData(form)]) .then(res => { // 有功功率 @@ -279,20 +283,17 @@ const onSubmit = async () => { for (let k in res[0].data.stringMap) { voltageList.value.push({ name: k, - c: res[0].data.stringMap[k][0], - a: res[0].data.stringMap[k][1], - b: res[0].data.stringMap[k][2] + c: res[0].data.stringMap[k][0].toFixed(2), + a: res[0].data.stringMap[k][1].toFixed(2), + b: res[0].data.stringMap[k][2].toFixed(2) }) } - setEChart(1, res[0].data.data) - setEChart(2, res[1].data.data) - setEChart(3, res[2].data.data) + setEChart(1, res[0].data.data, '有功功率', 'w') + setEChart(2, res[1].data.data, '无功功率', 'w') + setEChart(3, res[2].data.data, '谐波电流幅值', 'A') showBtn.value = true loading.value = false // props.rowList.id != undefined - if (props.rowList.id != undefined) { - rendering(props.rowList) - } }) .catch(err => { loading.value = false @@ -313,10 +314,10 @@ const modelTrain = () => { }).then(res => {}) } -const setEChart = (val: any, data: any) => { +const setEChart = (val: any, data: any, text: string, name: string) => { let options = { title: { - text: '在线率统计', + text: text, x: 'center', textStyle: { fontWeight: 'normal' @@ -324,12 +325,13 @@ const setEChart = (val: any, data: any) => { }, xAxis: { data: data.filter(item => item.phaseType == 'A').map(item => item.time), - // name: '时间', + name: '时间', onZero: false, position: 'bottom' // 设置 x 轴在底部 }, yAxis: { type: 'value', + name: name, max: Math.ceil(Math.max(...data.map(item => item.value))), min: Math.floor(Math.min(...data.map(item => item.value))) }, @@ -340,6 +342,7 @@ const setEChart = (val: any, data: any) => { grid: { left: '30px' }, + color: ['#FFCC33', '#00CC00', '#CC0000'], series: [ { name: 'A', diff --git a/src/views/pqs/bearingCapacity/evaluationList/components/policy.vue b/src/views/pqs/bearingCapacity/evaluationList/components/policy.vue index 93e11211..ae56bdf5 100644 --- a/src/views/pqs/bearingCapacity/evaluationList/components/policy.vue +++ b/src/views/pqs/bearingCapacity/evaluationList/components/policy.vue @@ -5,7 +5,7 @@ 光伏电站承载能力评估策略 - + @@ -43,7 +43,7 @@ 充电站、电加热负荷、电气化铁路承载能力评估 - + diff --git a/src/views/pqs/bearingCapacity/evaluationList/index.vue b/src/views/pqs/bearingCapacity/evaluationList/index.vue index b4f80b3f..eb043161 100644 --- a/src/views/pqs/bearingCapacity/evaluationList/index.vue +++ b/src/views/pqs/bearingCapacity/evaluationList/index.vue @@ -38,7 +38,7 @@ - 返回 + 返回 @@ -82,7 +82,14 @@ const tableStore: any = new TableStore({ return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1 } }, - { field: 'lineName', title: '配变台区', width: '500' }, + { + field: 'lineName', + title: '配变台区', + width: '500', + formatter: (row: any) => { + return row.cellValue ? row.cellValue : '/' + } + }, { field: 'evaluateType', title: '评估类型', @@ -166,6 +173,7 @@ tableStore.table.params.id = dictData.state.area[0].id provide('tableStore', tableStore) const quit = () => { addedShow.value = true + tableStore.index() rowList.value = {} } onMounted(() => { diff --git a/src/views/pqs/bearingCapacity/userManagement/index.vue b/src/views/pqs/bearingCapacity/userManagement/index.vue index 6a5b07a1..cc025c4b 100644 --- a/src/views/pqs/bearingCapacity/userManagement/index.vue +++ b/src/views/pqs/bearingCapacity/userManagement/index.vue @@ -30,7 +30,7 @@ @@ -91,18 +91,8 @@ const equipmentRef = ref() const title = ref('') const areaList: any = dictData.areaSelect() const userShow: any = ref('Power_Station_Users') -interface RuleForm { - area: string - city: string - province: string - region: string - regionList: any - protocolCapacity: number - userName: string - userType: string - voltage: string -} -const form = ref({ + +const form = ref({ area: '', city: '', province: '', @@ -148,7 +138,7 @@ const tableStore: any = new TableStore({ } }, - { field: 'area', title: '所属区域' }, + // { field: 'area', title: '所属区域' }, { field: 'voltage', title: '电压等级(V)', @@ -292,6 +282,17 @@ const onSubmit = () => { // 取消 const handleClose = () => { + form.value = { + area: '', + city: '', + province: '', + protocolCapacity: 0, + region: '', + userName: '', + userType: '', + voltage: '', + regionList: [] + } ruleFormRef.value?.resetFields() dialogVisible.value = false } diff --git a/src/views/pqs/voltageSags/Region/components/Compatibility.vue b/src/views/pqs/voltageSags/Region/components/Compatibility.vue index f8bdd874..891d0e79 100644 --- a/src/views/pqs/voltageSags/Region/components/Compatibility.vue +++ b/src/views/pqs/voltageSags/Region/components/Compatibility.vue @@ -112,6 +112,7 @@ const info = async (list: any) => { } }) await gongfunction() + ITIC.value = { title: { text: 'ITIC曲线' diff --git a/src/views/pqs/voltageSags/sagGovern/businessUser/event/sags3D.vue b/src/views/pqs/voltageSags/sagGovern/businessUser/event/sags3D.vue index 4a8c331d..6faf75d6 100644 --- a/src/views/pqs/voltageSags/sagGovern/businessUser/event/sags3D.vue +++ b/src/views/pqs/voltageSags/sagGovern/businessUser/event/sags3D.vue @@ -34,9 +34,9 @@ const tableStore = new TableStore({ { title: '电压暂降频次统计表', children: [ - { title: '暂降福度', field: 'amplitude', width: '130' }, + { title: '暂降幅度(p.u.)', field: 'amplitude', width: '130' }, { - title: '持续时间', + title: '持续时间(s)', field: 'loginName', children: [] } @@ -208,7 +208,28 @@ const initEchart = () => { dataZoom: null, backgroundColor: '#fff', tooltip: { - trigger: 'axis' + axisPointer: { + type: 'shadow', + label: { + color: '#fff', + fontSize: 16 + } + }, + textStyle: { + color: '#fff', + fontStyle: 'normal', + opacity: 0.35, + fontSize: 14 + }, + backgroundColor: 'rgba(0,0,0,0.35)', + borderWidth: 0, + formatter: function (params: any) { + let tips = '' + tips += '暂降幅度(p.u.):' + apiData.value.amplitudes[params.value[0]] + '
' + tips += '持续时间(s):' + apiData.value.durations[params.value[1]] + '
' + tips += '事件次数::' + params.value[2] + '' + return tips + } }, title: { text: '暂降密度图', diff --git a/src/views/pqs/voltageSags/sagGovern/businessUser/event/toleranceCurve.vue b/src/views/pqs/voltageSags/sagGovern/businessUser/event/toleranceCurve.vue index d95ab5b9..ea1cc426 100644 --- a/src/views/pqs/voltageSags/sagGovern/businessUser/event/toleranceCurve.vue +++ b/src/views/pqs/voltageSags/sagGovern/businessUser/event/toleranceCurve.vue @@ -93,21 +93,383 @@ import SecondSheet from '@/components/secondSheet/index.vue' import MyEchart from '@/components/echarts/MyEchart.vue' import { reactive, ref } from 'vue' const options = ref({ + legend: { + data: ['越限事件', '未越限事件', '不确定事件'], + left: '10px' + }, + tooltip: { + formatter: function (a: any) { + if (a[0].value[4] == undefined) { + return + } + + let relVal = '' + relVal = "供电公司:" + ' ' + ' ' + a[0].value[3] + '
' + relVal += "变电站:" + ' ' + ' ' + a[0].value[4] + '
' + relVal += "发生时刻:" + ' ' + ' ' + a[0].value[2] + '
' + relVal += + "持续时间:" + ' ' + ' ' + a[0].value[0].toFixed(3) + 's
' + relVal += "特征幅值:" + ' ' + ' ' + a[0].value[1].toFixed(3) + '%' + return relVal + } + }, xAxis: { - type: 'category', - data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] + name: '持续时间\n ms', + type: 'log', + min: '0.001', + max: '1000', + splitLine: { show: false } }, yAxis: { - type: 'value' + name: '幅值/p.u.', + splitNumber: 10, + minInterval: 3 }, + grid: { + right: '70px' + }, + color: ['#ff0000', '#ff0000', '#2f4554', '#61a0a8', '#d48265'], series: [ { - data: [150, 230, 224, 218, 135, 147, 260], - type: 'line' + type: 'line', + data: [ + // [0.001, 200], + [0.003, 0], + [0.003, 110], + // [0.5, 120], + // [0.5, 110], + // [10, 110], + [1000, 110] + ], + showSymbol: false, + tooltips: { + show: false + } }, { - data: [50, 30, 124, 318, 175, 127, 160], - type: 'line' + type: 'line', + data: [ + [0.02, 0], + [0.02, 90], + // [0.5, 70], + // [0.5, 80], + // [10, 80], + // [10, 90], + [1000, 90] + ], + showSymbol: false, + tooltips: { + show: false + } + }, + { + name: '越限事件', + type: 'scatter', + symbol: 'circle', + data: [ + { + value: [ + 7.795, + 94, + '2024-03-27 20:46:53.319', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '00ea8d9bab92f5edcec72fec87bda760' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + }, + { + value: [ + 7.846, + 92, + '2024-03-17 12:51:54.520', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '01497b699e36624f14f0db879d52cb8a' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + }, + { + value: [ + 0.047, + 89, + '2024-03-26 07:39:44.114', + '长兴市', + '古茶山', + 'c63a677b0f6fdd667d1305938f04a052', + '017fae8ed5310bb39ce09442951fe868' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + }, + { + value: [ + 0.064, + 89, + '2024-03-23 20:42:02.339', + '淮安市', + '淮安荣芯半导体公司', + 'c8b1c708164f4e69837835d623464f71', + '01909672630cec80b36d9de81d6de8a6' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + }, + { + value: [ + 0.059, + 86, + '2024-03-01 07:28:37.000', + '南通市', + '南通象屿海洋装备有限责任公司', + 'b4c1f4657462669ed4205b3c9ec27715', + '01ddfd3d-d863-4b32-ba9c-270bca5464ac' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + }, + { + value: [ + 8.026, + 94, + '2024-03-19 08:02:40.363', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '028cb780851f0dbf42d77deb2288e6ae' + ], + itemStyle: { + normal: { + color: '#2f4554' + } + } + } + ] + }, + { + name: '未越限事件', + type: 'scatter', + symbol: 'circle', + data: [ + { + value: [ + 7.795, + 134, + '2024-03-27 20:46:53.319', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '00ea8d9bab92f5edcec72fec87bda760' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + }, + { + value: [ + 7.846, + 134, + '2024-03-17 12:51:54.520', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '01497b699e36624f14f0db879d52cb8a' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + }, + { + value: [ + 0.047, + 134, + '2024-03-26 07:39:44.114', + '长兴市', + '古茶山', + 'c63a677b0f6fdd667d1305938f04a052', + '017fae8ed5310bb39ce09442951fe868' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + }, + { + value: [ + 0.064, + 134, + '2024-03-23 20:42:02.339', + '淮安市', + '淮安荣芯半导体公司', + 'c8b1c708164f4e69837835d623464f71', + '01909672630cec80b36d9de81d6de8a6' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + }, + { + value: [ + 0.059, + 134, + '2024-03-01 07:28:37.000', + '南通市', + '南通象屿海洋装备有限责任公司', + 'b4c1f4657462669ed4205b3c9ec27715', + '01ddfd3d-d863-4b32-ba9c-270bca5464ac' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + }, + { + value: [ + 8.026, + 134, + '2024-03-19 08:02:40.363', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '028cb780851f0dbf42d77deb2288e6ae' + ], + itemStyle: { + normal: { + color: '#61a0a8' + } + } + } + ] + }, + { + name: '不确定事件', + type: 'scatter', + symbol: 'circle', + data: [ + { + value: [ + 17.795, + 134, + '2024-03-27 20:46:53.319', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '00ea8d9bab92f5edcec72fec87bda760' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + }, + { + value: [ + 17.846, + 134, + '2024-03-17 12:51:54.520', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '01497b699e36624f14f0db879d52cb8a' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + }, + { + value: [ + 1.047, + 134, + '2024-03-26 07:39:44.114', + '长兴市', + '古茶山', + 'c63a677b0f6fdd667d1305938f04a052', + '017fae8ed5310bb39ce09442951fe868' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + }, + { + value: [ + 1.064, + 134, + '2024-03-23 20:42:02.339', + '淮安市', + '淮安荣芯半导体公司', + 'c8b1c708164f4e69837835d623464f71', + '01909672630cec80b36d9de81d6de8a6' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + }, + { + value: [ + 1.059, + 134, + '2024-03-01 07:28:37.000', + '南通市', + '南通象屿海洋装备有限责任公司', + 'b4c1f4657462669ed4205b3c9ec27715', + '01ddfd3d-d863-4b32-ba9c-270bca5464ac' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + }, + { + value: [ + 18.026, + 134, + '2024-03-19 08:02:40.363', + '南通市', + '南通象屿海洋装备有限责任公司', + 'cc297ca8575101e3e6c5dfc609eb1c1c', + '028cb780851f0dbf42d77deb2288e6ae' + ], + itemStyle: { + normal: { + color: '#d48265' + } + } + } + ] } ], options: { diff --git a/src/views/system/reportForms/department.vue b/src/views/system/reportForms/department.vue index 3004ada9..20f5759d 100644 --- a/src/views/system/reportForms/department.vue +++ b/src/views/system/reportForms/department.vue @@ -25,7 +25,7 @@ @@ -36,7 +36,7 @@ import { ref } from 'vue' import { ElMessageBox } from 'element-plus' import { useDictData } from '@/stores/dictData' -import { getDataByTempId } from '@/api/harmonic-boot/luckyexcel' +import { getDataByTempId, updateBindTemplate } from '@/api/harmonic-boot/luckyexcel' const emit = defineEmits(['shutDown']) const dictData = useDictData() const dialogVisible = ref(false) @@ -58,12 +58,10 @@ const open = (row: any) => { id: item.deptId, activation: item.activation }) - console.log('🚀 ~ getDataByTempId ~ item.activation:', item.activation) idarr.value.push({ id: item.deptId }) }) gettreeData(area.value, keyarr.value) dataTree.value = area.value - console.log('🚀 ~ getDataByTempId ~ dataTree.value:', dataTree.value) }) } //过滤数据 @@ -83,6 +81,13 @@ const gettreeData = (mdata, ids) => { } }) } +// 绑定 +const bind=()=>{ + + updateBindTemplate().then(res=>{ + // ElMessage.success('绑定成功') + }) +} defineExpose({ open }) diff --git a/src/views/system/reportForms/form.vue b/src/views/system/reportForms/form.vue index 62069378..8dfb50d2 100644 --- a/src/views/system/reportForms/form.vue +++ b/src/views/system/reportForms/form.vue @@ -6,7 +6,6 @@
{ - departmentRef.value.open(row) - } - }, + // { + // name: 'edit', + // title: '绑定', + // type: 'primary', + // icon: 'el-icon-Plus', + // render: 'basicButton', + // click: row => { + // departmentRef.value.open(row) + // } + // }, { name: 'del', text: '删除', diff --git a/src/views/system/reportForms/look.vue b/src/views/system/reportForms/look.vue index d34b70db..634facd3 100644 --- a/src/views/system/reportForms/look.vue +++ b/src/views/system/reportForms/look.vue @@ -12,7 +12,7 @@ 导入excel 导出excel - 返回 + 返回
@@ -35,7 +35,7 @@ const options: any = ref({ container: 'luckysheet', title: '', // 表 头名 lang: 'zh', // 中文 - showtoolbar: true, // 是否显示工具栏 + showtoolbar: false, // 是否显示工具栏 showinfobar: false, // 是否显示顶部信息栏 showsheetbar: true, // 是否显示底部sheet按钮 data: [ diff --git a/src/views/system/reportForms/luckysheet.vue b/src/views/system/reportForms/luckysheet.vue index dcb1b4e8..38ea6510 100644 --- a/src/views/system/reportForms/luckysheet.vue +++ b/src/views/system/reportForms/luckysheet.vue @@ -13,7 +13,7 @@ 导出excel 保存 - 返回 + 返回