Compare commits
11 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
48472bdb85 | ||
|
|
fafc5f82c4 | ||
| 93ee7e4034 | |||
|
|
7d2ce51510 | ||
|
|
9202da17f1 | ||
|
|
30eddd0572 | ||
|
|
15bd1ac6d2 | ||
|
|
f5c76c1b7a | ||
|
|
b25515b5db | ||
|
|
bfa061fb03 | ||
|
|
15e3d4aec8 |
@@ -1504,7 +1504,7 @@ window.BMAP_AUTHENTIC_KEY = "Yp57V71dkOPiXjiN8VdcFRsVELzlVNKK";
|
|||||||
for (d in b) c = c + "&" + d + "=" + encodeURIComponent(b[d]);
|
for (d in b) c = c + "&" + d + "=" + encodeURIComponent(b[d]);
|
||||||
var e = function (a) {
|
var e = function (a) {
|
||||||
a && (rb = o, setTimeout(function () {
|
a && (rb = o, setTimeout(function () {
|
||||||
sb.src = B.oc + "images/blank.gif?" + a.src
|
// sb.src = B.oc + "images/blank.gif?" + a.src
|
||||||
}, 50))
|
}, 50))
|
||||||
},
|
},
|
||||||
f = function () {
|
f = function () {
|
||||||
|
|||||||
@@ -1536,7 +1536,7 @@ window.BMAP_AUTHENTIC_KEY = ''
|
|||||||
a &&
|
a &&
|
||||||
((ob = q),
|
((ob = q),
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
pb.src = B.Wc + 'images/blank.gif?' + a.src
|
// pb.src = B.Wc + 'images/blank.gif?' + a.src
|
||||||
}, 50))
|
}, 50))
|
||||||
},
|
},
|
||||||
g = function () {
|
g = function () {
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -1,5 +1,6 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
|
||||||
|
|
||||||
// 密码规则修改
|
// 密码规则修改
|
||||||
export function ruleUpdate(data) {
|
export function ruleUpdate(data) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -24,3 +25,77 @@ export function unlockRoot(data) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//根据客户端名查询信息
|
||||||
|
export function getClientInfoByPath() {
|
||||||
|
|
||||||
|
return createAxios({
|
||||||
|
url: '/user-boot/authClient/getAuthClientByName/njcn',
|
||||||
|
method: 'GET',
|
||||||
|
headers: {
|
||||||
|
'Content-Type': 'application/x-www-form-urlencoded'
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//客户端会话配置更新
|
||||||
|
export function updateClientSessionConfig(data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/user-boot/authClient/sessionConfigUpdate',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取用户配置
|
||||||
|
export function getUserConfig() {
|
||||||
|
return createAxios({
|
||||||
|
url: '/user-boot/password/getUserStrategyList',
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询系统列表
|
||||||
|
export function getSystemList() {
|
||||||
|
return createAxios({
|
||||||
|
url: '/system-boot/config/getSysConfigData',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//激活系统配置
|
||||||
|
export function activeSystemConfig(data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/system-boot/config/updateSysConfig',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//删除系统配置
|
||||||
|
export function deleteSystemConfig( data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/system-boot/config/removeSysConfigById',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//新增系统配置
|
||||||
|
export function addSystemConfig(data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/system-boot/config/addSysConfig',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//修改系统配置
|
||||||
|
export function updateSystemConfig(data) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/system-boot/config/updateSysConfig',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -129,7 +129,7 @@ export function queryAllByType(params: any) {
|
|||||||
//获取用户
|
//获取用户
|
||||||
export function selectUserList(data: any) {
|
export function selectUserList(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/supervision-boot/userReport/selectUserList',
|
url: '/device-boot/userReport/selectUserList',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -45,3 +45,13 @@ export const getLineOverLimitData = (id: string) => {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//导出数据总览
|
||||||
|
export function dataVerifyExcel(params: any) {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/dataVerify/dataVerifyExcel',
|
||||||
|
method: 'get',
|
||||||
|
params,
|
||||||
|
responseType: 'blob'
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -32,3 +32,12 @@ export function getDevTypeList() {
|
|||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const getDeviceTypeList = (params: any) => {
|
||||||
|
return createAxios({
|
||||||
|
url: '/device-boot/devType/pageDevTypeList',
|
||||||
|
method: 'POST',
|
||||||
|
data: params
|
||||||
|
})
|
||||||
|
}
|
||||||
103
src/api/device-boot/sensitiveLoadMange.ts
Normal file
103
src/api/device-boot/sensitiveLoadMange.ts
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 新增敏感用户
|
||||||
|
export function saveUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/pqSensitiveUser/save',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改敏感用户
|
||||||
|
export function updateUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/pqSensitiveUser/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除敏感用户
|
||||||
|
export function deleteUser(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/pqSensitiveUser/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 干扰源接入功能删除流程
|
||||||
|
*/
|
||||||
|
export const deleteUserReport = (data: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReport/deleteUserReport',
|
||||||
|
method: 'POST',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 提交表单数据
|
||||||
|
*/
|
||||||
|
export const submitFormData = (data: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReport/add',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据id获取用户档案录入的详细数据
|
||||||
|
export const getById = (data: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReport/getById',
|
||||||
|
method: 'get',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 提交表单数据
|
||||||
|
*/
|
||||||
|
export const addEditor = (data: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReportRenewal/addEditor',
|
||||||
|
method: 'POST',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据id获取用户档案录入的详细数据
|
||||||
|
export const getByDeptDevLine = (params: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/line/getByDeptDevLine',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 根据id获取用户档案录入的详细数据
|
||||||
|
*/
|
||||||
|
export const getUserReportUpdateById = (id: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReportRenewal/getUserReportUpdateById?businessId='+id,
|
||||||
|
method: 'POST',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 根据id获取用户档案录入的详细数据
|
||||||
|
export const getUserReportById = (id: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/userReport/getUserReportById?id='+id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
// 根据id查询文件信息集合
|
||||||
|
export const getFileById = (params: any) => {
|
||||||
|
return request({
|
||||||
|
url: '/device-boot/fileUrl/getFileById',
|
||||||
|
method: 'get',
|
||||||
|
params
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -2,13 +2,35 @@ import createAxios from '@/utils/request'
|
|||||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
|
|
||||||
//事件报告
|
//事件报告
|
||||||
|
// export function getEventReport(data) {
|
||||||
|
// return createAxios({
|
||||||
|
// url: '/event-boot/report/getEventReport',
|
||||||
|
// method: 'post',
|
||||||
|
// data
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
export function getEventReport(data) {
|
export function getEventReport(data) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
url: '/event-boot/report/getEventReport',
|
url: '/event-boot/report/createEventReport',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data
|
data,
|
||||||
|
responseType: 'blob'
|
||||||
|
}).then(async res => {
|
||||||
|
let load: any = await readJsonBlob(res)
|
||||||
|
if (load.code) {
|
||||||
|
if (load.data.code == 'A0011') {
|
||||||
|
ElMessage.warning('下载失败!')
|
||||||
|
} else {
|
||||||
|
ElMessage.warning(load.data.message)
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return res
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 生成报告
|
// 生成报告
|
||||||
export function getAreaReport(data) {
|
export function getAreaReport(data) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
|
|||||||
@@ -20,6 +20,14 @@ export function getAreaDept() {
|
|||||||
method: 'post'
|
method: 'post'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
// 承载能力评估去除前缀
|
||||||
|
export function getAreaDeptRemoveMode(params) {
|
||||||
|
return request({
|
||||||
|
url: '/user-boot/dept/loginDeptTree',
|
||||||
|
method: 'GET',
|
||||||
|
params: params
|
||||||
|
})
|
||||||
|
}
|
||||||
export function getOnlineRateDataCensus(data:any) {
|
export function getOnlineRateDataCensus(data:any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/device-boot/terminalOnlineRateData/getOnlineRateDataCensus',
|
url: '/device-boot/terminalOnlineRateData/getOnlineRateDataCensus',
|
||||||
|
|||||||
42
src/api/system-boot/MonitoringPoint.ts
Normal file
42
src/api/system-boot/MonitoringPoint.ts
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
//查询所有模板
|
||||||
|
export function getList(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/EventTemplate/getList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//字典树
|
||||||
|
export function getDictTree(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/DictTree",
|
||||||
|
method: "post",
|
||||||
|
params:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//新增模板
|
||||||
|
export function addData(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/EventTemplate/add",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//修改模板
|
||||||
|
export function updateData(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/EventTemplate/update",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//删除模板
|
||||||
|
export function deleteData(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/EventTemplate/delete",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
43
src/api/system-boot/ReportTemplate.ts
Normal file
43
src/api/system-boot/ReportTemplate.ts
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
//获取字典树数据
|
||||||
|
export function getDictTree(data) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/DictTree",
|
||||||
|
method: "post",
|
||||||
|
params:data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
//查询字典列表
|
||||||
|
export function getReportDictList(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/getReportDictList",
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//新增字典表
|
||||||
|
export function addDict(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/addDict",
|
||||||
|
method: "post",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//更新字典表
|
||||||
|
export function updateDict(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/updateDict",
|
||||||
|
method: "put",
|
||||||
|
data
|
||||||
|
});
|
||||||
|
}
|
||||||
|
//删除字典表
|
||||||
|
export function deleteDict(data: any) {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/reportDict/deleteDict",
|
||||||
|
method: "delete",
|
||||||
|
params:data
|
||||||
|
});
|
||||||
|
}
|
||||||
37
src/api/system-boot/area.ts
Normal file
37
src/api/system-boot/area.ts
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
//区域树形表格接口
|
||||||
|
export function areaTree(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/system-boot/area/areaTree',
|
||||||
|
method: 'post',
|
||||||
|
params: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function areaAdd(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/system-boot/area/add',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function areaDelete(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/system-boot/area/delete',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function update(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/system-boot/area/update',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function selectPid(data: any) {
|
||||||
|
return request({
|
||||||
|
url: '/system-boot/area/selectPid',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
File diff suppressed because one or more lines are too long
@@ -6,29 +6,40 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-tabs type="border-card">
|
<el-tabs type="border-card">
|
||||||
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
<el-tab-pane label="暂态波形上送" :style="'height:' + vhh">
|
||||||
<el-table stripe :data="Data" :height="height" border style="width: 100%"
|
<vxe-table
|
||||||
header-cell-class-name="table_header">
|
stripe
|
||||||
<el-table-column align="center" prop="number" label="事件段"></el-table-column>
|
:data="Data"
|
||||||
<el-table-column align="center" prop="number" label="波形起始点相位(°)">
|
:height="height"
|
||||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
border
|
||||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
style="width: 100%"
|
||||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
header-cell-class-name="table_header"
|
||||||
</el-table-column>
|
>
|
||||||
<el-table-column align="center" prop="number" label="跳变段电压变化率(V/ms)">
|
<vxe-column align="center" field="number" title="事件段"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
<vxe-colgroup align="center" field="number1" title="波形起始点相位(°)">
|
||||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
<vxe-column align="center" field="number2" title="A相"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
<vxe-column align="center" field="number3" title="B相"></vxe-column>
|
||||||
</el-table-column>
|
<vxe-column align="center" field="number4" title="C相"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="相位跳变(°)">
|
</vxe-colgroup>
|
||||||
<el-table-column align="center" prop="number" label="A相"></el-table-column>
|
<vxe-colgroup align="center" field="number" title="跳变段电压变化率(V/ms)">
|
||||||
<el-table-column align="center" prop="number" label="B相"></el-table-column>
|
<vxe-column align="center" field="number5" title="A相"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="C相"></el-table-column>
|
<vxe-column align="center" field="number6" title="B相"></vxe-column>
|
||||||
</el-table-column>
|
<vxe-column align="center" field="number7" title="C相"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="总分段数目"></el-table-column>
|
</vxe-colgroup>
|
||||||
<el-table-column align="center" prop="number" label="三相电压不平衡度(%)" width="180"></el-table-column>
|
<vxe-colgroup align="center" field="number" title="相位跳变(°)">
|
||||||
<el-table-column align="center" prop="number" label="触发类型"></el-table-column>
|
<vxe-column align="center" field="number8" title="A相"></vxe-column>
|
||||||
<el-table-column align="center" prop="number" label="暂降原因"></el-table-column>
|
<vxe-column align="center" field="number9" title="B相"></vxe-column>
|
||||||
</el-table>
|
<vxe-column align="center" field="number10" title="C相"></vxe-column>
|
||||||
|
</vxe-colgroup>
|
||||||
|
<vxe-column align="center" field="number11" title="总分段数目"></vxe-column>
|
||||||
|
<vxe-column
|
||||||
|
align="center"
|
||||||
|
field="number12"
|
||||||
|
title="三相电压不平衡度(%)"
|
||||||
|
width="180"
|
||||||
|
></vxe-column>
|
||||||
|
<vxe-column align="center" field="number13" title="触发类型"></vxe-column>
|
||||||
|
<vxe-column align="center" field="number14" title="暂降原因"></vxe-column>
|
||||||
|
</vxe-table>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -73,7 +84,25 @@ export default {
|
|||||||
subName: '',
|
subName: '',
|
||||||
waveDatas: [],
|
waveDatas: [],
|
||||||
|
|
||||||
Data: [],
|
Data: [
|
||||||
|
{
|
||||||
|
number: 1,
|
||||||
|
number1: 0,
|
||||||
|
number2: 0,
|
||||||
|
number3: 0,
|
||||||
|
number4: 0,
|
||||||
|
number5: 0,
|
||||||
|
number6: 0,
|
||||||
|
number7: 0,
|
||||||
|
number8: 0,
|
||||||
|
number9: 0,
|
||||||
|
number10: 0,
|
||||||
|
number11: 1,
|
||||||
|
number12: 0,
|
||||||
|
number13: '其他',
|
||||||
|
number14: '其他'
|
||||||
|
}
|
||||||
|
],
|
||||||
height: null,
|
height: null,
|
||||||
vhh: null,
|
vhh: null,
|
||||||
ptpass: '',
|
ptpass: '',
|
||||||
@@ -88,7 +117,7 @@ export default {
|
|||||||
zoom: ''
|
zoom: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() { },
|
created() {},
|
||||||
watch: {
|
watch: {
|
||||||
value: function (a, b) {
|
value: function (a, b) {
|
||||||
if (a == 2) {
|
if (a == 2) {
|
||||||
@@ -116,10 +145,10 @@ export default {
|
|||||||
this.zoom = 1 / document.body.style.zoom
|
this.zoom = 1 / document.body.style.zoom
|
||||||
if (this.flag) {
|
if (this.flag) {
|
||||||
// console.log(123);
|
// console.log(123);
|
||||||
this.vh = mainHeight(250).height
|
this.vh = mainHeight(280).height
|
||||||
} else {
|
} else {
|
||||||
// console.log(3333);
|
// console.log(3333);
|
||||||
this.vh = mainHeight(270).height
|
this.vh = mainHeight(305).height
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
query() {
|
query() {
|
||||||
@@ -197,6 +226,8 @@ export default {
|
|||||||
'#FF9999'
|
'#FF9999'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
console.log('🚀 ~ this.boxoList:', this.boxoList)
|
||||||
|
|
||||||
var option = {
|
var option = {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
top: '10px',
|
top: '10px',
|
||||||
@@ -239,7 +270,7 @@ export default {
|
|||||||
|
|
||||||
title: {
|
title: {
|
||||||
left: 'center',
|
left: 'center',
|
||||||
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.measurementPointName,
|
text: '发生时刻:' + this.boxoList.startTime + ' PT变化:' + this.boxoList.pt,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
@@ -378,6 +409,33 @@ export default {
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
series: [
|
series: [
|
||||||
|
{
|
||||||
|
name: '跳变期',
|
||||||
|
type: 'line',
|
||||||
|
data: [],
|
||||||
|
showSymbol: true, // 强制显示标记
|
||||||
|
symbol: 'rect', // 标记形状为方块
|
||||||
|
symbolSize: 10, // 方块大小
|
||||||
|
itemStyle: {
|
||||||
|
color: '#888888', // 方块颜色为灰色
|
||||||
|
borderWidth: 0
|
||||||
|
},
|
||||||
|
|
||||||
|
markArea: {
|
||||||
|
silent: true, // 不响应交互
|
||||||
|
itemStyle: { color: '#ccc' },
|
||||||
|
data: [
|
||||||
|
[
|
||||||
|
{ xAxis: '0' }, // 第一个跳变期起始
|
||||||
|
{ xAxis: '5' } // 第一个跳变期结束
|
||||||
|
],
|
||||||
|
[
|
||||||
|
{ xAxis: '210' }, // 第二个跳变期起始
|
||||||
|
{ xAxis: '220' } // 第二个跳变期结束
|
||||||
|
]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'A相',
|
name: 'A相',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
|
|||||||
1498
src/components/echarts/gaoji.js
Normal file
1498
src/components/echarts/gaoji.js
Normal file
File diff suppressed because it is too large
Load Diff
@@ -972,7 +972,7 @@ export default {
|
|||||||
align: "left",
|
align: "left",
|
||||||
},
|
},
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.8rem",
|
fontSize: "16",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -983,7 +983,7 @@ export default {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
itemDistance: 5,
|
itemDistance: 5,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.7rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
@@ -1019,14 +1019,14 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
text: "ms",
|
text: "ms",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
align: "high",
|
align: "high",
|
||||||
},
|
},
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
},
|
},
|
||||||
labels: {
|
labels: {
|
||||||
formatter: function () {
|
formatter: function () {
|
||||||
@@ -1046,7 +1046,7 @@ export default {
|
|||||||
onZero: false, //-----------重点
|
onZero: false, //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
// interval: 50,
|
// interval: 50,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
@@ -1077,7 +1077,7 @@ export default {
|
|||||||
// min: min.toFixed(2),
|
// min: min.toFixed(2),
|
||||||
opposite: false,
|
opposite: false,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
//minInterval: 1,
|
//minInterval: 1,
|
||||||
@@ -1090,7 +1090,7 @@ export default {
|
|||||||
onZero: false, //-----------重点
|
onZero: false, //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
return (value - 0).toFixed(2);
|
return (value - 0).toFixed(2);
|
||||||
@@ -1395,7 +1395,7 @@ export default {
|
|||||||
left: "center",
|
left: "center",
|
||||||
text: titlename,
|
text: titlename,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.8rem",
|
fontSize: "16",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -1406,7 +1406,7 @@ export default {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
itemDistance: 5,
|
itemDistance: 5,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.7rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
@@ -1437,7 +1437,7 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
text: "ms",
|
text: "ms",
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -1449,7 +1449,7 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
},
|
},
|
||||||
splitLine: {
|
splitLine: {
|
||||||
show: false,
|
show: false,
|
||||||
@@ -1464,7 +1464,7 @@ export default {
|
|||||||
onZero: false, //-----------重点
|
onZero: false, //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
// interval: 50,
|
// interval: 50,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
@@ -1498,7 +1498,7 @@ export default {
|
|||||||
// formatter: "{value}",
|
// formatter: "{value}",
|
||||||
// },
|
// },
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
},
|
},
|
||||||
//minInterval: 1,
|
//minInterval: 1,
|
||||||
@@ -1511,7 +1511,7 @@ export default {
|
|||||||
onZero: false, //-----------重点
|
onZero: false, //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: "0.6rem",
|
fontSize: "12",
|
||||||
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
color: _this.DColor ? "#fff" : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
return (value - 0).toFixed(2);
|
return (value - 0).toFixed(2);
|
||||||
|
|||||||
@@ -634,7 +634,7 @@ export default {
|
|||||||
left: 'center',
|
left: 'center',
|
||||||
text: title,
|
text: title,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.8rem',
|
fontSize: '16',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -645,7 +645,7 @@ export default {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
itemDistance: 5,
|
itemDistance: 5,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
@@ -681,7 +681,7 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
text: 'ms',
|
text: 'ms',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -691,7 +691,7 @@ export default {
|
|||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: '0.6rem'
|
fontSize: '12'
|
||||||
},
|
},
|
||||||
axisTick: {
|
axisTick: {
|
||||||
alignWithLabel: true
|
alignWithLabel: true
|
||||||
@@ -703,7 +703,7 @@ export default {
|
|||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
if (_this.valA != (value - 0).toFixed(0)) {
|
if (_this.valA != (value - 0).toFixed(0)) {
|
||||||
@@ -732,7 +732,7 @@ export default {
|
|||||||
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
min: min.toFixed(2) > 0 ? min.toFixed(2) - min.toFixed(2) * 0.1 : min.toFixed(2) * 1.1,
|
||||||
opposite: false,
|
opposite: false,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
//minInterval: 1,
|
//minInterval: 1,
|
||||||
@@ -745,7 +745,7 @@ export default {
|
|||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
return (value - 0).toFixed(2)
|
return (value - 0).toFixed(2)
|
||||||
@@ -1000,7 +1000,7 @@ export default {
|
|||||||
left: 'center',
|
left: 'center',
|
||||||
text: titlename,
|
text: titlename,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.8rem',
|
fontSize: '16',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1011,7 +1011,7 @@ export default {
|
|||||||
enabled: true,
|
enabled: true,
|
||||||
itemDistance: 5,
|
itemDistance: 5,
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
rich: {
|
rich: {
|
||||||
a: {
|
a: {
|
||||||
@@ -1042,7 +1042,7 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
text: 'ms',
|
text: 'ms',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
enabled: true,
|
enabled: true,
|
||||||
@@ -1061,10 +1061,10 @@ export default {
|
|||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: '0.6rem'
|
fontSize: '12'
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
if (_this.valB != (value - 0).toFixed(0)) {
|
if (_this.valB != (value - 0).toFixed(0)) {
|
||||||
@@ -1095,7 +1095,7 @@ export default {
|
|||||||
// formatter: "{value}",
|
// formatter: "{value}",
|
||||||
// },
|
// },
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
color: _this.DColor ? '#fff' : echartsColor.WordColor
|
||||||
},
|
},
|
||||||
//minInterval: 1,
|
//minInterval: 1,
|
||||||
@@ -1108,7 +1108,7 @@ export default {
|
|||||||
onZero: false //-----------重点
|
onZero: false //-----------重点
|
||||||
},
|
},
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
fontSize: '0.6rem',
|
fontSize: '12',
|
||||||
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
color: _this.DColor ? '#fff' : echartsColor.WordColor,
|
||||||
formatter: function (value, index) {
|
formatter: function (value, index) {
|
||||||
return (value - 0).toFixed(2)
|
return (value - 0).toFixed(2)
|
||||||
|
|||||||
@@ -16,18 +16,12 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<!-- <el-button v-if="view2 && senior" class="ml10" type="primary"
|
<!-- <el-button v-if="view2 && senior" class="ml10" type="primary" @click="AdvancedAnalytics">
|
||||||
@click="AdvancedAnalytics">高级分析</el-button> -->
|
高级分析
|
||||||
|
</el-button> -->
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-button
|
<el-button @click="backbxlb" icon="el-icon-Back" style="float: right">返回</el-button>
|
||||||
@click="backbxlb"
|
|
||||||
class="el-icon-refresh-right"
|
|
||||||
icon="el-icon-Back"
|
|
||||||
style="float: right"
|
|
||||||
>
|
|
||||||
返回
|
|
||||||
</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div v-loading="loading" style="height: calc(100vh - 190px)">
|
<div v-loading="loading" style="height: calc(100vh - 190px)">
|
||||||
@@ -108,12 +102,12 @@ const options = ref([
|
|||||||
const shushiboxiRef = ref()
|
const shushiboxiRef = ref()
|
||||||
const bxecharts = ref(mainHeight(95).height as any)
|
const bxecharts = ref(mainHeight(95).height as any)
|
||||||
const view2 = ref(true)
|
const view2 = ref(true)
|
||||||
const boxoList = ref(null)
|
const boxoList: any = ref(null)
|
||||||
const wp = ref(null)
|
const wp = ref(null)
|
||||||
const showBoxi = ref(true)
|
const showBoxi = ref(true)
|
||||||
const view3 = ref(false)
|
const view3 = ref(false)
|
||||||
const view4 = ref(false)
|
const view4 = ref(false)
|
||||||
const GJList = ref([])
|
const GJList = ref({})
|
||||||
|
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@@ -122,6 +116,7 @@ const open = async (row: any) => {
|
|||||||
row.loading = false
|
row.loading = false
|
||||||
if (res != undefined) {
|
if (res != undefined) {
|
||||||
boxoList.value = row
|
boxoList.value = row
|
||||||
|
boxoList.value.pt = res.data.pt
|
||||||
wp.value = res.data
|
wp.value = res.data
|
||||||
loading.value = false
|
loading.value = false
|
||||||
view4.value = true
|
view4.value = true
|
||||||
@@ -129,6 +124,7 @@ const open = async (row: any) => {
|
|||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
backbxlb()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const bxhandleClick = (tab: any) => {
|
const bxhandleClick = (tab: any) => {
|
||||||
@@ -168,10 +164,13 @@ const AdvancedAnalytics = () => {
|
|||||||
analysis({
|
analysis({
|
||||||
eventIndex: boxoList.value.eventId
|
eventIndex: boxoList.value.eventId
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
GJList.value = res.data
|
// GJList.value = res.data
|
||||||
view3.value = true
|
// view3.value = true
|
||||||
view2.value = false
|
// view2.value = false
|
||||||
})
|
})
|
||||||
|
GJList.value = {}
|
||||||
|
view3.value = true
|
||||||
|
view2.value = false
|
||||||
}
|
}
|
||||||
const changeView = () => {
|
const changeView = () => {
|
||||||
if (shushiboxiRef.value) shushiboxiRef.value.backbxlb()
|
if (shushiboxiRef.value) shushiboxiRef.value.backbxlb()
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('MQTT 初始化失败:', error)
|
// console.error('MQTT 初始化失败:', error)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ const onFullScreen = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleCommand = (key: string) => {
|
const handleCommand = async(key: string) => {
|
||||||
console.log(key)
|
console.log(key)
|
||||||
switch (key) {
|
switch (key) {
|
||||||
case 'adminInfo':
|
case 'adminInfo':
|
||||||
@@ -132,10 +132,17 @@ const handleCommand = (key: string) => {
|
|||||||
popupPwd.value.open()
|
popupPwd.value.open()
|
||||||
break
|
break
|
||||||
case 'layout':
|
case 'layout':
|
||||||
navTabs.closeTabs()
|
await window.location.reload()
|
||||||
window.localStorage.clear()
|
setTimeout(() => {
|
||||||
adminInfo.reset()
|
navTabs.closeTabs()
|
||||||
router.push({ name: 'login' })
|
window.localStorage.clear()
|
||||||
|
adminInfo.reset()
|
||||||
|
router.push({ name: 'login' })
|
||||||
|
}, 0)
|
||||||
|
// navTabs.closeTabs()
|
||||||
|
// window.localStorage.clear()
|
||||||
|
// adminInfo.reset()
|
||||||
|
// router.push({ name: 'login' })
|
||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -220,6 +220,57 @@ export const harmonicOptions = [
|
|||||||
{ label: '49次', value: 49 },
|
{ label: '49次', value: 49 },
|
||||||
{ label: '50次', value: 50 }
|
{ label: '50次', value: 50 }
|
||||||
]
|
]
|
||||||
|
export const harmonicOptions1 = [
|
||||||
|
{ label: '2次', value: 2 },
|
||||||
|
{ label: '3次', value: 3 },
|
||||||
|
{ label: '4次', value: 4 },
|
||||||
|
{ label: '5次', value: 5 },
|
||||||
|
{ label: '6次', value: 6 },
|
||||||
|
{ label: '7次', value: 7 },
|
||||||
|
{ label: '8次', value: 8 },
|
||||||
|
{ label: '9次', value: 9 },
|
||||||
|
{ label: '10次', value: 10 },
|
||||||
|
{ label: '11次', value: 11 },
|
||||||
|
{ label: '12次', value: 12 },
|
||||||
|
{ label: '13次', value: 13 },
|
||||||
|
{ label: '14次', value: 14 },
|
||||||
|
{ label: '15次', value: 15 },
|
||||||
|
{ label: '16次', value: 16 },
|
||||||
|
{ label: '17次', value: 17 },
|
||||||
|
{ label: '18次', value: 18 },
|
||||||
|
{ label: '19次', value: 19 },
|
||||||
|
{ label: '20次', value: 20 },
|
||||||
|
{ label: '21次', value: 21 },
|
||||||
|
{ label: '22次', value: 22 },
|
||||||
|
{ label: '23次', value: 23 },
|
||||||
|
{ label: '24次', value: 24 },
|
||||||
|
{ label: '25次', value: 25 },
|
||||||
|
{ label: '26次', value: 26 },
|
||||||
|
{ label: '27次', value: 27 },
|
||||||
|
{ label: '28次', value: 28 },
|
||||||
|
{ label: '29次', value: 29 },
|
||||||
|
{ label: '30次', value: 30 },
|
||||||
|
{ label: '31次', value: 31 },
|
||||||
|
{ label: '32次', value: 32 },
|
||||||
|
{ label: '33次', value: 33 },
|
||||||
|
{ label: '34次', value: 34 },
|
||||||
|
{ label: '35次', value: 35 },
|
||||||
|
{ label: '36次', value: 36 },
|
||||||
|
{ label: '37次', value: 37 },
|
||||||
|
{ label: '38次', value: 38 },
|
||||||
|
{ label: '39次', value: 39 },
|
||||||
|
{ label: '40次', value: 40 },
|
||||||
|
{ label: '41次', value: 41 },
|
||||||
|
{ label: '42次', value: 42 },
|
||||||
|
{ label: '43次', value: 43 },
|
||||||
|
{ label: '44次', value: 44 },
|
||||||
|
{ label: '45次', value: 45 },
|
||||||
|
{ label: '46次', value: 46 },
|
||||||
|
{ label: '47次', value: 47 },
|
||||||
|
{ label: '48次', value: 48 },
|
||||||
|
{ label: '49次', value: 49 },
|
||||||
|
{ label: '50次', value: 50 }
|
||||||
|
]
|
||||||
//简谐波次数
|
//简谐波次数
|
||||||
export const inharmonicOptions = [
|
export const inharmonicOptions = [
|
||||||
{ label: '0.5次', value: 1 },
|
{ label: '0.5次', value: 1 },
|
||||||
|
|||||||
@@ -50,14 +50,17 @@ class MQTT {
|
|||||||
if (this.client) {
|
if (this.client) {
|
||||||
throw new Error('MQTT 客户端已初始化')
|
throw new Error('MQTT 客户端已初始化')
|
||||||
}
|
}
|
||||||
|
const mqttUrl = localStorage.getItem('MqttUrl')
|
||||||
|
console.log('MQTT URL:', mqttUrl)
|
||||||
|
if (!mqttUrl || mqttUrl === 'null') {
|
||||||
|
return Promise.resolve()
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
// const mqttUrl =
|
// const mqttUrl =
|
||||||
// localStorage.getItem('MqttUrl') == 'null'
|
// localStorage.getItem('MqttUrl') == 'null'
|
||||||
// ? 'ws://192.168.1.68:8083/mqtt'
|
// ? 'ws://192.168.1.68:8083/mqtt'
|
||||||
// : localStorage.getItem('MqttUrl')
|
// : localStorage.getItem('MqttUrl')
|
||||||
const mqttUrl = localStorage.getItem('MqttUrl')
|
|
||||||
if (mqttUrl == 'null' || mqttUrl == null) return
|
|
||||||
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
||||||
this.setupEventListeners()
|
this.setupEventListeners()
|
||||||
|
|
||||||
@@ -78,12 +81,12 @@ class MQTT {
|
|||||||
|
|
||||||
this.client?.on('error', error => {
|
this.client?.on('error', error => {
|
||||||
clearTimeout(timeout)
|
clearTimeout(timeout)
|
||||||
console.error('MQTT 连接错误:', error)
|
console.log('MQTT 连接错误:', error)
|
||||||
reject(error)
|
reject(error)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('初始化 MQTT 失败:', error)
|
// console.log('初始化 MQTT 失败:', error)
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -132,7 +135,7 @@ class MQTT {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.client?.subscribe(this.topic, { qos: this.defaultOptions.qos, ...subscribeOptions }, error => {
|
this.client?.subscribe(this.topic, { qos: this.defaultOptions.qos, ...subscribeOptions }, error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('订阅失败:', error)
|
console.log('订阅失败:', error)
|
||||||
reject(error)
|
reject(error)
|
||||||
} else {
|
} else {
|
||||||
console.log('订阅成功')
|
console.log('订阅成功')
|
||||||
@@ -154,7 +157,7 @@ class MQTT {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.client?.unsubscribe(this.topic, error => {
|
this.client?.unsubscribe(this.topic, error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('取消订阅失败:', error)
|
console.log('取消订阅失败:', error)
|
||||||
reject(error)
|
reject(error)
|
||||||
} else {
|
} else {
|
||||||
console.log('取消订阅成功')
|
console.log('取消订阅成功')
|
||||||
@@ -189,7 +192,7 @@ class MQTT {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
this.client?.publish(this.topic, message, { qos: this.defaultOptions.qos, ...options }, error => {
|
this.client?.publish(this.topic, message, { qos: this.defaultOptions.qos, ...options }, error => {
|
||||||
if (error) {
|
if (error) {
|
||||||
console.error('消息发布失败:', error)
|
console.log('消息发布失败:', error)
|
||||||
reject(error)
|
reject(error)
|
||||||
} else {
|
} else {
|
||||||
console.log('消息发布成功')
|
console.log('消息发布成功')
|
||||||
|
|||||||
@@ -104,11 +104,11 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
if (token) {
|
if (token) {
|
||||||
;(config.headers as anyObj).Authorization = token
|
;(config.headers as anyObj).Authorization = token
|
||||||
} else {
|
} else {
|
||||||
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw=='
|
config.headers.Authorization = 'Basic bmpjbjpuamNucHFz'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') {
|
if (config.url == '/user-boot/user/generateSm2Key' || config.url == '/pqs-auth/oauth/token') {
|
||||||
config.headers.Authorization = 'Basic bmpjbnRlc3Q6bmpjbnBxcw=='
|
config.headers.Authorization = 'Basic bmpjbjpuamNucHFz'
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
@@ -145,12 +145,14 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
return refreshToken()
|
return refreshToken()
|
||||||
.then(res => {
|
.then(res => {
|
||||||
adminInfo.setToken(res.data.access_token, 'auth')
|
adminInfo.setToken(res.data.access_token, 'auth')
|
||||||
|
adminInfo.setToken(res.data.refresh_token, 'refresh')
|
||||||
window.requests.forEach(cb => cb(res.data.access_token))
|
window.requests.forEach(cb => cb(res.data.access_token))
|
||||||
window.requests = []
|
window.requests = []
|
||||||
|
|
||||||
return Axios(response.config)
|
return Axios(response.config)
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
|
window.location.reload()
|
||||||
adminInfo.removeToken()
|
adminInfo.removeToken()
|
||||||
router.push({ name: 'login' })
|
router.push({ name: 'login' })
|
||||||
return Promise.reject(err)
|
return Promise.reject(err)
|
||||||
|
|||||||
@@ -77,6 +77,7 @@ export default class TableStore {
|
|||||||
}
|
}
|
||||||
|
|
||||||
index() {
|
index() {
|
||||||
|
|
||||||
this.table.beforeSearchFun && this.table.beforeSearchFun()
|
this.table.beforeSearchFun && this.table.beforeSearchFun()
|
||||||
this.table.data = []
|
this.table.data = []
|
||||||
this.table.loading = true
|
this.table.loading = true
|
||||||
@@ -97,10 +98,12 @@ export default class TableStore {
|
|||||||
url: this.url,
|
url: this.url,
|
||||||
method: this.method
|
method: this.method
|
||||||
},
|
},
|
||||||
|
|
||||||
requestPayload(this.method, this.table.params, this.paramsPOST)
|
requestPayload(this.method, this.table.params, this.paramsPOST)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|
||||||
if (res.data) {
|
if (res.data) {
|
||||||
this.table.data = res.data.records || res.data
|
this.table.data = res.data.records || res.data
|
||||||
this.table.total = res.data?.total || res.data.length || 0
|
this.table.total = res.data?.total || res.data.length || 0
|
||||||
@@ -129,6 +132,7 @@ export default class TableStore {
|
|||||||
* @param data 携带数据
|
* @param data 携带数据
|
||||||
*/
|
*/
|
||||||
onTableAction = (event: string, data: anyObj) => {
|
onTableAction = (event: string, data: anyObj) => {
|
||||||
|
|
||||||
const actionFun = new Map([
|
const actionFun = new Map([
|
||||||
[
|
[
|
||||||
'search',
|
'search',
|
||||||
@@ -136,6 +140,7 @@ export default class TableStore {
|
|||||||
|
|
||||||
this.table.params.pageNum = 1
|
this.table.params.pageNum = 1
|
||||||
this.index()
|
this.index()
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -201,9 +206,10 @@ export default class TableStore {
|
|||||||
[
|
[
|
||||||
'export',
|
'export',
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
this.table.exportLoading = true
|
this.table.exportLoading = true
|
||||||
// this.index()
|
// this.index()
|
||||||
//console.log('export')
|
|
||||||
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
||||||
createAxios(
|
createAxios(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
|
|||||||
@@ -183,7 +183,7 @@ import TableHeader from '@/components/table/header/index.vue'
|
|||||||
import MyEChart from '@/components/echarts/MyEchart.vue'
|
import MyEChart from '@/components/echarts/MyEchart.vue'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { harmonicOptions } from '@/utils/dictionary'
|
import { harmonicOptions1 } from '@/utils/dictionary'
|
||||||
import { Select } from '@element-plus/icons-vue'
|
import { Select } from '@element-plus/icons-vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import {
|
import {
|
||||||
@@ -202,7 +202,7 @@ import html2canvas from 'html2canvas'
|
|||||||
import { yMethod } from '@/utils/echartMethod'
|
import { yMethod } from '@/utils/echartMethod'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
const props = defineProps(['rowList'])
|
const props = defineProps(['rowList'])
|
||||||
const harmonic = harmonicOptions.filter(item => item.value < 26)
|
const harmonic = harmonicOptions1.filter(item => item.value < 26)
|
||||||
const currentLod = ref(false)
|
const currentLod = ref(false)
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const size = ref(19)
|
const size = ref(19)
|
||||||
@@ -844,7 +844,7 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
.btnBox {
|
.btnBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.vxe-table--header thead tr:first-of-type th:first-of-type) {
|
:deep(.vxe-table--header thead tr:first-of-type th:first-of-type) {
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ const tableStore: any = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
text: '禁止接入',
|
text: '删除',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-Delete',
|
icon: 'el-icon-Delete',
|
||||||
render: 'confirmButton',
|
render: 'confirmButton',
|
||||||
@@ -165,11 +165,11 @@ const tableStore: any = new TableStore({
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
confirmButtonType: 'danger',
|
confirmButtonType: 'danger',
|
||||||
title: '确定禁止接入?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
remove({ ids: row.id }).then(() => {
|
remove({ ids: row.id }).then(() => {
|
||||||
ElMessage.success('禁止接入成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ defineExpose({ open })
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.formBox{
|
.formBox{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -57,7 +57,13 @@
|
|||||||
|
|
||||||
<el-form-item label="区域" prop="regionList">
|
<el-form-item label="区域" prop="regionList">
|
||||||
<!-- <el-cascader v-model="form.regionList" style="width: 100%" :props="props" :options="areaList" /> -->
|
<!-- <el-cascader v-model="form.regionList" style="width: 100%" :props="props" :options="areaList" /> -->
|
||||||
<el-cascader v-model="form.regionList" :props="props" :options="areaList" style="width: 100%" placeholder="请选择区域" />
|
<el-cascader
|
||||||
|
v-model="form.regionList"
|
||||||
|
:props="props"
|
||||||
|
:options="areaList"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择区域"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="详细地址:" prop="area">
|
<el-form-item label="详细地址:" prop="area">
|
||||||
@@ -95,7 +101,7 @@ import { mainHeight } from '@/utils/layout'
|
|||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import equipment from './equipment.vue'
|
import equipment from './equipment.vue'
|
||||||
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
||||||
import { getAreaDept } from '@/api/harmonic-boot/area'
|
import { getAreaDept, getAreaDeptRemoveMode } from '@/api/harmonic-boot/area'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'estimate/photovoltaic'
|
name: 'estimate/photovoltaic'
|
||||||
@@ -108,8 +114,9 @@ const disabled = ref(false)
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const equipmentRef = ref()
|
const equipmentRef = ref()
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'removeMode'
|
||||||
//const areaList: any = dictData.areaSelect()
|
//const areaList: any = dictData.areaSelect()
|
||||||
const areaList = ref([])
|
const areaList: any = ref([])
|
||||||
const userShow: any = ref('Power_Station_Users')
|
const userShow: any = ref('Power_Station_Users')
|
||||||
|
|
||||||
const form = ref({
|
const form = ref({
|
||||||
@@ -187,7 +194,8 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createBy', title: '创建者' },
|
{ field: 'createBy', title: '创建者' },
|
||||||
{ field: 'createTime', title: '创建日期' },
|
{ field: 'createTime', title: '创建日期' },
|
||||||
{
|
{
|
||||||
title: '操作',fixed: 'right',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
@@ -258,9 +266,7 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {}
|
||||||
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.userType = ''
|
tableStore.table.params.userType = ''
|
||||||
@@ -268,8 +274,6 @@ tableStore.table.params.userType = ''
|
|||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
|
|
||||||
|
|
||||||
})
|
})
|
||||||
const useChange = (e: string) => {
|
const useChange = (e: string) => {
|
||||||
userShow.value = uesrList.filter(item => item.id == e)[0].code
|
userShow.value = uesrList.filter(item => item.id == e)[0].code
|
||||||
@@ -278,10 +282,14 @@ const useChange = (e: string) => {
|
|||||||
const add = async () => {
|
const add = async () => {
|
||||||
disabled.value = false
|
disabled.value = false
|
||||||
title.value = '新增承载能力待评估用户'
|
title.value = '新增承载能力待评估用户'
|
||||||
|
if (VITE_FLAG) {
|
||||||
|
areaList.value = dictData.state.areaTree
|
||||||
|
} else {
|
||||||
|
await getAreaDept().then(res => {
|
||||||
|
areaList.value = JSON.parse(JSON.stringify(res.data))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
await getAreaDept().then(res => {
|
|
||||||
areaList.value = JSON.parse(JSON.stringify(res.data))
|
|
||||||
})
|
|
||||||
dialogVisible.value = true
|
dialogVisible.value = true
|
||||||
}
|
}
|
||||||
// 保存
|
// 保存
|
||||||
|
|||||||
@@ -40,7 +40,14 @@
|
|||||||
></Table>
|
></Table>
|
||||||
</div>
|
</div>
|
||||||
<div class="pd10" style="width: 400px" v-loading="loading">
|
<div class="pd10" style="width: 400px" v-loading="loading">
|
||||||
<el-input v-model="filterText" placeholder="请输入内容" clearable maxlength="32" show-word-limit @input="change">
|
<el-input
|
||||||
|
v-model="filterText"
|
||||||
|
placeholder="请输入内容"
|
||||||
|
clearable
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
@input="change"
|
||||||
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
@@ -139,7 +146,7 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top" >
|
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
||||||
<el-input
|
<el-input
|
||||||
v-model.trim.number="formData.nodeDevNum"
|
v-model.trim.number="formData.nodeDevNum"
|
||||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||||
@@ -273,7 +280,7 @@ const tableStore = new TableStore({
|
|||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '名称', field: 'name' },
|
{ title: '名称', field: 'name' },
|
||||||
{ title: 'IP', field: 'ip' ,width:'120px' },
|
{ title: 'IP', field: 'ip', width: '120px' },
|
||||||
{
|
{
|
||||||
title: '等级',
|
title: '等级',
|
||||||
field: 'nodeGrade',
|
field: 'nodeGrade',
|
||||||
@@ -317,7 +324,8 @@ const tableStore = new TableStore({
|
|||||||
{ title: '描述', field: 'remark' },
|
{ title: '描述', field: 'remark' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',fixed: 'right',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -376,8 +384,8 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
if (hasDevices.value) {
|
if (hasDevices.value) {
|
||||||
ElMessage.warning('此前置机绑定了设备,无法删除!');
|
ElMessage.warning('此前置机绑定了设备,无法删除!')
|
||||||
return;
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
delNode(row.id).then(res => {
|
delNode(row.id).then(res => {
|
||||||
@@ -386,7 +394,7 @@ const tableStore = new TableStore({
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '分配终端',
|
title: '分配终端',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
@@ -399,10 +407,10 @@ const tableStore = new TableStore({
|
|||||||
title: '确定分配终端吗?'
|
title: '确定分配终端吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
if (!hasDevices.value) {
|
// if (!hasDevices.value) {
|
||||||
ElMessage.warning('此前置机下无设备,无法分配终端!');
|
// ElMessage.warning('此前置机下无设备,无法分配终端!')
|
||||||
return;
|
// return
|
||||||
}
|
// }
|
||||||
allotTerminal({
|
allotTerminal({
|
||||||
nodeId: row.id
|
nodeId: row.id
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -410,7 +418,7 @@ const tableStore = new TableStore({
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -448,26 +456,25 @@ const currentChangeEvent = () => {
|
|||||||
// 检查返回的数据是否存在且不为空
|
// 检查返回的数据是否存在且不为空
|
||||||
if (res.data && res.data.processDeviceList) {
|
if (res.data && res.data.processDeviceList) {
|
||||||
// 检查是否有设备绑定
|
// 检查是否有设备绑定
|
||||||
const hasAnyDevices = res.data.processDeviceList.some(item =>
|
const hasAnyDevices = res.data.processDeviceList.some(
|
||||||
item.deviceInfoList && item.deviceInfoList.length > 0
|
item => item.deviceInfoList && item.deviceInfoList.length > 0
|
||||||
);
|
)
|
||||||
hasDevices.value = hasAnyDevices;
|
hasDevices.value = hasAnyDevices
|
||||||
|
|
||||||
dataSource.value = res.data.processDeviceList.filter(item => {
|
dataSource.value = res.data.processDeviceList.filter(item => {
|
||||||
item.name = item.processNo + '';
|
item.name = item.processNo + ''
|
||||||
return true; // 保持原有的过滤逻辑
|
return true // 保持原有的过滤逻辑
|
||||||
});
|
})
|
||||||
} else {
|
} else {
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
hasDevices.value = false;
|
hasDevices.value = false
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 添加错误处理,确保 loading 状态也能关闭
|
// 添加错误处理,确保 loading 状态也能关闭
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
hasDevices.value = false;
|
hasDevices.value = false
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -476,7 +483,7 @@ const currentChangeEvent = () => {
|
|||||||
|
|
||||||
// 重启进程
|
// 重启进程
|
||||||
const restart = (data: any) => {
|
const restart = (data: any) => {
|
||||||
// console.log('🚀 ~ restart ~ data:', data)
|
// console.log('🚀 ~ restart ~ data:', data)
|
||||||
askRestartProcess({
|
askRestartProcess({
|
||||||
deviceRebootType: null,
|
deviceRebootType: null,
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeId.value,
|
||||||
@@ -518,7 +525,7 @@ const filterNode = (value: string, data: any, node: any) => {
|
|||||||
|
|
||||||
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||||
const chooseNode = (value: string, data: any, node: any) => {
|
const chooseNode = (value: string, data: any, node: any) => {
|
||||||
if (data.name.indexOf(value) !== -1) {
|
if ((data.subName + data.name).indexOf(value) !== -1) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
const level = node.level
|
const level = node.level
|
||||||
@@ -629,7 +636,7 @@ const addMenu = () => {}
|
|||||||
:deep(.default) {
|
:deep(.default) {
|
||||||
display: flex;
|
display: flex;
|
||||||
.row--current {
|
.row--current {
|
||||||
// background-color: var(--el-color-primary-light-8) !important;
|
// background-color: var(--el-color-primary-light-8) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader>
|
<TableHeader>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="终端型号">
|
<el-form-item label="终端型号">
|
||||||
<el-select v-model="tableStore.table.params.teriminal" clearable placeholder="请选择终端型号">
|
<el-select v-model="tableStore.table.params.devType" clearable placeholder="请选择终端型号">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminaloption"
|
v-for="item in teriminaloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端状态">
|
<el-form-item label="终端状态">
|
||||||
<el-select v-model="tableStore.table.params.teriminalstatus" clearable placeholder="请选择终端状态">
|
<el-select v-model="tableStore.table.params.runFlag" clearable placeholder="请选择终端状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in teriminalstatusoption"
|
v-for="item in teriminalstatusoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="通讯状态">
|
<el-form-item label="通讯状态">
|
||||||
<el-select v-model="tableStore.table.params.state" clearable placeholder="请选择通讯状态">
|
<el-select v-model="tableStore.table.params.comFlag" clearable placeholder="请选择通讯状态">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in stateoption"
|
v-for="item in stateoption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="筛选数据">
|
<!-- <el-form-item label="筛选数据">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
show-word-limit
|
show-word-limit
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<!-- <template #operation>
|
<!-- <template #operation>
|
||||||
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
<el-button icon="el-icon-Download" @click="add">导出</el-button>
|
||||||
@@ -252,9 +252,9 @@ const tableStore = new TableStore({
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.teriminal = ''
|
tableStore.table.params.devType = ''
|
||||||
tableStore.table.params.teriminalstatus = ''
|
tableStore.table.params.runFlag = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.comFlag = ''
|
||||||
tableStore.table.params.program = ''
|
tableStore.table.params.program = ''
|
||||||
tableStore.table.params.searchEvent = ''
|
tableStore.table.params.searchEvent = ''
|
||||||
tableStore.table.params.filterName = ''
|
tableStore.table.params.filterName = ''
|
||||||
|
|||||||
@@ -1740,8 +1740,8 @@ const optionarr = ref([
|
|||||||
])
|
])
|
||||||
/**母线类型 */
|
/**母线类型 */
|
||||||
const busBarType = ref([
|
const busBarType = ref([
|
||||||
{ name: '实际母线', value: 0 },
|
{ name: '真实母线', value: 1 },
|
||||||
{ name: '虚拟母线', value: 1 }
|
{ name: '虚拟母线', value: 0 }
|
||||||
])
|
])
|
||||||
const bigList: any = ref([])
|
const bigList: any = ref([])
|
||||||
const smallList: any = ref([])
|
const smallList: any = ref([])
|
||||||
@@ -1811,7 +1811,7 @@ const busBarDetail = ref({
|
|||||||
/**电压等级 */
|
/**电压等级 */
|
||||||
scale: '',
|
scale: '',
|
||||||
/**母线类型 */
|
/**母线类型 */
|
||||||
model: 0,
|
model: 1,
|
||||||
/**母线id */
|
/**母线id */
|
||||||
subvIndex: '',
|
subvIndex: '',
|
||||||
/**监测点 */
|
/**监测点 */
|
||||||
|
|||||||
107
src/views/pqs/business/terminal/sensitiveLoadMange/detail.vue
Normal file
107
src/views/pqs/business/terminal/sensitiveLoadMange/detail.vue
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog class="cn-operate-dialog" width="600px" v-model.trim="dialogVisible" :title="title">
|
||||||
|
<el-form :model="form" class="form-one" label-width="auto" ref="formRef" :rules="rules">
|
||||||
|
<el-form-item label="所属厂站名称" prop="substationName">
|
||||||
|
<el-input v-model.trim="form.substationName" placeholder="请输入所属厂站名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="敏感用户名称" prop="name">
|
||||||
|
<el-input v-model.trim="form.name" placeholder="请输入敏感用户名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="敏感负荷类型" prop="loadType">
|
||||||
|
<el-select v-model.trim="form.loadType" filterable clearable placeholder="请选择数据分类">
|
||||||
|
<el-option
|
||||||
|
v-for="item in DataTypeSelect"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户协议容量(MVA)" prop="userAgreementCapacity">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.number="form.userAgreementCapacity" placeholder="请输入用户协议容量"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="装机容量(MW)" prop="installedCapacity">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.number="form.installedCapacity" placeholder="请输入装机容量"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序" prop="sort">
|
||||||
|
<el-input-number style="width: 100%;" :min="0" maxlength="32" show-word-limit v-model.number="form.sort" placeholder="请输入排序"></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="submit">确认</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref,inject } from 'vue'
|
||||||
|
import { reactive } from 'vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import { queryByCode, queryCsDictTree } from '@/api/system-boot/dictTree'
|
||||||
|
import { saveUser, updateUser } from '@/api/device-boot/sensitiveLoadMange'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
|
const TypeOptions = ref()
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const DataTypeSelect = dictData.getBasicData('Interference_Source')
|
||||||
|
|
||||||
|
const tableStore = inject('tableStore') as TableStore
|
||||||
|
|
||||||
|
const formRef = ref()
|
||||||
|
const form = reactive<any>({
|
||||||
|
loadType: [],
|
||||||
|
substationName: null,
|
||||||
|
installedCapacity: null,
|
||||||
|
name: null,
|
||||||
|
userAgreementCapacity:null,
|
||||||
|
id: null,
|
||||||
|
sort:100
|
||||||
|
})
|
||||||
|
const rules = {
|
||||||
|
substationName: [{ required: true, message: '请输入所属厂站名称', trigger: 'blur' }],
|
||||||
|
name: [{ required: true, message: '请输入敏感用户名称', trigger: 'blur' }],
|
||||||
|
loadType: [{ required: true, message: '请输入请选择敏感负荷类型', trigger: 'blur' }],
|
||||||
|
installedCapacity: [{ required: true, message: '请输入用户协议容量', trigger: 'blur' }],
|
||||||
|
userAgreementCapacity: [{ required: true, message: '请输入装机容量', trigger: 'blur' }],
|
||||||
|
sort: [{ required: true, message: '请输入排序', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const title = ref('新增')
|
||||||
|
const open = (text: string, data?: anyObj) => {
|
||||||
|
formRef.value?.resetFields()
|
||||||
|
title.value = text
|
||||||
|
dialogVisible.value = true
|
||||||
|
if (data) {
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = data[key]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
for (let key in form) {
|
||||||
|
form[key] = null
|
||||||
|
form.sort = 100
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const submit = () => {
|
||||||
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.id) {
|
||||||
|
await updateUser(form)
|
||||||
|
} else {
|
||||||
|
await saveUser(form)
|
||||||
|
}
|
||||||
|
ElMessage.success('操作成功')
|
||||||
|
tableStore.index()
|
||||||
|
dialogVisible.value = false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ open })
|
||||||
|
</script>
|
||||||
117
src/views/pqs/business/terminal/sensitiveLoadMange/index.vue
Normal file
117
src/views/pqs/business/terminal/sensitiveLoadMange/index.vue
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader :showReset="false" showExport>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="关键字筛选">
|
||||||
|
<el-input
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
style="width: 240px"
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入敏感负荷名称"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
<detail ref="detail"></detail>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, onMounted, provide } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import Detail from './detail.vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import { deleteUser } from '@/api/device-boot/sensitiveLoadMange'
|
||||||
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'govern/sensitiveLoadMange/index'
|
||||||
|
})
|
||||||
|
const detail = ref()
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
const interferenceType = dictData.getBasicData('Interference_Source')
|
||||||
|
|
||||||
|
const tableStore: any = new TableStore({
|
||||||
|
url: '/device-boot/pqSensitiveUser/getList',
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
title: '序号',
|
||||||
|
width: 80,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '所属厂站名称', field: 'substationName', minWidth: 180 },
|
||||||
|
{ title: '敏感用户名称', field: 'name', minWidth: 180 },
|
||||||
|
{
|
||||||
|
title: '敏感负荷类型',
|
||||||
|
field: 'loadType',
|
||||||
|
minWidth: 120,
|
||||||
|
formatter: row => {
|
||||||
|
return interferenceType.filter(item => item.id == row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ title: '用户协议容量(MVA)', field: 'userAgreementCapacity', minWidth: 100 },
|
||||||
|
{ title: '装机容量(MW)', field: 'installedCapacity', minWidth: 100 },
|
||||||
|
{
|
||||||
|
title: '操作', fixed: 'right',
|
||||||
|
align: 'center',
|
||||||
|
width: '180',
|
||||||
|
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
detail.value.open('编辑', row)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'del',
|
||||||
|
title: '删除',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Delete',
|
||||||
|
render: 'confirmButton',
|
||||||
|
popconfirm: {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonType: 'danger',
|
||||||
|
title: '确定删除吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
deleteUser([row.id]).then(res => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
loadCallback: () => {}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
const addMenu = () => {
|
||||||
|
detail.value.open('新增')
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -400,13 +400,12 @@ import { uploadFile } from '@/api/system-boot/file'
|
|||||||
import {
|
import {
|
||||||
submitFormData,
|
submitFormData,
|
||||||
getById,
|
getById,
|
||||||
updateFormData,
|
|
||||||
addEditor,
|
addEditor,
|
||||||
resend,
|
getByDeptDevLine,
|
||||||
getByDeptDevLine
|
getUserReportUpdateById
|
||||||
} from '@/api/supervision-boot/interfere/index'
|
} from '@/api/device-boot/sensitiveLoadMange'
|
||||||
import { getSubstationSelect } from '@/api/device-boot/line'
|
import { getSubstationSelect } from '@/api/device-boot/line'
|
||||||
import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
// import { getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
|||||||
@@ -1,217 +1,225 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<div v-if="detailLoading" class="loading">
|
<div v-if="detailLoading" class="loading">
|
||||||
<el-spin description="加载中..." />
|
<el-spin description="加载中..." />
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-descriptions :column="2" border>
|
<el-descriptions :column="2" border label-width="200px">
|
||||||
<el-descriptions-item label="所在地市">
|
<el-descriptions-item label="所在地市">
|
||||||
{{ detailData.city }}
|
{{ detailData.city }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="项目名称">
|
<el-descriptions-item label="项目名称">
|
||||||
{{ detailData.projectName }}
|
{{ detailData.projectName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="工程预期投产日期">
|
<el-descriptions-item label="工程预期投产日期">
|
||||||
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
{{ formatDate(detailData.expectedProductionDate, 'YYYY-MM-DD') }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="经纬度">
|
<el-descriptions-item label="经纬度">
|
||||||
{{ detailData.longitude }} {{ detailData.latitude }}
|
{{ detailData.longitude }} {{ detailData.latitude }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="用户性质">
|
<el-descriptions-item label="用户性质">
|
||||||
{{
|
{{
|
||||||
userTypeList.find(item => {
|
userTypeList.find(item => {
|
||||||
return item.value == detailData.userType
|
return item.value == detailData.userType
|
||||||
})?.label
|
})?.label
|
||||||
}}
|
}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="归口管理部门">
|
<el-descriptions-item label="归口管理部门">
|
||||||
{{ detailData.responsibleDepartment }}
|
{{ detailData.responsibleDepartment }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="用户状态">
|
<el-descriptions-item label="用户状态">
|
||||||
{{
|
{{
|
||||||
userStateList.find(item => {
|
userStateList.find(item => {
|
||||||
return item.value == detailData.userStatus
|
return item.value == detailData.userStatus
|
||||||
})?.label
|
})?.label
|
||||||
}}
|
}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="厂站名称">
|
<el-descriptions-item label="厂站名称">
|
||||||
{{ detailData.substation }}
|
{{ detailData.substation }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="电压等级">
|
<el-descriptions-item label="电压等级">
|
||||||
{{
|
{{
|
||||||
voltageLevelList.find(item => {
|
voltageLevelList.find(item => {
|
||||||
return item.id == detailData.voltageLevel
|
return item.id == detailData.voltageLevel
|
||||||
})?.name
|
})?.name
|
||||||
}}
|
}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="非线性终端类型" v-if="detailData.userType == 0 || detailData.userType == 1">
|
<el-descriptions-item
|
||||||
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
label="非线性终端类型"
|
||||||
</el-descriptions-item>
|
v-if="detailData.userType == 0 || detailData.userType == 1"
|
||||||
<el-descriptions-item label="预测评估单位">
|
>
|
||||||
{{ detailData.evaluationDept }}
|
{{ proviteData.nonlinearDeviceType ? proviteData.nonlinearDeviceType : '-' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="预测评估结论" :span="2">
|
<el-descriptions-item label="预测评估单位">
|
||||||
{{ detailData.evaluationConclusion }}
|
{{ detailData.evaluationDept }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item
|
<el-descriptions-item label="预测评估结论" :span="2">
|
||||||
:label="
|
{{ detailData.evaluationConclusion }}
|
||||||
detailData.userType == '4' || detailData.userType == '5' ? '非线性设备类型: ' : '非线性负荷类型:'
|
</el-descriptions-item>
|
||||||
"
|
<el-descriptions-item
|
||||||
v-if="
|
:label="
|
||||||
detailData.userType == '2' ||
|
detailData.userType == '4' || detailData.userType == '5'
|
||||||
detailData.userType == '3' ||
|
? '非线性设备类型: '
|
||||||
detailData.userType == '4' ||
|
: '非线性负荷类型:'
|
||||||
detailData.userType == '5'
|
"
|
||||||
"
|
|
||||||
>
|
|
||||||
{{ proviteData.nonlinearLoadType }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="是否需要治理">
|
|
||||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
|
||||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
|
||||||
</span>
|
|
||||||
<span
|
|
||||||
v-if="
|
v-if="
|
||||||
detailData.userType == 2 ||
|
detailData.userType == '2' ||
|
||||||
detailData.userType == 3 ||
|
detailData.userType == '3' ||
|
||||||
detailData.userType == 4 ||
|
detailData.userType == '4' ||
|
||||||
detailData.userType == 5
|
detailData.userType == '5'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
{{ proviteData.nonlinearLoadType }}
|
||||||
</span>
|
</el-descriptions-item>
|
||||||
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
<el-descriptions-item label="是否需要治理">
|
||||||
</el-descriptions-item>
|
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||||
<el-descriptions-item label="是否开展背景测试">
|
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||||
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
</span>
|
||||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
<span
|
||||||
</span>
|
v-if="
|
||||||
<span
|
detailData.userType == 2 ||
|
||||||
|
detailData.userType == 3 ||
|
||||||
|
detailData.userType == 4 ||
|
||||||
|
detailData.userType == 5
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ proviteData.needGovernance == 0 ? '否' : '是' }}
|
||||||
|
</span>
|
||||||
|
<span v-if="detailData.userType == 6">{{ proviteData.needGovernance == 0 ? '否' : '是' }}</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="是否开展背景测试">
|
||||||
|
<span v-if="detailData.userType == 0 || detailData.userType == 1">
|
||||||
|
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||||
|
</span>
|
||||||
|
<span
|
||||||
|
v-if="
|
||||||
|
detailData.userType == 2 ||
|
||||||
|
detailData.userType == 3 ||
|
||||||
|
detailData.userType == 4 ||
|
||||||
|
detailData.userType == 5
|
||||||
|
"
|
||||||
|
>
|
||||||
|
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||||
|
</span>
|
||||||
|
<span v-if="detailData.userType == 6">
|
||||||
|
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
||||||
|
<span>
|
||||||
|
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
||||||
|
</span>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
label="用户协议容量(MVA)"
|
||||||
|
v-if="detailData.userType == 0 || detailData.userType == 1"
|
||||||
|
>
|
||||||
|
{{ proviteData.agreementCapacity }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="装机容量(MW)">
|
||||||
|
{{ detailData?.ratePower }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item
|
||||||
|
label="PCC供电设备容量(MVA)"
|
||||||
v-if="
|
v-if="
|
||||||
detailData.userType == 2 ||
|
detailData.userType == '2' ||
|
||||||
detailData.userType == 3 ||
|
detailData.userType == '3' ||
|
||||||
detailData.userType == 4 ||
|
detailData.userType == '4' ||
|
||||||
detailData.userType == 5
|
detailData.userType == '5'
|
||||||
"
|
"
|
||||||
>
|
>
|
||||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
{{ proviteData.pccEquipmentCapacity }}
|
||||||
</span>
|
</el-descriptions-item>
|
||||||
<span v-if="detailData.userType == 6">
|
<el-descriptions-item
|
||||||
{{ proviteData.backgroundTestPerformed == 0 ? '否' : '是' }}
|
label="基准短路容量(MVA)"
|
||||||
</span>
|
v-if="
|
||||||
</el-descriptions-item>
|
detailData.userType == '2' ||
|
||||||
|
detailData.userType == '3' ||
|
||||||
<el-descriptions-item label="是否开展抗扰度测试" v-if="detailData.userType == 6">
|
detailData.userType == '4' ||
|
||||||
<span>
|
detailData.userType == '5'
|
||||||
{{ proviteData.antiInterferenceTest == 0 ? '否' : '是' }}
|
"
|
||||||
</span>
|
>
|
||||||
</el-descriptions-item>
|
{{ proviteData.baseShortCircuitCapacity }}
|
||||||
<el-descriptions-item
|
</el-descriptions-item>
|
||||||
label="用户协议容量(MVA)"
|
<el-descriptions-item
|
||||||
v-if="detailData.userType == 0 || detailData.userType == 1"
|
label="系统最小短路容量(MVA)"
|
||||||
>
|
v-if="
|
||||||
{{ proviteData.agreementCapacity }}
|
detailData.userType == '2' ||
|
||||||
</el-descriptions-item>
|
detailData.userType == '3' ||
|
||||||
<el-descriptions-item label="装机容量(MW)">
|
detailData.userType == '4' ||
|
||||||
{{ detailData?.ratePower }}
|
detailData.userType == '5'
|
||||||
</el-descriptions-item>
|
"
|
||||||
<el-descriptions-item
|
>
|
||||||
label="PCC供电设备容量(MVA)"
|
{{ proviteData?.minShortCircuitCapacity }}
|
||||||
v-if="
|
</el-descriptions-item>
|
||||||
detailData.userType == '2' ||
|
<el-descriptions-item
|
||||||
detailData.userType == '3' ||
|
label="用户用电协议容量(MVA)"
|
||||||
detailData.userType == '4' ||
|
v-if="
|
||||||
detailData.userType == '5'
|
detailData.userType == '2' ||
|
||||||
"
|
detailData.userType == '3' ||
|
||||||
>
|
detailData.userType == '4' ||
|
||||||
{{ proviteData.pccEquipmentCapacity }}
|
detailData.userType == '5'
|
||||||
</el-descriptions-item>
|
"
|
||||||
<el-descriptions-item
|
>
|
||||||
label="基准短路容量(MVA)"
|
{{ proviteData?.userAgreementCapacity }}
|
||||||
v-if="
|
</el-descriptions-item>
|
||||||
detailData.userType == '2' ||
|
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||||
detailData.userType == '3' ||
|
{{ proviteData?.pccPoint }}
|
||||||
detailData.userType == '4' ||
|
</el-descriptions-item>
|
||||||
detailData.userType == '5'
|
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
||||||
"
|
{{
|
||||||
>
|
evaluationTypeList.find(item => {
|
||||||
{{ proviteData.baseShortCircuitCapacity }}
|
return item.id == proviteData?.evaluationType
|
||||||
</el-descriptions-item>
|
})?.name
|
||||||
<el-descriptions-item
|
}}
|
||||||
label="系统最小短路容量(MVA)"
|
</el-descriptions-item>
|
||||||
v-if="
|
<el-descriptions-item
|
||||||
detailData.userType == '2' ||
|
label="预测评估评审单位"
|
||||||
detailData.userType == '3' ||
|
v-if="detailData.userType != 0 && detailData.userType != 1"
|
||||||
detailData.userType == '4' ||
|
>
|
||||||
detailData.userType == '5'
|
{{ proviteData?.evaluationChekDept }}
|
||||||
"
|
</el-descriptions-item>
|
||||||
>
|
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
||||||
{{ proviteData?.minShortCircuitCapacity }}
|
{{
|
||||||
</el-descriptions-item>
|
industryList.find(item => {
|
||||||
<el-descriptions-item
|
return item.id == proviteData.industry
|
||||||
label="用户用电协议容量(MVA)"
|
})?.name
|
||||||
v-if="
|
}}
|
||||||
detailData.userType == '2' ||
|
</el-descriptions-item>
|
||||||
detailData.userType == '3' ||
|
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
||||||
detailData.userType == '4' ||
|
{{ proviteData.deviceName }}
|
||||||
detailData.userType == '5'
|
</el-descriptions-item>
|
||||||
"
|
<!-- <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
|
||||||
>
|
<!-- {{ proviteData.powerSupplyCount }}-->
|
||||||
{{ proviteData?.userAgreementCapacity }}
|
<!-- </el-descriptions-item>-->
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
|
||||||
<el-descriptions-item label="PCC点" v-if="detailData.userType != 0 && detailData.userType != 1">
|
{{
|
||||||
{{ proviteData?.pccPoint }}
|
powerSupplyInfoOptionList.find(item => {
|
||||||
</el-descriptions-item>
|
return item.id == proviteData.powerSupplyInfo
|
||||||
<el-descriptions-item label="评估类型" v-if="detailData.userType != 0 && detailData.userType != 1">
|
})?.name
|
||||||
{{
|
}}
|
||||||
evaluationTypeList.find(item => {
|
</el-descriptions-item>
|
||||||
return item.id == proviteData?.evaluationType
|
<el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
|
||||||
})?.name
|
{{ proviteData.powerSupply }}
|
||||||
}}
|
</el-descriptions-item>
|
||||||
</el-descriptions-item>
|
<el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
|
||||||
<el-descriptions-item label="预测评估评审单位" v-if="detailData.userType != 0 && detailData.userType != 1">
|
{{
|
||||||
{{ proviteData?.evaluationChekDept }}
|
loadLevelOptionList.find(item => {
|
||||||
</el-descriptions-item>
|
return item.id == proviteData.loadLevel
|
||||||
<el-descriptions-item label="行业" v-if="detailData.userType == 6">
|
})?.name
|
||||||
{{
|
}}
|
||||||
industryList.find(item => {
|
</el-descriptions-item>
|
||||||
return item.id == proviteData.industry
|
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
||||||
})?.name
|
{{
|
||||||
}}
|
energyQualityIndexList.find(item => {
|
||||||
</el-descriptions-item>
|
return item.id == proviteData.energyQualityIndex
|
||||||
<el-descriptions-item label="敏感终端名称" v-if="detailData.userType == 6">
|
})?.name
|
||||||
{{ proviteData.deviceName }}
|
}}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<!-- <el-descriptions-item label="供电电源数量" v-if="detailData.userType == 6">-->
|
</el-descriptions>
|
||||||
<!-- {{ proviteData.powerSupplyCount }}-->
|
|
||||||
<!-- </el-descriptions-item>-->
|
|
||||||
<el-descriptions-item label="供电电源情况" v-if="detailData.userType == 6">
|
|
||||||
{{
|
|
||||||
powerSupplyInfoOptionList.find(item => {
|
|
||||||
return item.id == proviteData.powerSupplyInfo
|
|
||||||
})?.name
|
|
||||||
}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="供电电源" :span="2" v-if="detailData.userType == 6">
|
|
||||||
{{ proviteData.powerSupply }}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="负荷级别" v-if="detailData.userType == 6">
|
|
||||||
{{
|
|
||||||
loadLevelOptionList.find(item => {
|
|
||||||
return item.id == proviteData.loadLevel
|
|
||||||
})?.name
|
|
||||||
}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
<el-descriptions-item label="敏感电能质量指标" v-if="detailData.userType == 6">
|
|
||||||
{{
|
|
||||||
energyQualityIndexList.find(item => {
|
|
||||||
return item.id == proviteData.energyQualityIndex
|
|
||||||
})?.name
|
|
||||||
}}
|
|
||||||
</el-descriptions-item>
|
|
||||||
</el-descriptions>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -220,14 +228,13 @@ import { onMounted, ref, reactive, watch } from 'vue'
|
|||||||
import { useRoute, useRouter } from 'vue-router'
|
import { useRoute, useRouter } from 'vue-router'
|
||||||
import { formatDate } from '@/utils/formatTime'
|
import { formatDate } from '@/utils/formatTime'
|
||||||
import { propTypes } from '@/utils/propTypes'
|
import { propTypes } from '@/utils/propTypes'
|
||||||
import { getUserReportById, getUserReportUpdateById } from '@/api/supervision-boot/userReport/form'
|
import { getById, getUserReportUpdateById, getByDeptDevLine, getFileById } from '@/api/device-boot/sensitiveLoadMange'
|
||||||
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
import { getDictTreeById } from '@/api/system-boot/dictTree'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
import { Link, View } from '@element-plus/icons-vue'
|
import { Link, View } from '@element-plus/icons-vue'
|
||||||
import PreviewFile from '@/components/PreviewFile/index.vue'
|
import PreviewFile from '@/components/PreviewFile/index.vue'
|
||||||
import { getByDeptDevLine } from '@/api/supervision-boot/interfere/index'
|
// import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { addOrUpdateFile, getFileById } from '@/api/supervision-boot/interfere/index'
|
|
||||||
defineOptions({ name: 'BpmUserReportDetail' })
|
defineOptions({ name: 'BpmUserReportDetail' })
|
||||||
|
|
||||||
const { query } = useRoute() // 查询参数
|
const { query } = useRoute() // 查询参数
|
||||||
@@ -340,7 +347,7 @@ const getInfo = async () => {
|
|||||||
getProviteData()
|
getProviteData()
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
await getUserReportById(props.id || queryId).then(res => {
|
await getById({ id: props.id || queryId }).then(res => {
|
||||||
detailData.value = res.data
|
detailData.value = res.data
|
||||||
|
|
||||||
getProviteData()
|
getProviteData()
|
||||||
@@ -385,7 +392,6 @@ const preview = (val: any, url: any) => {
|
|||||||
}
|
}
|
||||||
//预测评估报告
|
//预测评估报告
|
||||||
if (val == 'predictionEvaluationReport') {
|
if (val == 'predictionEvaluationReport') {
|
||||||
|
|
||||||
predictionEvaluationReportRef?.value.open(url)
|
predictionEvaluationReportRef?.value.open(url)
|
||||||
}
|
}
|
||||||
//预测评估评审意见报告
|
//预测评估评审意见报告
|
||||||
@@ -416,11 +422,11 @@ const preview = (val: any, url: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const queryFiles = () => {
|
const queryFiles = () => {
|
||||||
getFileById({ id: props.id }).then(res => {
|
// getFileById({ id: props.id }).then(res => {
|
||||||
res.data.forEach((item: any) => {
|
// res.data.forEach((item: any) => {
|
||||||
if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
// if (item.url.length > 0) getFileNamePaths(item.url, item.name)
|
||||||
})
|
// })
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
//判断userType选择取用的对象
|
//判断userType选择取用的对象
|
||||||
const getProviteData = async () => {
|
const getProviteData = async () => {
|
||||||
|
|||||||
@@ -34,11 +34,11 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
<el-dialog title="详情" width="60%" v-model="dialogShow" v-if="dialogShow">
|
<el-dialog title="详情" width="1000px" v-model="dialogShow" v-if="dialogShow">
|
||||||
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
<DetailInfo :id="userId" :openType="'sourcesOfInterference'"></DetailInfo>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 批量导入 -->
|
<!-- 批量导入
|
||||||
<sensitive-user-popup ref="sensitiveUserPopup" />
|
<sensitive-user-popup ref="sensitiveUserPopup" /> -->
|
||||||
|
|
||||||
<!-- 查看详情 detail 新增/修改 create-->
|
<!-- 查看详情 detail 新增/修改 create-->
|
||||||
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
<addForm ref="addForms" @onSubmit="tableStore.index()" :openType="'sourcesOfInterference'"></addForm>
|
||||||
@@ -57,7 +57,7 @@ import { useRouter } from 'vue-router'
|
|||||||
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
import { downloadSensitiveReportTemplate } from '@/api/supervision-boot/userReport/form'
|
||||||
import DetailInfo from './components/detail.vue'
|
import DetailInfo from './components/detail.vue'
|
||||||
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
import { cancelFormData, getUserReportById } from '@/api/supervision-boot/interfere/index'
|
||||||
import { deleteUserReport } from '@/api/supervision-boot/delete/index'
|
import { deleteUserReport } from '@/api/device-boot/sensitiveLoadMange'
|
||||||
const addForms = ref()
|
const addForms = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const sensitiveUserPopup = ref()
|
const sensitiveUserPopup = ref()
|
||||||
@@ -73,7 +73,7 @@ defineOptions({
|
|||||||
//获取登陆用户姓名和部门
|
//获取登陆用户姓名和部门
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/supervision-boot/userReport/getUserLedgerPage',
|
url: '/device-boot/userReport/getUserLedgerPage',
|
||||||
// publicHeight: 65,
|
// publicHeight: 65,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
|
|||||||
@@ -129,14 +129,22 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'subName', title: '变电站', minWidth: '150' },
|
{ field: 'subName', title: '变电站', minWidth: '150' },
|
||||||
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
||||||
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
{ field: 'scale', title: '电压等级', minWidth: '110' },
|
||||||
// {
|
{
|
||||||
// field: 'advanceType',
|
field: 'advanceType',
|
||||||
// title: '触发类型',
|
title: '暂降类型',
|
||||||
// minWidth: '90',
|
minWidth: '90',
|
||||||
// formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
// return row.cellValue || '其他'
|
return row.cellValue || '其他'
|
||||||
// }
|
}
|
||||||
// },
|
},
|
||||||
|
{
|
||||||
|
field: 'eventType',
|
||||||
|
title: '触发类型',
|
||||||
|
minWidth: '120',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'advanceReason',
|
field: 'advanceReason',
|
||||||
title: '暂降原因',
|
title: '暂降原因',
|
||||||
@@ -145,14 +153,7 @@ const tableStore = new TableStore({
|
|||||||
return row.cellValue || '其他'
|
return row.cellValue || '其他'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'eventType',
|
|
||||||
title: '触发类型',
|
|
||||||
minWidth: '120',
|
|
||||||
formatter: (row: any) => {
|
|
||||||
return eventList.filter(item => item.id === row.cellValue)[0]?.name
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => {
|
// field: 'severity', title: '严重度', minWidth: "80", formatter: (row: any) => {
|
||||||
// return row.cellValue.toFixed(2)
|
// return row.cellValue.toFixed(2)
|
||||||
|
|||||||
@@ -54,6 +54,9 @@
|
|||||||
:value="item"></el-option>
|
:value="item"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选:">
|
||||||
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字"></el-input>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button type="primary" icon="el-icon-Tickets" @click="makeUp" v-if="!VITE_FLAG">补招</el-button>
|
<el-button type="primary" icon="el-icon-Tickets" @click="makeUp" v-if="!VITE_FLAG">补招</el-button>
|
||||||
@@ -285,7 +288,7 @@ const tableStore = new TableStore({
|
|||||||
// tableStore.table.params.searchEndTime = tableHeaderRef.value.datePickerRef.timeValue[1]
|
// tableStore.table.params.searchEndTime = tableHeaderRef.value.datePickerRef.timeValue[1]
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(filterTreeByKeyword( tableStore.table.data,tableStore.table.params.searchValue), Math.random() * 1000)
|
||||||
tableStore.table.column[0].title = formData.value.statisticalType.name
|
tableStore.table.column[0].title = formData.value.statisticalType.name
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
@@ -305,6 +308,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
tableStore.table.params.deptIndex = ''
|
tableStore.table.params.deptIndex = ''
|
||||||
tableStore.table.params.filterName = ''
|
tableStore.table.params.filterName = ''
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.statisticalType = []
|
tableStore.table.params.statisticalType = []
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
tableStore.table.params.manufacturer = []
|
tableStore.table.params.manufacturer = []
|
||||||
@@ -339,6 +343,78 @@ const tree2List = (list: any, id?: string) => {
|
|||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 树形结构按名称筛选:保留匹配节点+所有上级+所有下级,保持原树形层级
|
||||||
|
* @param {Array} treeData - 原始嵌套树形数据(根节点数组)
|
||||||
|
* @param {string} keyword - 筛选关键词(name包含该关键词即匹配)
|
||||||
|
* @returns {Array} 筛选后的嵌套树形数据,保持原层级
|
||||||
|
*/
|
||||||
|
function filterTreeByKeyword(treeData, keyword) {
|
||||||
|
// 关键词为空,直接返回原树(深拷贝,避免修改原数据)
|
||||||
|
if (!keyword || keyword.trim() === '') {
|
||||||
|
return JSON.parse(JSON.stringify(treeData));
|
||||||
|
}
|
||||||
|
const targetKey = keyword.trim();
|
||||||
|
// 存储需要保留的节点ID(匹配节点+所有上级+所有下级)
|
||||||
|
const keepIdSet = new Set();
|
||||||
|
|
||||||
|
// 第一步:递归遍历树形,标记所有需要保留的节点ID
|
||||||
|
const markKeepNodes = (node, parentNodes = []) => {
|
||||||
|
// 1. 若当前节点名称包含关键词,标记自身+所有上级+所有下级
|
||||||
|
const isMatch = node.name && node.name.includes(targetKey);
|
||||||
|
if (isMatch) {
|
||||||
|
// 标记自身
|
||||||
|
keepIdSet.add(node.id);
|
||||||
|
// 标记所有上级父节点
|
||||||
|
parentNodes.forEach(pNode => keepIdSet.add(pNode.id));
|
||||||
|
// 标记所有下级子节点(递归)
|
||||||
|
const markChildren = (childNode) => {
|
||||||
|
keepIdSet.add(childNode.id);
|
||||||
|
if (childNode.children && childNode.children.length) {
|
||||||
|
childNode.children.forEach(markChildren);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
if (node.children && node.children.length) {
|
||||||
|
node.children.forEach(markChildren);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 递归遍历子节点,传递当前节点的上级链(parentNodes + 当前节点)
|
||||||
|
if (node.children && node.children.length) {
|
||||||
|
node.children.forEach(child => markKeepNodes(child, [...parentNodes, node]));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
// 遍历根节点,开始标记
|
||||||
|
treeData.forEach(rootNode => markKeepNodes(rootNode));
|
||||||
|
|
||||||
|
// 第二步:递归重构树形,只保留标记过的节点,保持层级
|
||||||
|
const rebuildTree = (node) => {
|
||||||
|
// 若当前节点无需保留,直接返回null
|
||||||
|
if (!keepIdSet.has(node.id)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
// 深拷贝当前节点,避免修改原数据
|
||||||
|
const newNode = { ...node };
|
||||||
|
// 递归处理子节点,过滤掉无需保留的,只保留有效子节点
|
||||||
|
if (newNode.children && newNode.children.length) {
|
||||||
|
const newChildren = newNode.children.map(child => rebuildTree(child)).filter(Boolean);
|
||||||
|
newNode.children = newChildren;
|
||||||
|
} else {
|
||||||
|
newNode.children = [];
|
||||||
|
}
|
||||||
|
return newNode;
|
||||||
|
};
|
||||||
|
|
||||||
|
// 重构根节点,过滤掉null的根节点
|
||||||
|
const filteredTree = treeData.map(rootNode => rebuildTree(rootNode)).filter(Boolean);
|
||||||
|
return filteredTree;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// 禁用超过当前日期的选择
|
// 禁用超过当前日期的选择
|
||||||
const disabledDate = (date: Date) => {
|
const disabledDate = (date: Date) => {
|
||||||
return date > new Date() // 如果日期大于当前日期,则禁用
|
return date > new Date() // 如果日期大于当前日期,则禁用
|
||||||
@@ -351,7 +427,9 @@ const makeUp = () => {
|
|||||||
tableRef.value
|
tableRef.value
|
||||||
.getRef()
|
.getRef()
|
||||||
.getCheckboxRecords()
|
.getCheckboxRecords()
|
||||||
.find((item: any) => item.level == '6') || []
|
.filter((item: any) => item.level == '6') || []
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (list.length == 0) {
|
if (list.length == 0) {
|
||||||
return ElMessage({
|
return ElMessage({
|
||||||
@@ -359,6 +437,16 @@ const makeUp = () => {
|
|||||||
type: 'warning'
|
type: 'warning'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 检查是否有 comFlag 等于 0 的项
|
||||||
|
const hasOfflineDevice = list.some((item: any) => item.comFlag === 0)
|
||||||
|
|
||||||
|
if (hasOfflineDevice) {
|
||||||
|
return ElMessage({
|
||||||
|
message: '请选择在线监测点进行补招',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
}
|
||||||
timeData.value = []
|
timeData.value = []
|
||||||
timePopUp.value = true
|
timePopUp.value = true
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,6 +102,13 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选:">
|
||||||
|
<el-input
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入关键字"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,7 +139,6 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'device-boot/getOnlineRateData'
|
name: 'device-boot/getOnlineRateData'
|
||||||
})
|
})
|
||||||
@@ -153,7 +159,6 @@ const treeData = ref([])
|
|||||||
const idArr = ref([])
|
const idArr = ref([])
|
||||||
const activeName = ref(0)
|
const activeName = ref(0)
|
||||||
const getTreeData = async () => {
|
const getTreeData = async () => {
|
||||||
|
|
||||||
await getAreaDept().then(res => {
|
await getAreaDept().then(res => {
|
||||||
var data = res.data
|
var data = res.data
|
||||||
data.forEach(element => {
|
data.forEach(element => {
|
||||||
@@ -205,7 +210,8 @@ const tableStore = new TableStore({
|
|||||||
{
|
{
|
||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'ip',
|
field: 'ip',
|
||||||
align: 'center' ,width:'120px',
|
align: 'center',
|
||||||
|
width: '120px',
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -257,7 +263,7 @@ const tableStore = new TableStore({
|
|||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue.toFixed(2)
|
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue.toFixed(2)
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
// {
|
// {
|
||||||
// title: '评估',
|
// title: '评估',
|
||||||
// field: 'valueOver',
|
// field: 'valueOver',
|
||||||
@@ -299,7 +305,10 @@ const tableStore = new TableStore({
|
|||||||
// let treeData = []
|
// let treeData = []
|
||||||
// treeData = tree2List(tableStore.table.data)
|
// treeData = tree2List(tableStore.table.data)
|
||||||
// tableStore.table.data = JSON.parse(JSON.stringify(treeData))
|
// tableStore.table.data = JSON.parse(JSON.stringify(treeData))
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(
|
||||||
|
filterTreeByKeyword(tableStore.table.data, tableStore.table.params.searchValue),
|
||||||
|
Math.random() * 1000
|
||||||
|
)
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -315,7 +324,7 @@ const tableStore = new TableStore({
|
|||||||
formData.value.loadType = interfereoption
|
formData.value.loadType = interfereoption
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.deptIndex = ''
|
tableStore.table.params.deptIndex = ''
|
||||||
tableStore.table.params.statisticalType = []
|
tableStore.table.params.statisticalType = []
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
@@ -342,7 +351,73 @@ const tree2List = (list: any, id?: string) => {
|
|||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 树形结构按名称筛选:保留匹配节点+所有上级+所有下级,保持原树形层级
|
||||||
|
* @param {Array} treeData - 原始嵌套树形数据(根节点数组)
|
||||||
|
* @param {string} keyword - 筛选关键词(name包含该关键词即匹配)
|
||||||
|
* @returns {Array} 筛选后的嵌套树形数据,保持原层级
|
||||||
|
*/
|
||||||
|
function filterTreeByKeyword(treeData, keyword) {
|
||||||
|
// 关键词为空,直接返回原树(深拷贝,避免修改原数据)
|
||||||
|
if (!keyword || keyword.trim() === '') {
|
||||||
|
return JSON.parse(JSON.stringify(treeData))
|
||||||
|
}
|
||||||
|
const targetKey = keyword.trim()
|
||||||
|
// 存储需要保留的节点ID(匹配节点+所有上级+所有下级)
|
||||||
|
const keepIdSet = new Set()
|
||||||
|
|
||||||
|
// 第一步:递归遍历树形,标记所有需要保留的节点ID
|
||||||
|
const markKeepNodes = (node, parentNodes = []) => {
|
||||||
|
// 1. 若当前节点名称包含关键词,标记自身+所有上级+所有下级
|
||||||
|
const isMatch = node.name && node.name.includes(targetKey)
|
||||||
|
if (isMatch) {
|
||||||
|
// 标记自身
|
||||||
|
keepIdSet.add(node.id)
|
||||||
|
// 标记所有上级父节点
|
||||||
|
parentNodes.forEach(pNode => keepIdSet.add(pNode.id))
|
||||||
|
// 标记所有下级子节点(递归)
|
||||||
|
const markChildren = childNode => {
|
||||||
|
keepIdSet.add(childNode.id)
|
||||||
|
if (childNode.children && childNode.children.length) {
|
||||||
|
childNode.children.forEach(markChildren)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (node.children && node.children.length) {
|
||||||
|
node.children.forEach(markChildren)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 递归遍历子节点,传递当前节点的上级链(parentNodes + 当前节点)
|
||||||
|
if (node.children && node.children.length) {
|
||||||
|
node.children.forEach(child => markKeepNodes(child, [...parentNodes, node]))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 遍历根节点,开始标记
|
||||||
|
treeData.forEach(rootNode => markKeepNodes(rootNode))
|
||||||
|
|
||||||
|
// 第二步:递归重构树形,只保留标记过的节点,保持层级
|
||||||
|
const rebuildTree = node => {
|
||||||
|
// 若当前节点无需保留,直接返回null
|
||||||
|
if (!keepIdSet.has(node.id)) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
// 深拷贝当前节点,避免修改原数据
|
||||||
|
const newNode = { ...node }
|
||||||
|
// 递归处理子节点,过滤掉无需保留的,只保留有效子节点
|
||||||
|
if (newNode.children && newNode.children.length) {
|
||||||
|
const newChildren = newNode.children.map(child => rebuildTree(child)).filter(Boolean)
|
||||||
|
newNode.children = newChildren
|
||||||
|
} else {
|
||||||
|
newNode.children = []
|
||||||
|
}
|
||||||
|
return newNode
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重构根节点,过滤掉null的根节点
|
||||||
|
const filteredTree = treeData.map(rootNode => rebuildTree(rootNode)).filter(Boolean)
|
||||||
|
return filteredTree
|
||||||
}
|
}
|
||||||
onMounted(() => {})
|
onMounted(() => {})
|
||||||
|
|
||||||
|
|||||||
@@ -613,7 +613,7 @@ onMounted(() => {
|
|||||||
.harmonicButton {
|
.harmonicButton {
|
||||||
height: 42px;
|
height: 42px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
:deep(.el-tabs__content) {
|
:deep(.el-tabs__content) {
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ onMounted(() => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.title {
|
.title {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
></DatePicker>
|
></DatePicker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:operation></template>
|
<template v-slot:operation>
|
||||||
|
<el-button type="primary" icon="el-icon-Download" @click="exportTemplate">导出</el-button>
|
||||||
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<GridLayout
|
<GridLayout
|
||||||
@@ -68,9 +70,12 @@ import { useRouter, useRoute } from 'vue-router'
|
|||||||
import { View } from '@element-plus/icons-vue'
|
import { View } from '@element-plus/icons-vue'
|
||||||
import { useTimeCacheStore } from '@/stores/timeCache'
|
import { useTimeCacheStore } from '@/stores/timeCache'
|
||||||
import { adminBaseRoutePath } from '@/router/static'
|
import { adminBaseRoutePath } from '@/router/static'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import { dataVerifyExcel } from '@/api/device-boot/line'
|
||||||
const { push } = useRouter()
|
const { push } = useRouter()
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const timeCacheStore = useTimeCacheStore()
|
const timeCacheStore = useTimeCacheStore()
|
||||||
|
|
||||||
@@ -288,7 +293,29 @@ const fetchLayoutData = async () => {
|
|||||||
// 可以添加错误提示逻辑
|
// 可以添加错误提示逻辑
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 导出
|
||||||
|
const exportTemplate = () => {
|
||||||
|
console.log(123)
|
||||||
|
|
||||||
|
dataVerifyExcel({
|
||||||
|
deptId: adminInfo.$state.deptId,
|
||||||
|
searchBeginTime: datePickerRef.value?.timeValue[0],
|
||||||
|
searchEndTime: datePickerRef.value?.timeValue[1]
|
||||||
|
}).then((res: any) => {
|
||||||
|
let blob = new Blob([res], {
|
||||||
|
type: 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
|
||||||
|
})
|
||||||
|
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a') // 创建a标签
|
||||||
|
link.href = url
|
||||||
|
// link.download = "电压暂降事件分析报告"; // 设置下载的文件名
|
||||||
|
link.download = '数据总览' // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
})
|
||||||
|
}
|
||||||
// 窗口大小变化处理 - 使用防抖
|
// 窗口大小变化处理 - 使用防抖
|
||||||
const handleResize = useDebounceFn(() => {
|
const handleResize = useDebounceFn(() => {
|
||||||
initRowHeight()
|
initRowHeight()
|
||||||
|
|||||||
@@ -665,7 +665,7 @@ const initEcharts = (color: string, key: number, name: string) => {
|
|||||||
startAngle: key == 0 ? 180 : 90,
|
startAngle: key == 0 ? 180 : 90,
|
||||||
endAngle: key == 0 ? 90 : 0,
|
endAngle: key == 0 ? 90 : 0,
|
||||||
min: 0,
|
min: 0,
|
||||||
max: key == 0 ? 12 : 400,
|
max: key == 0 ? 12 : 200,
|
||||||
radius: '180%',
|
radius: '180%',
|
||||||
center: key == 0 ? ['70%', '95%'] : ['30%', '95%'],
|
center: key == 0 ? ['70%', '95%'] : ['30%', '95%'],
|
||||||
splitNumber: 2, //刻度数量
|
splitNumber: 2, //刻度数量
|
||||||
@@ -745,7 +745,7 @@ const initEcharts = (color: string, key: number, name: string) => {
|
|||||||
//渲染echarts
|
//渲染echarts
|
||||||
const init = () => {
|
const init = () => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.67:10407/api/pushMessage/'
|
const url = localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.68:10407/api/pushMessage/'
|
||||||
echartsDataV1.value = initEcharts('#DAA520', 0, 'A相')
|
echartsDataV1.value = initEcharts('#DAA520', 0, 'A相')
|
||||||
echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相')
|
echartsDataV2.value = initEcharts('#2E8B57', 0, 'B相')
|
||||||
echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相')
|
echartsDataV3.value = initEcharts('#A52a2a', 0, 'C相')
|
||||||
@@ -868,6 +868,22 @@ const setRealData = () => {
|
|||||||
// webMsgSend.value[0].vRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsB)
|
// webMsgSend.value[0].vRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsB)
|
||||||
// echartsDataV3.value.options.series[0].max =
|
// echartsDataV3.value.options.series[0].max =
|
||||||
// webMsgSend.value[0].vRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsC)
|
// webMsgSend.value[0].vRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].vRmsC)
|
||||||
|
let vMax =
|
||||||
|
Math.ceil(
|
||||||
|
(Math.max(
|
||||||
|
...[
|
||||||
|
Math.floor(webMsgSend.value[0].vRmsA * 100) / 100 || 10,
|
||||||
|
Math.floor(webMsgSend.value[0].vRmsB * 100) / 100 || 10,
|
||||||
|
Math.floor(webMsgSend.value[0].vRmsC * 100) / 100 || 10
|
||||||
|
]
|
||||||
|
) *
|
||||||
|
1.2) /
|
||||||
|
10
|
||||||
|
) * 10
|
||||||
|
|
||||||
|
echartsDataV1.value.options.series[0].max = vMax
|
||||||
|
echartsDataV2.value.options.series[0].max = vMax
|
||||||
|
echartsDataV3.value.options.series[0].max = vMax
|
||||||
echartsDataV1.value.options.series[0].data = [
|
echartsDataV1.value.options.series[0].data = [
|
||||||
{
|
{
|
||||||
name: ptName.value == 'star' ? 'A相' : 'AB相', //A相
|
name: ptName.value == 'star' ? 'A相' : 'AB相', //A相
|
||||||
@@ -896,6 +912,22 @@ const setRealData = () => {
|
|||||||
// webMsgSend.value[0].iRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsB)
|
// webMsgSend.value[0].iRmsB == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsB)
|
||||||
// echartsDataA3.value.options.series[0].max =
|
// echartsDataA3.value.options.series[0].max =
|
||||||
// webMsgSend.value[0].iRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsC)
|
// webMsgSend.value[0].iRmsC == 0 ? 1 : Math.ceil(webMsgSend.value[0].iRmsC)
|
||||||
|
|
||||||
|
let aMax =
|
||||||
|
Math.ceil(
|
||||||
|
(Math.max(
|
||||||
|
...[
|
||||||
|
Math.floor(webMsgSend.value[0].iRmsA * 100) / 100 || 10,
|
||||||
|
Math.floor(webMsgSend.value[0].iRmsB * 100) / 100 || 10,
|
||||||
|
Math.floor(webMsgSend.value[0].iRmsC * 100) / 100 || 10
|
||||||
|
]
|
||||||
|
) *
|
||||||
|
1.2) /
|
||||||
|
10
|
||||||
|
) * 10
|
||||||
|
echartsDataA1.value.options.series[0].max = aMax
|
||||||
|
echartsDataA2.value.options.series[0].max = aMax
|
||||||
|
echartsDataA3.value.options.series[0].max = aMax
|
||||||
echartsDataA1.value.options.series[0].data = [
|
echartsDataA1.value.options.series[0].data = [
|
||||||
{
|
{
|
||||||
name: 'A相',
|
name: 'A相',
|
||||||
@@ -920,14 +952,12 @@ const setRealData = () => {
|
|||||||
}
|
}
|
||||||
defineExpose({ setRealData })
|
defineExpose({ setRealData })
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
init()
|
init()
|
||||||
|
|
||||||
initRadioCharts()
|
initRadioCharts()
|
||||||
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
getLineDetail({ id: monitoringPoint.state.lineId }).then(res => {
|
||||||
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
ptName.value = connection.filter(item => item.value == res.data.ptType)[0].code || ''
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
onBeforeUnmount(() => {
|
onBeforeUnmount(() => {
|
||||||
dataSocket.socketServe?.closeWs()
|
dataSocket.socketServe?.closeWs()
|
||||||
|
|||||||
@@ -103,7 +103,11 @@ const init = () => {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
options.value = {
|
options.value = {
|
||||||
|
title: {
|
||||||
|
text: formData.harmState == 0 ? '谐波电压频谱' : '谐波电流频谱'
|
||||||
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
|
|
||||||
name: '次数',
|
name: '次数',
|
||||||
type: 'category',
|
type: 'category',
|
||||||
data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`)
|
data: Array.from({ length: 49 }, (_, i) => `${i + 2}次`)
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ defineOptions({
|
|||||||
name: 'harmonic-boot/reate/word'
|
name: 'harmonic-boot/reate/word'
|
||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
//区域联级选择
|
//行业类型选择
|
||||||
const industry = dictData.getBasicData('Interference_Source')
|
const industry = dictData.getBasicData('Business_Type')
|
||||||
//用户信息弹出框
|
//用户信息弹出框
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
|
|||||||
@@ -1,156 +1,276 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
|
<TableHeader area ref="TableHeaderRef" showExport>
|
||||||
<TableHeader area showExport>
|
|
||||||
<template #select>
|
<template #select>
|
||||||
<!-- <el-form-item label="统计类型:">
|
<el-form-item label="运行状态">
|
||||||
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型" value-key="id">
|
<el-select
|
||||||
<el-option v-for="item in classificationData" :key="item.id" :label="item.name" :value="item">
|
filterable
|
||||||
</el-option>
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
v-model="tableStore.table.params.runFlag" clearable placeholder="请选择运行状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in runFlagList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item>
|
||||||
|
<el-form-item label="数据筛选">
|
||||||
|
<el-input
|
||||||
|
style="width: 240px"
|
||||||
|
placeholder="电站名称,终端编号,监测点名称、电压等级、终端厂家、干扰源类型"
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="通讯状态:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.comFlag"
|
||||||
|
filterable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择通讯状态"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in communicationstatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="电压等级:">
|
<el-form-item label="电压等级:">
|
||||||
<el-select v-model="tableStore.table.params.scale" filterable multiple collapse-tags clearable
|
<el-select
|
||||||
placeholder="请选择电压等级" value-key="id">
|
v-model="tableStore.table.params.scale"
|
||||||
<el-option v-for="item in voltageleveloption" :key="item.id" :label="item.name" :value="item">
|
filterable
|
||||||
</el-option>
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择电压等级"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in voltageleveloption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select v-model="tableStore.table.params.manufacturer" filterable multiple collapse-tags
|
<el-select
|
||||||
clearable placeholder="请选择终端厂家" value-key="id">
|
v-model="tableStore.table.params.manufacturer"
|
||||||
<el-option v-for="item in terminaloption" :key="item.id" :label="item.name" :value="item">
|
filterable
|
||||||
</el-option>
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择终端厂家"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in terminaloption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="干扰源类型:">
|
<el-form-item label="干扰源类型:">
|
||||||
<el-select v-model="tableStore.table.params.loadType" filterable multiple collapse-tags clearable
|
<el-select
|
||||||
placeholder="请选择干扰源类型" value-key="id">
|
v-model="tableStore.table.params.loadType"
|
||||||
<el-option v-for="item in interfereoption" :key="item.id" :label="item.name" :value="item">
|
filterable
|
||||||
</el-option>
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择干扰源类型"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in interfereoption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="通讯状态:">
|
|
||||||
<el-select v-model="tableStore.table.params.comFlag" filterable multiple collapse-tags clearable
|
|
||||||
placeholder="请选择通讯状态">
|
|
||||||
<el-option v-for="item in communicationstatus" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="终端状态:">
|
|
||||||
<el-select v-model="tableStore.table.params.runFlag" filterable multiple collapse-tags clearable
|
|
||||||
placeholder="请选择终端状态">
|
|
||||||
<el-option v-for="item in terminalstatus" :key="item.value" :label="item.label"
|
|
||||||
:value="item.value">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="评价筛选">
|
|
||||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" maxlength="32" show-word-limit />
|
|
||||||
</el-form-item>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<template #operation>
|
||||||
|
<!-- <el-button icon="el-icon-Download" type="primary">导出</el-button> -->
|
||||||
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide, nextTick, watch } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
const dictData = useDictData()
|
import { useDictData } from '@/stores/dictData'
|
||||||
defineOptions({
|
|
||||||
name: 'harmonic-boot/run/devicemessage'
|
|
||||||
})
|
|
||||||
const view = ref(true)
|
|
||||||
const classificationData = dictData.getBasicData('Statistical_Type', ["Report_Type"])
|
|
||||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
|
||||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
|
||||||
const interfereoption = dictData.getBasicData('Interference_Source')
|
|
||||||
|
|
||||||
const communicationstatus = [
|
const dictData = useDictData()
|
||||||
{ value: 0, label: "中断" },
|
const TableHeaderRef = ref()
|
||||||
{ value: 1, label: "正常" },
|
const areaOptionList = dictData.getBasicData('jibei_area')
|
||||||
]
|
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||||
const terminalstatus = [
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
{ value: 0, label: "投运" },
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
{ value: 1, label: "检修" },
|
|
||||||
{ value: 2, label: "停运" },
|
|
||||||
]
|
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/runManage/getLineLedger',
|
url: '/device-boot/runManage/getLineLedgerComm',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
isWebPaging: true,
|
filename: '监测点台账',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: 80,
|
||||||
formatter: (row: any) => {
|
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: 'areaName', title: '区域',minWidth: 100 },
|
|
||||||
{ field: 'gdName', title: '供电公司' ,minWidth: 100},
|
{
|
||||||
|
field: 'areaName',
|
||||||
|
title: '省公司',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
|
||||||
|
{ field: 'gdName', title: '市公司', minWidth: 150 },
|
||||||
{
|
{
|
||||||
field: 'bdName',
|
field: 'bdName',
|
||||||
title: '场站',
|
title: '所属变电站',
|
||||||
minWidth: 100
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{ field: 'objName', title: '对象名称' , minWidth: 240},
|
{
|
||||||
{ field: 'lineName', title: '监测点名称' , minWidth: 100},
|
field: 'objName',
|
||||||
{ field: 'manufacturer', title: '厂家' , minWidth: 100},
|
title: '监测对象名称',
|
||||||
{ field: 'scale', title: '电压等级' , minWidth: 100},
|
minWidth: 150,
|
||||||
{ field: 'businessType', title: '行业类型' , minWidth: 100},
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ field: 'lineName', title: '监测点名称', minWidth: 130 },
|
||||||
|
{ field: 'scale', title: '监测点电压等级', minWidth: 120 },
|
||||||
|
|
||||||
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
{ field: 'loadType', title: '干扰源类型', minWidth: 120 },
|
||||||
{ field: 'ip', title: '网络参数' ,width:'120px'},
|
|
||||||
|
|
||||||
// { field: 'comFlag', title: '通讯状态' , minWidth: 100},
|
{
|
||||||
|
field: 'manufacturer',
|
||||||
|
title: '终端厂家',
|
||||||
|
minWidth: 100,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'runFlag',
|
||||||
|
title: '运行状态',
|
||||||
|
minWidth: 80,
|
||||||
|
render: 'tag',
|
||||||
|
custom: {
|
||||||
|
投运: 'success',
|
||||||
|
停运: 'danger',
|
||||||
|
检修: 'warning',
|
||||||
|
调试: 'warning',
|
||||||
|
退运: 'danger'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'comFlag',
|
field: 'comFlag',
|
||||||
title: '通讯状态',
|
title: '通讯状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 100,
|
|
||||||
// effect: 'dark',
|
// effect: 'dark',
|
||||||
|
minWidth: 70,
|
||||||
custom: {
|
custom: {
|
||||||
'正常': 'success',
|
正常: 'success',
|
||||||
'中断': 'danger',
|
中断: 'danger'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
field: 'shortCapacity',
|
||||||
|
title: '最小短路容量(MVA)',
|
||||||
|
minWidth: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'devCapacity',
|
||||||
|
title: '供电设备容量(MVA )',
|
||||||
|
minWidth: 160
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'dealCapacity',
|
||||||
|
title: '用户协议容量(MVA)',
|
||||||
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{ field: 'loadType', title: '干扰源类型' , minWidth: 100},
|
|
||||||
|
|
||||||
|
{ field: 'id', title: '监测点序号', minWidth: 90 },
|
||||||
|
|
||||||
|
{ field: 'devName', title: '监测终端编号 ', minWidth: 140 },
|
||||||
|
{ field: 'ptType', title: '监测终端接线方式', minWidth: 140 },
|
||||||
|
{
|
||||||
|
field: 'voltageDev',
|
||||||
|
title: '电压偏差上限(%)',
|
||||||
|
minWidth: 140
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'uvoltageDev',
|
||||||
|
title: '电压偏差下限(%)',
|
||||||
|
minWidth: 140
|
||||||
|
}
|
||||||
|
|
||||||
|
/* {
|
||||||
|
title: '操作',fixed: 'right',
|
||||||
|
minWidth: 150,
|
||||||
|
fixed: 'right',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'productSetting',
|
||||||
|
title: '流程详情',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}*/
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.data.map((item: any) => {
|
tableStore.table.params.serverName = 'harmonic-boot'
|
||||||
item.onlineEvaluate == 3.14159 ? item.onlineEvaluate = '/' : item.onlineEvaluate <= 0.6 ? item.onlineEvaluate = '差' : item.onlineEvaluate <= 0.9 ? item.onlineEvaluate = '良' : item.onlineEvaluate <= 1 ? item.onlineEvaluate = '优' : '/'
|
tableStore.table.params.statisticalType = {
|
||||||
})
|
name: '电网拓扑',
|
||||||
|
code: 'Power_Network'
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.statisticalType = classificationData[0]
|
|
||||||
tableStore.table.params.serverName = "harmonic-boot"
|
|
||||||
tableStore.table.params.comFlag = []
|
|
||||||
tableStore.table.params.runFlag = []
|
tableStore.table.params.runFlag = []
|
||||||
tableStore.table.params.evaluate = ''
|
tableStore.table.params.comFlag = []
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
tableStore.table.params.manufacturer = []
|
tableStore.table.params.manufacturer = []
|
||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
const wp = ref({})
|
const runFlagList = [
|
||||||
|
{ id: 0, name: '投运' },
|
||||||
|
{ id: 1, name: '检修' },
|
||||||
|
{ id: 2, name: '停运' },
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
|
const communicationstatus = [
|
||||||
|
{ value: 0, label: '中断' },
|
||||||
|
{ value: 1, label: '正常' }
|
||||||
|
]
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -159,6 +279,4 @@ onMounted(() => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader area showExport>
|
<TableHeader area ref="TableHeaderRef" showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<!-- <el-form-item label="统计类型:">
|
<!-- <el-form-item label="统计类型:">
|
||||||
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型" value-key="id">
|
<el-select v-model="tableStore.table.params.statisticalType" placeholder="请选择统计类型" value-key="id">
|
||||||
@@ -9,24 +9,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
|
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="电压等级:">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.scale"
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
clearable
|
|
||||||
placeholder="请选择电压等级"
|
|
||||||
value-key="id"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in voltageleveloption"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacturer"
|
v-model="tableStore.table.params.manufacturer"
|
||||||
@@ -45,6 +28,44 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="数据筛选">
|
||||||
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入市公司、变电站、用户" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="通讯状态:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.comF"
|
||||||
|
filterable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择通讯状态"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in communicationstatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="终端状态:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.runF"
|
||||||
|
filterable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择终端状态"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in terminalstatus"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="干扰源类型:">
|
<el-form-item label="干扰源类型:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.loadType"
|
v-model="tableStore.table.params.loadType"
|
||||||
@@ -63,59 +84,39 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="电压等级:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.scale"
|
||||||
|
filterable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择电压等级"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in voltageleveloption"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="通讯状态:">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.comFlag"
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
clearable
|
|
||||||
placeholder="请选择通讯状态"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in communicationstatus"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="终端状态:">
|
|
||||||
<el-select
|
|
||||||
v-model="tableStore.table.params.runFlag"
|
|
||||||
filterable
|
|
||||||
multiple
|
|
||||||
collapse-tags
|
|
||||||
clearable
|
|
||||||
placeholder="请选择终端状态"
|
|
||||||
>
|
|
||||||
<el-option
|
|
||||||
v-for="item in terminalstatus"
|
|
||||||
:key="item.value"
|
|
||||||
:label="item.label"
|
|
||||||
:value="item.value"
|
|
||||||
></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<!-- <el-form-item label="评价筛选">
|
|
||||||
<el-input v-model="tableStore.table.params.evaluate" clearable placeholder="输入关键字筛选" />
|
|
||||||
</el-form-item> -->
|
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
defineOptions({
|
|
||||||
name: 'harmonic-boot/run/terminalmessage'
|
|
||||||
})
|
|
||||||
const view = ref(true)
|
const view = ref(true)
|
||||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Voltage_Level', 'Load_Type'])
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Voltage_Level', 'Load_Type'])
|
||||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
@@ -134,37 +135,41 @@ const terminalstatus = [
|
|||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/device-boot/runManage/getRuntimeData',
|
url: '/device-boot/runManage/getRuntimeData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
isWebPaging: true,
|
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
field: 'index',
|
||||||
title: '序号',
|
title: '序号',
|
||||||
width: '80',
|
width: '70',
|
||||||
formatter: (row: any) => {
|
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: 'areaName', title: '区域', minWidth: 100 },
|
{ field: 'areaName', title: '区域', minWidth: 90 },
|
||||||
{ field: 'gdName', title: '供电公司', minWidth: 100 },
|
{ field: 'gdName', title: '市公司', minWidth: 110 },
|
||||||
{
|
{
|
||||||
field: 'bdName',
|
field: 'bdName',
|
||||||
title: '场站',
|
title: '变电站',
|
||||||
minWidth: 100
|
minWidth: 110
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'objName',
|
||||||
|
title: '用户对象',
|
||||||
|
minWidth: 110
|
||||||
},
|
},
|
||||||
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
{ field: 'manufacturer', title: '厂家', minWidth: 100 },
|
||||||
|
|
||||||
{ field: 'devName', title: '终端名称', minWidth: 80 },
|
{ field: 'devName', title: '终端名称', minWidth: 100 },
|
||||||
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
{ field: 'ip', title: '网络参数' ,width:110 },
|
||||||
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
{ field: 'loginTime', title: '投运时间', minWidth: 90 },
|
||||||
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
||||||
{ field: 'port', title: '端口', minWidth: 100 },
|
{ field: 'port', title: '端口', minWidth: 60 },
|
||||||
{ field: 'updateTime', title: '最新数据', minWidth: 100 },
|
{ field: 'updateTime', title: '最新数据', minWidth: 110 },
|
||||||
{
|
{
|
||||||
field: 'runFlag',
|
field: 'runFlag',
|
||||||
title: '终端状态',
|
title: '终端状态',
|
||||||
// effect: 'dark',
|
// effect: 'dark',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
minWidth: 100,
|
minWidth: 70,
|
||||||
custom: {
|
custom: {
|
||||||
投运: 'success',
|
投运: 'success',
|
||||||
检修: 'warning',
|
检修: 'warning',
|
||||||
@@ -176,56 +181,45 @@ const tableStore = new TableStore({
|
|||||||
title: '通讯状态',
|
title: '通讯状态',
|
||||||
render: 'tag',
|
render: 'tag',
|
||||||
// effect: 'dark',
|
// effect: 'dark',
|
||||||
minWidth: 100,
|
minWidth: 70,
|
||||||
custom: {
|
custom: {
|
||||||
正常: 'success',
|
正常: 'success',
|
||||||
中断: 'danger'
|
中断: 'danger'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
field: 'onlineEvaluate',
|
|
||||||
title: '在线率评价',
|
|
||||||
render: 'tag',
|
|
||||||
// effect: 'dark',
|
|
||||||
minWidth: 100,
|
|
||||||
custom: {
|
|
||||||
'/': 'info',
|
|
||||||
优: 'success',
|
|
||||||
良: 'warning',
|
|
||||||
差: 'danger'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.webPagingData.map((item1: any) => {
|
tableStore.table.params.serverName = 'harmonic-boot'
|
||||||
item1.map((item: any) => {
|
tableStore.table.params.statisticalType = {
|
||||||
item.onlineEvaluate == 3.14159
|
name: '电网拓扑',
|
||||||
? (item.onlineEvaluate = '/')
|
code: 'Power_Network'
|
||||||
: item.onlineEvaluate <= 0.6
|
}
|
||||||
? (item.onlineEvaluate = '差')
|
|
||||||
: item.onlineEvaluate <= 0.9
|
|
||||||
? (item.onlineEvaluate = '良')
|
|
||||||
: item.onlineEvaluate <= 1
|
|
||||||
? (item.onlineEvaluate = '优')
|
|
||||||
: '/'
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
tableStore.table.params.runFlag = []
|
||||||
|
if (tableStore.table.params.runF != null && tableStore.table.params.runF != '') {
|
||||||
|
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||||
|
}
|
||||||
|
tableStore.table.params.comFlag = []
|
||||||
|
if (tableStore.table.params.comF != null&&tableStore.table.params.comF != '') {
|
||||||
|
tableStore.table.params.comFlag = [tableStore.table.params.comF]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
tableStore.table.params.runF = ''
|
||||||
|
tableStore.table.params.comF = ''
|
||||||
tableStore.table.params.statisticalType = classificationData[0]
|
tableStore.table.params.statisticalType = classificationData[0]
|
||||||
tableStore.table.params.serverName = 'harmonic-boot'
|
tableStore.table.params.serverName = 'harmonic-boot'
|
||||||
tableStore.table.params.comFlag = []
|
tableStore.table.params.comFlag = []
|
||||||
tableStore.table.params.runFlag = []
|
tableStore.table.params.runFlag = []
|
||||||
// tableStore.table.params.evaluate = ''
|
tableStore.table.params.searchValue = ''
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.monitorFlag = 2
|
tableStore.table.params.monitorFlag = 2
|
||||||
tableStore.table.params.scale = []
|
tableStore.table.params.scale = []
|
||||||
tableStore.table.params.manufacturer = []
|
tableStore.table.params.manufacturer = []
|
||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
const wp = ref({})
|
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -8621,6 +8621,91 @@ const 葫芦岛 = [
|
|||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const 海口 = [
|
||||||
|
[
|
||||||
|
{ lng: 110.106525, lat:20.026851},
|
||||||
|
{ lng: 110.161895, lat:19.977693},
|
||||||
|
{ lng: 110.143932, lat:19.889106},
|
||||||
|
{ lng: 110.186246, lat:19.864193},
|
||||||
|
{ lng: 110.228283, lat:19.753767},
|
||||||
|
{ lng: 110.208468, lat:19.716679},
|
||||||
|
{ lng: 110.222357, lat:19.67974},
|
||||||
|
{ lng: 110.262449, lat:19.687318},
|
||||||
|
{ lng: 110.314208, lat:19.697421},
|
||||||
|
{ lng: 110.340041, lat:19.720625},
|
||||||
|
{ lng: 110.393373, lat:19.698053},
|
||||||
|
{ lng: 110.372633, lat:19.654004},
|
||||||
|
{ lng: 110.401151, lat:19.606626},
|
||||||
|
{ lng: 110.455687, lat:19.574559},
|
||||||
|
{ lng: 110.486705, lat:19.593357},
|
||||||
|
{ lng: 110.519297, lat:19.563341},
|
||||||
|
{ lng: 110.540223, lat:19.535532},
|
||||||
|
{ lng: 110.611518, lat:19.526841},
|
||||||
|
{ lng: 110.641333, lat:19.549122},
|
||||||
|
{ lng: 110.636148, lat:19.593989},
|
||||||
|
{ lng: 110.672814, lat:19.647214},
|
||||||
|
{ lng: 110.623463, lat:19.664109},
|
||||||
|
{ lng: 110.623, lat:19.735461},
|
||||||
|
{ lng: 110.670314, lat:19.812776},
|
||||||
|
{ lng: 110.704665, lat:19.805992},
|
||||||
|
{ lng: 110.699573, lat:19.861512},
|
||||||
|
{ lng: 110.676147, lat:19.860092},
|
||||||
|
{ lng: 110.675314, lat:19.907868},
|
||||||
|
{ lng: 110.634666, lat:19.965401},
|
||||||
|
{ lng: 110.598, lat:19.98305},
|
||||||
|
{ lng: 110.526612, lat:20.075206},
|
||||||
|
{ lng: 110.495039, lat:20.077253},
|
||||||
|
{ lng: 110.387355, lat:20.11347},
|
||||||
|
{ lng: 110.318467, lat:20.109061},
|
||||||
|
{ lng: 110.293282, lat:20.059614},
|
||||||
|
{ lng: 110.24319, lat:20.077568},
|
||||||
|
{ lng: 110.144395, lat:20.074418},
|
||||||
|
{ lng: 110.106525, lat:20.026851}
|
||||||
|
]
|
||||||
|
]
|
||||||
|
const 三亚=[
|
||||||
|
[
|
||||||
|
{ lng: 108.932374, lat:18.335288},
|
||||||
|
{ lng: 108.956448, lat:18.307433},
|
||||||
|
{ lng: 109.006632, lat:18.323032},
|
||||||
|
{ lng: 109.108298, lat:18.323828},
|
||||||
|
{ lng: 109.138668, lat:18.267791},
|
||||||
|
{ lng: 109.174686, lat:18.260149},
|
||||||
|
{ lng: 109.28811, lat:18.264925},
|
||||||
|
{ lng: 109.355887, lat:18.214922},
|
||||||
|
{ lng: 109.441349, lat:18.199153},
|
||||||
|
{ lng: 109.4632, lat:18.177171},
|
||||||
|
{ lng: 109.527366, lat:18.169046},
|
||||||
|
{ lng: 109.561718, lat:18.143554},
|
||||||
|
{ lng: 109.63792, lat:18.171595},
|
||||||
|
{ lng: 109.72616, lat:18.177808},
|
||||||
|
{ lng: 109.749863, lat:18.19326},
|
||||||
|
{ lng: 109.783381, lat:18.337516},
|
||||||
|
{ lng: 109.805418, lat:18.347543},
|
||||||
|
{ lng: 109.785048, lat:18.426622},
|
||||||
|
{ lng: 109.809955, lat:18.459388},
|
||||||
|
{ lng: 109.781159, lat:18.51107},
|
||||||
|
{ lng: 109.725234, lat:18.493102},
|
||||||
|
{ lng: 109.710882, lat:18.426462},
|
||||||
|
{ lng: 109.665883, lat:18.391462},
|
||||||
|
{ lng: 109.539866, lat:18.396713},
|
||||||
|
{ lng: 109.515607, lat:18.429008},
|
||||||
|
{ lng: 109.536996, lat:18.490717},
|
||||||
|
{ lng: 109.535237, lat:18.53142},
|
||||||
|
{ lng: 109.506163, lat:18.551291},
|
||||||
|
{ lng: 109.423386, lat:18.574657},
|
||||||
|
{ lng: 109.405146, lat:18.623443},
|
||||||
|
{ lng: 109.332832, lat:18.575451},
|
||||||
|
{ lng: 109.313295, lat:18.517429},
|
||||||
|
{ lng: 109.246537, lat:18.558921},
|
||||||
|
{ lng: 109.203574, lat:18.553517},
|
||||||
|
{ lng: 109.185056, lat:18.507095},
|
||||||
|
{ lng: 109.195148, lat:18.469407},
|
||||||
|
{ lng: 109.072557, lat:18.452231},
|
||||||
|
{ lng: 109.015243, lat:18.422645},
|
||||||
|
{ lng: 108.932374, lat:18.335288}
|
||||||
|
]
|
||||||
|
]
|
||||||
export default {
|
export default {
|
||||||
zjkJSON,
|
zjkJSON,
|
||||||
lfJSON,
|
lfJSON,
|
||||||
@@ -8640,5 +8725,7 @@ export default {
|
|||||||
铁岭,
|
铁岭,
|
||||||
朝阳,
|
朝阳,
|
||||||
葫芦岛,
|
葫芦岛,
|
||||||
沈阳
|
沈阳,
|
||||||
|
海口,
|
||||||
|
三亚
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -53,6 +53,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="collapse_none" style="color: red; cursor: pointer" @click="showWrap = false">关闭</div>
|
<div class="collapse_none" style="color: red; cursor: pointer" @click="showWrap = false">关闭</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<baidu-map
|
<baidu-map
|
||||||
class="map"
|
class="map"
|
||||||
:style="height"
|
:style="height"
|
||||||
@@ -329,6 +333,16 @@ const boundaryList: any = ref([
|
|||||||
orgName: '鞍山',
|
orgName: '鞍山',
|
||||||
LngLat: [122.808845, 40.840049],
|
LngLat: [122.808845, 40.840049],
|
||||||
boundary: mapJson['鞍山']
|
boundary: mapJson['鞍山']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orgName: '海口',
|
||||||
|
LngLat: [110.32, 20.03],
|
||||||
|
boundary: mapJson['海口']
|
||||||
|
},
|
||||||
|
{
|
||||||
|
orgName: '三亚',
|
||||||
|
LngLat: [109.51, 18.25],
|
||||||
|
boundary: mapJson['三亚']
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -338,8 +352,10 @@ const siteList = ref<any>([])
|
|||||||
const polyline = ref<any>([])
|
const polyline = ref<any>([])
|
||||||
const lineId = ref('')
|
const lineId = ref('')
|
||||||
const center = ref({
|
const center = ref({
|
||||||
lng: 122.42588,
|
lng: 122.42588,
|
||||||
lat: 40.810977
|
lat: 40.810977
|
||||||
|
// lng: 109.5, // 海南经度
|
||||||
|
// lat: 18.5 // 海南纬度
|
||||||
})
|
})
|
||||||
const infoWindowPoint = ref<anyObj>({
|
const infoWindowPoint = ref<anyObj>({
|
||||||
lng: 0,
|
lng: 0,
|
||||||
|
|||||||
@@ -363,7 +363,7 @@ defineExpose({
|
|||||||
|
|
||||||
.actionButtons {
|
.actionButtons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
|
|
||||||
.loading-container {
|
.loading-container {
|
||||||
|
|||||||
@@ -28,6 +28,7 @@
|
|||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item :title="item.name" v-for="(item, index) in column" :key="index" :name="index + 3">
|
<el-collapse-item :title="item.name" v-for="(item, index) in column" :key="index" :name="index + 3">
|
||||||
<div style="height: 200px">
|
<div style="height: 200px">
|
||||||
|
|
||||||
<vxe-table height="auto" :data="form[item.key]" v-bind="defaultAttribute" v-loading="item.loading">
|
<vxe-table height="auto" :data="form[item.key]" v-bind="defaultAttribute" v-loading="item.loading">
|
||||||
<vxe-column type="seq" title="序号" width="80px"></vxe-column>
|
<vxe-column type="seq" title="序号" width="80px"></vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<el-form-item label="用户名称" prop="assessName">
|
<el-form-item label="用户名称" prop="assessName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="form.assessName"
|
v-model="form.assessName"
|
||||||
placeholder="用户名称"
|
placeholder="请输入用户名称"
|
||||||
clearable
|
clearable
|
||||||
show-word-limit
|
show-word-limit
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="变电站电压等级" prop="powerstationScale">
|
<el-form-item label="变电站电压等级" prop="powerstationScale">
|
||||||
<el-select v-model="form.powerstationScale" disabled clearable placeholder="请选择变电站">
|
<el-select v-model="form.powerstationScale" disabled clearable placeholder="请选择变电站电压等级">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in voltageleveloption"
|
v-for="item in voltageleveloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -147,7 +147,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="母线电压等级" prop="busScale">
|
<el-form-item label="母线电压等级" prop="busScale">
|
||||||
<el-select v-model="form.busScale" disabled clearable placeholder="请选择母线">
|
<el-select v-model="form.busScale" disabled clearable placeholder="请选择母线电压等级">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in voltageleveloption"
|
v-for="item in voltageleveloption"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -189,7 +189,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="导线类型" prop="linetypeId">
|
<el-form-item label="导线类型" prop="linetypeId">
|
||||||
<el-select v-model="form.linetypeId" clearable placeholder="请选择变电站">
|
<el-select v-model="form.linetypeId" clearable placeholder="请选择导线类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in linetypeList"
|
v-for="item in linetypeList"
|
||||||
:key="item.linetypeId"
|
:key="item.linetypeId"
|
||||||
@@ -404,7 +404,7 @@ const info = async (id?: string) => {
|
|||||||
const getUserList = async (e?: any) => {
|
const getUserList = async (e?: any) => {
|
||||||
selectUserAssessMentList({ orgId: form.value.deptId, secondAssessmentId: form.value.assessId || '' }).then(res => {
|
selectUserAssessMentList({ orgId: form.value.deptId, secondAssessmentId: form.value.assessId || '' }).then(res => {
|
||||||
userList.value = res.data
|
userList.value = res.data
|
||||||
console.log('🚀 ~ getUserList ~ e:', e)
|
|
||||||
if (e) {
|
if (e) {
|
||||||
assessMentId.value = res.data.filter(item => item.secondAssessmentId == form.value.assessId)[0]?.id || ''
|
assessMentId.value = res.data.filter(item => item.secondAssessmentId == form.value.assessId)[0]?.id || ''
|
||||||
} else {
|
} else {
|
||||||
@@ -454,7 +454,7 @@ onMounted(() => {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.actionButtons {
|
.actionButtons {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
:deep(.el-collapse-item__header) {
|
:deep(.el-collapse-item__header) {
|
||||||
// font-family: AlimamaDongFangDaKai;
|
// font-family: AlimamaDongFangDaKai;
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ import { ElMessage, ElMessageBox, ElDatePicker } from 'element-plus'
|
|||||||
import { cableList, batchDel } from '@/api/advance-boot/assess'
|
import { cableList, batchDel } from '@/api/advance-boot/assess'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import Form from './form.vue'
|
import Form from './form.vue'
|
||||||
import { selectUserList, bindAssessmentId } from '@/api/device-boot/Business'
|
import { bindAssessmentId } from '@/api/device-boot/Business'
|
||||||
import { forEach } from 'min-dash'
|
import { forEach } from 'min-dash'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'runManage/addUser'
|
name: 'runManage/addUser'
|
||||||
|
|||||||
@@ -467,6 +467,7 @@ const dictionary = () => {
|
|||||||
|
|
||||||
}
|
}
|
||||||
onBeforeMount(async () => {
|
onBeforeMount(async () => {
|
||||||
|
|
||||||
await dictionary()
|
await dictionary()
|
||||||
info(0) // 变压器参数维护
|
info(0) // 变压器参数维护
|
||||||
info(1) // 电容器参数维护
|
info(1) // 电容器参数维护
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ defineExpose({
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.btnsBox {
|
.btnsBox {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: flex-end;
|
||||||
}
|
}
|
||||||
::v-deep .el-radio-button__inner {
|
::v-deep .el-radio-button__inner {
|
||||||
padding: 8px 18px;
|
padding: 8px 18px;
|
||||||
|
|||||||
@@ -235,7 +235,7 @@ defineExpose({ open })
|
|||||||
}
|
}
|
||||||
.form {
|
.form {
|
||||||
// display: flex;
|
// display: flex;
|
||||||
// justify-content: end;
|
// justify-content: flex-end;
|
||||||
// position: relative;
|
// position: relative;
|
||||||
// .form_but {
|
// .form_but {
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,16 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="通讯状态">
|
||||||
|
<el-select v-model="tableStore.table.params.comF" clearable placeholder="请选择通讯状态">
|
||||||
|
<el-option
|
||||||
|
v-for="item in comFlagList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="数据筛选">
|
<el-form-item label="数据筛选">
|
||||||
<el-input
|
<el-input
|
||||||
style="width: 200px"
|
style="width: 200px"
|
||||||
@@ -19,7 +29,7 @@
|
|||||||
v-model="tableStore.table.params.searchValue"
|
v-model="tableStore.table.params.searchValue"
|
||||||
clearable
|
clearable
|
||||||
maxlength="32"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
></el-input>
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
@@ -71,6 +81,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'bdName', title: '所属变电站', minWidth: 120 },
|
{ field: 'bdName', title: '所属变电站', minWidth: 120 },
|
||||||
{ field: 'devName', title: '终端名称', minWidth: 110 },
|
{ field: 'devName', title: '终端名称', minWidth: 110 },
|
||||||
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
{ field: 'loginTime', title: '投运时间', minWidth: 100 },
|
||||||
|
{ field: 'updateTime', title: '最新数据时间', minWidth: 150 },
|
||||||
{
|
{
|
||||||
field: 'manufacturer',
|
field: 'manufacturer',
|
||||||
title: '厂家',
|
title: '厂家',
|
||||||
@@ -79,7 +90,18 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
{ field: 'devType', title: '终端型号', minWidth: 100 },
|
||||||
|
|
||||||
{ field: 'ip', title: '终端网络参数', width: '120px' },
|
{ field: 'ip', title: '终端网络参数', width: '120px' },
|
||||||
{ field: 'port', title: '端口号', minWidth: 40 },
|
{ field: 'port', title: '端口号', minWidth: 70 },
|
||||||
|
{
|
||||||
|
field: 'comFlag',
|
||||||
|
title: '通讯状态',
|
||||||
|
minWidth: 80,
|
||||||
|
render: 'tag',
|
||||||
|
custom: {
|
||||||
|
正常: 'success',
|
||||||
|
中断: 'danger',
|
||||||
|
'/': 'primary'
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
field: 'runFlag',
|
field: 'runFlag',
|
||||||
title: '运行状态',
|
title: '运行状态',
|
||||||
@@ -125,10 +147,15 @@ const tableStore = new TableStore({
|
|||||||
if (tableStore.table.params.runF != null) {
|
if (tableStore.table.params.runF != null) {
|
||||||
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
tableStore.table.params.runFlag = [tableStore.table.params.runF]
|
||||||
}
|
}
|
||||||
|
tableStore.table.params.comFlag = []
|
||||||
|
if (tableStore.table.params.comF != null) {
|
||||||
|
tableStore.table.params.comFlag = [tableStore.table.params.comF]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
tableStore.table.params.runF = 0
|
tableStore.table.params.runF = 0
|
||||||
|
tableStore.table.params.comF = ''
|
||||||
tableStore.table.params.runFlag = []
|
tableStore.table.params.runFlag = []
|
||||||
tableStore.table.params.searchValue = ''
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
@@ -139,6 +166,10 @@ const runFlagList = [
|
|||||||
{ id: 3, name: '调试' },
|
{ id: 3, name: '调试' },
|
||||||
{ id: 4, name: '退运' }
|
{ id: 4, name: '退运' }
|
||||||
]
|
]
|
||||||
|
const comFlagList = [
|
||||||
|
{ name: '正常', id: 1 },
|
||||||
|
{ name: '中断', id: 0 }
|
||||||
|
]
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -220,6 +220,23 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
|
},
|
||||||
|
exportProcessingData: () => {
|
||||||
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
|
item.userStatus =
|
||||||
|
item.userStatus == 0 ? '可研' : item.userStatus == 1 ? '建设' : item.userStatus == 2 ? '运行' : '退运'
|
||||||
|
item.status =
|
||||||
|
item.status == 0
|
||||||
|
? '待提交审批'
|
||||||
|
: item.status == 1
|
||||||
|
? '审批中'
|
||||||
|
: item.status == 2
|
||||||
|
? '审批通过'
|
||||||
|
: item.status == 3
|
||||||
|
? '审批不通过'
|
||||||
|
: '已取消'
|
||||||
|
return item
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
|
|||||||
@@ -169,6 +169,14 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
tableStore.table.params.orgNo = tableStore.table.params.deptIndex
|
||||||
|
},
|
||||||
|
exportProcessingData: () => {
|
||||||
|
tableStore.table.allData = tableStore.table.allData.filter(item => {
|
||||||
|
item.userStatus =
|
||||||
|
item.userStatus == 0 ? '可研' : item.userStatus == 1 ? '建设' : item.userStatus == 2 ? '运行' : '退运'
|
||||||
|
|
||||||
|
return item
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.city = ''
|
tableStore.table.params.city = ''
|
||||||
|
|||||||
@@ -357,6 +357,7 @@ import {
|
|||||||
import { getAllDeptList } from '@/api/common'
|
import { getAllDeptList } from '@/api/common'
|
||||||
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
import { getTerminalDetailsById } from '@/api/supervision-boot/terminal/index'
|
||||||
import { nodeAllList } from '@/api/device-boot/Business'
|
import { nodeAllList } from '@/api/device-boot/Business'
|
||||||
|
import { getDeviceTypeList } from '@/api/device-boot/modelManage'
|
||||||
const emits = defineEmits(['onSubmit'])
|
const emits = defineEmits(['onSubmit'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
@@ -377,7 +378,8 @@ const neutralPointWiringMethodList = dictData.getBasicData('Neutral_Point')
|
|||||||
//字典获取厂家
|
//字典获取厂家
|
||||||
const manufacturerList = dictData.getBasicData('Dev_Manufacturers')
|
const manufacturerList = dictData.getBasicData('Dev_Manufacturers')
|
||||||
//字典获取终端型号
|
//字典获取终端型号
|
||||||
const terminalTypeList = dictData.getBasicData('Dev_Type')
|
//const terminalTypeList = dictData.getBasicData('Dev_Type')
|
||||||
|
const terminalTypeList = ref([])
|
||||||
//字典获取数据类型
|
//字典获取数据类型
|
||||||
const dataTypeList = [
|
const dataTypeList = [
|
||||||
{
|
{
|
||||||
@@ -432,7 +434,7 @@ const terminalModelList = [
|
|||||||
const substationList: any = ref([])
|
const substationList: any = ref([])
|
||||||
//字典获取通讯类型
|
//字典获取通讯类型
|
||||||
const frontTypeList = dictData.getBasicData('Front_Type', ['CLD', '61850'])
|
const frontTypeList = dictData.getBasicData('Front_Type', ['CLD', '61850'])
|
||||||
console.log("🚀 ~ frontTypeList:", frontTypeList)
|
//console.log("🚀 ~ frontTypeList:", frontTypeList)
|
||||||
//定义通讯状态下拉框数据
|
//定义通讯状态下拉框数据
|
||||||
const communicationStatusList = [
|
const communicationStatusList = [
|
||||||
{
|
{
|
||||||
@@ -539,6 +541,7 @@ const getPowerCompanyList = async (flag: any) => {
|
|||||||
getAllDeptList().then(res => {
|
getAllDeptList().then(res => {
|
||||||
powerCompanyList.value = res.data[0].children[0].children
|
powerCompanyList.value = res.data[0].children[0].children
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
||||||
getSubstationVoltageLevel({
|
getSubstationVoltageLevel({
|
||||||
orgIds: [
|
orgIds: [
|
||||||
powerCompanyList.value.find(
|
powerCompanyList.value.find(
|
||||||
@@ -1168,12 +1171,26 @@ const disabledDate = time => {
|
|||||||
const importType = ref(null)
|
const importType = ref(null)
|
||||||
const resendId = ref('')
|
const resendId = ref('')
|
||||||
const open = async (row: any) => {
|
const open = async (row: any) => {
|
||||||
console.log('🚀 ~ open ~ row:', row.row)
|
|
||||||
let flag = row.row ? true : false
|
let flag = row.row ? true : false
|
||||||
importType.value = null
|
importType.value = null
|
||||||
if (!flag) await getPowerCompanyList(false)
|
if (!flag) await getPowerCompanyList(false)
|
||||||
title.value = row.title
|
title.value = row.title
|
||||||
dialogFormVisible.value = true
|
dialogFormVisible.value = true
|
||||||
|
|
||||||
|
const params = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 100,
|
||||||
|
searchState: '',
|
||||||
|
searchValue: ''
|
||||||
|
}
|
||||||
|
await getDeviceTypeList(params).then((res: any) => {
|
||||||
|
terminalTypeList.value = res.data.records.map((item: any) => ({
|
||||||
|
id: item.id,
|
||||||
|
name: item.name
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
|
||||||
if (row.row) {
|
if (row.row) {
|
||||||
resendId.value = row.row.id
|
resendId.value = row.row.id
|
||||||
importType.value = row.row.importType
|
importType.value = row.row.importType
|
||||||
|
|||||||
@@ -1,23 +1,37 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span style="width: 100px; margin-top: 3px">电压等级:</span>
|
<span style="width: 100px; margin-top: 3px">电压等级:</span>
|
||||||
<el-checkbox :indeterminate="isIndeterminate" v-model="checkAll" @change="handleCheckAllChange"
|
<el-checkbox
|
||||||
style="margin-right: 28px">
|
:indeterminate="isIndeterminate"
|
||||||
|
v-model="checkAll"
|
||||||
|
@change="handleCheckAllChange"
|
||||||
|
style="margin-right: 28px"
|
||||||
|
>
|
||||||
全选
|
全选
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-checkbox-group v-model="checkedVoltage" @change="handleCheckedVoltageChange"
|
<el-checkbox-group
|
||||||
style="height: 72px; overflow-y: auto; flex: 1">
|
v-model="checkedVoltage"
|
||||||
|
@change="handleCheckedVoltageChange"
|
||||||
|
style="height: 72px; overflow-y: auto; flex: 1"
|
||||||
|
>
|
||||||
<el-checkbox v-for="(item, index) in grade" :label="item" :key="index">{{ item.name }}</el-checkbox>
|
<el-checkbox v-for="(item, index) in grade" :label="item" :key="index">{{ item.name }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
<div class="flex">
|
<div class="flex">
|
||||||
<span style="width: 100px; margin-top: 3px">干扰源类型:</span>
|
<span style="width: 100px; margin-top: 3px">干扰源类型:</span>
|
||||||
<el-checkbox :indeterminate="isIndeterminate1" v-model="checkAll1" @change="handleCheckAllChange1"
|
<el-checkbox
|
||||||
style="margin-right: 28px">
|
:indeterminate="isIndeterminate1"
|
||||||
|
v-model="checkAll1"
|
||||||
|
@change="handleCheckAllChange1"
|
||||||
|
style="margin-right: 28px"
|
||||||
|
>
|
||||||
全选
|
全选
|
||||||
</el-checkbox>
|
</el-checkbox>
|
||||||
<el-checkbox-group v-model="checkedSource" @change="handleCheckedSourceChange"
|
<el-checkbox-group
|
||||||
style="height: 72px; overflow-y: auto; flex: 1">
|
v-model="checkedSource"
|
||||||
|
@change="handleCheckedSourceChange"
|
||||||
|
style="height: 72px; overflow-y: auto; flex: 1"
|
||||||
|
>
|
||||||
<el-checkbox v-for="(item, index) in type" :label="item" :key="index">{{ item.name }}</el-checkbox>
|
<el-checkbox v-for="(item, index) in type" :label="item" :key="index">{{ item.name }}</el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</div>
|
</div>
|
||||||
@@ -28,7 +42,7 @@
|
|||||||
<el-radio label="F47">F47</el-radio>
|
<el-radio label="F47">F47</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<my-echart class="bars_w" :options="echartList" />
|
<my-echart class="bars_w" :options="echartList" @echartClick="echartClick" />
|
||||||
|
|
||||||
<vxe-table class="dw" :data="TableData" height="50px" v-bind="defaultAttribute">
|
<vxe-table class="dw" :data="TableData" height="50px" v-bind="defaultAttribute">
|
||||||
<vxe-column field="name" title="名称" width="100px"></vxe-column>
|
<vxe-column field="name" title="名称" width="100px"></vxe-column>
|
||||||
@@ -43,7 +57,7 @@ import MyEchart from '@/components/echarts/MyEchart.vue'
|
|||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { ref, reactive } from 'vue'
|
import { ref, reactive } from 'vue'
|
||||||
import { Bottom } from '@element-plus/icons-vue/dist/types'
|
const emit = defineEmits(['viewWave'])
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const isIndeterminate = ref(false)
|
const isIndeterminate = ref(false)
|
||||||
const isIndeterminate1 = ref(false)
|
const isIndeterminate1 = ref(false)
|
||||||
@@ -340,7 +354,7 @@ const gongfunction = () => {
|
|||||||
var index = datalist.value[i].lineId
|
var index = datalist.value[i].lineId
|
||||||
var eventId = datalist.value[i].eventId
|
var eventId = datalist.value[i].eventId
|
||||||
var lineName = datalist.value[i].lineName
|
var lineName = datalist.value[i].lineName
|
||||||
point = [xx, yy, time, company, substation, index, eventId, lineName]
|
point = [xx, yy, time, company, substation, index, eventId, lineName, datalist.value[i]]
|
||||||
|
|
||||||
if (xx <= 0.003) {
|
if (xx <= 0.003) {
|
||||||
var line = 0
|
var line = 0
|
||||||
@@ -468,6 +482,10 @@ const gongfunction = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const echartClick = (params: any) => {
|
||||||
|
|
||||||
|
emit('viewWave', params.value[8])
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ checkedVoltage, checkedSource, info })
|
defineExpose({ checkedVoltage, checkedSource, info })
|
||||||
const layout = mainHeight(320) as any
|
const layout = mainHeight(320) as any
|
||||||
|
|||||||
@@ -85,6 +85,7 @@ const eliminate = (name: string) => {
|
|||||||
|
|
||||||
// 地图数处理
|
// 地图数处理
|
||||||
const map = (res: any) => {
|
const map = (res: any) => {
|
||||||
|
|
||||||
echartMapList.value = {
|
echartMapList.value = {
|
||||||
name: '',
|
name: '',
|
||||||
title: {
|
title: {
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader date-picker area>
|
<div v-show="view">
|
||||||
<template v-slot:select></template>
|
<TableHeader date-picker area>
|
||||||
</TableHeader>
|
<template v-slot:select></template>
|
||||||
<el-tabs v-model="activeName" type="border-card" @tab-change="handleClick" v-loading="tableStore.table.loading">
|
</TableHeader>
|
||||||
<el-tab-pane label="暂降原因及类型统计" name="1">
|
<el-tabs
|
||||||
<TypeStatistics ref="Statistics" />
|
v-model="activeName"
|
||||||
</el-tab-pane>
|
type="border-card"
|
||||||
<el-tab-pane label="电压容忍度曲线兼容性统计" name="2">
|
@tab-change="handleClick"
|
||||||
<Compatibility ref="compatibility" />
|
v-loading="tableStore.table.loading"
|
||||||
</el-tab-pane>
|
>
|
||||||
</el-tabs>
|
<el-tab-pane label="暂降原因及类型统计" name="1">
|
||||||
|
<TypeStatistics ref="Statistics" />
|
||||||
|
</el-tab-pane>
|
||||||
|
<el-tab-pane label="电压容忍度曲线兼容性统计" name="2">
|
||||||
|
<Compatibility ref="compatibility" @viewWave="viewWave" />
|
||||||
|
</el-tab-pane>
|
||||||
|
</el-tabs>
|
||||||
|
</div>
|
||||||
|
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||||
|
<waveForm ref="waveFormRef" senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -24,7 +34,7 @@
|
|||||||
"voltage": "" -->
|
"voltage": "" -->
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import waveForm from '@/components/echarts/waveForm.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import { onMounted, reactive, ref, provide } from 'vue'
|
import { onMounted, reactive, ref, provide } from 'vue'
|
||||||
@@ -34,11 +44,15 @@ import { mainHeight } from '@/utils/layout'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Region/overview'
|
name: 'Region/overview'
|
||||||
})
|
})
|
||||||
|
const pageHeight = mainHeight(20)
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const Statistics = ref()
|
const Statistics = ref()
|
||||||
const compatibility = ref()
|
const compatibility = ref()
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
|
const view = ref(true)
|
||||||
|
const view2 = ref(false)
|
||||||
|
const boxoList = ref({})
|
||||||
|
const wp = ref({})
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/event-boot/areaAnalysis/getEventReason',
|
url: '/event-boot/areaAnalysis/getEventReason',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -53,8 +67,6 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
|
|
||||||
|
|
||||||
if (activeName.value == '1') {
|
if (activeName.value == '1') {
|
||||||
Statistics.value.info(tableStore.table.data)
|
Statistics.value.info(tableStore.table.data)
|
||||||
} else {
|
} else {
|
||||||
@@ -84,6 +96,21 @@ const handleClick = async (e: any) => {
|
|||||||
await tableStore.onTableAction('search', {})
|
await tableStore.onTableAction('search', {})
|
||||||
}
|
}
|
||||||
const layout = mainHeight(123) as any
|
const layout = mainHeight(123) as any
|
||||||
|
const backbxlb = () => {
|
||||||
|
view.value = true
|
||||||
|
view2.value = false
|
||||||
|
}
|
||||||
|
const waveFormRef = ref()
|
||||||
|
// 查看波形
|
||||||
|
const viewWave = (row: any) => {
|
||||||
|
view.value = false
|
||||||
|
setTimeout(() => {
|
||||||
|
waveFormRef.value.open({ ...row, startTime: row.time,
|
||||||
|
featureAmplitude:row.eventValue,
|
||||||
|
duration:row.persistTime
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-descriptions-item align="center" label="不可容忍">{{ data.bkrr }}</el-descriptions-item>
|
<el-descriptions-item align="center" label="不可容忍">{{ data.bkrr }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div style="flex: 1" class="mt10">
|
<div style="flex: 1" class="mt10">
|
||||||
<my-echart :options="options" />
|
<my-echart :options="options" @echartClick="echartClick" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -107,7 +107,7 @@ const init = () => {
|
|||||||
name: '%'
|
name: '%'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
color: ['#FF8C00', '#00BFFF', 'green', 'red'],
|
color: ['#FF8C00', '#00BFFF', 'green', 'red'],
|
||||||
options: {
|
options: {
|
||||||
dataZoom: null,
|
dataZoom: null,
|
||||||
series: [
|
series: [
|
||||||
@@ -186,7 +186,7 @@ function gongfunction(arr: any) {
|
|||||||
let time = arr[i].time
|
let time = arr[i].time
|
||||||
let eventId = arr[i].eventId
|
let eventId = arr[i].eventId
|
||||||
// let index =arr[i].eventDetailIndex;
|
// let index =arr[i].eventDetailIndex;
|
||||||
point = [xx, yy, time, eventId]
|
point = [xx, yy, time, eventId, arr[i]]
|
||||||
|
|
||||||
if (xx <= 0.003) {
|
if (xx <= 0.003) {
|
||||||
let line = 0
|
let line = 0
|
||||||
@@ -324,9 +324,13 @@ function gongfunction(arr: any) {
|
|||||||
pointFun
|
pointFun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const emit = defineEmits(['viewWave'])
|
||||||
|
const echartClick = (params: any) => {
|
||||||
|
emit('viewWave', params.value[4])
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
datePickerRef.value.setTheDate(1)
|
datePickerRef.value.setTheDate(1)
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<el-descriptions-item align="center" label="不可容忍">{{ data.bkrr }}</el-descriptions-item>
|
<el-descriptions-item align="center" label="不可容忍">{{ data.bkrr }}</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<div style="flex: 1" class="mt10">
|
<div style="flex: 1" class="mt10">
|
||||||
<my-echart :options="options" />
|
<my-echart :options="options" @echartClick="echartClick" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -172,7 +172,7 @@ function gongfunction(arr: any) {
|
|||||||
let time = arr[i].time
|
let time = arr[i].time
|
||||||
let eventId = arr[i].eventId
|
let eventId = arr[i].eventId
|
||||||
// let index =arr[i].eventDetailIndex;
|
// let index =arr[i].eventDetailIndex;
|
||||||
point = [xx, yy, time, eventId]
|
point = [xx, yy, time, eventId, arr[i]]
|
||||||
|
|
||||||
if (xx <= 0.003) {
|
if (xx <= 0.003) {
|
||||||
let line = 0
|
let line = 0
|
||||||
@@ -205,8 +205,6 @@ function gongfunction(arr: any) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (xx <= 0.5) {
|
} else if (xx <= 0.5) {
|
||||||
|
|
||||||
|
|
||||||
if (yy > 120 || yy < 70) {
|
if (yy > 120 || yy < 70) {
|
||||||
unstandI++
|
unstandI++
|
||||||
pointIun.push({
|
pointIun.push({
|
||||||
@@ -251,14 +249,12 @@ function gongfunction(arr: any) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (xx < 0.05) {
|
if (xx < 0.05) {
|
||||||
|
|
||||||
standF++
|
standF++
|
||||||
pointF.push({
|
pointF.push({
|
||||||
value: point,
|
value: point,
|
||||||
itemStyle: { normal: { color: 'green' } }
|
itemStyle: { normal: { color: 'green' } }
|
||||||
})
|
})
|
||||||
} else if (xx < 0.2) {
|
} else if (xx < 0.2) {
|
||||||
|
|
||||||
if (yy > 50) {
|
if (yy > 50) {
|
||||||
standF++
|
standF++
|
||||||
pointF.push({
|
pointF.push({
|
||||||
@@ -274,7 +270,6 @@ function gongfunction(arr: any) {
|
|||||||
}
|
}
|
||||||
} else if (xx < 0.5) {
|
} else if (xx < 0.5) {
|
||||||
if (yy > 70) {
|
if (yy > 70) {
|
||||||
|
|
||||||
standF++
|
standF++
|
||||||
pointF.push({
|
pointF.push({
|
||||||
value: point,
|
value: point,
|
||||||
@@ -289,7 +284,6 @@ function gongfunction(arr: any) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (yy > 80) {
|
if (yy > 80) {
|
||||||
|
|
||||||
standF++
|
standF++
|
||||||
pointF.push({
|
pointF.push({
|
||||||
value: point,
|
value: point,
|
||||||
@@ -316,9 +310,12 @@ function gongfunction(arr: any) {
|
|||||||
pointFun
|
pointFun
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const emit = defineEmits(['viewWave'])
|
||||||
|
const echartClick = (params: any) => {
|
||||||
|
emit('viewWave', params.value[4])
|
||||||
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
datePickerRef.value.setTheDate(1)
|
datePickerRef.value.setTheDate(1)
|
||||||
init()
|
init()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-tabs v-model="activeName" type="border-card" class="event-statistics" tab-position="left" :style="height">
|
<el-tabs v-model="activeName" type="border-card" class="event-statistics" tab-position="left" :style="height">
|
||||||
<el-tab-pane lazy label="ITIC曲线分析" name="1">
|
<el-tab-pane lazy label="ITIC曲线分析" name="1">
|
||||||
<ITICquxianfenxi />
|
<ITICquxianfenxi @viewWave="viewWave"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane lazy label="SEMI F47 分析" name="2">
|
<el-tab-pane lazy label="SEMI F47 分析" name="2">
|
||||||
<SEMIF47fenxi />
|
<SEMIF47fenxi @viewWave="viewWave"/>
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane lazy label="电压暂降表及密度" name="3">
|
<el-tab-pane lazy label="电压暂降表及密度" name="3">
|
||||||
<Dianyazanjiangbiaojimidu />
|
<Dianyazanjiangbiaojimidu />
|
||||||
@@ -35,12 +35,16 @@ const props = defineProps({
|
|||||||
default: 0
|
default: 0
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
const emit = defineEmits(['viewWave'])
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
const height = ref(mainHeight(84 + props.externalHeight))
|
const height = ref(mainHeight(84 + props.externalHeight))
|
||||||
// onMounted(() => {
|
// onMounted(() => {
|
||||||
// height.value = mainHeight(84 + props.externalHeight)
|
// height.value = mainHeight(84 + props.externalHeight)
|
||||||
// console.log("🚀 ~ 84 + props.externalHeight:", 84 + props.externalHeight)
|
// console.log("🚀 ~ 84 + props.externalHeight:", 84 + props.externalHeight)
|
||||||
// })
|
// })
|
||||||
|
const viewWave=(row:any)=>{
|
||||||
|
emit('viewWave',row)
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.event-statistics {
|
.event-statistics {
|
||||||
|
|||||||
@@ -1,34 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main" style="position: relative">
|
<div class="default-main" style="position: relative">
|
||||||
|
<div v-show="view">
|
||||||
<el-tabs v-model="activeName" type="border-card" class="demo-tabs">
|
<el-tabs v-model="activeName" type="border-card" class="demo-tabs">
|
||||||
<el-tab-pane label="导航" name="1" :style="height" lazy>
|
<el-tab-pane label="导航" name="1" :style="height" lazy>
|
||||||
<Navigation @changeTab="changeTab" ref="navigationRef" />
|
<Navigation @changeTab="changeTab" ref="navigationRef" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="事件统计" name="2" lazy v-if="!isReload">
|
<el-tab-pane label="事件统计" name="2" lazy v-if="!isReload">
|
||||||
<EventStatistics />
|
<EventStatistics @viewWave="viewWave" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="事件分析" name="3" lazy v-if="!isReload">
|
<el-tab-pane label="事件分析" name="3" lazy v-if="!isReload">
|
||||||
<EventStudy />
|
<EventStudy />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="运行情况" name="4" lazy :style="height" v-if="!isReload">
|
<el-tab-pane label="运行情况" name="4" lazy :style="height" v-if="!isReload">
|
||||||
<RunningCondition />
|
<RunningCondition />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="暂态报告" name="5" lazy v-if="VITE_FLAG">
|
<el-tab-pane label="暂态报告" name="5" lazy v-if="VITE_FLAG">
|
||||||
<TransientReport />
|
<TransientReport />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
<div class="monitoring-point">当前位置:{{ monitoringPoint.state.lineName }}</div>
|
<div class="monitoring-point">当前位置:{{ monitoringPoint.state.lineName }}</div>
|
||||||
|
</div>
|
||||||
|
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
|
||||||
|
<waveForm ref="waveFormRef" senior :boxoList="boxoList" :wp="wp" @backbxlb="backbxlb" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { defineOptions, nextTick, ref, watch } from 'vue'
|
import { nextTick, ref, watch } from 'vue'
|
||||||
import Navigation from './navigation/index.vue'
|
import Navigation from './navigation/index.vue'
|
||||||
import EventStatistics from './eventStatistics/index.vue'
|
import EventStatistics from './eventStatistics/index.vue'
|
||||||
import EventStudy from './eventStudy/index.vue'
|
import EventStudy from './eventStudy/index.vue'
|
||||||
import RunningCondition from './runningCondition/index.vue'
|
import RunningCondition from './runningCondition/index.vue'
|
||||||
import TransientReport from './transientReport/index.vue'
|
import TransientReport from './transientReport/index.vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import waveForm from '@/components/echarts/waveForm.vue'
|
||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||||
@@ -37,14 +42,17 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const isReload = ref(false)
|
const isReload = ref(false)
|
||||||
const navigationRef = ref()
|
const navigationRef = ref()
|
||||||
|
const pageHeight = mainHeight(20)
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(82)
|
const height = mainHeight(82)
|
||||||
const activeName = ref('1')
|
const activeName = ref('1')
|
||||||
|
const view = ref(true)
|
||||||
|
const view2 = ref(false)
|
||||||
|
const boxoList = ref({})
|
||||||
|
const wp = ref({})
|
||||||
watch(
|
watch(
|
||||||
() => router.currentRoute.value.query.lineId,
|
() => router.currentRoute.value.query.lineId,
|
||||||
(newLineId, oldLineId) => {
|
(newLineId, oldLineId) => {
|
||||||
|
|
||||||
if (!newLineId) return
|
if (!newLineId) return
|
||||||
// 在这里处理 lineId 的变化
|
// 在这里处理 lineId 的变化
|
||||||
console.log('newLineId')
|
console.log('newLineId')
|
||||||
@@ -62,7 +70,6 @@ watch(
|
|||||||
watch(
|
watch(
|
||||||
() => monitoringPoint.state.lineId,
|
() => monitoringPoint.state.lineId,
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
// 刷新页面
|
// 刷新页面
|
||||||
isReload.value = true
|
isReload.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -70,8 +77,27 @@ watch(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
const changeTab = (e: string,) => {
|
const backbxlb = () => {
|
||||||
|
view.value = true
|
||||||
|
view2.value = false
|
||||||
|
}
|
||||||
|
const waveFormRef = ref()
|
||||||
|
// 查看波形
|
||||||
|
const viewWave = (row: any) => {
|
||||||
|
view.value = false
|
||||||
|
setTimeout(() => {
|
||||||
|
console.log(123, monitoringPoint.state)
|
||||||
|
|
||||||
|
waveFormRef.value.open({
|
||||||
|
...row,
|
||||||
|
lineName: monitoringPoint.state.lineName.split('>').pop(),
|
||||||
|
startTime: row.time,
|
||||||
|
featureAmplitude: row.eventValue / 100,
|
||||||
|
duration: row.persistTime
|
||||||
|
})
|
||||||
|
}, 100)
|
||||||
|
}
|
||||||
|
const changeTab = (e: string) => {
|
||||||
activeName.value = e
|
activeName.value = e
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -126,6 +126,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
|
import { BmlMarkerClusterer } from 'vue-baidu-map-3x'
|
||||||
|
|
||||||
import { onMounted, ref, watch } from 'vue'
|
import { onMounted, ref, watch } from 'vue'
|
||||||
import { getAreaLineInfo } from '@/api/event-boot/areaInfo'
|
import { getAreaLineInfo } from '@/api/event-boot/areaInfo'
|
||||||
import DatePicker from '@/components/form/datePicker/index.vue'
|
import DatePicker from '@/components/form/datePicker/index.vue'
|
||||||
@@ -241,7 +242,7 @@ const handler = async ({ BMap, map }: any) => {
|
|||||||
siteList.value = list
|
siteList.value = list
|
||||||
|
|
||||||
center.value.lng = list[0]?.lng || 0
|
center.value.lng = list[0]?.lng || 0
|
||||||
center.value.lat = list[0]?.lat + 0.01 || 0
|
center.value.lat = list[0]?.lat
|
||||||
watch(
|
watch(
|
||||||
() => monitoringPoint.state.lineId,
|
() => monitoringPoint.state.lineId,
|
||||||
(newLineId, oldLineId) => {
|
(newLineId, oldLineId) => {
|
||||||
@@ -250,7 +251,7 @@ const handler = async ({ BMap, map }: any) => {
|
|||||||
if (value == undefined) return
|
if (value == undefined) return
|
||||||
|
|
||||||
center.value.lng = value.lng
|
center.value.lng = value.lng
|
||||||
center.value.lat = value.lat + 0.01
|
center.value.lat = value.lat
|
||||||
infoWindowPoint.value = value
|
infoWindowPoint.value = value
|
||||||
infoWindowPoint.value.show = true
|
infoWindowPoint.value.show = true
|
||||||
|
|
||||||
@@ -273,7 +274,6 @@ const syncCenterAndZoom = (e: any) => {
|
|||||||
const markerClick = (e: any) => {
|
const markerClick = (e: any) => {
|
||||||
//console.log("🚀 ~ markerClick ~ e:", e)
|
//console.log("🚀 ~ markerClick ~ e:", e)
|
||||||
infoWindowPoint.value = e
|
infoWindowPoint.value = e
|
||||||
monitoringPoint.setValue('lineId', e.lineId)
|
|
||||||
infoWindowPoint.value.show = true
|
infoWindowPoint.value.show = true
|
||||||
}
|
}
|
||||||
const changeTab = (e: string) => {
|
const changeTab = (e: string) => {
|
||||||
|
|||||||
@@ -91,14 +91,19 @@
|
|||||||
@click="markerClick(path)"
|
@click="markerClick(path)"
|
||||||
></bm-marker>
|
></bm-marker>
|
||||||
</BmlMarkerClusterer>
|
</BmlMarkerClusterer>
|
||||||
|
|
||||||
<bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
|
<bm-marker :position="infoWindowPoint" :icon="{ url: '1', size: { width: 0, height: 0 } }">
|
||||||
<bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
|
<bm-info-window :show="infoWindowPoint.show" @close="infoWindowPoint.show = false">
|
||||||
<el-descriptions :title="infoWindowPoint.lineName" :column="1" v-if="infoWindowPoint.lineId">
|
<el-descriptions :title="infoWindowPoint.lineName" :column="1" v-if="infoWindowPoint.lineId">
|
||||||
<el-descriptions-item label="供电公司">{{ infoWindowPoint.gdName }}</el-descriptions-item>
|
<el-descriptions-item label="供电公司">
|
||||||
|
{{ infoWindowPoint.gdName }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="变电站(场站)">
|
<el-descriptions-item label="变电站(场站)">
|
||||||
{{ infoWindowPoint.subName }}
|
{{ infoWindowPoint.subName }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="母线">{{ infoWindowPoint.voltageName }}</el-descriptions-item>
|
<el-descriptions-item label="母线">
|
||||||
|
{{ infoWindowPoint.voltageName }}
|
||||||
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="网络参数">
|
<el-descriptions-item label="网络参数">
|
||||||
{{ infoWindowPoint.ip }}
|
{{ infoWindowPoint.ip }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
@@ -292,7 +297,7 @@ const pointChange = (val: string) => {
|
|||||||
let data = areaLineInfo.value.find((item: any) => item.lineId == val)
|
let data = areaLineInfo.value.find((item: any) => item.lineId == val)
|
||||||
|
|
||||||
center.value.lng = data.lng
|
center.value.lng = data.lng
|
||||||
center.value.lat = data.lat + 0.04
|
center.value.lat = data.lat
|
||||||
infoWindowPoint.value = data
|
infoWindowPoint.value = data
|
||||||
infoWindowPoint.value.show = true
|
infoWindowPoint.value.show = true
|
||||||
zoom.value = 13
|
zoom.value = 13
|
||||||
|
|||||||
@@ -25,7 +25,11 @@
|
|||||||
<vxe-column type="seq" title="序号" width="70px"></vxe-column>
|
<vxe-column type="seq" title="序号" width="70px"></vxe-column>
|
||||||
<vxe-column field="startTime" title="发生时刻" width="200"></vxe-column>
|
<vxe-column field="startTime" title="发生时刻" width="200"></vxe-column>
|
||||||
<vxe-column field="lineName" title="监测点" width="120"></vxe-column>
|
<vxe-column field="lineName" title="监测点" width="120"></vxe-column>
|
||||||
<vxe-column field="featureAmplitude" title="暂降(骤升)幅值(%)"></vxe-column>
|
<vxe-column field="featureAmplitude" title="暂降(骤升)幅值(%)">
|
||||||
|
<template #default="{ row }">
|
||||||
|
{{ (row.featureAmplitude * 100).toFixed(2) }}
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
<vxe-column field="duration" title="持续时间(s)"></vxe-column>
|
<vxe-column field="duration" title="持续时间(s)"></vxe-column>
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,7 +53,6 @@ const props = defineProps({
|
|||||||
const tableData = ref([])
|
const tableData = ref([])
|
||||||
const tableData1 = ref([])
|
const tableData1 = ref([])
|
||||||
getNoDealEvents(props.params).then(res => {
|
getNoDealEvents(props.params).then(res => {
|
||||||
|
|
||||||
tableData.value = res.data
|
tableData.value = res.data
|
||||||
})
|
})
|
||||||
getAreaOffDev(props.params).then(res => {
|
getAreaOffDev(props.params).then(res => {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader date-picker area showExport>
|
<TableHeader date-picker area >
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="统计类型">
|
<el-form-item label="统计类型">
|
||||||
<el-radio-group v-model="tableStore.table.params.comFlag">
|
<el-radio-group v-model="tableStore.table.params.comFlag">
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="exportEvent">导出</el-button> -->
|
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">导出</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
@@ -61,6 +61,7 @@ import Table from '@/components/table/index.vue'
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { getEventReport } from '@/api/event-boot/report'
|
import { getEventReport } from '@/api/event-boot/report'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'Operationmanagement/terminalmanagement'
|
name: 'Operationmanagement/terminalmanagement'
|
||||||
@@ -70,7 +71,7 @@ const triggerType = dictData.getBasicData('Event_Statis')
|
|||||||
const sign: any = dictData.getBasicData('power_flag')
|
const sign: any = dictData.getBasicData('power_flag')
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
|
|
||||||
|
const loading = ref(false)
|
||||||
const monitorList = [
|
const monitorList = [
|
||||||
{ value: 0, label: '非网公司' },
|
{ value: 0, label: '非网公司' },
|
||||||
{ value: 1, label: '网公司' },
|
{ value: 1, label: '网公司' },
|
||||||
@@ -162,20 +163,48 @@ onMounted(() => {
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
let form: any = JSON.parse(JSON.stringify(tableStore.table.params))
|
// let form: any = JSON.parse(JSON.stringify(tableStore.table.params))
|
||||||
form.pageNum = 1
|
// form.pageNum = 1
|
||||||
form.pageSize = tableStore.table.total
|
// form.pageSize = tableStore.table.total
|
||||||
getEventReport(form).then(res => {
|
// getEventReport(form).then(res => {
|
||||||
tableRef.value.getRef().exportData({
|
// tableRef.value.getRef().exportData({
|
||||||
filename: '事件报告', // 文件名字
|
// filename: '事件报告', // 文件名字
|
||||||
sheetName: 'Sheet1',
|
// sheetName: 'Sheet1',
|
||||||
type: 'xlsx', //导出文件类型 xlsx 和 csv
|
// type: 'xlsx', //导出文件类型 xlsx 和 csv
|
||||||
useStyle: true,
|
// useStyle: true,
|
||||||
data: res.data.records, // 数据源 // 过滤那个字段导出
|
// data: res.data.records, // 数据源 // 过滤那个字段导出
|
||||||
columnFilterMethod: function (column, $columnIndex) {
|
// columnFilterMethod: function (column, $columnIndex) {
|
||||||
return !(column.$columnIndex === 0)
|
// return !(column.$columnIndex === 0)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
|
|
||||||
|
const ids = tableStore.table.data.map((item: any) => item.eventId);
|
||||||
|
loading.value = true
|
||||||
|
|
||||||
|
ElMessage('生成报告中,请稍等!')
|
||||||
|
getEventReport(ids)
|
||||||
|
.then((res: any) => {
|
||||||
|
if (res == undefined) {
|
||||||
|
loading.value = false
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
let blob = new Blob([res], {
|
||||||
|
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||||
|
})
|
||||||
|
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a') // 创建a标签
|
||||||
|
link.href = url
|
||||||
|
link.download = '事件报告' // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
loading.value = false
|
||||||
|
}) .catch(() => {
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -0,0 +1,344 @@
|
|||||||
|
<template>
|
||||||
|
<div class="dictiontary-list-detail child-router">
|
||||||
|
<!-- 上方一整块:筛选和操作按钮 -->
|
||||||
|
<el-row class="main-content">
|
||||||
|
<el-col :span="24">
|
||||||
|
<TableHeader>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-page-header @back="$emit('close')">
|
||||||
|
<template #content>
|
||||||
|
<span class="text-large font-600 mr-3">报告字典管理</span>
|
||||||
|
</template>
|
||||||
|
</el-page-header>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="过滤筛选">
|
||||||
|
<el-input
|
||||||
|
style="width: 240px"
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入筛选数据"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
<template #operation>
|
||||||
|
<el-button :icon="Plus" type="primary" @click="addTemplate">新增配置项</el-button>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 下方左右两块:左侧树 + 右侧表格 -->
|
||||||
|
<el-row :gutter="20" class="main-content mt20">
|
||||||
|
<!-- 左侧树 -->
|
||||||
|
<el-col :span="6">
|
||||||
|
<div class="tree-container">
|
||||||
|
<el-tree
|
||||||
|
@node-click="(node, data, event) => handleNodeClick(node, data)"
|
||||||
|
:expand-on-click-node="false"
|
||||||
|
:highlight-current="true"
|
||||||
|
:data="TreeData"
|
||||||
|
node-key="id"
|
||||||
|
:default-expanded-keys="treeExpandData"
|
||||||
|
:props="defaultProps"
|
||||||
|
ref="tree"
|
||||||
|
></el-tree>
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
<!-- 右侧表格 -->
|
||||||
|
<el-col :span="18">
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<!-- 新增弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
:title="dialogTitle"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
width="30%"
|
||||||
|
@close="closeDialog"
|
||||||
|
>
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="80px">
|
||||||
|
<el-form-item label="父节点:" prop="pid">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="form.pid"
|
||||||
|
style="width: 100%"
|
||||||
|
placeholder="请选择父节点"
|
||||||
|
:data="TreeData"
|
||||||
|
node-key="id"
|
||||||
|
:props="defaultProps"
|
||||||
|
clearable
|
||||||
|
:disabled="isEditMode"
|
||||||
|
check-strictly
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="名称:" prop="name" class="top">
|
||||||
|
<el-input v-model.trim="form.name" placeholder="请输入名称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述:" prop="reportDescribe" class="top">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
placeholder="请输入描述"
|
||||||
|
v-model.trim="form.reportDescribe"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="closeDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addFn">确 定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
|
import { ref, onMounted, provide } from 'vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import { ElMessage } from 'element-plus'
|
||||||
|
import {
|
||||||
|
updateDict,
|
||||||
|
addDict,
|
||||||
|
deleteDict,
|
||||||
|
getDictTree
|
||||||
|
} from '@/api/system-boot/ReportTemplate'
|
||||||
|
|
||||||
|
// 弹出框是否可见
|
||||||
|
const dialogVisible = ref<boolean>(false)
|
||||||
|
const dialogTitle = ref('新增配置项')
|
||||||
|
const formRef = ref()
|
||||||
|
const props = defineProps({
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: undefined
|
||||||
|
},
|
||||||
|
treeData: {
|
||||||
|
type: Array,
|
||||||
|
default: () => []
|
||||||
|
}
|
||||||
|
})
|
||||||
|
const TreeData = computed(() => props.treeData)
|
||||||
|
const treeExpandData = ref([])
|
||||||
|
const tree = ref(null)
|
||||||
|
|
||||||
|
// Administration.vue
|
||||||
|
const emit = defineEmits(['refreshTree'])
|
||||||
|
|
||||||
|
// 刷新左侧树数据
|
||||||
|
const refreshTreeData = () => {
|
||||||
|
emit('refreshTree') // 触发父组件刷新树数据
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData = reactive({
|
||||||
|
searchValue: '',
|
||||||
|
id: 0,
|
||||||
|
type: props.type
|
||||||
|
})
|
||||||
|
|
||||||
|
const form = reactive({
|
||||||
|
id: 0,
|
||||||
|
name: '',
|
||||||
|
reportDescribe: '',
|
||||||
|
pid: '',
|
||||||
|
sort: 0,
|
||||||
|
type: props.type
|
||||||
|
})
|
||||||
|
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'reportDescribe',
|
||||||
|
value: 'id' // 指定节点的值字段
|
||||||
|
}
|
||||||
|
|
||||||
|
const rules = {
|
||||||
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
|
reportDescribe: [{ required: true, message: '描述不能为空', trigger: 'blur' }],
|
||||||
|
pid: [{ required: true, message: '请选择父节点', trigger: 'change' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 判断是否为编辑模式
|
||||||
|
const isEditMode = computed(() => dialogTitle.value === '编辑配置项')
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/system-boot/reportDict/getReportDictList',
|
||||||
|
method: 'POST',
|
||||||
|
showPage: false,
|
||||||
|
column: [
|
||||||
|
{ title: '配置项名称', field: 'name' },
|
||||||
|
{ title: '配置项描述', field: 'reportDescribe' },
|
||||||
|
{ title: '上级节点', field: 'pidName' },
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
|
width: '180',
|
||||||
|
render: 'buttons',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
dialogTitle.value = '编辑配置项'
|
||||||
|
dialogVisible.value = true
|
||||||
|
Object.assign(form, {
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
reportDescribe: row.reportDescribe,
|
||||||
|
pid: row.pid,
|
||||||
|
sort: row.sort,
|
||||||
|
type: props.type
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '删除',
|
||||||
|
type: 'danger',
|
||||||
|
icon: 'el-icon-Delete',
|
||||||
|
render: 'confirmButton',
|
||||||
|
popconfirm: {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonType: 'danger',
|
||||||
|
title: '确定删除该字典类型吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
let data = {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
deleteDict(data).then(() => {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
tableStore.index()
|
||||||
|
refreshTreeData()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
resetCallback: () => {
|
||||||
|
tableStore.table.params.id = formData.id
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.id = 0
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
tableStore.table.params.type = props.type
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
const setDefaultExpandedKeys = (treeData: any[]) => {
|
||||||
|
const firstLevelIds = treeData.map(item => item.id)
|
||||||
|
treeExpandData.value = firstLevelIds
|
||||||
|
}
|
||||||
|
|
||||||
|
// 默认选中第一个节点并触发事件
|
||||||
|
const selectFirstNode = () => {
|
||||||
|
if (props.treeData.length > 0 && tree.value) {
|
||||||
|
const firstNodeId = props.treeData[0].id
|
||||||
|
tree.value.setCurrentKey(firstNodeId)
|
||||||
|
formData.id = firstNodeId
|
||||||
|
const firstNode = props.treeData[0]
|
||||||
|
handleNodeClick(firstNode)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听 treeData 变化,自动设置默认展开
|
||||||
|
watch(
|
||||||
|
() => props.treeData,
|
||||||
|
(newVal) => {
|
||||||
|
if (newVal.length > 0) {
|
||||||
|
setDefaultExpandedKeys(newVal)
|
||||||
|
nextTick(() => {
|
||||||
|
selectFirstNode()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
// 处理节点点击事件
|
||||||
|
const handleNodeClick = (node: any) => {
|
||||||
|
formData.id = node.id
|
||||||
|
tableStore.table.params.id = node.id
|
||||||
|
tableStore.table.params.type = props.type
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
|
||||||
|
const addTemplate = () => {
|
||||||
|
dialogTitle.value = '新增配置项'
|
||||||
|
dialogVisible.value = true
|
||||||
|
Object.assign(form, {
|
||||||
|
id: 0,
|
||||||
|
name: '',
|
||||||
|
reportDescribe: '',
|
||||||
|
pid: '',
|
||||||
|
sort: 0,
|
||||||
|
type: props.type
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const addFn = () => {
|
||||||
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
try {
|
||||||
|
if (dialogTitle.value === '编辑配置项') {
|
||||||
|
await updateDict(form)
|
||||||
|
ElMessage.success('编辑成功')
|
||||||
|
} else {
|
||||||
|
await addDict(form)
|
||||||
|
ElMessage.success('新增成功')
|
||||||
|
}
|
||||||
|
dialogVisible.value = false
|
||||||
|
tableStore.index()
|
||||||
|
refreshTreeData()
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error(dialogTitle.value === '编辑配置项' ? '编辑失败' : '新增失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
dialogVisible.value = false
|
||||||
|
formRef.value?.resetFields()
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
selectFirstNode()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.dictiontary-list-detail {
|
||||||
|
padding: 10px;
|
||||||
|
background-color: #ffffff;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.main-content {
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.mt20 {
|
||||||
|
margin-top: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
.tree-container {
|
||||||
|
border: 1px solid #ebeef5;
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 10px;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-tree) {
|
||||||
|
height: 100%;
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,22 +1,77 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
|
|
||||||
<TableHeader ref="TableHeaderRef">
|
<TableHeader ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="模板类型">
|
<el-form-item label="模板类型">
|
||||||
|
<el-select v-model="tableStore.table.params.type" placeholder="Select" size="large" @change="handleTypeChange">
|
||||||
<el-select v-model="tableStore.table.params.type" placeholder="Select" size="large">
|
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Memo" type="primary" @click="add">报告字典管理</el-button>
|
<el-button icon="el-icon-Memo" type="primary" @click="openReportDictionary">报告字典管理</el-button>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增模版</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增模版</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
|
<Administration
|
||||||
|
:type="Number(tableStore.table.params.type)"
|
||||||
|
:tree-data="treeDataForChild"
|
||||||
|
v-if="showDictionary"
|
||||||
|
@close="closeReportDictionary"
|
||||||
|
@refreshTree="handleRefreshTree"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-dialog
|
||||||
|
:title="title"
|
||||||
|
v-model="dialogVisible"
|
||||||
|
v-if="dialogVisible"
|
||||||
|
width="40%"
|
||||||
|
>
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="11">
|
||||||
|
<div class="grid-content">
|
||||||
|
<el-tree
|
||||||
|
:data="data"
|
||||||
|
show-checkbox
|
||||||
|
node-key="id"
|
||||||
|
:props="defaultProps"
|
||||||
|
:default-checked-keys="treeCheckedData"
|
||||||
|
:default-expanded-keys="treeExpandData"
|
||||||
|
@check-change="handleCheckChange"
|
||||||
|
ref="tree"
|
||||||
|
>
|
||||||
|
</el-tree>
|
||||||
|
</div
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="13">
|
||||||
|
<el-form ref="formRef" :rules="rules" :model="form" label-width="60px">
|
||||||
|
<el-form-item label="名称:" prop="name">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="form.name"
|
||||||
|
placeholder="请输入名称"
|
||||||
|
></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="描述:" prop="code" class="top">
|
||||||
|
<el-input
|
||||||
|
type="textarea"
|
||||||
|
:rows="2"
|
||||||
|
placeholder="请输入描述"
|
||||||
|
v-model.trim="form.code"
|
||||||
|
>
|
||||||
|
</el-input>
|
||||||
|
</el-form-item> </el-form
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="closeDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="addDetermine">确定</el-button>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -24,19 +79,83 @@ import { ref, onMounted, provide, nextTick } from 'vue'
|
|||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { delTemplate } from '@/api/harmonic-boot/luckyexcel'
|
import { addData,updateData,deleteData,getDictTree } from '@/api/system-boot/MonitoringPoint'
|
||||||
import { useDictData } from '@/stores/dictData'
|
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
|
import Administration from '@/views/system/ReportConfiguration/components/Administration.vue'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'BusinessAdministrator/ReportTemplate/ReportConfiguration'
|
name: 'BusinessAdministrator/ReportTemplate/ReportConfiguration'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const showDictionary = ref(false)
|
||||||
|
const formRef = ref(null)
|
||||||
|
const tree = ref(null)
|
||||||
|
// 弹出框标题
|
||||||
|
const title = ref<string>('新增模板')
|
||||||
|
|
||||||
|
// 弹出框是否可见
|
||||||
|
const dialogVisible = ref<boolean>(false)
|
||||||
|
// 是否为编辑模式
|
||||||
|
const isEdit = ref<boolean>(false)
|
||||||
|
// 表单数据
|
||||||
|
const form = ref({
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
code: '',
|
||||||
|
type: 0,
|
||||||
|
ids: []
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
// 表单验证规则
|
||||||
|
const rules = {
|
||||||
|
name: [
|
||||||
|
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
code: [
|
||||||
|
{ required: true, message: '请输入描述', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 树形控件相关数据(假设)
|
||||||
|
const data = ref([]) // 树形数据源
|
||||||
|
const defaultProps = {
|
||||||
|
children: 'children',
|
||||||
|
label: 'reportDescribe'
|
||||||
|
}
|
||||||
|
|
||||||
|
const treeCheckedData = ref([]) // 默认选中的节点
|
||||||
|
const treeExpandData = ref([]) // 默认展开的节点
|
||||||
|
|
||||||
const options = ([
|
const options = ([
|
||||||
{ value: '0', label: '监测点报告' },
|
{ value: '0', label: '监测点报告' },
|
||||||
{ value: '1', label: '区域报告' },
|
{ value: '1', label: '区域报告' },
|
||||||
|
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
const treeDataForChild = ref([]) // 用于存储传递给子组件的树数据
|
||||||
|
const openReportDictionary = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getDictTree({ type: Number(tableStore.table.params.type) })
|
||||||
|
treeDataForChild.value = res.data // 将数据存储到响应式变量中
|
||||||
|
showDictionary.value = true // 打开子组件
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('获取字典数据失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 监听子组件触发的刷新事件
|
||||||
|
const handleRefreshTree = async () => {
|
||||||
|
try {
|
||||||
|
const res = await getDictTree({ type: Number(tableStore.table.params.type) })
|
||||||
|
treeDataForChild.value = res.data // 更新树数据
|
||||||
|
} catch (error) {
|
||||||
|
ElMessage.error('刷新树数据失败')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const closeReportDictionary = () => {
|
||||||
|
showDictionary.value = false
|
||||||
|
}
|
||||||
|
|
||||||
const tableStore: any = new TableStore({
|
const tableStore: any = new TableStore({
|
||||||
url: '/system-boot/EventTemplate/getList',
|
url: '/system-boot/EventTemplate/getList',
|
||||||
@@ -50,7 +169,6 @@ const tableStore: any = new TableStore({
|
|||||||
width: '220',
|
width: '220',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
@@ -58,7 +176,24 @@ const tableStore: any = new TableStore({
|
|||||||
icon: 'el-icon-Plus',
|
icon: 'el-icon-Plus',
|
||||||
render: 'basicButton',
|
render: 'basicButton',
|
||||||
click: row => {
|
click: row => {
|
||||||
|
isEdit.value = true
|
||||||
|
title.value = '编辑模板'
|
||||||
|
dialogVisible.value = true
|
||||||
|
// 回显表单数据
|
||||||
|
form.value = {
|
||||||
|
id: row.id,
|
||||||
|
name: row.name,
|
||||||
|
code: row.code,
|
||||||
|
type: row.type,
|
||||||
|
ids: row.rdIds
|
||||||
|
}
|
||||||
|
// 获取树数据
|
||||||
|
formData.type = row.type
|
||||||
|
getDictTree(formData).then(res => {
|
||||||
|
data.value = res.data
|
||||||
|
treeCheckedData.value= row.rdIds
|
||||||
|
setDefaultExpandedKeys(res.data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -75,7 +210,8 @@ const tableStore: any = new TableStore({
|
|||||||
title: '确定删除?'
|
title: '确定删除?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
delTemplate({ tempId: row.id, deptId: row.deptId }).then(res => {
|
let data = [row.id];
|
||||||
|
deleteData(data).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
@@ -91,10 +227,82 @@ tableStore.table.params = {}
|
|||||||
|
|
||||||
tableStore.table.params.type = '0'
|
tableStore.table.params.type = '0'
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
// 模板类型变更
|
||||||
|
const handleTypeChange = (value: string) => {
|
||||||
|
tableStore.table.params.type = value
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
|
||||||
|
const formData= reactive({
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 20,
|
||||||
|
type: 0,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
const add = () => {
|
const add = () => {
|
||||||
|
isEdit.value = false
|
||||||
|
title.value = '新增模板'
|
||||||
|
dialogVisible.value = true
|
||||||
|
// 初始化表单数据
|
||||||
|
form.value = {
|
||||||
|
id: '',
|
||||||
|
name: '',
|
||||||
|
code: '',
|
||||||
|
type: tableStore.table.params.type,
|
||||||
|
ids: []
|
||||||
|
}
|
||||||
|
formData.type = tableStore.table.params.type
|
||||||
|
treeCheckedData.value = []
|
||||||
|
getDictTree(formData).then(res => {
|
||||||
|
data.value = res.data
|
||||||
|
setDefaultExpandedKeys(res.data)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const setDefaultExpandedKeys = (treeData: any[]) => {
|
||||||
|
const firstLevelIds = treeData.map(item => item.id)
|
||||||
|
treeExpandData.value = firstLevelIds
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleCheckChange = (data: any, checked: boolean, indeterminate: boolean) => {
|
||||||
|
// 获取当前选中的节点 key 值
|
||||||
|
const checkedKeys = tree.value?.getCheckedKeys() || []
|
||||||
|
form.value.ids = checkedKeys // 将选中的节点 ID 更新到表单数据中
|
||||||
|
}
|
||||||
|
|
||||||
|
const addDetermine = () => {
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.validate((valid: boolean) => {
|
||||||
|
if (valid) {
|
||||||
|
if (isEdit.value) {
|
||||||
|
// 编辑逻辑
|
||||||
|
updateData(form.value).then(res => {
|
||||||
|
ElMessage.success('编辑模板成功')
|
||||||
|
closeDialog()
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 新增逻辑
|
||||||
|
addData(form.value).then(res => {
|
||||||
|
ElMessage.success('新增模板成功')
|
||||||
|
closeDialog()
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const closeDialog = () => {
|
||||||
|
dialogVisible.value = false
|
||||||
|
// 重置表单
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.resetFields()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
|
|||||||
259
src/views/system/area/index.vue
Normal file
259
src/views/system/area/index.vue
Normal file
@@ -0,0 +1,259 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<div class="default-main">
|
||||||
|
<el-form :inline="true" :model="formInline" class="demo-form-inline">
|
||||||
|
<el-form-item label="类型:">
|
||||||
|
<el-switch v-model="value" active-text="企业部门" inactive-text="行政区域" @change="handleSwitchChange"></el-switch>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button
|
||||||
|
v-if="value ? true : false"
|
||||||
|
@click="AddClick1"
|
||||||
|
type="primary"
|
||||||
|
size="mini"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
>
|
||||||
|
新增部门
|
||||||
|
</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<Table ref='tableRef' />
|
||||||
|
<!-- 修改弹窗 -->
|
||||||
|
<el-dialog
|
||||||
|
:close-on-click-modal="false"
|
||||||
|
:title="RowName + '部门'"
|
||||||
|
v-model="dialogFormVisible"
|
||||||
|
width="30%"
|
||||||
|
@close="closeDialog"
|
||||||
|
>
|
||||||
|
<el-form :model="formData" ref="formRef" label-width="110px" :rules="rules">
|
||||||
|
<el-form-item v-if="flag" label="父级节点:">
|
||||||
|
<el-input v-model="parentName" placeholder="请输入父级节点"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="企业部门:" prop="name" class="top">
|
||||||
|
<el-input v-model="formData.name" placeholder="请输入企业部门"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="简称:" prop="shortName" class="top">
|
||||||
|
<el-input v-model="formData.shortName" placeholder="请输入简称"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="排序:" prop="areaCode" class="top">
|
||||||
|
<el-input v-model="formData.areaCode" placeholder="请输入排序"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="经度:" prop="lng" class="top">
|
||||||
|
<el-input v-model="formData.lng" placeholder="请输入经度"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="纬度:" prop="lat" class="top">
|
||||||
|
<el-input v-model="formData.lat" placeholder="请输入纬度"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="closeDialog">取 消</el-button>
|
||||||
|
<el-button type="primary" @click="submitEvent">确 定</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted, onBeforeUnmount } from 'vue'
|
||||||
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
|
import { areaTree, areaAdd, areaDelete, update, selectPid } from '@/api/system-boot/area'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'system-boot/area/areaTree'
|
||||||
|
})
|
||||||
|
// 响应式数据
|
||||||
|
const value = ref(false)
|
||||||
|
const flag = ref(true)
|
||||||
|
const dialogFormVisible = ref(false)
|
||||||
|
const tableData = ref([])
|
||||||
|
const formData = reactive({
|
||||||
|
type: 0,
|
||||||
|
id: '',
|
||||||
|
pid: '',
|
||||||
|
name: '',
|
||||||
|
shortName: '',
|
||||||
|
areaCode: '',
|
||||||
|
lng: 0,
|
||||||
|
lat: 0
|
||||||
|
})
|
||||||
|
const parentName = ref('')
|
||||||
|
const RowName = ref('')
|
||||||
|
const flag1 = ref('')
|
||||||
|
const row = ref(null)
|
||||||
|
const formInline = reactive({})
|
||||||
|
const rules = {
|
||||||
|
name: [{ required: true, message: '名称不能为空', trigger: 'blur' }],
|
||||||
|
shortName: [{ required: true, message: '简称不能为空', trigger: 'blur' }],
|
||||||
|
areaCode: [{ required: true, message: '排序不能为空', trigger: 'blur' }],
|
||||||
|
lng: [{ required: true, message: '经度不能为空', trigger: 'blur' }],
|
||||||
|
lat: [{ required: true, message: '纬度不能为空', trigger: 'blur' }]
|
||||||
|
}
|
||||||
|
|
||||||
|
// 表单引用
|
||||||
|
const formRef = ref(null)
|
||||||
|
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
showPage:false,
|
||||||
|
url: areaTree( { id: '', type: value.value ? 1 : 0 }),
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{ title: value ? '企业部门' : '行政区域', field: 'name', treeNode: true, align: 'left' },
|
||||||
|
{ title: '简称', field: 'shortName', treeNode: true, align: 'left' },
|
||||||
|
{ title: '经度', field: 'lng' },
|
||||||
|
{ title: '维度', field: 'lat' },
|
||||||
|
{ title: '行政编码', field: 'areaCode' },
|
||||||
|
],
|
||||||
|
loadCallback: () => {
|
||||||
|
console.log('tableStore.table.data')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
tableStore.table.params.searchState = 0
|
||||||
|
const handleSwitchChange = (val) => {
|
||||||
|
|
||||||
|
areaTree( { id: '', type: value.value ? 1 : 0 })
|
||||||
|
}
|
||||||
|
// 外部新增
|
||||||
|
const AddClick1 = () => {
|
||||||
|
flag.value = true
|
||||||
|
Object.assign(formData, {})
|
||||||
|
RowName.value = '新增'
|
||||||
|
parentName.value = '企业'
|
||||||
|
dialogFormVisible.value = true
|
||||||
|
formData.type = 1
|
||||||
|
formData.pid = '0'
|
||||||
|
flag1.value = 'add'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 行内新增
|
||||||
|
const AddClick = (row) => {
|
||||||
|
flag.value = true
|
||||||
|
Object.assign(formData, {})
|
||||||
|
RowName.value = `${row.name}下新增`
|
||||||
|
parentName.value = row.name
|
||||||
|
dialogFormVisible.value = true
|
||||||
|
formData.type = 1
|
||||||
|
formData.pid = row.id
|
||||||
|
formData.id = row.id
|
||||||
|
flag1.value = 'add'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 行内修改
|
||||||
|
const EditClick = (row) => {
|
||||||
|
flag.value = false
|
||||||
|
RowName.value = `${row.name}下修改`
|
||||||
|
dialogFormVisible.value = true
|
||||||
|
Object.assign(formData, {
|
||||||
|
type: 1,
|
||||||
|
id: row.id,
|
||||||
|
pid: row.pid,
|
||||||
|
name: row.name,
|
||||||
|
shortName: row.shortName,
|
||||||
|
areaCode: row.areaCode,
|
||||||
|
lng: row.lng,
|
||||||
|
lat: row.lat
|
||||||
|
})
|
||||||
|
flag1.value = 'edit'
|
||||||
|
row.value = row
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
const DeleteClick = (row) => {
|
||||||
|
const p = row.id
|
||||||
|
const arr = JSON.stringify([p])
|
||||||
|
selectPid(arr).then((response) => {
|
||||||
|
ElMessageBox.confirm('确认删除该节点吗?', '提示', {
|
||||||
|
confirmButtonText: '确认删除',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
areaDelete(arr).then((response) => {
|
||||||
|
if (response.code === 'A0000') {
|
||||||
|
ElMessage.success('删除成功')
|
||||||
|
getAreaTree()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
.catch(() => {})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 提交操作
|
||||||
|
const submitEvent = () => {
|
||||||
|
dialogFormVisible.value = false
|
||||||
|
if (flag1.value === 'add') {
|
||||||
|
areaAdd(formData).then((response) => {
|
||||||
|
if (response.code === 'A0000') {
|
||||||
|
ElMessage.success('新增成功')
|
||||||
|
getAreaTree()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else if (flag1.value === 'edit') {
|
||||||
|
update(formData).then((response) => {
|
||||||
|
if (response.code === 'A0000') {
|
||||||
|
ElMessage.success('修改成功')
|
||||||
|
tableData.value = []
|
||||||
|
getAreaTree()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询树形数据
|
||||||
|
const getAreaTree = () => {
|
||||||
|
const data = { id: '', type: value.value ? 1 : 0 }
|
||||||
|
areaTree(data).then((response) => {
|
||||||
|
if (response.code === 'A0000') {
|
||||||
|
response.data.forEach((m) => {
|
||||||
|
delete m.children
|
||||||
|
m.hasChildren = true
|
||||||
|
})
|
||||||
|
tableData.value = response.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 加载子节点
|
||||||
|
const load = (tree, treeNode, resolve) => {
|
||||||
|
const id = tree.id
|
||||||
|
const data = { id, type: value.value ? 1 : 0 }
|
||||||
|
areaTree(data).then((response) => {
|
||||||
|
const childrenData = response.data.map((n) => {
|
||||||
|
delete n.children
|
||||||
|
n.hasChildren = true
|
||||||
|
return n
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
resolve(childrenData)
|
||||||
|
}, 30)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 关闭弹窗
|
||||||
|
const closeDialog = () => {
|
||||||
|
if (formRef.value) {
|
||||||
|
formRef.value.resetFields()
|
||||||
|
}
|
||||||
|
dialogFormVisible.value = false
|
||||||
|
}
|
||||||
|
|
||||||
|
// 生命周期
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="less" scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
<el-radio-button :label="1">否</el-radio-button>
|
<el-radio-button :label="1">否</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="用户ID">
|
<el-form-item label="自定义ID">
|
||||||
<div style="display: flex; width: 100%">
|
<div style="display: flex; width: 100%">
|
||||||
<el-radio-group v-model="useId">
|
<el-radio-group v-model="useId">
|
||||||
<el-radio-button :label="1">是</el-radio-button>
|
<el-radio-button :label="1">是</el-radio-button>
|
||||||
@@ -123,8 +123,8 @@ const form = reactive({
|
|||||||
limitIpEnd: '',
|
limitIpEnd: '',
|
||||||
limitTime: [1, 2],
|
limitTime: [1, 2],
|
||||||
role: [],
|
role: [],
|
||||||
smsNotice: 0,
|
smsNotice: 1,
|
||||||
emailNotice: 0,
|
emailNotice: 1,
|
||||||
type: 0
|
type: 0
|
||||||
})
|
})
|
||||||
const rules: Partial<Record<string, Array<FormItemRule>>> = {
|
const rules: Partial<Record<string, Array<FormItemRule>>> = {
|
||||||
@@ -228,9 +228,9 @@ const open = (text: string, data?: anyObj) => {
|
|||||||
form.casualUser = 1
|
form.casualUser = 1
|
||||||
form.limitTime = [0, 24]
|
form.limitTime = [0, 24]
|
||||||
form.role = []
|
form.role = []
|
||||||
form.smsNotice = 0
|
form.smsNotice = 1
|
||||||
form.emailNotice = 0
|
form.emailNotice = 1
|
||||||
useId.value = 1
|
useId.value = 0
|
||||||
form.id = ''
|
form.id = ''
|
||||||
form.limitIpStart = '0.0.0.0'
|
form.limitIpStart = '0.0.0.0'
|
||||||
form.limitIpEnd = '255.255.255.255'
|
form.limitIpEnd = '255.255.255.255'
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ const submit = () => {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
updateTimer(form).then(res => {
|
updateTimer(form).then(res => {
|
||||||
ElMessage.success('新增成功')
|
ElMessage.success('修改成功')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
emit('submit')
|
emit('submit')
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,135 +1,525 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="strategy-manage pd10" :style="height">
|
<div class="strategy-manage pd10" :style="height" style="overflow-y: auto;">
|
||||||
<el-form :inline="true" class="demo-form-inline">
|
|
||||||
<el-form-item>
|
<!-- 折叠面板 -->
|
||||||
<el-button @click="AddClick()" type="primary" :icon="Plus">保存</el-button>
|
<el-collapse v-model="activeNames" >
|
||||||
</el-form-item>
|
<!-- 客户端配置 -->
|
||||||
</el-form>
|
<el-collapse-item title="客户端配置" name="1">
|
||||||
<div style="width: 500px">
|
<div style="width: 500px">
|
||||||
<el-form ref="formRef" :model="form" label-width="auto" :rules="rules">
|
<el-form ref="formRef" :model="form" label-width="auto" :rules="rules">
|
||||||
<el-divider content-position="left">系统策略</el-divider>
|
<el-form-item label="认证令牌时效(秒):" prop="accessTokenValidity">
|
||||||
<el-form-item label="最大并发数:" prop="maxUseUser">
|
<el-input-number
|
||||||
|
v-model.number="form.accessTokenValidity"
|
||||||
|
:min="10"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="刷新令牌时效(秒):" prop="refreshTokenValidity">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="form.refreshTokenValidity"
|
||||||
|
:min="10"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</div>
|
||||||
|
<el-button @click="AddClick()" type="primary" :icon="Check" >保存</el-button>
|
||||||
|
|
||||||
|
</el-collapse-item>
|
||||||
|
|
||||||
|
<el-collapse-item :title="item.name" v-for="(item, index) in column" :key="index" :name="String(index + 2)" >
|
||||||
|
<div class="mb10">
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-Plus"
|
||||||
|
@click="addForm()"
|
||||||
|
v-if="item.name === '系统配置'"
|
||||||
|
>
|
||||||
|
新增类型</el-button>
|
||||||
|
</div>
|
||||||
|
<div style="height: 200px">
|
||||||
|
<vxe-table
|
||||||
|
height="auto"
|
||||||
|
:data="configForm[item.key]"
|
||||||
|
v-bind="defaultAttribute"
|
||||||
|
>
|
||||||
|
<vxe-column
|
||||||
|
v-for="(k, index) in item.child"
|
||||||
|
:key="index"
|
||||||
|
:field="k.field"
|
||||||
|
:title="k.title"
|
||||||
|
></vxe-column>
|
||||||
|
<vxe-column title="操作" width="150px">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-button type="text" @click="sysActive(row)" v-if="item.key =='getSystemList' && row.state == '未激活'">激活</el-button>
|
||||||
|
<el-button type="text" @click="editConfig(item, row)">编辑</el-button>
|
||||||
|
<el-button type="text" @click="sysDelete(row)" v-if="item.key =='getSystemList'">删除</el-button>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
</vxe-table>
|
||||||
|
</div>
|
||||||
|
</el-collapse-item>
|
||||||
|
</el-collapse>
|
||||||
|
|
||||||
|
|
||||||
|
<el-dialog v-model="dialogVisible" title="编辑用户配置" width="500px">
|
||||||
|
<el-form ref="editFormRef" :model="editForm" :rules="editRules" label-width="auto">
|
||||||
|
<el-form-item label="密码有效期(月):" prop="passwordExpirationMonth">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.passwordExpirationMonth"
|
||||||
|
:min="1"
|
||||||
|
:max="6"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="密码错误次数限定(次):" prop="errorsCount">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.errorsCount"
|
||||||
|
:min="3"
|
||||||
|
:max="20"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="验证密码错误次数时间范围(分钟):" prop="lockPwdCheck">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.lockPwdCheck"
|
||||||
|
:min="5"
|
||||||
|
:max="60"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户锁定时间(分钟):" prop="releaseTime">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.releaseTime"
|
||||||
|
:min="30"
|
||||||
|
:max="60"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户休眠(天):" prop="sleepDay">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.sleepDay"
|
||||||
|
:min="1"
|
||||||
|
:max="180"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="用户注销(天):" prop="logoutDay">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.logoutDay"
|
||||||
|
:min="1"
|
||||||
|
:max="360"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="最大并发数:" prop="maxUseUser">
|
||||||
|
<el-input-number
|
||||||
|
v-model.number="editForm.maxUseUser"
|
||||||
|
:min="10"
|
||||||
|
:max="99"
|
||||||
|
style="width: 100%"
|
||||||
|
></el-input-number>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="saveEdit">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<el-dialog v-model="systemDialogVisible" :title=sysTitle width="500px">
|
||||||
|
<el-form ref="sysFormRef" :model="sysForm" :rules="sysRules" label-width="auto">
|
||||||
|
<el-form-item label="系统类型:" prop="type">
|
||||||
|
<el-select v-model="sysForm.type" placeholder="请选择系统类型" style="width: 100%">
|
||||||
|
<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="数据上报:" prop="dataReport" class="top">
|
||||||
|
<el-input style="width: 100%" v-model="sysForm.dataReport" placeholder="请输入数据上报"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="审计日志大小(M):" prop="logSize" class="top">
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model.number="form.maxUseUser"
|
|
||||||
:min="10"
|
|
||||||
:max="99"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
type="number"
|
||||||
|
v-model="sysForm.logSize"
|
||||||
|
:min="1024"
|
||||||
|
:max="20480"
|
||||||
|
placeholder="请输入审计日志大小"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-divider content-position="left">账号锁定策略</el-divider>
|
<el-form-item label="日志储存时间(月):" prop="logTime" class="top">
|
||||||
<el-form-item label="密码输入错误次数:" prop="errorsCount">
|
|
||||||
<el-input-number
|
<el-input-number
|
||||||
v-model.number="form.errorsCount"
|
|
||||||
:min="3"
|
|
||||||
:max="20"
|
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input-number>
|
type="number"
|
||||||
</el-form-item>
|
v-model="sysForm.logTime"
|
||||||
<el-form-item label="自动解锁(分钟):" prop="releaseTime">
|
|
||||||
<el-input-number
|
|
||||||
v-model.number="form.releaseTime"
|
|
||||||
:min="5"
|
|
||||||
:max="60"
|
|
||||||
style="width: 100%"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="会话超时时间(分钟):" prop="sessionTime">
|
|
||||||
<el-input-number v-model.number="form.sessionTime" :min="10" style="width: 100%"></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="token刷新时间(分钟):" prop="sessionRefreshTime">
|
|
||||||
<el-input-number
|
|
||||||
v-model.number="form.sessionRefreshTime"
|
|
||||||
:min="10"
|
|
||||||
style="width: 100%"
|
|
||||||
></el-input-number>
|
|
||||||
</el-form-item>
|
|
||||||
<el-divider content-position="left">账号密码复杂度校验</el-divider>
|
|
||||||
<el-form-item label="密码有效期(月):" prop="passwordExpirationMonth">
|
|
||||||
<el-input-number
|
|
||||||
v-model.number="form.passwordExpirationMonth"
|
|
||||||
:min="1"
|
:min="1"
|
||||||
:max="6"
|
:max="6"
|
||||||
style="width: 100%"
|
placeholder="请输入日志储存时间不能大于6个月"
|
||||||
></el-input-number>
|
></el-input-number>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="账号长时间未登录休眠期(天):" prop="sleepDay">
|
<el-form-item label="激活状态:" class="top" prop="state">
|
||||||
<el-input-number
|
<el-select
|
||||||
v-model.number="form.sleepDay"
|
v-model="sysForm.state"
|
||||||
:min="1"
|
:disabled="flagtyoe == 'add' ? false : true"
|
||||||
:max="180"
|
placeholder="请选择"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
></el-input-number>
|
>
|
||||||
|
<el-option label="未激活" value="0"></el-option>
|
||||||
|
<el-option label="已激活" value="1"></el-option>
|
||||||
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
<template #footer>
|
||||||
|
<span class="dialog-footer">
|
||||||
|
<el-button @click="systemDialogVisible = false">取消</el-button>
|
||||||
|
<el-button type="primary" @click="saveSystem">确定</el-button>
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage, MessageParams } from 'element-plus'
|
||||||
import { ruleUpdate, getRule, unlockRoot } from '@/api/admin/user.js'
|
import { updateClientSessionConfig, getClientInfoByPath, ruleUpdate ,getUserConfig,getSystemList,activeSystemConfig,deleteSystemConfig,addSystemConfig,updateSystemConfig} from '@/api/admin/user.js'
|
||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Check } from '@element-plus/icons-vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
|
|
||||||
// 页面缓存
|
// 页面缓存
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'system-boot/sysConfig/timer'
|
name: 'system-boot/strategyManage'
|
||||||
})
|
})
|
||||||
|
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
|
|
||||||
// 定义表单引用
|
// 定义表单引用
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
|
const editFormRef = ref()
|
||||||
|
const sysFormRef = ref()
|
||||||
|
const dialogVisible = ref(false)
|
||||||
|
const systemDialogVisible = ref(false)
|
||||||
|
const activeNames = ref(['1', '2', '3']) // 默认展开所有面板
|
||||||
|
const flagtyoe = ref('add') // 用于区分新增或编辑模式
|
||||||
|
const sysTitle = ref('新增系统配置')
|
||||||
|
|
||||||
|
|
||||||
// 定义表单数据
|
// 定义表单数据
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
maxUseUser: 50,
|
accessTokenValidity: 0,
|
||||||
errorsCount: 0,
|
refreshTokenValidity: 0,
|
||||||
passwordExpirationMonth: 0,
|
|
||||||
sleepDay: 90,
|
|
||||||
releaseTime: 0,
|
|
||||||
sessionTime: 0,
|
|
||||||
sessionRefreshTime: 0
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// 定义表单验证规则
|
// 定义表单验证规则
|
||||||
const rules = {
|
const rules = {
|
||||||
maxUseUser: [{ required: true, message: '请填写最大并发数', trigger: 'blur' }],
|
accessTokenValidity: [{ required: true, message: '请填写会话超时时间', trigger: 'blur' }],
|
||||||
errorsCount: [{ required: true, message: '请填写密码输入错误次数', trigger: 'blur' }],
|
refreshTokenValidity: [{ required: true, message: '请填写会话刷新时间', trigger: 'blur' }],
|
||||||
releaseTime: [{ required: true, message: '请填写自动解锁(分钟)', trigger: 'blur' }],
|
|
||||||
sessionTime: [{ required: true, message: '请填写会话超时时间', trigger: 'blur' }],
|
|
||||||
sessionRefreshTime: [{ required: true, message: '请填写会话刷新时间', trigger: 'blur' }],
|
|
||||||
passwordExpirationMonth: [{ required: true, message: '请填写密码有效期', trigger: 'blur' }],
|
|
||||||
sleepDay: [{ required: true, message: '请填写休眠期', trigger: 'blur' }]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 获取策略信息
|
const editForm = ref({
|
||||||
const info = () => {
|
passwordExpirationMonth: 3,
|
||||||
getRule().then(res => {
|
errorsCount: 5,
|
||||||
Object.assign(form, res.data)
|
lockPwdCheck: 30,
|
||||||
})
|
releaseTime: 30,
|
||||||
|
sleepDay: 3,
|
||||||
|
logoutDay: 7,
|
||||||
|
maxUseUser: 50,
|
||||||
|
type: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
const editRules = {
|
||||||
|
passwordExpirationMonth: [{ required: true, message: '请输入密码有效期', trigger: 'blur' }],
|
||||||
|
errorsCount: [{ required: true, message: '请输入密码错误次数限定', trigger: 'blur' }],
|
||||||
|
lockPwdCheck: [{ required: true, message: '请输入验证密码错误次数时间范围', trigger: 'blur' }],
|
||||||
|
releaseTime: [{ required: true, message: '请输入用户锁定时间', trigger: 'blur' }],
|
||||||
|
sleepDay: [{ required: true, message: '请输入用户休眠时间', trigger: 'blur' }],
|
||||||
|
logoutDay: [{ required: true, message: '请输入用户注销时间', trigger: 'blur' }],
|
||||||
|
maxUseUser: [{ required: true, message: '请输入最大并发数', trigger: 'blur' }],
|
||||||
}
|
}
|
||||||
|
|
||||||
// 保存策略
|
const sysForm = ref({
|
||||||
|
type: '',
|
||||||
|
dataReport: '',
|
||||||
|
logSize: 1024,
|
||||||
|
logTime: 1,
|
||||||
|
state: '',
|
||||||
|
})
|
||||||
|
|
||||||
|
const sysRules = {
|
||||||
|
type: [{ required: true, message: '请选择系统类型', trigger: 'change' }],
|
||||||
|
dataReport: [{ required: true, message: '请输入数据上报', trigger: 'blur' }],
|
||||||
|
logSize: [{ required: true, message: '请输入审计日志大小', trigger: 'blur' }],
|
||||||
|
logTime: [{ required: true, message: '请输入日志储存时间', trigger: 'blur' }],
|
||||||
|
state: [{ required: true, message: '请选择激活状态', trigger: 'change' }],
|
||||||
|
}
|
||||||
|
|
||||||
|
// 编辑配置项
|
||||||
|
const editConfig = (item: any, row: any) => {
|
||||||
|
if(item.name == '用户配置'){
|
||||||
|
dialogVisible.value = true
|
||||||
|
Object.assign(editForm.value, row)
|
||||||
|
}else{
|
||||||
|
systemDialogVisible.value = true
|
||||||
|
flagtyoe.value = 'edit'
|
||||||
|
sysTitle.value = '编辑系统配置'
|
||||||
|
Object.assign(sysForm.value, row)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存客户端配置
|
||||||
const AddClick = () => {
|
const AddClick = () => {
|
||||||
formRef.value.validate(valid => {
|
formRef.value.validate((valid: any) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
ruleUpdate(form).then(res => {
|
updateClientSessionConfig(form).then((res: { data: any }) => {
|
||||||
Object.assign(form, res.data)
|
Object.assign(form, res.data)
|
||||||
ElMessage({
|
ElMessage.success(res.message)
|
||||||
message: '保存成功',
|
info(0)
|
||||||
type: 'success'
|
|
||||||
})
|
|
||||||
info()
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 保存用户配置编辑
|
||||||
|
const saveEdit = () => {
|
||||||
|
editFormRef.value.validate((valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
const formData = {
|
||||||
|
...editForm.value,
|
||||||
|
type: parseUserType(editForm.value.type),
|
||||||
|
}
|
||||||
|
ruleUpdate(formData).then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
dialogVisible.value = false
|
||||||
|
info(1)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
const configForm = ref({
|
||||||
|
getUserConfig: [], //用户配置
|
||||||
|
getSystemList: [], //系统配置
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
const column = readonly([
|
||||||
|
{
|
||||||
|
name: '用户配置',
|
||||||
|
key: 'getUserConfig',
|
||||||
|
child: [
|
||||||
|
{ field: 'passwordExpirationMonth', title: '密码有效期(月)', width: '120' },
|
||||||
|
{ field: 'errorsCount', title: '密码错误次数限定', minWidth: '120' },
|
||||||
|
{ field: 'lockPwdCheck', title: '验证密码错误次数时间范围(天)', minWidth: '200' },
|
||||||
|
{ field: 'releaseTime', title: '用户锁定时间', width: '120' },
|
||||||
|
{ field: 'sleepDay', title: '用户休眠(天)', width: '120' },
|
||||||
|
{ field: 'logoutDay', title: '用户注销(天)', width: '120' },
|
||||||
|
{ field: 'maxUseUser', title: '最大并发数', width: '120' },
|
||||||
|
{field: 'type',title: '用户类型',width: '120'},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: '系统配置',
|
||||||
|
key: 'getSystemList',
|
||||||
|
child: [
|
||||||
|
{
|
||||||
|
title: '系统类型',
|
||||||
|
field: 'type',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '数据上报',
|
||||||
|
field: 'dataReport'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审计日志大小(M)',
|
||||||
|
field: 'logSize'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '审计日志存储时间(月))',
|
||||||
|
field: 'logTime'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '状态',
|
||||||
|
field: 'state',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建用户',
|
||||||
|
field: 'createBy'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '创建时间',
|
||||||
|
field: 'createTime'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '更新用户',
|
||||||
|
field: 'updateBy'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '更新时间',
|
||||||
|
field: 'updateTime'
|
||||||
|
},
|
||||||
|
]
|
||||||
|
}
|
||||||
|
])
|
||||||
|
|
||||||
|
// 获取客户端配置
|
||||||
|
const info = async (type: number) => {
|
||||||
|
if (type === 0) {
|
||||||
|
// 获取客户端配置
|
||||||
|
await getClientInfoByPath().then((res: { data: any }) => {
|
||||||
|
Object.assign(form, res.data)
|
||||||
|
})
|
||||||
|
} else if (type === 1) {
|
||||||
|
// 获取用户配置
|
||||||
|
await getUserConfig().then((res: { data: { map: (arg0: (item: any) => any) => never[] } }) => {
|
||||||
|
configForm.value.getUserConfig = res.data.map((item: any) => ({
|
||||||
|
...item,
|
||||||
|
type: formatUserType(item.type)
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
// 获取系统配置
|
||||||
|
await getSystemList().then((res: { data: { map: (arg0: (item: any) => any) => never[] } }) => {
|
||||||
|
configForm.value.getSystemList = res.data.map((item: any) => ({
|
||||||
|
...item,
|
||||||
|
type: formatSystemType(item.type),
|
||||||
|
state: formatSystemState(item.state)
|
||||||
|
}))
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatUserType = (type: number) => {
|
||||||
|
return type === 1 ? '正常用户' : '临时用户'
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatSystemType = (type: number) => {
|
||||||
|
return type === 0 ? '省级系统' : type === 1 ? '企业系统' : type === 2 ? '数据中心' : '/'
|
||||||
|
}
|
||||||
|
|
||||||
|
const formatSystemState = (type: number) => {
|
||||||
|
return type === 0 ? '未激活' : '已激活'
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将用户类型从中文转换为数字
|
||||||
|
const parseUserType = (type: string): number => {
|
||||||
|
return type === '正常用户' ? 1 : 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将系统类型从中文转换为数字
|
||||||
|
const parseSystemType = (type: string): number => {
|
||||||
|
return type === '省级系统' ? 0 : type === '企业系统' ? 1 : type === '数据中心' ? 2 : -1
|
||||||
|
}
|
||||||
|
|
||||||
|
// 将系统状态从中文转换为数字
|
||||||
|
const parseSystemState = (state: string): number => {
|
||||||
|
return state === '未激活' ? 0 : 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增 addForm 方法
|
||||||
|
const addForm = () => {
|
||||||
|
// 初始化系统配置表单
|
||||||
|
sysForm.value = {
|
||||||
|
type: '',
|
||||||
|
dataReport: '',
|
||||||
|
logSize: 1024,
|
||||||
|
logTime: 1,
|
||||||
|
state: '',
|
||||||
|
}
|
||||||
|
flagtyoe.value = 'add' // 标记为新增模式
|
||||||
|
sysTitle.value = '新增系统配置'
|
||||||
|
systemDialogVisible.value = true // 打开系统配置弹窗
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除系统配置
|
||||||
|
const sysDelete = (row: any) => {
|
||||||
|
let data = {
|
||||||
|
id: row.id
|
||||||
|
}
|
||||||
|
ElMessageBox.confirm('此操作将永久删除该配置, 是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(() => {
|
||||||
|
deleteSystemConfig(data).then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
info(2) // 刷新系统配置列表
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 激活系统配置
|
||||||
|
const sysActive = (row: any) => {
|
||||||
|
// 构造请求参数
|
||||||
|
const data = {
|
||||||
|
id: row.id,
|
||||||
|
type: parseSystemType(row.type),
|
||||||
|
logSize: row.logSize,
|
||||||
|
logTime: row.logTime,
|
||||||
|
dataReport: row.dataReport,
|
||||||
|
state: 1
|
||||||
|
}
|
||||||
|
|
||||||
|
// 弹出确认框
|
||||||
|
ElMessageBox.confirm('此操作将激活该系统配置,是否继续?', '提示', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
// 用户点击“确定”,执行激活操作
|
||||||
|
activeSystemConfig(data).then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
info(2) // 刷新系统配置列表
|
||||||
|
}).catch((err: any) => {
|
||||||
|
ElMessage.error('激活失败,请重试')
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// 保存系统配置
|
||||||
|
const saveSystem = () => {
|
||||||
|
sysFormRef.value.validate((valid: any) => {
|
||||||
|
if (valid) {
|
||||||
|
if (flagtyoe.value === 'add') {
|
||||||
|
addSystemConfig(sysForm.value).then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
systemDialogVisible.value = false
|
||||||
|
info(2)
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
const formData = {
|
||||||
|
...sysForm.value,
|
||||||
|
type: parseSystemType(sysForm.value.type),
|
||||||
|
state: parseSystemState(sysForm.value.state)
|
||||||
|
}
|
||||||
|
updateSystemConfig(formData).then((res: any) => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
systemDialogVisible.value = false
|
||||||
|
info(2)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// 组件挂载时获取数据
|
// 组件挂载时获取数据
|
||||||
onMounted(() => {
|
onBeforeMount(() => {
|
||||||
info()
|
info(0)
|
||||||
|
info(1)
|
||||||
|
info(2)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -138,9 +528,15 @@ onMounted(() => {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
margin: 10px;
|
margin: 10px;
|
||||||
}
|
}
|
||||||
|
/* 增大折叠面板标题字体 */
|
||||||
|
:deep(.el-collapse-item__header) {
|
||||||
|
font-size: 20px; /* 设置字体大小 */
|
||||||
|
font-weight: bold; /* 加粗字体 */
|
||||||
|
//color: var(--el-color-primary); /* 可选:设置颜色 */
|
||||||
|
}
|
||||||
|
|
||||||
|
:deep(.el-form-item__label) {
|
||||||
|
|
||||||
:deep(.el-form-item__label ){
|
|
||||||
color: var(--el-color-primary);
|
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in New Issue
Block a user