Compare commits

24 Commits

Author SHA1 Message Date
GGJ
d69a6e1e5d Merge branch 'master' of http://pqmcc.com:3000/Web/admin-sjzx
# Conflicts:
#	src/views/pqs/supervise/technology/feedbackPopup.vue
2025-12-19 14:08:17 +08:00
GGJ
a67535abbf 修改打包报错 2025-12-19 14:05:56 +08:00
sjl
dffc735edb 待办任务提交审核返回刷新 2025-12-19 13:27:18 +08:00
sjl
38806367b4 Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx 2025-12-19 13:12:46 +08:00
sjl
6f770aa91d 修改文件查看只有冀北可行 2025-12-19 13:12:38 +08:00
GGJ
dc32cc3bb7 修改冀北现场反馈问题 2025-12-19 11:58:26 +08:00
sjl
d64d18f330 微调 2025-12-19 10:56:30 +08:00
sjl
909f43e257 电能质量异常管理,谐波测试计划管理bug修改 2025-12-18 16:09:44 +08:00
GGJ
92aa66436e 修改冀北现场问题 2025-12-17 09:22:19 +08:00
GGJ
264f33302f 修改冀北问题 2025-12-16 13:38:12 +08:00
sjl
7b9f5302d0 流程图时间和结果,流程审核表单默认勾选 2025-12-16 11:15:27 +08:00
sjl
72d836020b 编辑打开时,干扰源类型决定类别 2025-12-15 17:41:49 +08:00
sjl
67efef738a 干扰源接入,终端检测,台账管理bug修复 2025-12-15 16:19:33 +08:00
GGJ
6918611d06 添加上传全局提示 2025-12-15 10:35:34 +08:00
GGJ
9f5b2ecc46 修改冀北现场反馈问题 2025-12-15 09:33:34 +08:00
sjl
d30b8247cf 微调 2025-12-15 09:24:25 +08:00
GGJ
0b61c4b7ba 修改冀北现场问题 2025-12-14 12:47:53 +08:00
sjl
ff2b9db7b8 我的任务,干扰源分析,常态化干扰源用户管理,终端检测,bug调整 2025-12-12 15:44:56 +08:00
sjl
289900f9ff Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx 2025-12-12 09:29:16 +08:00
sjl
e87d05c587 微调 2025-12-12 09:29:09 +08:00
GGJ
46c55d48ec 修改冀北现场问题 2025-12-12 09:26:56 +08:00
GGJ
b36f765d07 修改技术监督 2025-12-11 15:03:11 +08:00
guanj
0fe2d2b911 修改冀北问题 2025-12-09 20:04:55 +08:00
guanj
8c41a8fc77 冀北问题修改 2025-12-08 16:28:34 +08:00
220 changed files with 21378 additions and 17045 deletions

BIN
public/favicon4.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

View File

@@ -30,3 +30,18 @@ export const getSubstationSelect = () => {
method: 'get'
})
}
// 查询变电站详情
export const getSubstationSelectLine = (id: string) => {
return request({
url: '/device-boot/line/getSubstationData',
method: 'post',
data: [id]
})
}
// 查询监测点
export const getLineOverLimitData = (id: string) => {
return request({
url: '/device-boot/line/getLineOverLimitData?id=' + id,
method: 'post'
})
}

View File

@@ -165,3 +165,20 @@ export function getSupervisionDetailsData(data: any) {
export function getSupervisionCityDetailsData(data: any) {
return request({ url: '/supervision-boot/gridDiagram/getSupervisionCityDetailsData', method: 'post', data })
}
//区域污染值统计
export function getAreaPollution(data: any) {
return request({ url: '/harmonic-boot/PollutionSubstation/getAreaPollution', method: 'post', data })
}
//场站级评估
export function downPollutionSubCalc(data: any) {
return request({ url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc', method: 'post', data })
}
//监测点评价
export function limitTableDetail(data: any) {
return request({ url: '/device-boot/dataVerify/limitTableDetail', method: 'post', data })
}
//重要及敏感用户详情
export function downPollutionSensitiveUser(data: any) {
return request({ url: '/harmonic-boot/PollutionSubstation/downPollutionSensitiveUser', method: 'post', data })
}

View File

@@ -6,7 +6,7 @@ export function getUndocumentednonlinearData() {
method: 'get'
})
}
//获取入网评估报告审核数据
//获取系统接入方案审核数据
export function getReportreviewData() {
return createAxios({
url: '/Process-supervision/Reportreview/getReportreview',

View File

@@ -1,5 +1,5 @@
import createAxios from '@/utils/request'
import { ElMessage } from 'element-plus'
const SYSTEM_PREFIX = '/system-boot'
/**
@@ -17,6 +17,11 @@ export const uploadFile = (file: any, path: string) => {
'Content-Type': 'multipart/form-data'
},
data: form
}).then(res => {
if (res.code == `A0000`) {
ElMessage.success('上传成功!')
return res
}
})
}

View File

@@ -54,6 +54,54 @@
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe782;</span>
<div class="name">253_ipower</div>
<div class="code-name">&amp;#xe782;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe665;</span>
<div class="name">电压</div>
<div class="code-name">&amp;#xe665;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe758;</span>
<div class="name">三相电压幅值不平衡</div>
<div class="code-name">&amp;#xe758;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe61e;</span>
<div class="name">电压总谐波畸变率</div>
<div class="code-name">&amp;#xe61e;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe612;</span>
<div class="name">闪变</div>
<div class="code-name">&amp;#xe612;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe65d;</span>
<div class="name">停运事件管理</div>
<div class="code-name">&amp;#xe65d;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe604;</span>
<div class="name">在运设备</div>
<div class="code-name">&amp;#xe604;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe666;</span>
<div class="name">异常类_14非智能表在运异常</div>
<div class="code-name">&amp;#xe666;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe82f;</span>
<div class="name">综合评价</div>
@@ -234,9 +282,9 @@
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.woff2?t=1744179175277') format('woff2'),
url('iconfont.woff?t=1744179175277') format('woff'),
url('iconfont.ttf?t=1744179175277') format('truetype');
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
url('iconfont.woff?t=1765612648830') format('woff'),
url('iconfont.ttf?t=1765612648830') format('truetype');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
@@ -262,6 +310,78 @@
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-a-253_ipower"></span>
<div class="name">
253_ipower
</div>
<div class="code-name">.icon-a-253_ipower
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dianya"></span>
<div class="name">
电压
</div>
<div class="code-name">.icon-dianya
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-sanxiangdianyafuzhibupingheng"></span>
<div class="name">
三相电压幅值不平衡
</div>
<div class="code-name">.icon-sanxiangdianyafuzhibupingheng
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-dianyazongxiebojibianshuai"></span>
<div class="name">
电压总谐波畸变率
</div>
<div class="code-name">.icon-dianyazongxiebojibianshuai
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-shanbian"></span>
<div class="name">
闪变
</div>
<div class="code-name">.icon-shanbian
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-tingyunshijianguanli"></span>
<div class="name">
停运事件管理
</div>
<div class="code-name">.icon-tingyunshijianguanli
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zaiyunshebei"></span>
<div class="name">
在运设备
</div>
<div class="code-name">.icon-zaiyunshebei
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-yichanglei_14feizhinengbiaozaiyunyichang"></span>
<div class="name">
异常类_14非智能表在运异常
</div>
<div class="code-name">.icon-yichanglei_14feizhinengbiaozaiyunyichang
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-zonghepingjia1"></span>
<div class="name">
@@ -532,6 +652,70 @@
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-a-253_ipower"></use>
</svg>
<div class="name">253_ipower</div>
<div class="code-name">#icon-a-253_ipower</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dianya"></use>
</svg>
<div class="name">电压</div>
<div class="code-name">#icon-dianya</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-sanxiangdianyafuzhibupingheng"></use>
</svg>
<div class="name">三相电压幅值不平衡</div>
<div class="code-name">#icon-sanxiangdianyafuzhibupingheng</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-dianyazongxiebojibianshuai"></use>
</svg>
<div class="name">电压总谐波畸变率</div>
<div class="code-name">#icon-dianyazongxiebojibianshuai</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-shanbian"></use>
</svg>
<div class="name">闪变</div>
<div class="code-name">#icon-shanbian</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-tingyunshijianguanli"></use>
</svg>
<div class="name">停运事件管理</div>
<div class="code-name">#icon-tingyunshijianguanli</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zaiyunshebei"></use>
</svg>
<div class="name">在运设备</div>
<div class="code-name">#icon-zaiyunshebei</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-yichanglei_14feizhinengbiaozaiyunyichang"></use>
</svg>
<div class="name">异常类_14非智能表在运异常</div>
<div class="code-name">#icon-yichanglei_14feizhinengbiaozaiyunyichang</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-zonghepingjia1"></use>

View File

@@ -1,8 +1,8 @@
@font-face {
font-family: "iconfont"; /* Project id 3482754 */
src: url('iconfont.woff2?t=1744179175277') format('woff2'),
url('iconfont.woff?t=1744179175277') format('woff'),
url('iconfont.ttf?t=1744179175277') format('truetype');
src: url('iconfont.woff2?t=1765612648830') format('woff2'),
url('iconfont.woff?t=1765612648830') format('woff'),
url('iconfont.ttf?t=1765612648830') format('truetype');
}
.iconfont {
@@ -13,6 +13,38 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-a-253_ipower:before {
content: "\e782";
}
.icon-dianya:before {
content: "\e665";
}
.icon-sanxiangdianyafuzhibupingheng:before {
content: "\e758";
}
.icon-dianyazongxiebojibianshuai:before {
content: "\e61e";
}
.icon-shanbian:before {
content: "\e612";
}
.icon-tingyunshijianguanli:before {
content: "\e65d";
}
.icon-zaiyunshebei:before {
content: "\e604";
}
.icon-yichanglei_14feizhinengbiaozaiyunyichang:before {
content: "\e666";
}
.icon-zonghepingjia1:before {
content: "\e82f";
}

File diff suppressed because one or more lines are too long

View File

@@ -5,6 +5,62 @@
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "33424624",
"name": "253_ipower",
"font_class": "a-253_ipower",
"unicode": "e782",
"unicode_decimal": 59266
},
{
"icon_id": "12331657",
"name": "电压",
"font_class": "dianya",
"unicode": "e665",
"unicode_decimal": 58981
},
{
"icon_id": "33073330",
"name": "三相电压幅值不平衡",
"font_class": "sanxiangdianyafuzhibupingheng",
"unicode": "e758",
"unicode_decimal": 59224
},
{
"icon_id": "37400988",
"name": "电压总谐波畸变率",
"font_class": "dianyazongxiebojibianshuai",
"unicode": "e61e",
"unicode_decimal": 58910
},
{
"icon_id": "43700638",
"name": "闪变",
"font_class": "shanbian",
"unicode": "e612",
"unicode_decimal": 58898
},
{
"icon_id": "25458995",
"name": "停运事件管理",
"font_class": "tingyunshijianguanli",
"unicode": "e65d",
"unicode_decimal": 58973
},
{
"icon_id": "35341056",
"name": "在运设备",
"font_class": "zaiyunshebei",
"unicode": "e604",
"unicode_decimal": 58884
},
{
"icon_id": "22630860",
"name": "异常类_14非智能表在运异常",
"font_class": "yichanglei_14feizhinengbiaozaiyunyichang",
"unicode": "e666",
"unicode_decimal": 58982
},
{
"icon_id": "32402696",
"name": "综合评价",

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
src/assets/img/inlogo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@@ -6,7 +6,7 @@
</div> -->
<TableHeader :showSearch="false">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
</el-form-item>
</template>

View File

@@ -18,14 +18,22 @@ import VueOfficeDocx from '@vue-office/docx'
import VueOfficeExcel from '@vue-office/excel'
//引入VueOfficePdf组件
import VueOfficePdf from '@vue-office/pdf'
import { downloadFile } from '@/api/system-boot/file'
const { push, options, currentRoute } = useRouter()
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
// const url = 'http://192.168.1.22:9009/excelreport' + currentRoute.value.href?.split('?')[1]
const url = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
console.log("🚀 ~ url:", url)
const excelOptions = ref({
const url = ref('')
const excelOptions = ref({})
if(VITE_FLAG){
url.value = '/api-docx/excelreport' + currentRoute.value?.href?.split('?')[1]
excelOptions.value = ref({
xls: currentRoute.value.href?.split('?')[1].split('.')[1] == 'xls' ? true : false
})
}else{
//下载
}
onMounted(() => {
console.log()
})

View File

@@ -279,6 +279,27 @@ const getResultCss = (status) => {
return ''
}
const getTaskNameItemType = (itemStatus: any) => {
if (itemStatus === 1) {
return '审批中'
}else if (itemStatus === 2) {
return '审批通过'
}else if (itemStatus === 3) {
return '审批不通过'
}else if (itemStatus === 4) {
return '已取消'
}else if (itemStatus === 5) {
return '退回'
} else if (itemStatus === 6) {
return '委派'
} else if (itemStatus === 7) {
return '审批通过中'
} else if (itemStatus === 0) {
return '待审批'
}
return ''
}
const getActivityOutgoing = (activity) => {
// 如果有 outgoing则直接使用它
if (activity.outgoing && activity.outgoing.length > 0) {
@@ -316,7 +337,9 @@ const elementHover = (element) => {
!overlays.value && (overlays.value = bpmnModeler.get('overlays'))
// 展示信息
// console.log(activityLists.value, 'activityLists.value')
// console.log(element.value, 'element.value')
if (element.value.type === 'bpmn:SequenceFlow') {
return
}
const activity = activityLists.value.find((m) => m.key === element.value.id)
// console.log(activity, 'activityactivityactivityactivity')
if (!activity) {
@@ -330,22 +353,22 @@ const elementHover = (element) => {
if (element.value.type === 'bpmn:StartEvent' && processInstance.value) {
html = `<p>发起人:${processInstance.value.startUser.name}</p>
<p>部门:${processInstance.value.startUser.deptName}</p>
<p>创建时间:${formatDate(processInstance.value.createTime)}`
<p>创建时间:${formatDate(processInstance.value.startTime)}`
} else if (element.value.type === 'bpmn:UserTask') {
let task = taskList.value.find((m) => m.id === activity.taskId) // 找到活动对应的 taskId
if (!task) {
return
}
let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
let dataResult = ''
optionData.forEach((element) => {
if (element.value == task.status) {
dataResult = element.label
}
})
// let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
// let dataResult = ''
// optionData.forEach((element) => {
// if (element.value == task.status) {
// dataResult = element.label
// }
// })
html = `<p>审批人:${task.assigneeUser.name}</p>
<p>部门:${task.assigneeUser.deptName}</p>
<p>结果:${dataResult}</p>
<p>结果:${getTaskNameItemType(task.status)}</p>
<p>创建时间:${formatDate(task.createTime)}</p>`
// html = `<p>审批人:${task.assigneeUser.nickname}</p>
// <p>部门:${task.assigneeUser.deptName}</p>
@@ -368,20 +391,20 @@ const elementHover = (element) => {
html += `<p>结束时间:${formatDate(activity.endTime)}</p>`
}
} else if (element.value.type === 'bpmn:EndEvent' && processInstance.value) {
let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
let dataResult = ''
optionData.forEach((element) => {
if (element.value == processInstance.value.status) {
dataResult = element.label
}
})
html = `<p>结果:${dataResult}</p>`
// let optionData = getIntDictOptions(DICT_TYPE.BPM_TASK_STATUS)
// let dataResult = ''
// optionData.forEach((element) => {
// if (element.value == processInstance.value.status) {
// dataResult = element.label
// }
// })
// html = `<p>结果:${dataResult}</p>`
// html = `<p>结果:${getIntDictOptions(
// DICT_TYPE.BPM_PROCESS_INSTANCE_RESULT,
// processInstance.value.status
// )}</p>`
if (processInstance.value.endTime) {
html += `<p>结束时间:${formatDate(processInstance.value.endTime)}</p>`
html = `<p>结束时间:${formatDate(processInstance.value.endTime)}</p>`
}
}
elementOverlayIds.value[element.value.id] = toRaw(overlays.value)?.add(element.value, {
@@ -660,7 +683,7 @@ watch(
}
.element-overlays {
width: 200px;
width: 250px;
padding: 8px;
color: #fafafa;
background: rgb(0 0 0 / 60%);

View File

@@ -162,7 +162,7 @@
<template v-if="listenerForm.event === 'timeout'">
<el-form-item label="定时器类型" prop="eventDefinitionType" key="eventDefinitionType">
<el-select v-model="listenerForm.eventDefinitionType">
<el-option label="日期" value="date" />
<el-option label="统计时间" value="date" />
<el-option label="持续时长" value="duration" />
<el-option label="循环" value="cycle" />
<el-option label="无" value="null" />

View File

@@ -204,6 +204,7 @@ const tableStore: any = new TableStore({
tableStore.table.params.deptId = dictData.state.area[0].id
tableStore.table.params.alarmDayLimit = 5
tableStore.table.params.warnDayLimit = 1
tableStore.table.params.lineRunFlag = 0
const echart = () => {
percentage.value = {
color: ['#FF9100'],
@@ -364,6 +365,7 @@ watch(
)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.monitoringPoints {
display: flex;
.statistics {

View File

@@ -31,7 +31,7 @@
<div class="divBox mt10">
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
<span class="divBox_title">低于90%监测点数</span>
<span class="divBox_num" style="color: #ff6600">
<span class="divBox_num" style="color: #57bc6e">
{{ monitoringPoints.abnormalNum }}
</span>
</div>
@@ -90,7 +90,7 @@
{{ o.citTotalNum }}
</span>
<!-- 低于90%监测点数 -->
<span style="flex: 1; color: #ff9100" class="text">
<span style="flex: 1; color: #388e3c" class="text">
{{ o.citBelowNum }}
</span>
<span
@@ -179,10 +179,17 @@ const tableStore: any = new TableStore({
monitoringPoints.value.runNum = tableStore.table.data.totalNum
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
abnormal.value = tableStore.table.data.citDetailList
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.citTotalNum != 0
} else {
return k.citName != '上送国网' && k.citName != '非上送国网'
}
})
}
})
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.lineRunFlag = 0
const echart = () => {
percentage.value = {
color: ['#FF9100'],
@@ -340,6 +347,7 @@ watch(
)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.monitoringPoints {
display: flex;
.statistics {

View File

@@ -31,7 +31,7 @@
<div class="divBox mt10">
<span class="iconfont icon-igw-f-warning-data" style="color: #ff6600"></span>
<span class="divBox_title">低于90%终端数</span>
<span class="divBox_num" style="color: #ff6600">
<span class="divBox_num" style="color: #57bc6e">
{{ monitoringPoints.abnormalNum }}
</span>
</div>
@@ -88,7 +88,7 @@
{{ o.citTotalNum }}
</span>
<!-- 低于90%终端数 -->
<span style="flex: 1; color: #ff9100" class="text">
<span style="flex: 1; color: #388e3c" class="text">
{{ o.citBelowNum }}
</span>
<span
@@ -177,10 +177,18 @@ const tableStore: any = new TableStore({
monitoringPoints.value.runNum = tableStore.table.data.totalNum
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
abnormal.value = tableStore.table.data.citDetailList
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.citTotalNum != 0
} else {
return k.citName != '上送国网' && k.citName != '非上送国网'
}
})
}
})
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.lineRunFlag = 0
const echart = () => {
percentage.value = {
color: ['#FF9100'],
@@ -338,6 +346,7 @@ watch(
)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.monitoringPoints {
display: flex;
.statistics {

View File

@@ -18,29 +18,53 @@
>
<div style="flex: 1">
<div class="title">终端统计</div>
<div style="height: 135px" class="box1">
<div class="boxDiv hexagon">
<div style="color: #fff">{{ statisticsList.allNum }}</div>
<div class="mt10 divBot">总数</div>
<div
class="box1"
:style="{
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px - 30px )`,
overflow: 'auto'
}"
>
<div class="statistics">
<div class="divBox div1">
<span class="iconfont icon-qiyezongshu" style="color: #57bc6e"></span>
<span class="divBox_title">终端总数</span>
<span class="divBox_num text-style" style="color: #57bc6e">
{{ statisticsList.allNum }}
</span>
</div>
<div class="boxDiv hexagon hexagon1">
<div style="color: #fff">{{ statisticsList.runNum }}</div>
<div class="mt10 divBot">在运</div>
<div class="divBox div2">
<span class="iconfont icon-zaiyunshebei" style="color: #67c23a"></span>
<span class="divBox_title">在运终端数</span>
<span class="divBox_num text-style" style="color: #67c23a">
{{ statisticsList.runNum }}
</span>
</div>
</div>
<div style="height: 135px" class="box1">
<div class="boxDiv hexagon hexagon2">
<div style="color: #fff">{{ statisticsList.checkNum }}</div>
<div class="mt10 divBot">调试</div>
<div class="statistics">
<div class="divBox div3">
<span
class="iconfont icon-yichanglei_14feizhinengbiaozaiyunyichang"
style="color: #ffbf00"
></span>
<span class="divBox_title">调试终端数</span>
<span class="divBox_num text-style" style="color: #ffbf00">
{{ statisticsList.checkNum }}
</span>
</div>
<div class="divBox div4">
<span class="iconfont icon-tingyunshijianguanli" style="color: #f56c6c"></span>
<span class="divBox_title">停运终端数</span>
<span class="divBox_num text-style" style="color: #f56c6c">
{{ statisticsList.stopRunNum }}
</span>
</div>
<div class="boxDiv hexagon hexagon3">
<div style="color: #fff">{{ statisticsList.stopRunNum }}</div>
<div class="mt10 divBot">停运</div>
</div>
</div>
</div>
<div style="flex: 2" class="ml15">
<div class="title">完整性统计</div>
<div class="title">终端运行统计</div>
<div class="mb5" style="height: 40px">
<el-segmented
@@ -65,7 +89,7 @@
<span style="width: 90px">终端总数</span>
<span style="flex: 1">完整性(%)</span>
<span style="flex: 1">在线率(%)</span>
<span style="flex: 1">合格(%)</span>
<span style="flex: 1">异常(%)</span>
</div>
<div
:style="{
@@ -84,7 +108,7 @@
</span>
<!-- -->
<sp
style="flex: 1; color: #ff9100"
style="flex: 1; color: #388e3c"
class="text"
:class="` ${o.integrity < 90 ? 'text-red' : ''}`"
>
@@ -99,7 +123,7 @@
</span>
<span
style="flex: 1; color: #388e3c"
:class="` ${o.qualified < 90 ? 'text-red' : ''}`"
:class="` ${o.qualified > 10 ? 'text-red' : ''}`"
class="text"
>
{{ o.qualified }}
@@ -205,11 +229,17 @@ const tableStore: any = new TableStore({
statisticsList.value.checkNum = totalData.value.filter(item => item.runFlag === '调试').length
statisticsList.value.stopRunNum = totalData.value.filter(item => item.runFlag === '停运').length
abnormal.value = tableStore.table.data
abnormal.value = tableStore.table.data.filter((k: any) => {
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.count != 0
} else {
return k.name != '上送国网' && k.name != '非上送国网'
}
})
}
})
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.lineRunFlag = 0
provide('tableStore', tableStore)
onMounted(() => {
@@ -234,6 +264,7 @@ watch(
)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.monitoringPoints {
display: flex;
}
@@ -344,32 +375,7 @@ watch(
color: #fff;
border-radius: 8px;
}
.box1 {
display: flex;
align-items: center;
justify-content: space-around;
.boxDiv {
// flex: 1;
display: flex;
flex-direction: column;
align-items: center;
position: relative;
margin: 0 5px;
div:nth-child(1) {
position: absolute;
font-size: 30px;
top: -10px;
font-weight: 700;
}
.divBot {
font-size: 16px;
position: absolute;
top: 20px;
}
color: #fff;
}
}
.hexagon {
position: relative;
width: 100px;
@@ -427,4 +433,44 @@ watch(
border-top: 27.5px solid #a52a2a;
}
}
.statistics {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
.divBox {
width: 100%;
height: 70px;
padding: 10px;
display: flex;
margin-bottom: 10px;
.iconfont {
font-size: 40px;
margin-right: 5px;
}
.divBox_title {
font-weight: 550;
}
.divBox_num {
font-size: 20px;
font-weight: 550;
margin-left: auto;
font-family: AlimamaDongFangDaKai;
}
align-items: center;
// text-align: center;
border-radius: 5px;
}
.div1 {
background-color: #eef8f0;
}
.div2 {
background-color: #67c23a24;
}
.div3 {
background-color: #ffbf0024;
}
.div4 {
background-color: #f56c6c24;
}
}
</style>

View File

@@ -15,7 +15,7 @@ import { color, gradeColor3 } from './color'
import { useConfig } from '@/stores/config'
const config = useConfig()
// import { nextTick } from 'process'
const emit = defineEmits(['triggerPoint', 'group'])
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
color[0] = config.layout.elementUiPrimary[0]
const chartRef = ref<HTMLDivElement>()
@@ -153,6 +153,9 @@ const initChart = () => {
chart.on('click', function (params) {
if (params.seriesName == '暂态触发点') {
emit('triggerPoint', params.data)
} else {
emit('echartClick', params)
}
})

View File

@@ -1,4 +1,4 @@
export let color = [
export const color = [
'#07CCCA',
'#00BFF5',
'#FFBF00',
@@ -8,7 +8,10 @@ export let color = [
'#FF9100',
'#5B6E96',
'#66FFCC',
'#B3B'
'#B266FF',
'#FF6680',
'#40A0FF',
'#33CC99'
]
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900', '#996600', '#A52a2a']

View File

@@ -4,7 +4,7 @@ export const defaultAttribute: VxeTableProps = {
align: 'center',
headerCellClassName: 'table-header-cell',
border: true,
stripe: true,
size: 'small',
columnConfig: { resizable: true },
rowConfig: { isCurrent: true, isHover: true },
@@ -13,6 +13,7 @@ export const defaultAttribute: VxeTableProps = {
treeConfig: {
reserve: true
},
showOverflow: true
showOverflow: true,
showFooter:true
}

View File

@@ -11,7 +11,7 @@
>
<el-form-item v-if="datePicker" style="grid-column: span 2; max-width: 630px">
<template #label>
<el-checkbox v-if="showTimeAll" v-model="timeAll" label="时间" />
<el-checkbox v-if="showTimeAll" v-model="timeAll" label="统计时间" />
<span v-else>{{ dateLabel }}</span>
</template>
<DatePicker
@@ -111,7 +111,7 @@ const props = withDefaults(defineProps<Props>(), {
showReset: true,
showExport: false,
showTimeAll: false,
dateLabel: '时间'
dateLabel: '统计日期'
})
// 动态计算table高度
const resizeObserver = new ResizeObserver(entries => {
@@ -182,7 +182,7 @@ const handlerHeight = () => {
}
}
const computedSearchRow = () => {
if (!headerForm.value.$el) return
if (!headerForm.value?.$el) return
// 清空headerFormSecond.value.$el下的元素
while (headerFormSecond.value.$el.firstChild) {
headerForm.value.$el.appendChild(headerFormSecond.value.$el.firstChild)
@@ -231,6 +231,16 @@ const setDatePicker = (list: any) => {
const onResetForm = () => {
//时间重置成默认值
datePickerRef.value?.setTheDate(3)
if (props.datePicker && timeAll.value) {
tableStore.table.params.searchBeginTime = datePickerRef.value.timeValue[0]
tableStore.table.params.searchEndTime = datePickerRef.value.timeValue[1]
tableStore.table.params.startTime = datePickerRef.value.timeValue[0]
tableStore.table.params.endTime = datePickerRef.value.timeValue[1]
tableStore.table.params.timeFlag = datePickerRef.value.timeFlag
tableStore.table.params.interval = datePickerRef.value.interval
}
tableStore.onTableAction('reset', {})
}
const setTheDate = (val: any) => {
@@ -238,7 +248,7 @@ const setTheDate = (val: any) => {
}
// 导出
const onExport = () => {
console.log('导出')
tableStore.onTableAction('export', { showAllFlag: true })
}

View File

@@ -0,0 +1,205 @@
<template>
<el-dialog draggable v-model="dialogVisible" :title="title" width="1200px">
<el-tabs type="border-card" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="监测点详情" name="tab1">
<el-descriptions :column="3" border label-width="150px">
<el-descriptions-item label="项目工程">
{{ details.areaName }}
</el-descriptions-item>
<el-descriptions-item label="项目单位">
{{ details.gdName }}
</el-descriptions-item>
<el-descriptions-item label="所属变电站">
{{ details.bdName }}
</el-descriptions-item>
<el-descriptions-item label="电压等级">
{{ details.scale }}
</el-descriptions-item>
<el-descriptions-item label="终端厂家">
{{ details.manufacturer }}
</el-descriptions-item>
<el-descriptions-item label="终端名称">
{{ details.devName }}
</el-descriptions-item>
<el-descriptions-item label="网络参数">
{{ details.ip }}
</el-descriptions-item>
<el-descriptions-item label="监测点名称">
{{ details.lineName }}
</el-descriptions-item>
<el-descriptions-item label="监测点序号">
{{ details.id }}
</el-descriptions-item>
<el-descriptions-item label="通讯状态">
{{ details.comFlag }}
</el-descriptions-item>
<el-descriptions-item label="干扰源类型">
{{ details.loadType }}
</el-descriptions-item>
<el-descriptions-item label="监测点对象名称">
{{ details.objName }}
</el-descriptions-item>
<el-descriptions-item label="接线方式">
{{ details.ptType }}
</el-descriptions-item>
<el-descriptions-item label="PT变比">
{{ details.pt }}
</el-descriptions-item>
<el-descriptions-item label="CT变比">
{{ details.ct }}
</el-descriptions-item>
<el-descriptions-item label="基准容量(MVA)">
{{ details.standardCapacity }}
</el-descriptions-item>
<el-descriptions-item label="最小短路容量(MVA)">
{{ details.shortCapacity }}
</el-descriptions-item>
<el-descriptions-item label="供电设备容量(MVA)">
{{ details.devCapacity }}
</el-descriptions-item>
<el-descriptions-item label="用户协议容量(MVA)">
{{ details.dealCapacity }}
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
<el-tab-pane label="监测点限值" name="tab2">
<el-descriptions :column="3" border label-width="250px">
<el-descriptions-item label="电压偏差上限值(%)">
{{ limitValue.voltageDev }}
</el-descriptions-item>
<el-descriptions-item label="电压偏差下限值(%)">
{{ limitValue.uvoltageDev }}
</el-descriptions-item>
<el-descriptions-item label="频率偏差限值(Hz)">
{{ limitValue.freqDev }}
</el-descriptions-item>
<el-descriptions-item label="三相电压不平衡度限值(%)">
{{ limitValue.ubalance }}
</el-descriptions-item>
<el-descriptions-item label="负序电流限值(A)">
{{ limitValue.ineg }}
</el-descriptions-item>
<el-descriptions-item label="长时闪变限值(%)">
{{ limitValue.flicker }}
</el-descriptions-item>
<el-descriptions-item label="电压总畸变率限值(%)">
{{ limitValue.uaberrance }}
</el-descriptions-item>
<el-descriptions-item label="奇次谐波电压含有率限值(%)">
{{ limitValue.oddHarm }}
</el-descriptions-item>
<el-descriptions-item label="偶次谐波电压含有率限值(%)">
{{ limitValue.evenHarm }}
</el-descriptions-item>
<el-descriptions-item label="3次谐波电流幅值限值(A)">
{{ limitValue.iharm3 }}
</el-descriptions-item>
<el-descriptions-item label="4次谐波电流幅值限值(A)">
{{ limitValue.iharm4 }}
</el-descriptions-item>
<el-descriptions-item label="5次谐波电流幅值限值(A)">
{{ limitValue.iharm5 }}
</el-descriptions-item>
<el-descriptions-item label="6次谐波电流幅值限值(A)">
{{ limitValue.iharm6 }}
</el-descriptions-item>
<el-descriptions-item label="7次谐波电流幅值限值(A)">
{{ limitValue.iharm7 }}
</el-descriptions-item>
<el-descriptions-item label="8次谐波电流幅值限值(A)">
{{ limitValue.iharm8 }}
</el-descriptions-item>
<el-descriptions-item label="9次谐波电流幅值限值(A)">
{{ limitValue.iharm9 }}
</el-descriptions-item>
<el-descriptions-item label="10次谐波电流幅值限值(A)">
{{ limitValue.iharm10 }}
</el-descriptions-item>
<el-descriptions-item label="11次谐波电流幅值限值(A)">
{{ limitValue.iharm11 }}
</el-descriptions-item>
<el-descriptions-item label="12次谐波电流幅值限值(A)">
{{ limitValue.iharm12 }}
</el-descriptions-item>
<el-descriptions-item label="13次谐波电流幅值限值(A)">
{{ limitValue.iharm13 }}
</el-descriptions-item>
<el-descriptions-item label="14次谐波电流幅值限值(A)">
{{ limitValue.iharm14 }}
</el-descriptions-item>
<el-descriptions-item label="15次谐波电流幅值限值(A)">
{{ limitValue.iharm15 }}
</el-descriptions-item>
<el-descriptions-item label="16次谐波电流幅值限值(A)">
{{ limitValue.iharm16 }}
</el-descriptions-item>
<el-descriptions-item label="17次谐波电流幅值限值(A)">
{{ limitValue.iharm17 }}
</el-descriptions-item>
<el-descriptions-item label="18次谐波电流幅值限值(A)">
{{ limitValue.iharm18 }}
</el-descriptions-item>
<el-descriptions-item label="19次谐波电流幅值限值(A)">
{{ limitValue.iharm19 }}
</el-descriptions-item>
<el-descriptions-item label="20次谐波电流幅值限值(A)">
{{ limitValue.iharm20 }}
</el-descriptions-item>
<el-descriptions-item label="21次谐波电流幅值限值(A)">
{{ limitValue.iharm21 }}
</el-descriptions-item>
<el-descriptions-item label="22次谐波电流幅值限值(A)">
{{ limitValue.iharm22 }}
</el-descriptions-item>
<el-descriptions-item label="23次谐波电流幅值限值(A)">
{{ limitValue.iharm23 }}
</el-descriptions-item>
<el-descriptions-item label="24次谐波电流幅值限值(A)">
{{ limitValue.iharm24 }}
</el-descriptions-item>
<el-descriptions-item label="25次谐波电流幅值限值(A)">
{{ limitValue.iharm25 }}
</el-descriptions-item>
<el-descriptions-item label="0.5-1.5次间谐波电压含有率限值(%)">
{{ limitValue.inUharm }}
</el-descriptions-item>
<el-descriptions-item label="2.5-15.5次谐波电压含有率限值(%)">
{{ limitValue.inUharm16 }}
</el-descriptions-item>
</el-descriptions>
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject } from 'vue'
import { getLineOverLimitData, getLineDetailData } from '@/api/device-boot/line'
const dialogVisible = ref(false)
const title = ref('')
const activeName = ref('tab1')
const details: any = ref([])
const limitValue: any = ref([])
const open = (data: any) => {
details.value = []
limitValue.value = []
activeName.value = 'tab1'
title.value = data.name.replace(/[^]*/g, '') + '_详情'
getLineDetailData(data.id).then(res => {
details.value = res.data
})
getLineOverLimitData(data.id).then(res => {
limitValue.value = res.data
})
dialogVisible.value = true
}
const handleClick = (tab: any, event: Event) => {}
defineExpose({ open })
</script>
<style lang="scss" scoped>
:deep(.el-upload-list__item) {
width: 400px;
}
</style>

View File

@@ -0,0 +1,34 @@
<template>
<el-dialog draggable v-model="dialogVisible" :title="title" width="500px">
<el-descriptions class="margin-top" :column="1" border label-width="150px">
<el-descriptions-item label="变电站名称">{{ list[0]?.srbName }}</el-descriptions-item>
<el-descriptions-item label="电压等级">{{ list[0]?.scale }}</el-descriptions-item>
<el-descriptions-item label="经度">{{ list[0]?.coordY }}</el-descriptions-item>
<el-descriptions-item label="纬度">{{ list[0]?.coordX }}</el-descriptions-item>
</el-descriptions>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, inject } from 'vue'
import { getSubstationSelectLine } from '@/api/device-boot/line'
const dialogVisible = ref(false)
const title = ref('')
const list: any = ref([])
const open = (data: any) => {
list.value = []
title.value = data.name.replace(/[^]*/g, '') + '_详情'
getSubstationSelectLine(data.id).then(res => {
list.value = res.data
})
dialogVisible.value = true
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
:deep(.el-upload-list__item) {
width: 400px;
}
</style>

View File

@@ -1,40 +1,93 @@
<template>
<div :style="{ width: menuCollapse ? '40px' : props.width }" style="transition: all 0.3s; overflow: hidden">
<Icon v-show="menuCollapse" @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 mt20 menu-collapse"
style="cursor: pointer" />
<Icon
v-show="menuCollapse"
@click="onMenuCollapse"
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''"
size="18"
class="fold ml10 mt20 menu-collapse"
style="cursor: pointer"
/>
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
<div style="display: flex; align-items: center" class="mb10">
<el-input v-model="filterText" placeholder="请输入内容" clearable maxlength="10" show-word-limit @input="change">
<el-input
v-model="filterText"
placeholder="请输入内容"
clearable
maxlength="10"
show-word-limit
@input="change"
>
<template #prefix>
<Icon name="el-icon-Search" style="font-size: 16px" />
</template>
</el-input>
<Icon @click="onMenuCollapse" :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''" size="18" class="fold ml10 menu-collapse"
style="cursor: pointer" v-if="props.canExpand" />
<el-button icon="el-icon-Plus" v-if="props.addTree" type="primary" class="ml10"
@click="onAddTree">新增</el-button>
<Icon
@click="onMenuCollapse"
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''"
size="18"
class="fold ml10 menu-collapse"
style="cursor: pointer"
v-if="props.canExpand"
/>
<el-button icon="el-icon-Plus" v-if="props.addTree" type="primary" class="ml10" @click="onAddTree">
新增
</el-button>
</div>
<el-tree style="flex: 1; overflow: auto" ref="treeRef" :props="defaultProps" highlight-current
:filter-node-method="filterNode" node-key="id" v-bind="$attrs">
<el-tree
style="flex: 1; overflow: auto"
ref="treeRef"
:props="defaultProps"
highlight-current
:filter-node-method="filterNode"
node-key="id"
v-bind="$attrs"
>
<template #default="{ node, data }">
<span class="custom-tree-node">
<Icon :name="data.icon" style="font-size: 16px" :style="{ color: data.color }"
v-if="data.icon" />
<Icon
:name="data.icon"
style="font-size: 16px"
:style="{ color: data.color }"
v-if="data.icon"
/>
<el-tooltip
class="box-item"
effect="customized"
placement="bottom-start"
:offset="0"
v-if="data.level == 6"
>
<template #content>
<el-button type="primary" plain @click="viewDetails(data)">
{{ data.level == 3 ? '变电站详情' : '监测点详情' }}
</el-button>
</template>
<span style="margin-left: 4px">{{ node.label }}</span>
</el-tooltip>
<span v-else style="margin-left: 4px">{{ node.label }}</span>
</span>
</template>
</el-tree>
</div>
<!-- 变电站详情 -->
<SubstationDetails ref="SubstationRef" />
<!-- 监测点详情 -->
<MonitoringPointDetails ref="MonitoringPointRef" />
</div>
</template>
<script lang="ts" setup>
import useCurrentInstance from '@/utils/useCurrentInstance'
import { ElTree } from 'element-plus'
import { ref, watch } from 'vue'
import { ref, watch, onMounted, nextTick } from 'vue'
import { ElMessage } from 'element-plus'
import MonitoringPointDetails from './details/monitoringPointDetails.vue'
import SubstationDetails from './details/substationDetails.vue'
defineOptions({
name: 'govern/tree'
})
@@ -52,19 +105,23 @@ const props = withDefaults(defineProps<Props>(), {
})
const { proxy } = useCurrentInstance()
const menuCollapse = ref(false)
const MonitoringPointRef = ref()
const SubstationRef = ref()
const filterText = ref('')
const treeRef = ref()
const defaultProps = {
label: 'name',
value: 'id'
}
const specialCharsPattern = /[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g;
const change=(val) => {
const specialCharsPattern = /[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g
const change = val => {
if (specialCharsPattern.test(val)) {
ElMessage.warning('禁止输入特殊字符!')
filterText.value = val.replace(/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g, "")
console.log("🚀 ~ change ~ filterText.value:", filterText.value)
filterText.value = val.replace(
/[`~!@$%^&*\-+=<>?:"{}|,.\/;'\\[\]·~@¥%……&*()——\-+={}|《》?:“”【】、;‘’,。、~]/g,
''
)
console.log('🚀 ~ change ~ filterText.value:', filterText.value)
treeRef.value!.filter(filterText.value)
} else {
@@ -88,18 +145,30 @@ const onMenuCollapse = () => {
menuCollapse.value = !menuCollapse.value
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
}
// 查看详情
const viewDetails = (data: any) => {
console.log('🚀 ~ viewDetails ~ data:', data)
if (data.level == 3) {
// 变电站详情
// substationDetails
SubstationRef.value.open(data)
} else {
// 监测点详情
MonitoringPointRef.value.open(data)
}
// proxy.eventBus.emit('viewDetails', data)
}
const filterNode = (value: string, data: any, node: any) => {
if (!value) return true
// return data.name.includes(value)
if (data.name) {
return chooseNode(value, data, node)
}
}
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配则返回该节点以及其下的所有子节点如果参数是子节点则返回该节点的父节点。name是中文字符enName是英文字符.
const chooseNode = (value: string, data: any, node: any) => {
if (data.name.indexOf(value) !== -1) {
return true
}
@@ -124,12 +193,40 @@ const chooseNode = (value: string, data: any, node: any) => {
// 没匹配到返回false
return false
}
onMounted(async () => {
// 等待树渲染完成
await nextTick()
// 可以等待更长时间确保树完全展开
})
const scrollToNode = (id: string) => {
console.log("🚀 ~ scrollToNode ~ id:", id)
if (!treeRef.value) return
// 获取目标节点的元素
const targetNode = treeRef.value.getNode(id)
if (!targetNode) return
// 获取节点的DOM元素
const nodeElement = document.querySelector(`[data-key="${id}"]`)
if (nodeElement) {
// 滚动到节点位置
nodeElement.scrollIntoView({
behavior: 'smooth', // 平滑滚动
block: 'center', // 垂直方向居中
inline: 'nearest' // 水平方向最近
})
// 如果需要高亮当前节点
treeRef.value.setCurrentKey(id)
}
}
// 添加树
const onAddTree = () => {
emit('onAddTree')
}
const treeRef = ref<InstanceType<typeof ElTree>>()
defineExpose({ treeRef })
defineExpose({ treeRef, scrollToNode })
</script>
<style lang="scss" scoped>
@@ -160,3 +257,16 @@ defineExpose({ treeRef })
align-items: center;
}
</style>
<style>
.el-popper.is-customized {
/* Set padding to ensure the height is 32px */
padding: 0;
background: var(--el-color-primary-light-3);
}
.el-popper.is-customized .el-popper__arrow::before {
background: var(--el-color-primary-light-3);
right: 0;
display: none;
}
</style>

View File

@@ -14,9 +14,7 @@ import { useDictData } from '@/stores/dictData'
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
import { useConfig } from '@/stores/config'
import { defineProps } from 'vue'
import {
getTree
} from '@/api/advance-boot/assess'
import { getTree } from '@/api/advance-boot/assess'
defineOptions({
name: 'pms/pointTree'
@@ -46,25 +44,24 @@ const formData = ref({
scale: null
})
// 添加数据转换函数
const transformTreeData = (data: any[]) => {
if (!data || !Array.isArray(data)) return [];
if (!data || !Array.isArray(data)) return []
return data.map(item => {
// 创建新对象,确保不修改原始数据
const newItem: any = {
name: item.treeName,
id: item.treeId,
children: []
};
}
// 递归处理子节点
if (item.children && Array.isArray(item.children)) {
newItem.children = transformTreeData(item.children);
newItem.children = transformTreeData(item.children)
}
return newItem
})
}
return newItem;
});
};
const loadData = () => {
let obj = classificationData.find(function (i) {
@@ -75,12 +72,15 @@ const loadData = () => {
let nodeKey = ''
getTree({}).then(res => {
// 转换数据结构为指定格式
const transformedData = transformTreeData(res.data);
const transformedData = transformTreeData(res.data)
// 确保有数据再进行处理
if (transformedData && transformedData.length > 0 &&
transformedData[0].children && transformedData[0].children.length > 0) {
if (
transformedData &&
transformedData.length > 0 &&
transformedData[0].children &&
transformedData[0].children.length > 0
) {
nodeKey = transformedData[0].children[0].id
emit('init', transformedData[0].children[0])
@@ -94,7 +94,15 @@ const loadData = () => {
}
})
}
const scrollToNode = (id: string) => {
// 树滚动
treeRef.value.scrollToNode(id)
}
loadData()
defineExpose({
tree,
scrollToNode
})
</script>
<style lang="scss">
.point-tree {

View File

@@ -135,11 +135,17 @@ const loadData = () => {
if (nodeKey) {
nextTick(() => {
treeRef.value.treeRef.setCurrentKey(nodeKey)
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
})
}
})
}
const scrollToNode = (id: string) => {
// 树滚动
treeRef.value.scrollToNode(id)
}
defineExpose({ treeRef, scrollToNode, tree })
loadData()
</script>
<style lang="scss">

View File

@@ -16,12 +16,14 @@ import '@/assets/font/iconfont.css'
import { ElDialog } from 'element-plus'
import BaiduMap from 'vue-baidu-map-3x'
import BaiduMapOffline from 'vue-baidu-map-offline'
import ExcelJS from 'exceljs'
import VXETablePluginExportXLSX from 'vxe-table-plugin-export-xlsx'
// 方式1NPM 安装,注入 ExcelJS 对象
VXETable.use(VXETablePluginExportXLSX, {
ExcelJS
})
// 全局注册 tooltip 组件
window.XEUtils = XEUtils
// 初始化多语言
@@ -35,21 +37,21 @@ const setupAll = async () => {
const app = createApp(App)
//开启离线地图
// app.use(BaiduMapOffline, {
// offline: true,
// offlineConfig: {
// imgext: '.png',
// customstyle: '',
// tiles_dir: '',
// tiles_hybrid: '',
// tiles_self: '',
// tiles_v_dir: '',
// tiles_satellite_dir: '',
// tiles_road_dir: '',
// tiles_v_road_dir: '',
// home: './plugin/offline/'
// }
// })
app.use(BaiduMapOffline, {
offline: true,
offlineConfig: {
imgext: '.png',
customstyle: '',
tiles_dir: '',
tiles_hybrid: '',
tiles_self: '',
tiles_v_dir: '',
tiles_satellite_dir: '',
tiles_road_dir: '',
tiles_v_road_dir: '',
home: './plugin/offline/'
}
})
app.use(BaiduMap, {
// ak: 'Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK',
ak: 'RpQi6WNFZ9tseKzhdwOQsXwFsoVntnsN',
@@ -61,6 +63,7 @@ const setupAll = async () => {
app.use(pinia)
app.use(ElementPlus)
app.use(VXETable)
;(app._context.components.ElDialog as typeof ElDialog).props.closeOnClickModal.default = false
registerIcons(app) // icons

View File

@@ -68,6 +68,7 @@ export const useDictStore = defineStore('dict', {
}
},
getDictByType(type: string) {
console.log("🚀 ~ type:", type)
if (!this.isSetDict) {
this.setDictMap()
}

View File

@@ -373,3 +373,4 @@ body,
.w-e-scroll {
min-height: 200px !important;
}

View File

@@ -268,3 +268,8 @@
.el-drawer__body {
padding: 10px;
}
.aLoad{
color: var(--el-color-primary);
cursor: pointer;
}

View File

@@ -10,7 +10,7 @@ $bg-color: () !default;
$bg-color: map.merge(
(
'': #edf0f3,
'overlay': #ffffff,
'overlay': #ffffff
),
$bg-color
);
@@ -19,7 +19,7 @@ $bg-color: map.merge(
$border-color: () !default;
$border-color: map.merge(
(
'': #f6f6f6,
'': #f6f6f6
),
$border-color
);
@@ -29,6 +29,8 @@ $border-color: map.merge(
@include set-css-var-value('color-primary-light', $primary-light);
@include set-component-css-var('bg-color', $bg-color);
@include set-component-css-var('border-color', $border-color);
--vxe-ui-table-row-current-background-color: var(--el-color-primary-light-8);
--vxe-ui-table-row-hover-current-background-color: var(--el-color-primary-light-8);
// --vxe-table-row-current-background-color: var(--el-color-primary-light-7);
// --vxe-table-row-hover-background-color: var(--el-color-primary-light-9);
// --vxe-table-row-hover-current-background-color: var(--el-color-primary-light-7);

View File

@@ -75,3 +75,4 @@
.default-theme .splitpanes--vertical > .splitpanes__splitter:before {
background-color: #000 !important;
}

View File

@@ -63,7 +63,10 @@
.vxe-table--render-default .vxe-cell--radio:not(.is--disabled):hover .vxe-radio--icon {
color: var(--el-color-primary-light-5);
}
.vxe-table--render-default .vxe-body--row.row--current,
.vxe-table--render-default .vxe-body--row.row--current:hover {
background-color: var(--el-color-primary-light-8);
}
// .vxe-table--render-default .is--disabled.vxe-cell--checkbox .vxe-checkbox--icon{
// color: #fff0;
// }
@@ -77,14 +80,14 @@
.vxe-modal--wrapper {
z-index: 5000 !important;
}
.vxe-table--body .vxe-body--row:nth-child(even) {
background-color: #f9f9f9;
// background-color: var(--el-color-primary-light-9);
}
// .vxe-table--body .vxe-body--row:nth-child(even) {
// background-color: #f9f9f9;
// // background-color: var(--el-color-primary-light-9);
// }
.vxe-table--body .vxe-body--row:nth-child(odd) {
background-color: #ffffff;
}
// .vxe-table--body .vxe-body--row:nth-child(odd) {
// background-color: #ffffff;
// }
.default-theme.splitpanes--vertical > .splitpanes__splitter,
.default-theme .splitpanes--vertical > .splitpanes__splitter {
width: 10px !important;

View File

@@ -40,6 +40,7 @@ export const getIntDictOptions = (dictType: string): NumberDictDataType[] => {
value: parseInt(dict.value + '')
})
})
console.log("🚀 ~ getIntDictOptions ~ dictOption:", dictOption)
return dictOption
}

42
src/utils/fileDownLoad.ts Normal file
View File

@@ -0,0 +1,42 @@
import { downloadFile } from '@/api/system-boot/file'
// 下载文件
export const download = (urls: string) => {
console.log("🚀 ~ download ~ urls:", urls)
downloadFile({ filePath: urls }).then((res: any) => {
let blob = new Blob([res], {
type: urls.includes('.pdf')
? 'application/pdf'
: urls.includes('.zip')
? 'application/zip'
: urls.includes('.doc')
? 'application/msword'
: urls.includes('.docx')
? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
: urls.includes('.xls')
? 'application/vnd.ms-excel'
: urls.includes('.xlsx')
? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
: urls.includes('.png')
? 'image/png'
: urls.includes('.jpeg')
? 'image/jpeg'
: urls.includes('.jpg')
? 'image/jpg'
: ''
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
let name = removeLastDotSuffix(urls.split('/')[2])
link.href = url
link.download = name
document.body.appendChild(link)
link.click()
link.remove()
})
}
function removeLastDotSuffix(str: string) {
// 找到最后一个 . 的位置
const lastDotIndex = str.lastIndexOf('.')
// 如果存在 .,截取到 . 之前的部分;否则返回原字符串
return lastDotIndex !== -1 ? str.slice(0, lastDotIndex) : str
}

View File

@@ -362,3 +362,4 @@ export function getTimeOfTheMonth(key: string): [string, string] {
throw new Error('Invalid key')
}
}

View File

@@ -130,6 +130,7 @@ export default class TableStore {
* @param data 携带数据
*/
onTableAction = (event: string, data: anyObj) => {
const actionFun = new Map([
[
'search',
@@ -202,6 +203,7 @@ export default class TableStore {
'export',
() => {
// this.index()
console.log('export')
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
createAxios(
Object.assign(
@@ -213,6 +215,7 @@ export default class TableStore {
)
).then(res => {
this.table.allData = filtration(res.data.records || res.data)
console.log('11111',this.table.allData)
this.table.exportProcessingData && this.table.exportProcessingData()
this.table.allFlag = data.showAllFlag || true
})

View File

@@ -301,7 +301,7 @@ const options1 = [
const height = mainHeight(20)
const heightB = mainHeight(448)
const heightA = mainHeight(180)
const size = ref(0)
const size = ref(23)
const TableHeaderRef = ref()
const detailRef = ref()
const dotList: any = ref({})
@@ -781,7 +781,7 @@ provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})

View File

@@ -321,7 +321,7 @@ const options1 = [
]
const height = mainHeight(20)
const heightB = mainHeight(445)
const size = ref(0)
const size = ref(23)
const TableHeaderRef = ref()
const detailRef = ref()
const dotList: any = ref({})
@@ -797,7 +797,7 @@ provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})

View File

@@ -146,7 +146,7 @@ const tableStore: any = new TableStore({
{ field: 'describe', title: '事件描述' },
{ field: 'type', title: '事件类型', sortable: true },
{ field: 'result', title: '操作结果', sortable: true },
{ field: 'ip', title: '操作IP' },
{ field: 'ip', title: '操作IP' ,width:'120px'},
{ field: 'level', title: '事件等级', sortable: true }
],
loadCallback: () => {

View File

@@ -26,7 +26,7 @@ const tableStore: any = new TableStore({
method: 'POST',
column: [
{ field: 'userName', title: '登录用户' },
{ field: 'ip', title: '登录ip' },
{ field: 'ip', title: '登录ip' ,width:'120px'},
{ field: 'time', title: '登录时间' }
]
})

View File

@@ -14,7 +14,7 @@
<pane style="background: #fff">
<TableHeader :showSearch="false" v-show="props.rowList.id == undefined">
<template #select>
<el-form-item label="时间">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
</template>
@@ -205,7 +205,7 @@ const props = defineProps(['rowList'])
const harmonic = harmonicOptions.filter(item => item.value < 26)
const currentLod = ref(false)
const monitoringPoint = useMonitoringPoint()
const size = ref(0)
const size = ref(23)
const dictData = useDictData()
const datePickerRef = ref()
const height = mainHeight(80).height

View File

@@ -270,7 +270,7 @@ const tableStore = new TableStore({
method: 'POST',
column: [
{ title: '名称', field: 'name' },
{ title: 'IP', field: 'ip' },
{ title: 'IP', field: 'ip' ,width:'120px' },
{
title: '等级',
field: 'nodeGrade',
@@ -332,29 +332,29 @@ const tableStore = new TableStore({
formData.value = JSON.parse(JSON.stringify(row))
}
},
{
name: 'edit',
title: '重启',
type: 'warning',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'warning',
title: '确定重启吗?'
},
click: row => {
askRestartProcess({
deviceRebootType: null,
nodeId: row.id,
processNo: 1
}).then(res => {
ElMessage.success('重启成功')
tableStore.index()
})
}
},
// {
// name: 'edit',
// title: '重启',
// type: 'warning',
// icon: 'el-icon-Delete',
// render: 'confirmButton',
// popconfirm: {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// confirmButtonType: 'warning',
// title: '确定重启吗?'
// },
// click: row => {
// askRestartProcess({
// deviceRebootType: null,
// nodeId: row.id,
// processNo: 1
// }).then(res => {
// ElMessage.success('重启成功')
// tableStore.index()
// })
// }
// },
{
name: 'del',
@@ -579,7 +579,7 @@ const addMenu = () => {}
:deep(.default) {
display: flex;
.row--current {
background-color: var(--el-color-primary-light-8) !important;
// background-color: var(--el-color-primary-light-8) !important;
}
}
.custom-tree-node {

View File

@@ -42,7 +42,7 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.filterName"
@keyup="searchEvent"

View File

@@ -25,7 +25,7 @@
:checkbox-config="{ labelField: 'name' }"
>
<vxe-column field="name" align="left" title="电网拓扑" min-width="200" tree-node></vxe-column>
<vxe-column field="ip" title="网络参数"></vxe-column>
<vxe-column field="ip" title="网络参数" width="120px"></vxe-column>
<vxe-column field="runFlag" title="终端状态" v-if="key == 0">
<template #default="{ row }">
<el-tag v-if="row.runFlag === 0" type="success" size="small">投运</el-tag>

View File

@@ -38,7 +38,7 @@
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.filterName"
@keyup="searchEvent"
@@ -88,7 +88,7 @@
</template>
</vxe-column>
<vxe-column field="version" title="版本信息"></vxe-column>
<vxe-column field="ip" title="网络参数"></vxe-column>
<vxe-column field="ip" title="网络参数" width="120px"></vxe-column>
<vxe-column field="runFlag" title="终端状态">
<template #default="{ row }">

View File

@@ -54,14 +54,17 @@
</el-button>
</el-form-item>
<el-form-item style="right: 500px; position: absolute; overflow: hidden">
<LocationInformation style="width: 16px; margin-right: 8px; color: var(--el-color-primary)" />
<span style="font-size: 16px; font-weight: bold; color: var(--el-color-primary)">当前操作节点</span>
<LocationInformation
style="width: 16px; margin-right: 8px; color: var(--el-color-primary)"
/>
<span style="font-size: 16px; font-weight: bold; color: var(--el-color-primary)">
当前操作节点
</span>
</el-form-item>
<el-form-item style="right: 0; position: absolute; overflow: hidden">
<div class="title" :class="titleList.length > 5 ? 'titleScroll' : ''">
<span v-for="(item, index) in titleList">{{ index == 0 ? '' : ' > ' }}{{ item }}</span>
</div>
</el-form-item>
</el-form>
<div id="scrollBox" :style="{ height: Height.height }" style="overflow-y: auto">
@@ -1691,7 +1694,7 @@ import { useDictData } from '@/stores/dictData'
import { ref, reactive, onMounted } from 'vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { getYwZtSubstation } from '@/api/device-boot/device'
const size = ref(0)
const size = ref(23)
const TerminalRef = ref()
const pageHeight = mainHeight(20)
const Height = mainHeight(100)
@@ -2338,7 +2341,9 @@ const next = async () => {
break
case 600:
addLine()
selectChanged(AddProjectBO.value.deviceParam[deviceIndex.value].subVoltageParam[busBarIndex.value].scale)
selectChanged(
AddProjectBO.value.deviceParam[deviceIndex.value].subVoltageParam[busBarIndex.value].scale
)
nextfalg.value = false
break
case 700:
@@ -2356,7 +2361,6 @@ const black = () => {
deviceIndex.value = '0'
lineIndex.value = '0'
nodeClick(nodeEventList.value, nodeDataList.value)
}
// 确认提交
const onsubmit = () => {
@@ -3073,7 +3077,7 @@ const setDown = () => {
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
if (VITE_FLAG) {
getYwZtSubstation({ orgId: '' }).then(res => {

View File

@@ -110,10 +110,7 @@
>
{{ proviteData.agreementCapacity }}
</el-descriptions-item>
<el-descriptions-item
label="装机容量MW"
>
<el-descriptions-item label="装机容量MW">
{{ proviteData?.ratePower }}
</el-descriptions-item>
<el-descriptions-item
@@ -485,7 +482,7 @@ const getProviteData = async () => {
getFileNamePath(proviteData.value.additionalAttachments, 'additionalAttachments')
}
// 入网评估报告
// 系统接入方案
if (detailData.value.netInReport.length > 0) {
netInReportList.value = []
detailData.value.netInReport.forEach((item: any) => {

View File

@@ -2,7 +2,7 @@
<div class="default-main">
<TableHeader :showSearch="false" v-show="flag">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker
ref="datePickerRef"
:nextFlag="false"

View File

@@ -6,7 +6,7 @@
</div> -->
<TableHeader :showSearch="false">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef" :nextFlag="false" :theCurrentTime="true"></DatePicker>
</el-form-item>
</template>

View File

@@ -39,7 +39,7 @@ const tableStore = new TableStore({
{ title: '事件描述', field: 'describe', align: 'center', showOverflow: true,minWidth: 200 },
{ title: '事件类型', field: 'type', align: 'center', width: 160 },
{ title: '操作结果', field: 'type', align: 'center', width: 100 },
{ title: '操作IP', field: 'ip', align: 'center', width: 160 },
{ title: '操作IP', field: 'ip', align: 'center', width: 120 },
{ title: '事件等级', field: 'level', align: 'center', width: 100 }
]
})

View File

@@ -3,10 +3,15 @@
<!-- 算法库 -->
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<algorithmTree ref="treeRef" :default-expand-all="false"
<algorithmTree
ref="treeRef"
:default-expand-all="false"
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
@init="handleNodeClick" @onAddTree="onAddTree"></algorithmTree>
:current-node-key="monitoringPoint.state.lineId"
@node-click="handleNodeClick"
@init="handleNodeClick"
@onAddTree="onAddTree"
></algorithmTree>
</pane>
<pane style="background: #fff" :style="height">
<div class="boxTop">
@@ -16,9 +21,7 @@
</el-radio-group>
</div>
<div v-if="information">
<el-button icon="el-icon-Plus" type="primary" @click="addUser">
新增
</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
</div>
@@ -55,10 +58,8 @@
</vxe-column> -->
<vxe-column field="definition" title="定义">
<template #default="{ row }">
<el-button type="primary" link @click="view(row)">查看</el-button>
</template>
</vxe-column>
<!-- <vxe-column title="操作" width="150px">
<template #default="{ row }">
@@ -78,19 +79,28 @@
<!-- 树弹框 -->
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
<!-- 弹框 -->
<PopupEdit ref="popupEditRef" v-if="popupEditFlag"
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" />
<PopupEdit
ref="popupEditRef"
v-if="popupEditFlag"
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
/>
<!-- 定义 -->
<el-dialog draggable v-model="viewFlag" title="定义" width="60%">
<div style="min-height: 300px; max-height: 55vh;">
<div style="min-height: 300px; max-height: 55vh">
<div class="editor" ref="editorRef" v-html="summary" />
</div>
</el-dialog>
<!-- 删除 -->
<el-dialog draggable v-model="dialogVisible" title="请选择需要删除的数据" width="400">
<el-tree-select v-model="TreeValue" :data="TreeData" filterable check-strictly :props="defaultProps"
default-expand-all :render-after-expand="false" />
<el-tree-select
v-model="TreeValue"
:data="TreeData"
filterable
check-strictly
:props="defaultProps"
default-expand-all
:render-after-expand="false"
/>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
@@ -115,8 +125,8 @@ import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteyById } from '@/api/supervision-boot/database/index'
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
import { useAdminInfo } from '@/stores/adminInfo'
import katex from "katex";
import "katex/dist/katex.css";
import katex from 'katex'
import 'katex/dist/katex.css'
const adminInfo = useAdminInfo()
defineOptions({
name: 'database/algorithm'
@@ -124,7 +134,7 @@ defineOptions({
const monitoringPoint = useMonitoringPoint()
const height = mainHeight(20)
const heightTab = mainHeight(82)
const size = ref(0)
const size = ref(23)
const addTreeRef = ref()
const editorRef = ref()
const dialogVisible = ref(false)
@@ -207,37 +217,32 @@ const revise = () => {
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
// tableStore.index()
})
const view = (row: any) => {
viewFlag.value = true
summary.value = row.definition
setTimeout(() => {
const spans = document.querySelectorAll('span[data-value]');
const spans = document.querySelectorAll('span[data-value]')
// 遍历每个 span 标签
spans.forEach(function (span) {
let val = katex.renderToString(span.getAttribute('data-value'), {
throwOnError: false,
throwOnError: false
})
// var newDiv = document.createElement('div');
var newDiv = span
newDiv.innerHTML = val;
span.parentNode.replaceChild(newDiv, span);
});
newDiv.innerHTML = val
span.parentNode.replaceChild(newDiv, span)
})
}, 100)
//
}
const handleNodeClick = (data: any, node: any) => {
if (data.pid != '0') {
dotList.value = data

View File

@@ -12,7 +12,7 @@
<div style="display: flex;align-items: center;">
<div>{{ item.name }}</div>
<el-icon class="elView" v-if="item.name" @click="view(item)">
<el-icon class="elView" v-if="item.name && VITE_FLAG" @click="view(item)">
<View />
</el-icon>
<el-icon class="elView" v-if="item.name" @click="download(item)">
@@ -50,6 +50,7 @@ import { ref, reactive } from 'vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
import { Download, View } from '@element-plus/icons-vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const dialogVisible = ref(false)
const tableData: any = ref({

View File

@@ -52,12 +52,18 @@ const num = ref(0)
const url = ref('')
const excelOptions = ref({})
const information = adminInfo.roleCode.includes('information_info')
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const open = (row: any) => {
// console.log('🚀 ~ open ~ row:', row)
// url.value = row
drawer.value = true
if(VITE_FLAG){
url.value = `/api-docx/excelreport` + row
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
}else{
}
// getFileNameAndFilePath({ filePath: row }).then(res => {
// url.value = res.data.url
// })

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<div >
<TableHeader ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="名称">
@@ -26,6 +26,7 @@ const tableStore = new TableStore({
url: '/supervision-boot/libModel/pageLibModelQuery',
method: 'POST',
showPage: true, // 确保启用分页
publicHeight: 60,
column: [
{
title: '典型设备',

View File

@@ -1,13 +1,17 @@
<template>
<div class="default-main">
<div>
<TableHeader>
<template v-slot:select>
<el-form-item label="名称">
<el-input v-model="tableStore.table.params.searchValue" clearable
placeholder="请输入搜索名称" maxlength="32" show-word-limit/>
<el-input
v-model="tableStore.table.params.searchValue"
clearable
placeholder="请输入搜索名称"
maxlength="32"
show-word-limit
/>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" isGroup />
</div>
@@ -23,6 +27,7 @@ const tableRef = ref()
const tableStore = new TableStore({
url: '/supervision-boot/libModel/pageLibModelQuery',
method: 'POST',
publicHeight: 60,
column: [
{
title: '谐波源',
@@ -32,7 +37,9 @@ const tableStore = new TableStore({
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
return (
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
)
}
},
{ field: 'name', title: '名称', minWidth: 200 },
@@ -56,7 +63,7 @@ const tableStore = new TableStore({
},
resetCallback: () => {
tableStore.table.params.searchValue = ''
},
}
})
tableStore.table.params.type = 1
@@ -70,5 +77,4 @@ const queryData = () => {
defineExpose({
queryData
})
</script>

View File

@@ -63,7 +63,7 @@ defineOptions({
const excelOptions = ref({})
const monitoringPoint = useMonitoringPoint()
const height = mainHeight(20)
const size = ref(0)
const size = ref(23)
const treeRef = ref()
const addTreeRef = ref()
const url = ref('')
@@ -73,10 +73,12 @@ const information = adminInfo.roleCode.includes('information_info')
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
const handleNodeClick = (data: any, node: any) => {
console.log("🚀 ~ handleNodeClick ~ data:", data)
dotList.value = data
@@ -86,8 +88,13 @@ const handleNodeClick = (data: any, node: any) => {
flag.value = true
setTimeout(() => {
if(VITE_FLAG){
url.value = `/api-docx/excelreport` + data.url
excelOptions.value = { xls: data.url.split('.')[1] == 'xls' ? true : false }
}else{
}
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
// url.value = res.data.url
// })

View File

@@ -3,7 +3,7 @@
<div v-show="view">
<TableHeader datePicker area showExport>
<template #select>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
</el-form-item>
<el-form-item label="统计类型:">
@@ -127,7 +127,7 @@ const tableStore = new TableStore({
{ field: 'lineName', title: '监测点名称', minWidth: '180' },
{ field: 'gdName', title: '供电公司', minWidth: '120' },
{ field: 'subName', title: '变电站', minWidth: '150' },
{ field: 'ip', title: '网络参数', minWidth: '110' },
{ field: 'ip', title: '网络参数' ,width:'120px' },
{ field: 'scale', title: '电压等级', minWidth: '110' },
// {
// field: 'advanceType',

View File

@@ -194,7 +194,7 @@ const tableStore = new TableStore({
{
title: '网络参数',
field: 'ip',
align: 'center',
align: 'center',width:'120px',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}

View File

@@ -199,7 +199,7 @@ const tableStore = new TableStore({
{
title: '网络参数',
field: 'ip',
align: 'center',
align: 'center' ,width:'120px',
formatter: function (row) {
return row.cellValue ? row.cellValue : '/'
}

View File

@@ -5,7 +5,7 @@
贡献度计算
<div style="font-size: 14px; font-weight: 500">
<!-- {{ dotList.alias || '' }} -->
<span class="monitoring-point">当前位置{{ dotList.alias || '' }}</span>
<span class="monitoring-point1">当前位置{{ dotList.alias || '' }}</span>
<back-component />
</div>
</div>
@@ -194,7 +194,7 @@ const dotList: any = ref({})
const height = mainHeight(20)
const heightB = mainHeight(70)
const harmonic = harmonicOptions.slice(1)
const size = ref(0)
const size = ref(23)
const showTabs = ref(false)
const loadDataOptions: any = ref([])
const form: any = reactive({
@@ -571,7 +571,7 @@ const group = (chart: any, myChartDom: any) => {
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
userDataList({
pageNum: 1,
@@ -598,7 +598,7 @@ onMounted(() => {
width: 300px;
}
}
.monitoring-point {
.monitoring-point1 {
font-size: 14px;
font-weight: 700;
color: var(--el-color-primary);

View File

@@ -3,9 +3,9 @@
<!-- 模版 -->
<TableHeader datePicker showExport :showReset="false" ref="TableHeaderRef">
<template #select>
<el-form-item label="关键字">
<!-- <el-form-item label="关键字">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
</el-form-item>
</el-form-item> -->
</template>
<template #operation>
<el-button type="primary" icon="el-icon-CreditCard"
@@ -41,7 +41,7 @@ const tableStore = new TableStore({
{ title: '供电公司', field: 'gdName' },
{ title: '变电站', field: 'subName' },
{ title: '终端名称', field: 'devName' },
{ title: 'IP', field: 'ip' },
{ title: 'IP', field: 'ip' ,width:'120px' },
{ title: '监测点名称', field: 'lineName' },
{ title: '类型', field: 'dataType' },
{ title: '谐波次数', field: 'dataTimes' },

View File

@@ -1,408 +0,0 @@
<template>
<div class="tab-content">
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange" >
<template #select>
<el-form-item label="区域">
<el-cascader
v-bind="$attrs"
:options="areOptions"
:props="cascaderProps"
v-model="selectedArea"
@change="handleFilterChange"
/>
</el-form-item>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
@change="handleStatisticalTypeChange"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="电网标志">
<el-select
v-model="tableStore.table.params.powerFlag"
placeholder="请选择电网标志"
@change="handleFilterChange"
>
<el-option label="全部" value="0"></el-option>
<el-option label="电网侧" value="1"></el-option>
<el-option label="非电网侧" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-input
v-model="searchKeyword"
placeholder="请输入变电站/终端/监测点"
clearable
@input="handleFilterChange"
:show-word-limit=true
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading" class="main-container">
<vxe-table
class="full-height-table"
ref="tableRef"
auto-resize
:data="tableStore.table.data"
v-bind="defaultAttribute"
:height="tableHeight"
resizable
show-overflow
>
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
<vxe-column field="gdName" title="供电公司" align="center" min-width="120" ></vxe-column>
<vxe-column field="subStationName" :show-overflow="true" title="变电站" align="center" min-width="150"></vxe-column>
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
<vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column>
<vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column>
<vxe-column field="interval" title="统计间隔" align="center" min-width="100" :formatter="formatMonitorId"></vxe-column>
<vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column>
<vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column>
<vxe-column field="harmonicValue" :title="harmonicValueTitle" align="center" min-width="120"></vxe-column>
<vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column>
<vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column>
<vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column>
<vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column>
</vxe-table>
</div>
<div class="pagination-container">
<el-pagination
:current-page="tableStore.table.params.pageNum"
:page-size="tableStore.table.params.pageSize"
:page-sizes="[10, 20, 50, 100]"
background
layout="sizes, total, prev, pager, next, jumper"
:total="tableStore.table.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
class="custom-pagination"/>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { debounce } from 'lodash-es'
const props = defineProps({
active: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['initialized'])
const dictData = useDictData()
const options = dictData.getBasicData('Pollution_Calc')
const tableHeight = ref(500)
const tableRef = ref()
const tableHeaderRef = ref()
const selectedArea = ref()
const areOptions: any = dictData.state.area
const allData = ref<PollutionItem[]>([])
const searchKeyword = ref('')
const harmonicValueTitle = ref('谐波电压污染值')
const cascaderProps = {
label: 'name',
value: 'id',
checkStrictly: true,
emitPath: false
}
interface PollutionItem {
gdName?: string
subStationName?: string
devName?: string
lineName?: string
powerFlag?: string
}
const formatMonitorId = (row: any) => {
return row.cellValue || '/'
}
const handleSelectChange = (isExpanded: boolean) => {
if (isExpanded) {
tableHeight.value = tableHeight.value - 55
} else {
tableHeight.value = tableHeight.value + 55
}
}
const calculateTableHeight = () => {
const windowHeight = window.innerHeight
const headerHeight = 160
const paginationHeight = 120
const padding = 30
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
tableHeight.value = Math.max(calculatedHeight, 300)
}
const debouncedCalculateTableHeight = debounce(() => {
calculateTableHeight()
}, 300)
const filteredData = computed(() => {
let result = [...allData.value]
if (selectedArea.value) {
let areaName = ''
let areaLevel = -1
const findAreaName = (areas: any[]) => {
for (const area of areas) {
if (area.id === selectedArea.value) {
areaName = area.name
areaLevel = area.level !== undefined ? area.level : -1
break
}
if (area.children && area.children.length > 0) {
findAreaName(area.children)
}
}
}
findAreaName(areOptions)
if (areaName && areaLevel > 1) {
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
}
}
if (tableStore.table.params.powerFlag === '1') {
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
} else if (tableStore.table.params.powerFlag === '2') {
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
}
if (searchKeyword.value) {
const keyword = searchKeyword.value.toLowerCase()
result = result.filter(item =>
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
)
}
return result
})
const currentPageData = computed(() => {
const pageSize = tableStore.table.params.pageSize
const pageNum = tableStore.table.params.pageNum
const start = (pageNum - 1) * pageSize
const end = start + pageSize
return filteredData.value.slice(start, end)
})
const updateTotal = computed(() => {
return filteredData.value.length
})
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
method: 'POST',
column: [],
beforeSearchFun: () => {
delete tableStore.table.params.deptIndex
delete tableStore.table.params.interval
delete tableStore.table.params.searchEndTime
delete tableStore.table.params.searchBeginTime
delete tableStore.table.params.timeFlag
},
loadCallback: () => {
allData.value = tableStore.table.data || []
tableStore.table.total = updateTotal.value
tableStore.table.data = currentPageData.value
},
resetCallback: () => {
clearQueryParams()
}
})
provide('tableStore', tableStore)
watch(
() => areOptions,
(newOptions) => {
if (newOptions && newOptions.length > 0) {
selectedArea.value = newOptions[0].id
tableStore.table.params.id = newOptions[0].id
}
},
{ immediate: true }
)
watch(
() => options,
(newOptions) => {
if (newOptions && newOptions.length > 0) {
if (!tableStore.table.params.statisticalType) {
tableStore.table.params.statisticalType = newOptions[0]
tableStore.table.params.ids = [newOptions[0].id]
}
}
},
{ immediate: true }
)
tableStore.table.params.powerFlag = "0"
tableStore.table.params.isUpToGrid = 0
tableStore.table.params.type = 1
const handleStatisticalTypeChange = (newVal: { id: any }) => {
if (newVal) {
tableStore.table.params.statisticalType = newVal
tableStore.table.params.ids = [newVal.id]
if (newVal.name) {
harmonicValueTitle.value = newVal.name + '污染值'
}
}
// 重新调用接口
tableStore.index()
}
const handleFilterChange = () => {
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleSizeChange = (val: number) => {
tableStore.table.params.pageSize = val
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleCurrentChange = (val: number) => {
tableStore.table.params.pageNum = val
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const exportEvent = () => {
const allFilteredData = filteredData.value
tableRef.value.exportData({
filename: '监测点评估-污染值报告',
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: allFilteredData,
columnFilterMethod: function (column, $columnIndex) {
return !(column.$columnIndex === 0)
}
})
}
onMounted(() => {
if (props.active) {
tableStore.index()
emit('initialized', 'pollutionReport')
}
calculateTableHeight()
window.addEventListener('resize', debouncedCalculateTableHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', debouncedCalculateTableHeight)
})
const clearQueryParams = () => {
// 将区域恢复成第一层
if (areOptions && areOptions.length > 0) {
selectedArea.value = areOptions[0].id
tableStore.table.params.id = areOptions[0].id
}
// 清空搜索关键词
searchKeyword.value = ''
}
defineExpose({
refresh: () => {
// 清空查询参数
clearQueryParams()
tableHeaderRef.value.setTheDate(3)
tableStore.index()
}
})
</script>
<style scoped>
.pagination-container {
border: 1px solid #ebeef5;
border-top: none;
padding: 10px;
margin: 0 0 5px 0;
background-color: #fff;
}
:deep(.custom-pagination) {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
:deep(.custom-pagination .el-pagination__sizes) {
margin-right: 10px;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: auto;
}
:deep(.custom-pagination .el-pagination__jump) {
margin-left: 20px;
}
/* 响应式处理 */
@media screen and (max-width: 768px) {
:deep(.custom-pagination) {
flex-direction: column;
align-items: stretch;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: 0;
order: 1;
margin-top: 10px;
}
:deep(.custom-pagination .el-pagination__sizes) {
order: 2;
}
:deep(.custom-pagination .btn-prev),
:deep(.custom-pagination .el-pager),
:deep(.custom-pagination .btn-next),
:deep(.custom-pagination .el-pagination__jump) {
order: 3;
justify-content: center;
margin-top: 10px;
}
}
</style>

View File

@@ -1,517 +0,0 @@
<template>
<div class="tab-content">
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
<template #select>
<el-form-item label="区域">
<el-cascader
v-bind="$attrs"
:options="areOptions"
:props="cascaderProps"
v-model="selectedArea"
@change="handleFilterChange"
/>
</el-form-item>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
@change="handleStatisticalTypeChange"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="电网标志">
<el-select
v-model="tableStore.table.params.powerFlag"
placeholder="请选择电网标志"
@change="handleFilterChange"
>
<el-option label="全部" value="0"></el-option>
<el-option label="电网侧" value="1"></el-option>
<el-option label="非电网侧" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-input
v-model="searchKeyword"
placeholder="请输入变电站"
clearable
@input="handleFilterChange"
:show-word-limit=true
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading" class="main-container">
<vxe-table
class="full-height-table"
ref="tableRef"
auto-resize
:data="tableStore.table.data"
v-bind="defaultAttribute"
:height="tableHeight"
resizable
show-overflow
>
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
<vxe-column field="gdName" title="供电公司" align="center" min-width="120" ></vxe-column>
<vxe-column field="subStationName" :show-overflow="true" title="变电站" align="center" min-width="150"></vxe-column>
<vxe-column field="subVStationValue" :title="harmonicValueTitle" align="center" min-width="150"></vxe-column>
<vxe-column field="subVoltage" title="变电站电压等级" align="center" min-width="150"></vxe-column>
<vxe-column title="操作" width="150" align="center">
<template #default="{ row }">
<el-button size="small" type="primary" @click="showDetailDialog(row)">监测点详情</el-button>
</template>
</vxe-column>
</vxe-table>
</div>
<div class="pagination-container">
<el-pagination
:current-page="tableStore.table.params.pageNum"
:page-size="tableStore.table.params.pageSize"
:page-sizes="[10, 20, 50, 100]"
background
layout="sizes, total, prev, pager, next, jumper"
:total="tableStore.table.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
class="custom-pagination"/>
</div>
<!-- 添加弹窗 -->
<el-dialog
v-model="detailDialogVisible"
:title="detailDialogTitle"
>
<div v-loading="detailLoading">
<div style="margin-bottom: 10px; text-align: right;">
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
</div>
<vxe-table
ref="detailTableRef"
:data="detailData"
auto-resize
resizable
show-overflow
height="400px"
>
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
<vxe-column field="devType" title="终端型号" align="center" min-width="100"></vxe-column>
<vxe-column field="manufacturer" title="终端厂家" align="center" min-width="120"></vxe-column>
<vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column>
<vxe-column field="interval" title="统计间隔" align="center" min-width="100"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
</vxe-table>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { debounce } from 'lodash-es'
const props = defineProps({
active: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['initialized'])
const dictData = useDictData()
const options = dictData.getBasicData('Pollution_Calc')
const tableHeight = ref(500)
const tableRef = ref()
const tableHeaderRef = ref()
const detailTableRef = ref()
const selectedArea = ref()
const areOptions: any = dictData.state.area
const allData = ref<PollutionItem[]>([])
const searchKeyword = ref('')
const harmonicValueTitle = ref('电站谐波电压污染值')
const detailDialogVisible = ref(false)
const detailDialogTitle = ref('')
const detailLoading = ref(false)
const detailData = ref<PollutionItem[]>([])
const originalTableData = ref<any[]>([])
// 方法
const showDetailDialog = (row) => {
detailDialogTitle.value = `${row.subStationName} - 监测点详情`
loadDetailData(row)
detailDialogVisible.value = true
}
const loadDetailData = async (row) => {
detailLoading.value = true
try {
// 从原始数据中查找该变电站的详细信息
const originalItem = originalTableData.value.find(
item => item.subStationName === row.subStationName
)
if (originalItem && originalItem.powerFlagPollutionList) {
const detailList: PollutionItem[] = []
originalItem.powerFlagPollutionList.forEach((point: any) => {
detailList.push({
lineName: processNullValue(point.lineName),
devName: processNullValue(point.devName),
devType: processNullValue(point.devType),
manufacturer: processNullValue(point.manufacturer),
loginTime: processNullValue(point.loginTime),
interval: processNullValue(point.interval),
powerFlag: processNullValue(point.powerFlag),
vharmonicValue: processNullValue(point.vharmonicValue)
})
})
detailData.value = detailList
} else {
detailData.value = []
}
} catch (error) {
console.error('加载详情数据失败:', error)
detailData.value = []
} finally {
detailLoading.value = false
}
}
const cascaderProps = {
label: 'name',
value: 'id',
checkStrictly: true,
emitPath: false
}
interface PollutionItem {
gdName?: string
subStationName?: string
subVStationValue?: string
subVoltage?: string
devName?: string
lineName?: string
powerFlag?: string
devType?: string
manufacturer?: string
loginTime?: string
interval?: string
vharmonicValue?: string
}
const handleSelectChange = (isExpanded: boolean) => {
if (isExpanded) {
tableHeight.value = tableHeight.value - 55
} else {
tableHeight.value = tableHeight.value + 55
}
}
const calculateTableHeight = () => {
const windowHeight = window.innerHeight
const headerHeight = 160
const paginationHeight = 120
const padding = 30
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
tableHeight.value = Math.max(calculatedHeight, 300)
}
const debouncedCalculateTableHeight = debounce(() => {
calculateTableHeight()
}, 300)
const filteredData = computed(() => {
let result = [...allData.value]
if (selectedArea.value) {
let areaName = ''
let areaLevel = -1
const findAreaName = (areas: any[]) => {
for (const area of areas) {
if (area.id === selectedArea.value) {
areaName = area.name
areaLevel = area.level !== undefined ? area.level : -1
break
}
if (area.children && area.children.length > 0) {
findAreaName(area.children)
}
}
}
findAreaName(areOptions)
if (areaName && areaLevel > 1) {
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
}
}
if (tableStore.table.params.powerFlag === '1') {
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
} else if (tableStore.table.params.powerFlag === '2') {
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
}
if (searchKeyword.value) {
const keyword = searchKeyword.value.toLowerCase()
result = result.filter(item =>
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
)
}
return result
})
const currentPageData = computed(() => {
const pageSize = tableStore.table.params.pageSize
const pageNum = tableStore.table.params.pageNum
const start = (pageNum - 1) * pageSize
const end = start + pageSize
return filteredData.value.slice(start, end)
})
const updateTotal = computed(() => {
return filteredData.value.length
})
const processNullValue = (value: any) => {
return value === null || value === undefined || value === '' || value === 'null'? '/' : value
}
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc',
method: 'POST',
column: [],
beforeSearchFun: () => {
delete tableStore.table.params.deptIndex
delete tableStore.table.params.interval
delete tableStore.table.params.searchEndTime
delete tableStore.table.params.searchBeginTime
delete tableStore.table.params.timeFlag
},
loadCallback: () => {
// 保存原始数据以便后续查询
originalTableData.value = [...(tableStore.table.data || [])]
const expandedData: PollutionItem[] = [];
(tableStore.table.data || []).forEach((item: any) => {
expandedData.push({
gdName: processNullValue(item.gdName),
subStationName: processNullValue(item.subStationName),
subVStationValue: processNullValue(item.subVStationValue),
subVoltage: processNullValue(item.subVoltage)
});
});
allData.value = expandedData;
tableStore.table.total = updateTotal.value;
tableStore.table.data = currentPageData.value;
},
resetCallback: () => {
clearQueryParams()
}
})
provide('tableStore', tableStore)
watch(
() => areOptions,
(newOptions) => {
if (newOptions && newOptions.length > 0) {
selectedArea.value = newOptions[0].id
tableStore.table.params.id = newOptions[0].id
}
},
{ immediate: true }
)
watch(
() => options,
(newOptions) => {
if (newOptions && newOptions.length > 0) {
if (!tableStore.table.params.statisticalType) {
tableStore.table.params.statisticalType = newOptions[0]
tableStore.table.params.ids = [newOptions[0].id]
}
}
},
{ immediate: true }
)
tableStore.table.params.powerFlag = "0"
tableStore.table.params.isUpToGrid = 0
tableStore.table.params.type = 1
const handleStatisticalTypeChange = (newVal: { id: any }) => {
if (newVal) {
tableStore.table.params.statisticalType = newVal
tableStore.table.params.ids = [newVal.id]
if (newVal.name) {
harmonicValueTitle.value = '电站' + newVal.name + '污染值'
}
}
// 重新调用接口
tableStore.index()
}
const handleFilterChange = () => {
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleSizeChange = (val: number) => {
tableStore.table.params.pageSize = val
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleCurrentChange = (val: number) => {
tableStore.table.params.pageNum = val
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const exportEvent = () => {
const allFilteredData = filteredData.value
tableRef.value.exportData({
filename: '场站级评估-污染值报告',
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: allFilteredData,
columnFilterMethod: function (column: any) {
return !(
column.column.title === '操作'
)
}
})
}
// 导出详情数据的方法
const exportDetailEvent = () => {
detailTableRef.value.exportData({
filename: detailDialogTitle.value,
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: detailData.value,
columnFilterMethod({ column }) {
// 导出所有列,包括隐藏列
return true;
}
})
}
onMounted(() => {
if (props.active) {
tableStore.index()
emit('initialized', 'pollutionReport')
}
calculateTableHeight()
window.addEventListener('resize', debouncedCalculateTableHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', debouncedCalculateTableHeight)
})
const clearQueryParams = () => {
// 将区域恢复成第一层
if (areOptions && areOptions.length > 0) {
selectedArea.value = areOptions[0].id
tableStore.table.params.id = areOptions[0].id
}
// 清空搜索关键词
searchKeyword.value = ''
}
defineExpose({
refresh: () => {
clearQueryParams()
tableHeaderRef.value.setTheDate(3)
tableStore.index()
}
})
</script>
<style scoped>
.pagination-container {
border: 1px solid #ebeef5;
border-top: none;
padding: 10px;
margin: 0 0 5px 0;
background-color: #fff;
}
:deep(.custom-pagination) {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
:deep(.custom-pagination .el-pagination__sizes) {
margin-right: 10px;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: auto;
}
:deep(.custom-pagination .el-pagination__jump) {
margin-left: 20px;
}
/* 响应式处理 */
@media screen and (max-width: 768px) {
:deep(.custom-pagination) {
flex-direction: column;
align-items: stretch;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: 0;
order: 1;
margin-top: 10px;
}
:deep(.custom-pagination .el-pagination__sizes) {
order: 2;
}
:deep(.custom-pagination .btn-prev),
:deep(.custom-pagination .el-pager),
:deep(.custom-pagination .btn-next),
:deep(.custom-pagination .el-pagination__jump) {
order: 3;
justify-content: center;
margin-top: 10px;
}
}
</style>

View File

@@ -0,0 +1,430 @@
<template>
<div class="tab-content">
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
<template #select>
<el-form-item label="区域">
<el-cascader
v-bind="$attrs"
:options="areOptions"
:props="cascaderProps"
v-model="selectedArea"
@change="handleFilterChange"
/>
</el-form-item>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
@change="handleStatisticalTypeChange"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="电网标志">
<el-select
v-model="tableStore.table.params.powerFlag"
placeholder="请选择电网标志"
@change="handleFilterChange"
>
<el-option label="全部" value="0"></el-option>
<el-option label="电网侧" value="1"></el-option>
<el-option label="非电网侧" value="2"></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选数据">
<el-input
v-model="searchKeyword"
placeholder="请输入变电站/终端/监测点"
clearable
@input="handleFilterChange"
:show-word-limit="true"
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading" class="main-container">
<vxe-table
class="full-height-table"
ref="tableRef"
auto-resize
:data="tableStore.table.data"
v-bind="defaultAttribute"
:height="tableHeight"
resizable
show-overflow
>
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
<vxe-column field="gdName" title="供电公司" align="center" min-width="120"></vxe-column>
<vxe-column
field="subStationName"
:show-overflow="true"
title="变电站"
align="center"
min-width="150"
></vxe-column>
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
<!-- <vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column> -->
<!-- <vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column> -->
<vxe-column
field="lineName"
title="监测点名称"
align="center"
min-width="150"
:formatter="formatMonitorId"
></vxe-column>
<!-- <vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column> -->
<!-- <vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column> -->
<!-- <vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column> -->
<!-- <vxe-column field="objName" title="监测对象名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column> -->
<!-- <vxe-column field="interval" title="统计间隔" align="center" min-width="100" :formatter="formatMonitorId"></vxe-column> -->
<!-- <vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column> -->
<!-- <vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column> -->
<vxe-column
field="harmonicValue"
:title="harmonicValueTitle"
align="center"
min-width="120"
></vxe-column>
<!-- <vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
<!-- <vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column> -->
<!-- <vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
<!-- <vxe-column field="monitorId" title="一类监测点" align="center" min-width="120" :formatter="formatMonitorId"></vxe-column> -->
</vxe-table>
</div>
<div class="pagination-container">
<el-pagination
:current-page="tableStore.table.params.pageNum"
:page-size="tableStore.table.params.pageSize"
:page-sizes="[10, 20, 50, 100, 200]"
background
layout="sizes, total, prev, pager, next, jumper"
:total="tableStore.table.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
class="custom-pagination"
/>
</div>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { debounce } from 'lodash-es'
const props = defineProps({
active: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['initialized'])
const dictData = useDictData()
const options = dictData.getBasicData('Pollution_Calc')
const tableHeight = ref(500)
const tableRef = ref()
const tableHeaderRef = ref()
const selectedArea = ref()
const areOptions: any = dictData.state.area
const allData = ref<PollutionItem[]>([])
const searchKeyword = ref('')
const harmonicValueTitle = ref('谐波电压污染值')
const cascaderProps = {
label: 'name',
value: 'id',
checkStrictly: true,
emitPath: false
}
interface PollutionItem {
gdName?: string
subStationName?: string
devName?: string
lineName?: string
powerFlag?: string
}
const formatMonitorId = (row: any) => {
return row.cellValue || '/'
}
const handleSelectChange = (isExpanded: boolean) => {
if (isExpanded) {
tableHeight.value = tableHeight.value - 55
} else {
tableHeight.value = tableHeight.value + 55
}
}
const calculateTableHeight = () => {
const windowHeight = window.innerHeight
const headerHeight = 160
const paginationHeight = 120
const padding = 30
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
tableHeight.value = Math.max(calculatedHeight, 300)
}
const debouncedCalculateTableHeight = debounce(() => {
calculateTableHeight()
}, 300)
const filteredData = computed(() => {
let result = [...allData.value]
if (selectedArea.value) {
let areaName = ''
let areaLevel = -1
const findAreaName = (areas: any[]) => {
for (const area of areas) {
if (area.id === selectedArea.value) {
areaName = area.name
areaLevel = area.level !== undefined ? area.level : -1
break
}
if (area.children && area.children.length > 0) {
findAreaName(area.children)
}
}
}
findAreaName(areOptions)
if (areaName && areaLevel > 1) {
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
}
}
if (tableStore.table.params.powerFlag === '1') {
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
} else if (tableStore.table.params.powerFlag === '2') {
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
}
if (searchKeyword.value) {
const keyword = searchKeyword.value.toLowerCase()
result = result.filter(
item =>
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
)
}
return result
})
const currentPageData = computed(() => {
const pageSize = tableStore.table.params.pageSize
const pageNum = tableStore.table.params.pageNum
const start = (pageNum - 1) * pageSize
const end = start + pageSize
return filteredData.value.slice(start, end)
})
const updateTotal = computed(() => {
return filteredData.value.length
})
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
method: 'POST',
column: [],
beforeSearchFun: () => {
delete tableStore.table.params.deptIndex
delete tableStore.table.params.interval
delete tableStore.table.params.searchEndTime
delete tableStore.table.params.searchBeginTime
delete tableStore.table.params.timeFlag
},
loadCallback: () => {
allData.value = tableStore.table.data || []
tableStore.table.total = updateTotal.value
tableStore.table.data = currentPageData.value
},
resetCallback: () => {
clearQueryParams()
}
})
provide('tableStore', tableStore)
watch(
() => areOptions,
newOptions => {
if (newOptions && newOptions.length > 0) {
selectedArea.value = newOptions[0].id
tableStore.table.params.id = newOptions[0].id
}
},
{ immediate: true }
)
watch(
() => options,
newOptions => {
if (newOptions && newOptions.length > 0) {
if (!tableStore.table.params.statisticalType) {
tableStore.table.params.statisticalType = newOptions[0]
tableStore.table.params.ids = [newOptions[0].id]
}
}
},
{ immediate: true }
)
tableStore.table.params.powerFlag = '0'
tableStore.table.params.isUpToGrid = 0
tableStore.table.params.type = 1
const handleStatisticalTypeChange = (newVal: { id: any }) => {
console.log('🚀 ~ handleStatisticalTypeChange ~ newVal:', newVal)
if (newVal) {
tableStore.table.params.statisticalType = newVal
tableStore.table.params.ids = [newVal.id]
if (newVal.name) {
harmonicValueTitle.value = newVal.name + '污染值'
}
}
// 重新调用接口
tableStore.index()
}
const handleFilterChange = () => {
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleSizeChange = (val: number) => {
tableStore.table.params.pageSize = val
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleCurrentChange = (val: number) => {
tableStore.table.params.pageNum = val
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const exportEvent = () => {
const allFilteredData = filteredData.value
tableRef.value.exportData({
filename: '监测点评估-污染值报告',
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: allFilteredData,
columnFilterMethod: function (column, $columnIndex) {
return !(column.$columnIndex === 0)
}
})
}
onMounted(() => {
if (props.active) {
tableStore.index()
emit('initialized', 'pollutionReport')
}
calculateTableHeight()
window.addEventListener('resize', debouncedCalculateTableHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', debouncedCalculateTableHeight)
})
const clearQueryParams = () => {
// 将区域恢复成第一层
if (areOptions && areOptions.length > 0) {
selectedArea.value = areOptions[0].id
tableStore.table.params.id = areOptions[0].id
}
// 清空搜索关键词
searchKeyword.value = ''
}
defineExpose({
refresh: (name?: any) => {
// 清空查询参数
clearQueryParams()
tableHeaderRef.value.setTheDate(3)
if (name) {
searchKeyword.value = name
}
tableStore.index()
}
})
</script>
<style scoped>
.pagination-container {
border: 1px solid #ebeef5;
border-top: none;
padding: 10px;
margin: 0 0 5px 0;
background-color: #fff;
}
:deep(.custom-pagination) {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
:deep(.custom-pagination .el-pagination__sizes) {
margin-right: 10px;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: auto;
}
:deep(.custom-pagination .el-pagination__jump) {
margin-left: 20px;
}
/* 响应式处理 */
@media screen and (max-width: 768px) {
:deep(.custom-pagination) {
flex-direction: column;
align-items: stretch;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: 0;
order: 1;
margin-top: 10px;
}
:deep(.custom-pagination .el-pagination__sizes) {
order: 2;
}
:deep(.custom-pagination .btn-prev),
:deep(.custom-pagination .el-pager),
:deep(.custom-pagination .btn-next),
:deep(.custom-pagination .el-pagination__jump) {
order: 3;
justify-content: center;
margin-top: 10px;
}
}
</style>

View File

@@ -0,0 +1,510 @@
<template>
<div class="tab-content">
<TableHeader datePicker ref="tableHeaderRef" @selectChange="handleSelectChange">
<template #select>
<el-form-item label="区域">
<el-cascader
v-bind="$attrs"
:options="areOptions"
:props="cascaderProps"
v-model="selectedArea"
@change="handleFilterChange"
/>
</el-form-item>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<!-- <el-form-item label="电网标志">
<el-select
v-model="tableStore.table.params.powerFlag"
placeholder="请选择电网标志"
@change="handleFilterChange"
>
<el-option label="全部" value="0"></el-option>
<el-option label="电网侧" value="1"></el-option>
<el-option label="非电网侧" value="2"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="筛选数据">
<el-input
v-model="searchKeyword"
placeholder="请输入变电站"
clearable
@input="handleFilterChange"
:show-word-limit="true"
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button>
</template>
</TableHeader>
<div v-loading="tableStore.table.loading" class="main-container">
<vxe-table
class="full-height-table"
ref="tableRef"
auto-resize
:data="tableStore.table.data"
v-bind="defaultAttribute"
:height="tableHeight"
resizable
show-overflow
>
<vxe-column title="序号" width="80" type="seq" align="center"></vxe-column>
<vxe-column field="gdName" title="供电公司" align="center" min-width="120"></vxe-column>
<vxe-column
field="subStationName"
:show-overflow="true"
title="变电站"
align="center"
min-width="150"
></vxe-column>
<vxe-column
field="subVStationValue"
:title="harmonicValueTitle"
align="center"
min-width="150"
></vxe-column>
<vxe-column field="subVoltage" title="变电站电压等级" align="center" min-width="150"></vxe-column>
<vxe-column title="操作" width="150" align="center">
<template #default="{ row }">
<el-button size="small" type="primary" link @click="showDetailDialog(row)">
监测点污染详情
</el-button>
</template>
</vxe-column>
</vxe-table>
</div>
<div class="pagination-container">
<el-pagination
:current-page="tableStore.table.params.pageNum"
:page-size="tableStore.table.params.pageSize"
:page-sizes="[10, 20, 50, 100, 200]"
background
layout="sizes, total, prev, pager, next, jumper"
:total="tableStore.table.total"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
class="custom-pagination"
/>
</div>
<!-- 添加弹窗 -->
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
<div v-loading="detailLoading">
<div style="margin-bottom: 10px; text-align: right">
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
</div>
<vxe-table
ref="detailTableRef"
:data="detailData"
auto-resize
v-bind="defaultAttribute"
resizable
show-overflow
height="400px"
>
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
</vxe-table>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, onBeforeUnmount, computed, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import TableHeader from '@/components/table/header/index.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { debounce } from 'lodash-es'
const props = defineProps({
active: {
type: Boolean,
default: false
}
})
const emit = defineEmits(['initialized'])
const dictData = useDictData()
const options = dictData.getBasicData('Pollution_Calc')
const tableHeight = ref(500)
const tableRef = ref()
const tableHeaderRef = ref()
const detailTableRef = ref()
const selectedArea = ref()
const areOptions: any = dictData.state.area
const allData = ref<PollutionItem[]>([])
const searchKeyword = ref('')
const harmonicValueTitle = ref('电站谐波电压污染值')
const detailDialogVisible = ref(false)
const detailDialogTitle = ref('')
const detailLoading = ref(false)
const detailData = ref<PollutionItem[]>([])
const originalTableData = ref<any[]>([])
// 方法
const showDetailDialog = row => {
detailDialogTitle.value = `${row.subStationName} - 监测点污染详情`
loadDetailData(row)
detailDialogVisible.value = true
}
const loadDetailData = async row => {
detailLoading.value = true
try {
// 从原始数据中查找该变电站的详细信息
const originalItem = originalTableData.value.find(item => item.subStationName === row.subStationName)
if (originalItem && originalItem.powerFlagPollutionList) {
const detailList: PollutionItem[] = []
// originalItem.powerFlagPollutionList.forEach((point: any) => {
// detailList.push({
// lineName: processNullValue(point.lineName),
// devName: processNullValue(point.devName),
// devType: processNullValue(point.devType),
// manufacturer: processNullValue(point.manufacturer),
// loginTime: processNullValue(point.loginTime),
// interval: processNullValue(point.interval),
// powerFlag: processNullValue(point.powerFlag),
// vharmonicValue: processNullValue(point.vharmonicValue)
// })
// })
detailData.value = originalItem.powerFlagPollutionList //detailList
} else {
detailData.value = []
}
} catch (error) {
console.error('加载详情数据失败:', error)
detailData.value = []
} finally {
detailLoading.value = false
}
}
const cascaderProps = {
label: 'name',
value: 'id',
checkStrictly: true,
emitPath: false
}
interface PollutionItem {
gdName?: string
subStationName?: string
subVStationValue?: string
subVoltage?: string
devName?: string
lineName?: string
powerFlag?: string
devType?: string
manufacturer?: string
loginTime?: string
interval?: string
vharmonicValue?: string
}
const handleSelectChange = (isExpanded: boolean) => {
if (isExpanded) {
tableHeight.value = tableHeight.value - 55
} else {
tableHeight.value = tableHeight.value + 55
}
}
const calculateTableHeight = () => {
const windowHeight = window.innerHeight
const headerHeight = 160
const paginationHeight = 120
const padding = 30
const calculatedHeight = windowHeight - headerHeight - paginationHeight - padding
tableHeight.value = Math.max(calculatedHeight, 300)
}
const debouncedCalculateTableHeight = debounce(() => {
calculateTableHeight()
}, 300)
const filteredData = computed(() => {
let result = [...allData.value]
if (selectedArea.value) {
let areaName = ''
let areaLevel = -1
const findAreaName = (areas: any[]) => {
for (const area of areas) {
if (area.id === selectedArea.value) {
areaName = area.name
areaLevel = area.level !== undefined ? area.level : -1
break
}
if (area.children && area.children.length > 0) {
findAreaName(area.children)
}
}
}
findAreaName(areOptions)
if (areaName && areaLevel > 1) {
result = result.filter(item => item.gdName && item.gdName.includes(areaName))
}
}
if (tableStore.table.params.powerFlag === '1') {
result = result.filter(item => item.powerFlag && !item.powerFlag.includes('非'))
} else if (tableStore.table.params.powerFlag === '2') {
result = result.filter(item => item.powerFlag && item.powerFlag.includes('非'))
}
if (searchKeyword.value) {
const keyword = searchKeyword.value.toLowerCase()
result = result.filter(
item =>
(item.subStationName && item.subStationName.toLowerCase().includes(keyword)) ||
(item.devName && item.devName.toLowerCase().includes(keyword)) ||
(item.lineName && item.lineName.toLowerCase().includes(keyword))
)
}
return result
})
const currentPageData = computed(() => {
const pageSize = tableStore.table.params.pageSize
const pageNum = tableStore.table.params.pageNum
const start = (pageNum - 1) * pageSize
const end = start + pageSize
return filteredData.value.slice(start, end)
})
const updateTotal = computed(() => {
return filteredData.value.length
})
const processNullValue = (value: any) => {
return value === null || value === undefined || value === '' || value === 'null' ? '/' : value
}
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/downPollutionSubCalc',
method: 'POST',
column: [],
beforeSearchFun: () => {
delete tableStore.table.params.deptIndex
delete tableStore.table.params.interval
delete tableStore.table.params.searchEndTime
delete tableStore.table.params.searchBeginTime
delete tableStore.table.params.timeFlag
tableStore.table.params.ids = [tableStore.table.params.statisticalType.id]
},
loadCallback: () => {
// 保存原始数据以便后续查询
originalTableData.value = [...(tableStore.table.data || [])]
const expandedData: PollutionItem[] = []
;(tableStore.table.data || []).forEach((item: any) => {
expandedData.push({
gdName: processNullValue(item.gdName),
subStationName: processNullValue(item.subStationName),
subVStationValue: processNullValue(item.subVStationValue),
subVoltage: processNullValue(item.subVoltage)
})
})
harmonicValueTitle.value = tableStore.table.params.statisticalType.name + '污染值'
allData.value = expandedData
tableStore.table.total = updateTotal.value
tableStore.table.data = currentPageData.value
},
resetCallback: () => {
clearQueryParams()
}
})
provide('tableStore', tableStore)
watch(
() => areOptions,
newOptions => {
if (newOptions && newOptions.length > 0) {
selectedArea.value = newOptions[0].id
tableStore.table.params.id = newOptions[0].id
}
},
{ immediate: true }
)
watch(
() => options,
newOptions => {
if (newOptions && newOptions.length > 0) {
if (!tableStore.table.params.statisticalType) {
tableStore.table.params.statisticalType = newOptions[0]
}
}
},
{ immediate: true }
)
tableStore.table.params.powerFlag = '0'
tableStore.table.params.isUpToGrid = 0
tableStore.table.params.type = 1
const handleFilterChange = () => {
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleSizeChange = (val: number) => {
tableStore.table.params.pageSize = val
tableStore.table.params.pageNum = 1
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const handleCurrentChange = (val: number) => {
tableStore.table.params.pageNum = val
tableStore.table.data = currentPageData.value
tableStore.table.total = updateTotal.value
}
const exportEvent = () => {
const allFilteredData = filteredData.value
tableRef.value.exportData({
filename: '场站级评估-污染值报告',
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: allFilteredData,
columnFilterMethod: function (column: any) {
return !(column.column.title === '操作')
}
})
}
// 导出详情数据的方法
const exportDetailEvent = () => {
detailTableRef.value.exportData({
filename: detailDialogTitle.value,
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: detailData.value,
columnFilterMethod({ column }) {
// 导出所有列,包括隐藏列
return true
}
})
}
onMounted(() => {
if (props.active) {
tableStore.index()
emit('initialized', 'pollutionReport')
}
calculateTableHeight()
window.addEventListener('resize', debouncedCalculateTableHeight)
})
onBeforeUnmount(() => {
window.removeEventListener('resize', debouncedCalculateTableHeight)
})
const clearQueryParams = () => {
// 将区域恢复成第一层
if (areOptions && areOptions.length > 0) {
selectedArea.value = areOptions[0].id
tableStore.table.params.id = areOptions[0].id
}
// 清空搜索关键词
searchKeyword.value = ''
}
defineExpose({
refresh: (statisticalType?: string) => {
tableStore.table.params.statisticalType = options.filter(item => item.id == statisticalType)[0] || options[0]
clearQueryParams()
tableHeaderRef.value.setTheDate(3)
tableStore.index()
}
})
</script>
<style scoped>
.pagination-container {
border: 1px solid #ebeef5;
border-top: none;
padding: 10px;
margin: 0 0 5px 0;
background-color: #fff;
}
:deep(.custom-pagination) {
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
:deep(.custom-pagination .el-pagination__sizes) {
margin-right: 10px;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: auto;
}
:deep(.custom-pagination .el-pagination__jump) {
margin-left: 20px;
}
/* 响应式处理 */
@media screen and (max-width: 768px) {
:deep(.custom-pagination) {
flex-direction: column;
align-items: stretch;
}
:deep(.custom-pagination .el-pagination__total) {
margin-right: 0;
order: 1;
margin-top: 10px;
}
:deep(.custom-pagination .el-pagination__sizes) {
order: 2;
}
:deep(.custom-pagination .btn-prev),
:deep(.custom-pagination .el-pager),
:deep(.custom-pagination .btn-next),
:deep(.custom-pagination .el-pagination__jump) {
order: 3;
justify-content: center;
margin-top: 10px;
}
}
</style>

View File

@@ -0,0 +1,173 @@
<template>
<div>
<TableHeader datePicker area ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<!-- <el-form-item label="电网标志">
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
<el-option label="全部" :value="0"></el-option>
<el-option label="电网侧" :value="1"></el-option>
<el-option label="非电网侧" :value="2"></el-option>
</el-select>
</el-form-item> -->
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="请输入变电站/终端/监测点"
clearable
:show-word-limit="true"
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
<!-- 添加弹窗 -->
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
<div v-loading="detailLoading">
<div style="margin-bottom: 10px; text-align: right">
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
</div>
<vxe-table
ref="detailTableRef"
:data="detailData"
auto-resize
v-bind="defaultAttribute"
resizable
show-overflow
height="400px"
>
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
</vxe-table>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
//
const detailDialogVisible = ref(false)
const detailLoading = ref(false)
const detailDialogTitle = ref('')
const detailData = ref([])
const dictData = useDictData()
const detailTableRef = ref()
const lineList = dictData.getBasicData('Line_Type')
const options = dictData.getBasicData('Pollution_Calc')
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/getAreaPollution',
publicHeight: 65,
isWebPaging: true,
method: 'POST',
filename: '区域级评估',
column: [
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'deptName',
title: '区域',
minWidth: 100
},
{
field: 'score',
title: '污染值',
minWidth: 150
},
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '监测点污染详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
click: row => {
detailDialogTitle.value = row.deptName + '监测点污染详情'
detailLoading.value = true
detailData.value = row.powerFlagPollutionList
detailDialogVisible.value = true
detailLoading.value = false
}
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.id = tableStore.table.params.deptIndex
tableStore.table.params.ids = [tableStore.table.params.statisticalType?.id]
},
loadCallback: () => {
tableStore.table.column[2].title = tableStore.table.params.statisticalType.name + '污染值'
}
})
tableStore.table.params.searchValue = ''
tableStore.table.params.statisticalType = options[0]
tableStore.table.params.searchState = '0'
tableStore.table.params.lineRunFlag = 0
// 导出详情数据的方法
const exportDetailEvent = () => {
detailTableRef.value.exportData({
filename: detailDialogTitle.value,
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: detailData.value,
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
}
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const setSearchValue = (val: string) => {
tableStore.table.params.searchValue = val
tableStore.index()
}
defineExpose({
setSearchValue
})
</script>

View File

@@ -0,0 +1,174 @@
<template>
<div>
<TableHeader datePicker area ref="TableHeaderRef" showExport>
<template #select>
<el-form-item label="统计类型">
<el-select
v-model="tableStore.table.params.statisticalType"
value-key="id"
placeholder="请选择统计类型"
>
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item" />
</el-select>
</el-form-item>
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.searchValue"
placeholder="请输入项目名称"
clearable
:show-word-limit="true"
:maxlength="32"
/>
</el-form-item>
</template>
<template #operation>
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
</template>
</TableHeader>
<Table ref="tableRef" />
<!-- 添加弹窗 -->
<el-dialog draggable v-model="detailDialogVisible" :title="detailDialogTitle" width="1000px">
<div v-loading="detailLoading">
<div style="margin-bottom: 10px; text-align: right">
<el-button icon="el-icon-Download" type="primary" @click="exportDetailEvent">导出</el-button>
</div>
<vxe-table
ref="detailTableRef"
:data="detailData"
auto-resize
v-bind="defaultAttribute"
resizable
show-overflow
height="400px"
>
<vxe-column title="序号" width="60" type="seq" align="center"></vxe-column>
<vxe-column field="subName" title="变电站名称" align="center" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="120"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="监测点污染值" align="center" min-width="120"></vxe-column>
</vxe-table>
</div>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick, watch } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { ElMessage, ElMessageBox } from 'element-plus'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
import { useDictData } from '@/stores/dictData'
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
//
const detailDialogVisible = ref(false)
const detailLoading = ref(false)
const detailDialogTitle = ref('')
const detailData = ref([])
const dictData = useDictData()
const detailTableRef = ref()
const lineList = dictData.getBasicData('Line_Type')
const options = dictData.getBasicData('Pollution_Calc')
const tableStore = new TableStore({
url: '/harmonic-boot/PollutionSubstation/downPollutionSensitiveUser',
publicHeight: 65,
isWebPaging: true,
method: 'POST',
filename: '敏感及重要用户评估',
column: [
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'gdName',
title: '供电公司',
width: 150
},
{ field: 'subStationName', title: '变电站', minWidth: 150 },
{ field: 'projectName', title: '项目名称', minWidth: 150 },
{
field: 'subValue',
title: '污染值',
width: 150,
formatter: (row: any) => {
return row.cellValue == null ? '暂未安装监测点' : row.cellValue
}
},
{
title: '操作',
width: '180',
fixed: 'right',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '监测点污染详情',
type: 'primary',
icon: 'el-icon-Open',
render: 'basicButton',
disabled: row => {
return row.subValue == null
},
click: row => {
detailDialogTitle.value = '监测点污染详情'
console.log('🚀 ~ row:', row)
detailLoading.value = true
detailData.value = row.powerFlagPollutionList
detailDialogVisible.value = true
detailLoading.value = false
}
}
]
}
],
beforeSearchFun: () => {
tableStore.table.params.deptId = tableStore.table.params.deptIndex
tableStore.table.params.ids = [tableStore.table.params.statisticalType?.id]
},
loadCallback: () => {
tableStore.table.column[4].title = tableStore.table.params.statisticalType.name + '污染值'
}
})
tableStore.table.params.searchValue = ''
tableStore.table.params.statisticalType = options[0]
tableStore.table.params.powerFlag = 0
tableStore.table.params.isUpToGrid = 0
// 导出详情数据的方法
const exportDetailEvent = () => {
detailTableRef.value.exportData({
filename: detailDialogTitle.value,
sheetName: 'Sheet1',
type: 'xlsx',
useStyle: true,
data: detailData.value,
columnFilterMethod: function (column: any) {
return !(column.$columnIndex === 0)
}
})
}
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const setSearchValue = (val: string) => {
tableStore.table.params.searchValue = val
tableStore.index()
}
defineExpose({
setSearchValue
})
</script>

View File

@@ -2,19 +2,17 @@
<div class="default-main">
<el-tabs v-model="activeTab" type="border-card" @tab-change="handleTabChange">
<el-tab-pane label="监测点评估" name="pollutionReport">
<MonitoringPointTab
ref="monitoringPointTabRef"
:active="activeTab === 'pollutionReport'"
/>
<MonitoringPointTab ref="monitoringPointTabRef" :active="activeTab === 'pollutionReport'" />
</el-tab-pane>
<el-tab-pane label="场站级评估" name="anotherReport">
<SubstationTab
ref="substationTabRef"
:active="activeTab === 'anotherReport'"
/>
<SubstationTab ref="substationTabRef" :active="activeTab === 'anotherReport'" />
</el-tab-pane>
<el-tab-pane label="区域级评估" name="3">
<regionalAssessment v-if="activeTab == '3'" />
</el-tab-pane>
<el-tab-pane label="敏感及重要用户评估" name="4">
<userEvaluation ref="userEvaluationRef" v-if="activeTab == '4'" />
</el-tab-pane>
</el-tabs>
</div>
@@ -22,9 +20,12 @@
<script setup lang="ts">
import { ref } from 'vue'
import MonitoringPointTab from './MonitoringPointTab.vue'
import SubstationTab from './SubstationTab.vue'
import MonitoringPointTab from './components/MonitoringPointTab.vue'
import SubstationTab from './components/SubstationTab.vue'
import regionalAssessment from './components/regionalAssessment.vue'
import userEvaluation from './components/userEvaluation.vue'
import { useRoute } from 'vue-router'
const route = useRoute()
defineOptions({
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport'
})
@@ -32,18 +33,38 @@ defineOptions({
const activeTab = ref('pollutionReport')
const monitoringPointTabRef = ref()
const substationTabRef = ref()
const userEvaluationRef = ref()
const handleTabChange = (tabName: string) => {
if (tabName === 'pollutionReport' && monitoringPointTabRef.value) {
monitoringPointTabRef.value.refresh()
} else if (tabName === 'anotherReport' && substationTabRef.value) {
substationTabRef.value.refresh()
}
}
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('harmonic-boot/qydetailedAnalysis/pollutionReport')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
activeTab.value = 'pollutionReport'
setTimeout(() => {
monitoringPointTabRef.value.refresh((route.query.name as string) || 'null')
}, 500)
} else if (type == '2') {
activeTab.value = 'anotherReport'
setTimeout(() => {
substationTabRef.value.refresh((route.query.statisticalType as string) || 'null')
}, 500)
} else if (type == '4') {
activeTab.value = '4'
setTimeout(() => {
userEvaluationRef.value.setSearchValue((route.query.name as string) || '')
}, 500)
}
}
},
{ deep: true, immediate: true }
)
</script>

View File

@@ -109,7 +109,7 @@ const tableStore = new TableStore({
{ field: 'name', title: '电网拓扑', minWidth: '150' },
{
field: 'onlineMonitorNumber',
title: '在线监测点数(个)',
title: '在监测点数(个)',
minWidth: '100px',
formatter: (row: any) => {
return row.cellValue == -1 ? '/' : row.cellValue

View File

@@ -2,7 +2,7 @@
<div class="default-main">
<TableHeader :showSearch="false" v-show="flag">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker
ref="datePickerRef"
:nextFlag="false"

View File

@@ -1,7 +1,7 @@
<template>
<TableHeader area datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.filterName"
@keyup="searchEvent"
@@ -123,7 +123,7 @@ const tableStore = new TableStore({
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
{
field: 'ip',
title: '网络参数',
title: '网络参数' ,width:'120px',
formatter: ({ row }: any) => {
return row.ip || '/'
}

View File

@@ -1,7 +1,7 @@
<template>
<TableHeader area datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input
v-model="tableStore.table.params.filterName"
@keyup="searchEvent"
@@ -123,7 +123,7 @@ const tableStore = new TableStore({
{ field: 'name', title: '电网拓扑', width: 350, type: 'radio', align: 'left', treeNode: true },
{
field: 'ip',
title: '网络参数',
title: '网络参数' ,width:'120px',
formatter: ({ row }: any) => {
return row.ip || '/'
}

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<TableHeader date-picker ref="TableHeaderRef" :dateLabel="`数据统计时间`">
<TableHeader date-picker ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="运行状态">
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
@@ -12,8 +12,8 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-input v-model="tableStore.table.params.filterName" placeholder="输入关键字筛选" />
<el-form-item label="筛选数据">
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入监测点名称" />
</el-form-item>
</template>
@@ -47,7 +47,7 @@
<span class="divBox_title">低于90%监测点数</span>
<span
class="divBox_num text-style"
style="color: #ff6600"
style="color: #57bc6e"
@click="totalTable(90, '低于90%监测点_')"
>
{{ monitoringPoints.abnormalNum }}
@@ -56,7 +56,9 @@
</div>
<div class="echartTitle">
<div>总的数据完整性</div>
<div>{{ monitoringPoints.totalOnlineRate }}%</div>
<div>
{{ monitoringPoints.totalOnlineRate > 100 ? 100 : monitoringPoints.totalOnlineRate }}%
</div>
</div>
<div style="height: 30px">
<MyEchart :options="percentage"></MyEchart>
@@ -115,7 +117,7 @@
</span>
<!-- 低于90%监测点数 -->
<span
style="flex: 1; color: #ff9100"
style="flex: 1; color: #388e3c"
class="text text-style"
@click="renderTable(o.detailList, 90, o.citName + '_低于90%监测点_')"
>
@@ -152,21 +154,22 @@
<vxe-column type="seq" title="序号" width="80px">
<template #default="{ rowIndex }">
<span>
{{
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
rowIndex +
1
}}
{{ (pageNum - 1) * pageSize + rowIndex + 1 }}
</span>
</template>
</vxe-column>
<vxe-column field="cit" title="所在地市" width="110px"></vxe-column>
<vxe-column field="company" title="供电公司"></vxe-column>
<vxe-column field="subStation" title="变电站"></vxe-column>
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
<vxe-column field="deviceName" title="终端名称"></vxe-column>
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="130px"></vxe-column>
<vxe-column field="lineName" title="监测点名称" :formatter="formatter"></vxe-column>
<vxe-column field="cit" title="所在地市" minWidth="110px"></vxe-column>
<vxe-column field="company" title="供电公司" minWidth="110px"></vxe-column>
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="120px"></vxe-column>
<vxe-column
field="lineName"
title="监测点名称"
:formatter="formatter"
minWidth="110px"
></vxe-column>
<vxe-column field="runFlag" title="运行状态" width="90px">
<template #default="{ row }">
<el-tag
@@ -209,7 +212,7 @@
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { onMounted, provide, ref } from 'vue'
import { onMounted, provide, ref, watch } from 'vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { useDictData } from '@/stores/dictData'
import { mainHeight } from '@/utils/layout'
@@ -218,7 +221,8 @@ import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
defineOptions({
name: 'harmonic-boot/harmonic/getIntegrityData'
})
import { useRoute } from 'vue-router'
const route = useRoute()
const dictData = useDictData()
//字典获取监督对象类型
const pageHeight = mainHeight(97)
@@ -267,7 +271,13 @@ const tableStore = new TableStore({
monitoringPoints.value.runNum = tableStore.table.data.totalNum
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
abnormal.value = tableStore.table.data.citDetailList
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.citTotalNum != 0
} else {
return k.citName != '上送国网' && k.citName != '非上送国网'
}
})
// 合并子集数据 并去重
totalData.value = Array.from(
tableStore.table.data.citDetailList
@@ -348,7 +358,13 @@ const echart = () => {
name: '异常占比',
type: 'bar',
barWidth: 13,
data: [monitoringPoints.value.totalOnlineRate == 0 ? '' : monitoringPoints.value.totalOnlineRate],
data: [
monitoringPoints.value.totalOnlineRate == 0
? ''
: monitoringPoints.value.totalOnlineRate > 100
? 100
: monitoringPoints.value.totalOnlineRate
],
z: 0,
zlevel: 0,
itemStyle: {
@@ -413,7 +429,8 @@ const echart = () => {
}
}
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.lineRunFlag = ''
tableStore.table.params.lineRunFlag = 0
tableStore.table.params.searchValue = ''
const formatter = (row: any) => {
return row.cellValue || '/'
@@ -470,10 +487,28 @@ onMounted(() => {
tableStore.index()
})
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('harmonic-boot/harmonic/getIntegrityData')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
setTimeout(() => {
tableStore.table.params.searchValue = (route.query.name as string) || ''
tableStore.index()
}, 500)
}
}
},
{ deep: true, immediate: true }
)
tableStore.table.params.name = ''
provide('tableStore', tableStore)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.card-list {
display: flex;
.monitoringPoints {

View File

@@ -1,7 +1,7 @@
<template>
<TableHeader area datePicker ref="TableHeaderRef">
<template #select>
<el-form-item label="筛选">
<el-form-item label="筛选数据">
<el-input v-model="tableStore.table.params.filterName" @keyup="searchEvent" placeholder="输入关键字筛选" />
</el-form-item>
<el-form-item label="统计类型:">
@@ -65,7 +65,7 @@ const tableStore = new TableStore({
{ field: 'name', title: '电网拓扑', width: 350, align: 'left', treeNode: true },
{
field: 'ip',
title: '网络参数',
title: '网络参数' ,width:'120px',
formatter: ({ row }: any) => {
return row.ip || '/'
}

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main">
<TableHeader date-picker ref="TableHeaderRef" :dateLabel="`数据统计时间`">
<TableHeader date-picker ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="运行状态">
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
@@ -12,8 +12,8 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="筛选">
<el-input v-model="tableStore.table.params.filterName" placeholder="输入关键字筛选" />
<el-form-item label="筛选数据">
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入终端名称" />
</el-form-item>
</template>
@@ -34,7 +34,11 @@
<div class="divBox">
<span class="iconfont icon-qiyezongshu" style="color: #57bc6e"></span>
<span class="divBox_title">终端总数</span>
<span class="divBox_num text-style" style="color: #57bc6e" @click="totalTable(100001, '')">
<span
class="divBox_num text-style"
style="color: #57bc6e"
@click="totalTable(100001, '')"
>
{{ monitoringPoints.runNum }}
</span>
</div>
@@ -43,7 +47,7 @@
<span class="divBox_title">低于90%终端数</span>
<span
class="divBox_num text-style"
style="color: #ff6600"
style="color: #57bc6e"
@click="totalTable(90, '低于90%终端_')"
>
{{ monitoringPoints.abnormalNum }}
@@ -111,7 +115,7 @@
</span>
<!-- 低于90%终端数 -->
<span
style="flex: 1; color: #ff9100"
style="flex: 1; color: #388e3c"
class="text text-style"
@click="renderTable(o.detailList, 90, o.citName + '_低于90%终端_')"
>
@@ -148,20 +152,16 @@
<vxe-column type="seq" title="序号" width="80px">
<template #default="{ rowIndex }">
<span>
{{
(tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
rowIndex +
1
}}
{{ (pageNum - 1) * pageSize + rowIndex + 1 }}
</span>
</template>
</vxe-column>
<vxe-column field="cit" title="所在地市" width="110px"></vxe-column>
<vxe-column field="company" title="供电公司"></vxe-column>
<vxe-column field="subStation" title="变电站"></vxe-column>
<vxe-column field="manufacturer" title="终端厂家"></vxe-column>
<vxe-column field="deviceName" title="终端名称"></vxe-column>
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="130px"></vxe-column>
<vxe-column field="company" title="供电公司" minWidth="110px"></vxe-column>
<vxe-column field="subStation" title="变电站" minWidth="110px"></vxe-column>
<vxe-column field="manufacturer" title="终端厂家" minWidth="110px"></vxe-column>
<vxe-column field="deviceName" title="终端名称" minWidth="110px"></vxe-column>
<vxe-column field="ip" title="终端IP" :formatter="formatter" width="120px"></vxe-column>
<vxe-column field="runFlag" title="运行状态" width="90px">
<template #default="{ row }">
<el-tag
@@ -200,6 +200,7 @@
</template>
<script setup lang="ts">
// import '@/assets/font/iconfont.css'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
@@ -212,7 +213,8 @@ import { getMonitorVerifyDay } from '@/api/device-boot/dataVerify'
defineOptions({
name: 'harmonic-boot/harmonic/getIntegrityData'
})
import { useRoute } from 'vue-router'
const route = useRoute()
const dictData = useDictData()
//字典获取监督对象类型
const pageHeight = mainHeight(97)
@@ -262,10 +264,19 @@ const tableStore = new TableStore({
monitoringPoints.value.runNum = tableStore.table.data.totalNum
monitoringPoints.value.abnormalNum = tableStore.table.data.belowNum
monitoringPoints.value.totalOnlineRate = tableStore.table.data.totalOnlineRate - 0
abnormal.value = tableStore.table.data.citDetailList
abnormal.value = tableStore.table.data.citDetailList.filter((k: any) => {
if (tableStore.table.params.statisticalType.name == '终端厂家') {
return k.citTotalNum != 0
} else {
return k.citName != '上送国网' && k.citName != '非上送国网'
}
})
console.log(123, tableStore.table.params.statisticalType.name)
// 合并子集数据 并去重
totalData.value = Array.from(
tableStore.table.data.citDetailList
.map((item: any) => item.detailList)
.flat()
.reduce((map: any, item: any) => {
@@ -409,7 +420,8 @@ const echart = () => {
}
}
tableStore.table.params.deptIndex = dictData.state.area[0].id
tableStore.table.params.lineRunFlag = ''
tableStore.table.params.lineRunFlag = 0
tableStore.table.params.searchValue = ''
const formatter = (row: any) => {
return row.cellValue || '/'
@@ -465,11 +477,28 @@ onMounted(() => {
tableStore.index()
})
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('harmonic-boot/area/OnlineRate')) {
let type = (route.query.type as string) || 'null'
if (type == 'null') {
} else if (type == '1') {
setTimeout(() => {
tableStore.table.params.searchValue = (route.query.name as string) || ''
tableStore.index()
}, 500)
}
}
},
{ deep: true, immediate: true }
)
tableStore.table.params.name = ''
provide('tableStore', tableStore)
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
.card-list {
display: flex;
.monitoringPoints {

View File

@@ -4,7 +4,7 @@
<el-form-item label="多监测点">
<el-checkbox v-model="checked" @change="checkChange" />
</el-form-item>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef" ></DatePicker>
</el-form-item>
<el-form-item label="指标类型:">

View File

@@ -0,0 +1,74 @@
<template>
<div>
<TableHeader datePicker ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="超标指标">
<el-select
v-model="tableStore.table.params.targetId"
clearable
collapse-tags
collapse-tags-tooltip
placeholder="请选择超标指标"
>
<el-option v-for="item in exceeded" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</template>
<script setup lang="ts">
import { nextTick, onMounted, reactive, ref } from 'vue'
import DatePicker from '@/components/form/datePicker/index.vue'
import MyEchart from '@/components/echarts/MyEchart.vue'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import TableStore from '@/utils/tableStore'
import { useDictData } from '@/stores/dictData'
const dictData = useDictData()
const exceeded = dictData.getBasicData('Steady_Statis')
const monitoringPoint = useMonitoringPoint()
const tableStore = new TableStore({
url: '/supervision-boot/onlineMonitor/overLimitDetail',
publicHeight: 80,
isWebPaging: true,
method: 'POST',
filename: '监测点台账',
column: [
{
title: '序号',
width: 70,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{
field: 'time',
title: '日期',
width: '140px'
},
{
field: 'overLimitInfo',
title: '越限详情'
}
],
beforeSearchFun: () => {
tableStore.table.params.lineId = monitoringPoint.state.lineId
}
})
tableStore.table.params.targetId = exceeded.filter(item => item.code == 'Total_Indicator')[0].id
? exceeded.filter(item => item.code == 'Total_Indicator')[0].id
: ''
onMounted(() => {
tableStore.index()
})
provide('tableStore', tableStore)
</script>
<style></style>

View File

@@ -41,9 +41,9 @@
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
<Yunxingzhuangtai v-if="activeName == '6'" />
</el-tab-pane>
<el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
<!-- <el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
<Shishishuju v-if="activeName == '7'" />
</el-tab-pane>
</el-tab-pane> -->
<el-tab-pane label="统计报表" name="8" lazy v-if="!isReload && VITE_FLAG">
<StatisticalReport v-if="activeName == '8'" />
</el-tab-pane>
@@ -64,33 +64,35 @@ import { defineOptions, watch, onMounted, ref, nextTick } from 'vue'
import 'splitpanes/dist/splitpanes.css'
import { Splitpanes, Pane } from 'splitpanes'
import PointTree from '@/components/tree/pqs/pointTree.vue'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { mainHeight } from '@/utils/layout'
import Wentaizonghepinggu from './wentaizonghepinggu/index.vue'
import Wentaizhibiaohegelv from './wentaizhibiaohegelv/index.vue'
import Wentaishujufenxi from './wentaishujufenxi/index.vue'
import Xiebopingpu from './xiebopingpu/index.vue'
import Gaojingshujutongji from './gaojingshujutongji/index.vue'
import Gaojingshujutongji from './gaojingshujutongji/index_JB.vue'
import Yunxingzhuangtai from './yunxingzhuangtai/index.vue'
import Shishishuju from './shishishuju/index.vue'
import { useRoute } from 'vue-router'
import StatisticalReport from './statisticalReport/index.vue'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
import router from '@/router'
import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { id } from 'element-plus/es/locale'
defineOptions({
name: 'harmonic-boot/monitor/online'
})
const route = useRoute()
const monitoringPoint = useMonitoringPoint()
const pointTree = ref()
const size = ref(0)
const size = ref(23)
const isReload = ref(false)
const height = mainHeight(40)
const activeName = ref('2')
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})
const handleNodeClick = (data: any, node: any) => {
@@ -121,7 +123,9 @@ watch(
{ immediate: true }
)
watch(
() => monitoringPoint.state.lineId,
() => {
return monitoringPoint.state.lineId
},
() => {
// 刷新页面
isReload.value = true
@@ -130,6 +134,49 @@ watch(
})
}
)
watch(
() => route.query.t,
async (newValue, oldValue) => {
if (route.fullPath.includes('harmonic-boot/monitor/online')) {
let type = (route.query.type as string) || 'null'
let lineId = (route.query.id as string) || 'null'
if (type == 'null') {
} else {
setTimeout(() => {
monitoringPoint.setValue('lineId', lineId)
//
// pointTree.value.tree
activeName.value = type
setTimeout(() => {
pointTree.value.scrollToNode(lineId)
monitoringPoint.setValue('lineName', findNodeByTreeId(pointTree.value.tree, lineId).alias)
}, 500)
}, 1000)
}
}
},
{ deep: true, immediate: true }
)
// 递归函数(同上)
const findNodeByTreeId = (treeData: any, id: any) => {
for (const node of treeData) {
if (node.id == id) return node
if (node.children && Array.isArray(node.children) && node.children.length) {
const found: any = findNodeByTreeId(node.children, id)
if (found) return found
}
}
return null
}
// 调用示例
const getTargetNode = () => {
const targetId = '9b7adecf588b4110acb7018f297592a7'
const node = findNodeByTreeId(treeData.value, targetId)
console.log('Vue中找到的节点', node)
}
const changeTab = (e: string) => {
activeName.value = e
}

View File

@@ -1,6 +1,5 @@
<template>
<div class="" :style="height">
<TableHeader ref="TableHeaderRef" datePicker @selectChange="selectChange">
<template v-slot:select>
<el-form-item label="模板策略">
@@ -40,7 +39,6 @@
<div class="box">
<div id="luckysheet" :style="`height: calc(${tableStore.table.height} )`"></div>
</div>
</div>
</template>
<script setup lang="ts">
@@ -63,7 +61,7 @@ defineOptions({
const monitoringPoint = useMonitoringPoint()
const showTree = ref(false)
const height = mainHeight(20)
const size = ref(0)
const size = ref(23)
const dictData = useDictData()
const TableHeaderRef = ref()
const dotList: any = ref({})
@@ -109,7 +107,7 @@ provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})
getTemplateByDept({ id: dictData.state.area[0].id })
@@ -135,21 +133,18 @@ const selectChange = () => {
}
}
const exportEvent = () => {
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
}
const exportReport = () => {
loading.value = true
let form = new FormData()
form.append('isUrl', false)
form.append('lineIndex', dotList.value.id)
form.append('lineIndex', monitoringPoint.state.lineId)
form.append('startTime', TableHeaderRef.value.datePickerRef.timeValue[0])
form.append('endTime', TableHeaderRef.value.datePickerRef.timeValue[1])
form.append('type', 0)
form.append('name', dotList.value.name)
form.append('name', monitoringPoint.state.lineName.split('>').pop())
ElMessage({
message: '下载报告中,请稍等.....',
duration: 1000
@@ -164,7 +159,7 @@ const exportReport = () => {
const link = document.createElement('a') // 创建a标签
link.href = url
link.download =
dotList.value.name +
monitoringPoint.state.lineName.split('>').pop() +
TableHeaderRef.value.datePickerRef.timeValue[0] +
'_' +
TableHeaderRef.value.datePickerRef.timeValue[1] // 设置下载的文件名

View File

@@ -6,7 +6,7 @@
<el-form-item label="多监测点">
<el-checkbox v-model="checked" @change="checkChange" />
</el-form-item>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef" :theCurrentTime="true"></DatePicker>
</el-form-item>
<el-form-item label="指标类型:">

View File

@@ -4,7 +4,7 @@
<el-form-item label="多监测点">
<el-checkbox v-model="checked" @change="checkChange" />
</el-form-item>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item label="指标类型:">

View File

@@ -2,7 +2,7 @@
<div style="display: flex; flex-direction: column; height: 100%">
<TableHeader ref="TableHeaderRef" :showSearch="false">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item label="对比">

View File

@@ -1,7 +1,7 @@
<template>
<div style="display: flex; flex-direction: column; height: 100%">
<el-form :inline="true">
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item>

View File

@@ -2,7 +2,7 @@
<div style="display: flex; flex-direction: column; height: 100%">
<TableHeader ref="TableHeaderRef" :showSearch="false">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item label="指标">

View File

@@ -2,7 +2,7 @@
<div style="display: flex; flex-direction: column; height: 100%">
<TableHeader ref="TableHeaderRef" :showSearch="false">
<template v-slot:select>
<el-form-item label="日期">
<el-form-item label="统计时间">
<DatePicker ref="datePickerRef"></DatePicker>
</el-form-item>
<el-form-item label="对比">

View File

@@ -71,7 +71,7 @@ defineOptions({
})
const showTree = ref(false)
const height = mainHeight(20)
const size = ref(0)
const size = ref(23)
const dictData = useDictData()
const TableHeaderRef = ref()
const dotList: any = ref({})
@@ -129,7 +129,7 @@ provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})
getTemplateByDept({ id: dictData.state.area[0].id })
@@ -165,7 +165,6 @@ const exportEvent = () => {
exportExcel(luckysheet.getAllSheets(), '统计报表下载')
}
const exportReport = () => {
loading.value = true
let form = new FormData()
form.append('isUrl', false)

View File

@@ -1,36 +1,58 @@
<template>
<div class='default-main' :style='height'>
<splitpanes style='height: 100%' class='default-theme' id='navigation-splitpanes'>
<pane :size='size'>
<PointTree :default-expand-all='false' @node-click='handleNodeClick' @init='handleNodeClick'>
</PointTree>
<div class="default-main" :style="height">
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<PointTree
:default-expand-all="false"
@node-click="handleNodeClick"
@init="handleNodeClick"
></PointTree>
</pane>
<pane style='background: #fff' :style='height'>
<TableHeader ref='TableHeaderRef' datePicker :show-search='false'>
<pane style="background: #fff" :style="height">
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
<template v-slot:select>
<el-form-item label='客户名称'>
<el-input v-model='tableStore.table.params.crmName' maxlength='32' show-word-limit clearable
placeholder='请输入客户名称' />
<el-form-item label="客户名称">
<el-input
v-model="tableStore.table.params.crmName"
maxlength="32"
show-word-limit
clearable
placeholder="请输入客户名称"
/>
</el-form-item>
<el-form-item label='报表编号'>
<el-input v-model='tableStore.table.params.reportNumber' clearable
placeholder='请输入报表编号' maxlength='12' show-word-limit />
<el-form-item label="报表编号">
<el-input
v-model="tableStore.table.params.reportNumber"
clearable
placeholder="请输入报表编号"
maxlength="12"
show-word-limit
/>
</el-form-item>
</template>
<template #operation>
<el-upload :show-file-list='false' ref='uploadRef' action='' accept='.png,.jpg'
:on-change='choose' :auto-upload='false'>
<el-upload
:show-file-list="false"
ref="uploadRef"
action=""
accept=".png,.jpg"
:on-change="choose"
:auto-upload="false"
>
<template #trigger>
<el-button icon='el-icon-Upload' type='primary' class='mr10 ml10'>上传接线图</el-button>
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
</template>
</el-upload>
<el-button icon='el-icon-Download' type='primary' @click='exportEvent'>生成</el-button>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">生成</el-button>
</template>
</TableHeader>
<div class='box'>
<div id='luckysheet'>
<img width='100%' :style='`height: calc(${tableStore.table.height} + 40px)`'
src='@/assets/img/jss.png' />
<div class="box">
<div id="luckysheet">
<img
width="100%"
:style="`height: calc(${tableStore.table.height} + 40px)`"
src="@/assets/img/jss.png"
/>
</div>
</div>
</pane>
@@ -38,7 +60,7 @@
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { onMounted, ref, provide } from 'vue'
import 'splitpanes/dist/splitpanes.css'
import { Splitpanes, Pane } from 'splitpanes'
@@ -55,7 +77,7 @@ defineOptions({
// name: 'harmonic-boot/report/word'
})
const height = mainHeight(20)
const size = ref(0)
const size = ref(23)
const dictData = useDictData()
const TableHeaderRef = ref()
const dotList: any = ref({})
@@ -66,24 +88,19 @@ const tableStore = new TableStore({
url: '',
method: 'POST',
column: [],
beforeSearchFun: () => {
},
loadCallback: () => {
}
beforeSearchFun: () => {},
loadCallback: () => {}
})
provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / dom.offsetHeight) * 120)
}
})
const handleNodeClick = (data: any, node: any) => {
dotList.value = data
}
@@ -117,7 +134,10 @@ const exportEvent = () => {
form.append('file', uploadList.value?.raw || '')
// 特殊字符正则表达式
const specialCharRegex = /[!@#$%^&*()_+\-=\[\]{};':"\\|,.<>\/?]/
if (specialCharRegex.test(tableStore.table.params.crmName) || specialCharRegex.test(tableStore.table.params.reportNumber)) {
if (
specialCharRegex.test(tableStore.table.params.crmName) ||
specialCharRegex.test(tableStore.table.params.reportNumber)
) {
ElNotification({
type: 'error',
message: '包含特殊字符,请注意修改!'
@@ -138,10 +158,9 @@ const exportEvent = () => {
document.body.removeChild(link)
})
}
}
</script>
<style lang='scss'>
<style lang="scss">
.splitpanes.default-theme .splitpanes__pane {
background: #eaeef1;
}

View File

@@ -113,7 +113,7 @@ const tableStore = new TableStore({
{ field: 'businessType', title: '行业类型' , minWidth: 100},
{ field: 'devName', title: '终端名称', minWidth: 80 },
{ field: 'ip', title: '网络参数' , minWidth: 100},
{ field: 'ip', title: '网络参数' ,width:'120px'},
// { field: 'comFlag', title: '通讯状态' , minWidth: 100},
{

View File

@@ -154,7 +154,7 @@ const tableStore = new TableStore({
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
{ field: 'devName', title: '终端名称', minWidth: 80 },
{ field: 'ip', title: '网络参数', minWidth: 100 },
{ field: 'ip', title: '网络参数' ,width:'120px' },
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
{ field: 'devType', title: '终端型号', minWidth: 100 },
{ field: 'port', title: '端口', minWidth: 100 },

View File

@@ -85,7 +85,7 @@ const options: any = dictData.getBasicData('Pollution_Statis').filter(item => {
return item
}
})
const contaminate = ref(options[0].id)
const contaminate = ref(options[0]?.id)
const rowList: any = ref({})
const trendEChart: any = ref({})
const tableData: any = ref([])

View File

@@ -52,7 +52,7 @@
</div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="365px" :data="tableData">
<vxe-column field="deptName" title="区域" />
<vxe-column sortable field="onlineNum" title="在线监测点数(个)" />
<vxe-column sortable field="onlineNum" title="在监测点数(个)" />
<vxe-column sortable field="overNum" title="超标监测点数量(个)" />
<vxe-column sortable field="overRatio" title="超标监测点占比(%)" />
@@ -100,7 +100,7 @@ const url: any = [
new URL(`@/assets/img/SB.png`, import.meta.url)
]
const tableData: any = ref([])
const title = ['电压偏差(超标)', '频率偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
const title = ['频率偏差(超标)', '电压偏差(超标)', '电压总谐波畸变率(超标)', '闪变(超标)', '三相电压不平衡度(超标)']
const echart = (row: any) => {
let maxList: any = []

View File

@@ -6,20 +6,21 @@
<div class="title">
<span>
稳态综合评估
<el-popover placement="right" :width="150" trigger="hover">
<el-popover placement="right" :width="190" trigger="hover">
<template #reference>
<WarningFilled class="WarningFilled" />
</template>
<div class="text">
<span style="color: #00b07d">优质(4.5 , 5]</span>
<span style="color: #00B07D">无污染0</span>
<br />
<span style="color: #2b7fd3">良好(4 , 4.5]</span>
<span style="color: #3399ff">轻微污染(0 , 100]</span>
<br />
<span style="color: #ffcc33">合格(3 , 4]</span>
<span style="color: #ffcc33">轻度污染(100 , 1000]</span>
<br />
<span style="color: #97017e">较差(2 , 3]</span>
<span style="color: #ff9900">中度污染(1000 , 10000]</span>
<br />
<span style="color: #A52a2a">极差[1 , 2]</span>
<span style="color: #A52a2a">重度污染(10000</span>
</div>
</el-popover>
</span>
@@ -53,7 +54,6 @@
}"
>
{{ assessList.score == 3.14159 ? '/' : assessList.score }}
<!-- {{ assessList.level }} -->
</span>
</div>
<div class="evaluate">
@@ -318,7 +318,7 @@ const options = ref([
])
const technology: any = ref({})
const harmonicType = ref('0')
const harmonicType = ref('6')
const transientNum = ref([0, 0])
const options1: any = dictData.getBasicData('Event_Statis').filter(item => {
if (item.code == 'Voltage_Dip' || item.code == 'Voltage_Rise' || item.code == 'Short_Interruptions') {

View File

@@ -10,15 +10,19 @@
<div class="boxSteps">
<el-steps>
<template v-for="(item, i) in Voltage">
<el-step :class="active == i ? 'highlight' : ''" :title="item.name"
@click="handleClick(i)"></el-step>
<el-step
:class="active == i ? 'highlight' : ''"
:title="item.name"
@click="handleClick(i)"
></el-step>
</template>
</el-steps>
</div>
<div v-for="(item, i) in evaluationData" class="evaluationData">
<el-row style="width: 100%">
<el-col :span="12" style="display: flex">
<img :src="url[i]" />
<!-- <img :src="url[i]" /> -->
<span :class="`iconfont ${url[i]} icoColor`"></span>
<span>{{ item.targetName }}</span>
</el-col>
<el-col :span="12" style="display: flex">
@@ -66,11 +70,11 @@ const Voltage: any = dictData.getBasicData('Dev_Voltage_Stand').filter(item => {
const chartRef = ref<HTMLDivElement>()
const url: any = [
new URL(`@/assets/img/PLPC.png`, import.meta.url),
new URL(`@/assets/img/DYPC.png`, import.meta.url),
new URL(`@/assets/img/JBL.png`, import.meta.url),
new URL(`@/assets/img/SXDY.png`, import.meta.url),
new URL(`@/assets/img/SB.png`, import.meta.url)
'icon-frequency',
'icon-dianya',
'icon-dianyazongxiebojibianshuai',
'icon-sanxiangdianyafuzhibupingheng',
'icon-a-253_ipower'
]
const tableData: any = ref([])
@@ -199,6 +203,7 @@ const handleClick = (i: any) => {
defineExpose({ open })
</script>
<style lang="scss" scoped>
@import '@/assets/font/iconfont.css';
:deep(.el-select) {
min-width: 80px;
}
@@ -283,4 +288,9 @@ defineExpose({ open })
// color: var(--el-color-primary) !important;
// }
}
.icoColor {
color: var(--el-color-primary);
margin: 0 20px;
font-size: 20px;
}
</style>

View File

@@ -13,8 +13,10 @@
<div v-for="(item, i) in list" class="cardBox" :style="i == 1 ? 'flex:1.3' : ''">
<div class="card">
<span style="cursor: pointer" @click="GridDiagram(i)">{{ item.title }}</span>
<span :style="`color: ${item.color[0]}; cursor:pointer`"
@click="LookMap(item.list[4].numOneList, item.list[4].numTwoList, 0)">
<span
:style="`color: ${item.color[0]}; cursor:pointer`"
@click="LookMap(item.list[4].numOneList, item.list[4].numTwoList, 0)"
>
{{ item.list[4].numOne }}
</span>
</div>
@@ -23,8 +25,10 @@
<!-- 监测规模 列表 -->
<div>
<div class="vcl mt5">
<p v-for="(item, i) in vList"
:style="i == 0 ? 'width: 60px' : i == 5 ? 'width: 32px' : 'flex:1'">
<p
v-for="(item, i) in vList"
:style="i == 0 ? 'width: 60px' : i == 5 ? 'width: 32px' : 'flex:1'"
>
{{ item }}
</p>
</div>
@@ -57,10 +61,10 @@
</div>
</div>
</div>
<!-- 监测点指标统计 -->
<!-- 资产性质 -->
<div :style="`height:calc(${boxHeight.height} + 50px)`">
<div class="title">
<span>监测点指标统计</span>
<span>资产性质</span>
</div>
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
@@ -68,16 +72,19 @@
<div :style="`height:calc(${boxHeight.height} + 20px);overflow-y: auto;`">
<div v-for="item in countList">
<div class="title mt5" style="font-weight: 500">
<img src="@/assets/img/TJ.png" />
{{ item.title }}
<!-- <img src="@/assets/img/TJ.png" />
{{ item.title }} -->
</div>
<div class="card-Box" :style="`height:calc((${boxHeight.height} - 50px )/ 3);`"
v-for="val in item.children">
<div
class="card-Box mt10"
:style="`height:calc((${boxHeight.height} - 20px )/ 2);`"
v-for="val in item.children"
>
<div>
<span class="line"></span>
<span class="vol">{{ val.title }}</span>
</div>
<div class="num">
<div class="num num1">
<div @click="LookMap(val.numList, [], 0)">
投运:
<span>{{ val.num }}</span>
@@ -88,29 +95,44 @@
</div>
<div>
数据完整性:
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate }}%</span>
<span style="color: #2b7fd3; cursor: text">{{ val.integrityRate || 0 }}%</span>
</div>
<div>
在线率:
<span style="color: #2dcd28; cursor: text">{{ val.onLineRate || 0 }}%</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 监测点指标统计 -->
<!-- 资产性质 -->
<div :style="`height:calc(${boxHeight.height} - 55px)`">
<div class="title">
<span>监测运行统计</span>
<div class="titleNum">
( 合格:
<span class="mr10" style="color: #2dcd28" @click="LookMap(linList[0].lineListOne, [], 0)">
{{ linList[0].lineNumOne || 0 }}
</span>
告警:
<span style="color: #a52a2a" @click="LookMap(linList[0].lineListOne, [], 0)">
{{ linList[0].lineNumTwo || 0 }}
</span>
)
</div>
</div>
<div style="display: flex" class="mt2">
<img src="@/assets/img/FGX.png" />
</div>
<div :style="`height:calc(${boxHeight.height} - 100px);overflow-y: auto;`" class="BoxA mt10">
<div class="card-Box" v-for="item in linList">
<div>
<div class="card-Box" v-for="item in linList.slice(1)">
<div class="num num2">
<div style="text-align: left">
<span class="line"></span>
<span class="vol">{{ item.title[0] }}</span>
<i class="vol">{{ item.title[0] }}</i>
</div>
<div class="num">
<div>
{{ item.title[1] }}:
<span style="color: #2dcd28" @click="LookMap(item.lineListOne, [], 0)">
@@ -119,7 +141,7 @@
</div>
<div>
{{ item.title[2] }}:
<span style="color: #A52a2a" @click="LookMap([], item.lineListTwo, 1)">
<span style="color: #a52a2a" @click="LookMap([], item.lineListTwo, 1)">
{{ item.lineNumTwo || 0 }}
</span>
</div>
@@ -129,8 +151,12 @@
</div>
</div>
<img class="imgL" :style="show ? 'transform: rotate(0deg);' : 'transform: rotate(180deg);'"
@click="show = !show" src="@/assets/img/QH.png" />
<img
class="imgL"
:style="show ? 'transform: rotate(0deg);' : 'transform: rotate(180deg);'"
@click="show = !show"
src="@/assets/img/QH.png"
/>
<!-- 变电站详情 -->
<stand ref="standRef" />
@@ -282,15 +308,16 @@ const countList: any = ref([
title: '电网侧监测点',
num: 0,
onLineNum: 0,
integrityRate: 0
integrityRate: 0,
onLineRate: 0
},
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }
{ title: '非电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0, onLineRate: 0 }
]
},
{
title: '上送网公司',
children: [{ title: '电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }]
}
// {
// title: '上送网公司',
// children: [{ title: '电网侧监测点', num: 0, onLineNum: 0, integrityRate: 0 }]
// }
])
const linList: any = ref([
{
@@ -307,7 +334,7 @@ const linList: any = ref([
title: ['电能质量指标', '未超标', '超标']
}
])
const vList = ['', '500kV', '220kV', '110kV', '35kV',]
const vList = ['', '500kV', '220kV', '110kV', '35kV']
const formRow: any = ref({})
const height = mainHeight(30)
const boxHeight = mainHeight(290, 2)
@@ -364,11 +391,11 @@ const info = async (row: any) => {
numOneList: []
})
})
// 监测点指标统计
// 资产性质
getGridDiagramStatistics(form).then(res => {
countList.value[0].children[0] = { title: '电网侧监测点', ...res.data.data[0] }
countList.value[0].children[1] = { title: '非电网侧监测点', ...res.data.data[1] }
countList.value[1].children[0] = { title: '电网侧监测点', ...res.data.gwData[0] }
// countList.value[1].children[0] = { title: '电网侧监测点', ...res.data.gwData[0] }
})
// 监测运行统计
getGridDiagramRunData(form).then(res => {
@@ -504,13 +531,13 @@ defineExpose({ info, show })
// grid-template-rows: 1fr 1fr;
display: flex;
flex-direction: column;
justify-content: space-evenly;
justify-content: space-around;
// align-items: center;
margin: 0 5px 5px;
padding: 10px;
background-color: #edededc0;
border-radius: 10px;
min-height: 60px;
min-height: 40px;
max-height: 120px;
.line {
@@ -536,12 +563,28 @@ defineExpose({ info, show })
font-weight: 550;
}
}
.num1 {
grid-template-columns: 1fr 1fr;
grid-template-rows: auto auto;
gap: 15px;
div {
display: flex;
padding-left: 20px;
span {
margin-left: 5px;
}
}
}
.num2 {
display: grid;
grid-template-columns: 1fr 1fr 1fr !important;
}
}
.BoxA {
display: grid;
grid-template-columns: 1fr 1fr;
grid-template-rows: 1fr 1fr;
grid-template-columns: 1fr;
grid-template-rows: 1fr 1fr 1fr;
// grid-template-rows: 80px;
.num {
@@ -592,4 +635,13 @@ defineExpose({ info, show })
:deep(.el-dialog__body) {
max-height: none !important;
}
.titleNum {
font-size: 13px;
font-weight: normal;
margin-left: 5px;
span {
font-weight: 600;
cursor: pointer;
}
}
</style>

View File

@@ -1,272 +1,218 @@
<template>
<!-- 综合评估详情 -->
<el-dialog draggable title="综合评估统计" v-model="dialogVisible" width="1400px">
<div>
<vxe-table v-bind="defaultAttribute" ref="vxeRef" height="300px" :data="tableData">
<el-dialog draggable title="稳态电能质量水平评估" v-model="dialogVisible" width="1400px">
<div class="title mb5">
<span>区域污染水平评估</span>
</div>
<div style="display: flex">
<div style="width: 400px">
<vxe-table
v-bind="defaultAttribute"
ref="tableRef"
@cell-click="currentChangeEvent"
height="250px"
:row-config="{ isCurrent: true, isHover: true }"
:data="tableData"
style="cursor: pointer"
>
<vxe-column field="deptName" title="地市" />
<vxe-column field="assessLevel" title="综合评估结论">
<template #default="scope">
<!-- class="conclusion"
:class="
scope.row.assessLevel == '特质'
? 'background1'
: scope.row.assessLevel == '较差'
? 'background2'
: scope.row.assessLevel == '极差'
? 'background3'
: ''
" -->
<span>
{{ scope.row.assessData }}
</span>
</template>
</vxe-column>
<vxe-column field="qualifyData" title="指标合格率(%)" />
<!-- <vxe-colgroup title="评估结论">
<vxe-column field="vdevAssessLevel" title="电压偏差">
<vxe-column field="score" title="污染值" sortable>
<template #default="scope">
<span
class="conclusion"
:class="
scope.row.vdevAssessLevel == '特质'
? 'background1'
: scope.row.vdevAssessLevel == '较差'
? 'background2'
: scope.row.vdevAssessLevel == '极差'
? 'background3'
: ''
"
:style="{
color: setColor(scope.row.score)
}"
>
{{ scope.row.vdevAssessLevel }}
{{ scope.row.score }}
</span>
</template>
</vxe-column>
<vxe-column field="freqAssessLevel" title="频率偏差">
<template #default="scope">
<span
class="conclusion"
:class="
scope.row.freqAssessLevel == '特质'
? 'background1'
: scope.row.freqAssessLevel == '较差'
? 'background2'
: scope.row.freqAssessLevel == '极差'
? 'background3'
: ''
"
>
{{ scope.row.freqAssessLevel }}
</span>
</template>
</vxe-column>
<vxe-column field="harmAssessLevel" title="电压总谐波畸变率">
<template #default="scope">
<span
class="conclusion"
:class="
scope.row.harmAssessLevel == '特质'
? 'background1'
: scope.row.harmAssessLevel == '较差'
? 'background2'
: scope.row.harmAssessLevel == '极差'
? 'background3'
: ''
"
>
{{ scope.row.harmAssessLevel }}
</span>
</template>
</vxe-column>
<vxe-column field="flickerAssessLevel" title="电压闪变">
<template #default="scope">
<span
class="conclusion"
:class="
scope.row.flickerAssessLevel == '特质'
? 'background1'
: scope.row.flickerAssessLevel == '较差'
? 'background2'
: scope.row.flickerAssessLevel == '极差'
? 'background3'
: ''
"
>
{{ scope.row.flickerAssessLevel }}
</span>
</template>
</vxe-column>
<vxe-column field="unbalanceAssessLevel" title="三相电压不平衡度">
<template #default="scope">
<span
class="conclusion"
:class="
scope.row.unbalanceAssessLevel == '特质'
? 'background1'
: scope.row.unbalanceAssessLevel == '较差'
? 'background2'
: scope.row.unbalanceAssessLevel == '极差'
? 'background3'
: ''
"
>
{{ scope.row.unbalanceAssessLevel }}
</span>
</template>
</vxe-column>
</vxe-colgroup> -->
</vxe-table>
</div>
<div style="height: 300px; margin-top: 10px; position: relative" v-loading="loading">
<!-- <el-select
v-model="time"
size="small"
@change="analysis"
<div class="ml10" style="width: 990px">
<vxe-table
v-bind="defaultAttribute"
@cell-click="clickAttribute"
v-loading="loadingTab"
ref="vxeRef"
height="250px"
:data="subdata"
style="cursor: pointer"
>
<el-option label="" value="1" />
<el-option label="月" value="3" />
</el-select> -->
<div style="position: absolute; width: 100px; top: 0px; right: 0px; z-index: 1">
<el-radio-group v-model="city" size="small" @change="analysis">
<el-radio-button label="0"></el-radio-button>
<el-radio-button label="1"></el-radio-button>
</el-radio-group>
<el-radio-group v-model="type" size="small" @change="analysis">
<el-radio-button label="1"></el-radio-button>
<el-radio-button label="3"></el-radio-button>
</el-radio-group>
<vxe-column type="seq" width="70" title="序号"></vxe-column>
<vxe-column field="subName" title="变电站名称" min-width="120"></vxe-column>
<vxe-column field="lineName" title="监测点名称" align="center" min-width="120"></vxe-column>
<vxe-column field="objName" title="监测对象名称" align="center" min-width="100"></vxe-column>
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="100"></vxe-column>
<vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column>
<vxe-column field="vharmonicValue" title="污染值" sortable min-width="80">
<template #default="scope">
<span
:style="{
color: setColor(scope.row.vharmonicValue)
}"
>
{{ scope.row.vharmonicValue }}
</span>
</template>
</vxe-column>
</vxe-table>
</div>
</div>
<div class="title mb5 mt10">
<span>敏感及重要用户评估</span>
</div>
<div style="height: 265px; position: relative" v-loading="loading">
<vxe-table
v-bind="defaultAttribute"
ref="tableRef1"
@cell-click="pollutionClick"
height="265px"
:row-config="{ isCurrent: true, isHover: true }"
:data="pollutionValueList"
style="cursor: pointer"
>
<vxe-column title="序号" width="60" type="seq"></vxe-column>
<vxe-column field="gdName" title="供电公司" Width="150" />
<vxe-column field="subStationName" title="变电站" />
<vxe-column field="projectName" title="项目名称" />
<vxe-column field="subValue" title="谐波电压污染值" width="150" />
</vxe-table>
<MyEChart style="height: 300px" :options="picEChart" />
<!-- <MyEChart style="height: 300px" :options="picEChart" @echartClick="echartClick" /> -->
</div>
</el-dialog>
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, nextTick } from 'vue'
import MyEChart from '@/components/echarts/MyEchart.vue'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { getAssessDetail, getAssessTrend } from '@/api/device-boot/panorama'
import { useDictData } from '@/stores/dictData'
import { getAssessDetail, getAssessTrend, downPollutionSensitiveUser } from '@/api/device-boot/panorama'
import { useRoute } from 'vue-router'
const router = useRouter()
const dictData = useDictData()
const dialogVisible: any = ref(false)
const rowList: any = ref({})
const type = ref('1')
const city = ref('0')
const loading = ref(false)
const tableData: any = ref([])
const subdata: any = ref([])
const picEChart = ref()
const open = async (row: any) => {
getAssessDetail(row).then(res => {
tableData.value = res.data
const pollutionValueList = ref([])
const tableRef = ref()
const loadingTab = ref(false)
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
const open = async (row: any, list: any) => {
console.log('🚀 ~ open ~ list:', list)
// getAssessDetail(row).then(res => {
tableData.value = list
subdata.value = tableData.value[0]?.powerFlagPollutionList || []
nextTick(() => {
setTimeout(() => {
tableRef.value?.setCurrentRow(tableData.value[0])
}, 0)
})
// })
rowList.value = row
analysis()
dialogVisible.value = true
}
const currentChangeEvent = async () => {
loadingTab.value = true
setTimeout(() => {
subdata.value = tableRef.value.getCurrentRecord()?.powerFlagPollutionList || []
loadingTab.value = false
}, 1000)
}
const analysis = () => {
loading.value = true
let time = rowList.value.searchBeginTime.slice(0, 4) + `-01-01`
getAssessTrend({ ...rowList.value, searchBeginTime: time, type: type.value, areaType: city.value }).then(res => {
picEChart.value = {
title: {
text: '各地市综合评估趋势对比'
},
legend: {
right: 120,
top: 20
},
// tooltip: {
// formatter: function (params: any) {
// // console.log(123, params)
downPollutionSensitiveUser({ ...rowList.value, ids: [PollutionList[0].id], deptId: rowList.value.id }).then(res => {
pollutionValueList.value = res.data.filter((item: any) => item.subValue != null)
// const first10Items = res.data.slice(0, 10)
// picEChart.value = {
// title: {
// text: '污染值排名前十敏感及重要用户'
// },
// var tips = ''
// for (var i = 0; i < params.length; i++) {
// console.log('🚀 ~ getAssessTrend ~ params[i].value:', params[i].value)
// tips +=
// params[i].seriesName +
// ':' +
// `<span style="color:${
// params[i].value > 4.5
// ? ''
// : params[i].value > 4
// ? ''
// : params[i].value > 3
// ? ''
// : params[i].value > 2
// ? '#97017e'
// : params[i].value > 0
// ? '#A52a2a'
// : ''
// }">
// ${
// params[i].value > 4.5
// ? '优质'
// : params[i].value > 4
// ? '良好'
// : params[i].value > 3
// ? '一般'
// : params[i].value > 2
// ? '较差'
// : params[i].value > 0
// ? '极差'
// : ''
// }
// </span>` +
// '</br>'
// }
// return tips
// xAxis: {
// name: '',
// data: first10Items.map((item: any) => item.projectName.split('(')[0].trim()),
// axisLabel: {
// rotate: 20 // 核心:倾斜 45 度(推荐 30/45/60角度太大易读性差
// }
// },
xAxis: {
name: '时间',
data: res.data[0].children.map((item: any) => item.dataTime)
},
// grid: {
// bottom: 10
// },
// legend: {
// show: false
// },
// yAxis: {
// name: ''
// },
// options: {
// dataZoom: false,
// series: [
// {
// // name: time[i],
// name: '污染值',
// type: 'bar',
// data: first10Items.map((item: any) => item.subValue),
// itemStyle: {
// color: function (params) {
// // params.value 是当前柱子的数值
// const value = params.value
// return setColor(value)
// }
// }
// }
// ]
// }
// }
grid: {
bottom: '10px',
top: '60px'
},
yAxis: {
name: ''
},
options: {
dataZoom: false,
series: []
}
}
let list: any = []
let time: any = []
let mun: any = []
res.data.forEach((item: any, num: any) => {
time.push(item.deptName)
list.push([])
item.children.forEach((val: any, i: any) => {
mun.push(val.score == 3.14159 ? null : val.score)
list[num].push(val.score == 3.14159 ? null : val.score)
})
})
list.forEach((item: any, i: any) => {
picEChart.value.options.series.push({
name: time[i],
type: 'line',
data: item
})
})
picEChart.value.yAxis.min = Math.min(...mun) < 1 ? 0 : (Math.min(...mun) - 0.5).toFixed(2)
picEChart.value.yAxis.max = Math.max(...mun) > 4.5 ? 5 : (Math.max(...mun) + 0.5).toFixed(2)
loading.value = false
})
}
const setColor = val => {
return val == 3.14159
? ''
: val > 10000
? '#A52a2a'
: val > 1000
? '#ff9900'
: val > 100
? '#ffcc33'
: val > 0
? '#3399ff'
: val == 0
? '#00B07D'
: ''
}
const pollutionClick = (res: any) => {
router.push({
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
query: {
type: '4',
name: res.row.projectName,
t: Date.now()
}
})
}
const clickAttribute = (row: any) => {
router.push({
name: 'harmonic-boot/qydetailedAnalysis/pollutionReport',
query: {
type: '1',
name: row.row.lineName,
t: Date.now()
}
})
}
defineExpose({ open })
</script>
<style lang="scss" scoped>
@@ -290,10 +236,25 @@ defineExpose({ open })
color: #fff;
}
.background3 {
background-color: #A52a2a;
background-color: #a52a2a;
color: #fff;
}
:deep(.el-select) {
min-width: 80px !important;
}
.title {
display: flex;
justify-content: space-between;
position: relative;
span {
font-weight: 550;
font-size: 18px;
}
.WarningFilled {
width: 16px;
cursor: pointer;
}
}
</style>

Some files were not shown because too many files have changed in this diff Show More