Compare commits
54 Commits
953b96fe05
...
2026-04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
120892808b | ||
|
|
0f5cb1d3c5 | ||
| dbaa42ff7e | |||
|
|
48472bdb85 | ||
|
|
fafc5f82c4 | ||
| 93ee7e4034 | |||
|
|
7d2ce51510 | ||
|
|
9202da17f1 | ||
|
|
30eddd0572 | ||
|
|
15bd1ac6d2 | ||
|
|
f5c76c1b7a | ||
|
|
b25515b5db | ||
|
|
bfa061fb03 | ||
|
|
15e3d4aec8 | ||
|
|
59489aaafa | ||
|
|
5d0421dd40 | ||
|
|
6d7ef7cf5d | ||
|
|
8d9ccf97a7 | ||
|
|
7188e3e681 | ||
|
|
a9fc77eb8b | ||
|
|
87af11288d | ||
|
|
0763187744 | ||
|
|
ae641604ba | ||
|
|
564e6ef4ab | ||
|
|
c84c5dae3b | ||
|
|
c902dabb73 | ||
|
|
8d1497032f | ||
|
|
6aeac753ef | ||
|
|
56d65a6c17 | ||
|
|
8b356c87a3 | ||
|
|
c0feeaee7b | ||
|
|
6a112c8ae2 | ||
|
|
a19952b771 | ||
|
|
0b76347853 | ||
|
|
379951699d | ||
|
|
003737cf52 | ||
|
|
20e6d3719a | ||
|
|
77617412dd | ||
|
|
68ea43c42b | ||
|
|
e65df4daad | ||
|
|
136248eec2 | ||
|
|
bfafb6dc5b | ||
|
|
0b91027da4 | ||
|
|
22aeb0bf4c | ||
|
|
87bc9d9017 | ||
|
|
43d4d37cd0 | ||
|
|
ad1528e53b | ||
|
|
c1e36440e7 | ||
|
|
16f5213d7a | ||
|
|
ab891e6125 | ||
|
|
36c8ab87a2 | ||
|
|
6c3037f19b | ||
|
|
54517c0d5f | ||
|
|
715cdb892f |
@@ -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
@@ -13,9 +13,11 @@ onMounted(async () => {
|
|||||||
const response = await fetch('/')
|
const response = await fetch('/')
|
||||||
const WebSocketUrl:any = response.headers.get('X-WebSocket-Url')
|
const WebSocketUrl:any = response.headers.get('X-WebSocket-Url')
|
||||||
const WebSocketUrl2:any = response.headers.get('X-WebSocket-Url2')
|
const WebSocketUrl2:any = response.headers.get('X-WebSocket-Url2')
|
||||||
|
const WebSocketUrl3:any = response.headers.get('X-WebSocket-Url3')
|
||||||
const MqttUrl:any = response.headers.get('X-MqttUrl-Url')
|
const MqttUrl:any = response.headers.get('X-MqttUrl-Url')
|
||||||
localStorage.setItem('WebSocketUrl2', WebSocketUrl2)
|
|
||||||
localStorage.setItem('WebSocketUrl', WebSocketUrl)
|
localStorage.setItem('WebSocketUrl', WebSocketUrl)
|
||||||
|
localStorage.setItem('WebSocketUrl2', WebSocketUrl2)
|
||||||
|
localStorage.setItem('WebSocketUrl3', WebSocketUrl3)
|
||||||
localStorage.setItem('MqttUrl', MqttUrl)
|
localStorage.setItem('MqttUrl', MqttUrl)
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -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
|
||||||
})
|
})
|
||||||
@@ -206,3 +206,11 @@ export function exportTerminalBase() {
|
|||||||
responseType: 'blob'
|
responseType: 'blob'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//一键分配终端
|
||||||
|
export function allotTerminal(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/device-boot/nodeDevice/oneKeyDistribution',
|
||||||
|
method: 'post',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -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
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1,13 +1,36 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
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({
|
||||||
@@ -15,8 +38,39 @@ export function getAreaReport(data) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data,
|
data,
|
||||||
responseType: 'blob'
|
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
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//查询所有模板
|
//查询所有模板
|
||||||
export function getList(data) {
|
export function getList(data) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -38,6 +92,17 @@ export function getLineExport(data) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
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 getVoltage(data: any) {
|
export function getVoltage(data: any) {
|
||||||
|
|||||||
@@ -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',
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
export function getHistoryResult(data: any) {
|
export function getHistoryResult(data: any) {
|
||||||
return request({
|
return request({
|
||||||
url: '/harmonic-boot/harmonic/getHistoryResult',
|
url: '/harmonic-boot/harmonic/getHistoryResult',
|
||||||
@@ -14,5 +14,35 @@ export function exportModelJB(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
responseType: 'blob',
|
responseType: 'blob',
|
||||||
data: data
|
data: data
|
||||||
|
}).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
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import createAxios from '@/utils/request'
|
import createAxios from '@/utils/request'
|
||||||
|
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||||
|
|
||||||
export function exportModel(data: any) {
|
export function exportModel(data: any) {
|
||||||
return createAxios({
|
return createAxios({
|
||||||
@@ -6,5 +7,54 @@ export function exportModel(data: any) {
|
|||||||
method: 'post',
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
responseType: 'blob'
|
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 areaHarmonicReport(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/harmonic-boot/areaHarmonicReport/areaHarmonicReport',
|
||||||
|
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
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
async function readJsonBlob(blob) {
|
||||||
|
try {
|
||||||
|
// 1. Blob.text() 读取二进制 → 直接转为 字符串(自动处理编码)
|
||||||
|
const jsonStr = await blob.text()
|
||||||
|
// 2. JSON.parse 解析字符串 → 得到可用的 JS 对象/数组
|
||||||
|
const jsonData = JSON.parse(jsonStr)
|
||||||
|
// 3. 拿到数据,后续随便用
|
||||||
|
return {
|
||||||
|
code: true,
|
||||||
|
data: jsonData
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
return {
|
||||||
|
code: false,
|
||||||
|
data: {}
|
||||||
|
}
|
||||||
|
// console.error('解析Blob的JSON数据失败:', err)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
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,
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -31,7 +31,7 @@ export const uploadFile = (file: any, path: string) => {
|
|||||||
data: form
|
data: form
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == `A0000`) {
|
if (res.code == `A0000`) {
|
||||||
ElMessage.success('上传成功!')
|
ElMessage.success('文件上传成功!')
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
BIN
src/assets/img/region.png
Normal file
BIN
src/assets/img/region.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 243 KiB |
BIN
src/assets/logo/海南.png
Normal file
BIN
src/assets/logo/海南.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.1 KiB |
BIN
src/assets/logo/灿能.png
Normal file
BIN
src/assets/logo/灿能.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
BIN
src/assets/logo/电网.png
Normal file
BIN
src/assets/logo/电网.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 249 KiB |
BIN
src/assets/logo/电网1.png
Normal file
BIN
src/assets/logo/电网1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
File diff suppressed because one or more lines are too long
@@ -17,6 +17,7 @@ const config = useConfig()
|
|||||||
// import { nextTick } from 'process'
|
// import { nextTick } from 'process'
|
||||||
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
const emit = defineEmits(['triggerPoint', 'group', 'echartClick'])
|
||||||
color[0] = config.layout.elementUiPrimary[0]
|
color[0] = config.layout.elementUiPrimary[0]
|
||||||
|
|
||||||
const chartRef = ref<HTMLDivElement>()
|
const chartRef = ref<HTMLDivElement>()
|
||||||
|
|
||||||
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
const props = defineProps(['options', 'isInterVal', 'pieInterVal'])
|
||||||
@@ -70,6 +71,8 @@ const initChart = () => {
|
|||||||
const value =
|
const value =
|
||||||
item.value === 3.14159 || item.value === 0.14159
|
item.value === 3.14159 || item.value === 0.14159
|
||||||
? '暂无数据'
|
? '暂无数据'
|
||||||
|
: item.value === 0.14158
|
||||||
|
? 0
|
||||||
: Math.round(item.value * 100) / 100 // 处理特殊值
|
: Math.round(item.value * 100) / 100 // 处理特殊值
|
||||||
tips += `<div style=" display: flex;justify-content: space-between;">
|
tips += `<div style=" display: flex;justify-content: space-between;">
|
||||||
<span>${item.marker}
|
<span>${item.marker}
|
||||||
@@ -154,7 +157,6 @@ const initChart = () => {
|
|||||||
if (params.seriesName == '暂态触发点') {
|
if (params.seriesName == '暂态触发点') {
|
||||||
emit('triggerPoint', params.data)
|
emit('triggerPoint', params.data)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
emit('echartClick', params)
|
emit('echartClick', params)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onBeforeUnmount, ref, watch, onMounted, defineEmits } from 'vue'
|
import { onBeforeUnmount, ref, watch, onMounted, } from 'vue'
|
||||||
import * as echarts from 'echarts'
|
import * as echarts from 'echarts'
|
||||||
import 'echarts-gl'
|
import 'echarts-gl'
|
||||||
import 'echarts-liquidfill'
|
import 'echarts-liquidfill'
|
||||||
@@ -19,14 +19,21 @@ const myCharts = ref()
|
|||||||
const showCircle = ref(false)
|
const showCircle = ref(false)
|
||||||
|
|
||||||
const fetchConfig = async (name: string) => {
|
const fetchConfig = async (name: string) => {
|
||||||
const res = await import(`../../assets/map/${name.replace(/市$/, "")}.json`)
|
try {
|
||||||
return res.default
|
// 处理城市名称(去掉末尾的"市")并尝试导入对应文件
|
||||||
|
const res = await import(`../../assets/map/${name.replace(/市$/, '')}.json`)
|
||||||
|
return res.default
|
||||||
|
} catch (error) {
|
||||||
|
const chinaRes = await import(`../../assets/map/中国.json`) // 请确认中国文件的实际命名
|
||||||
|
return chinaRes.default
|
||||||
|
}
|
||||||
|
// const res = await import(`../../assets/map/${name.replace(/市$/, "")}.json`)
|
||||||
|
// return res.default
|
||||||
// GetEchar(res.default)
|
// GetEchar(res.default)
|
||||||
}
|
}
|
||||||
// fetchConfig()
|
// fetchConfig()
|
||||||
|
|
||||||
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
||||||
onMounted(() => { })
|
|
||||||
|
|
||||||
const GetEchar = async (name: string) => {
|
const GetEchar = async (name: string) => {
|
||||||
let chartDom = document.getElementById('chartMap')
|
let chartDom = document.getElementById('chartMap')
|
||||||
@@ -36,6 +43,7 @@ const GetEchar = async (name: string) => {
|
|||||||
name == dictData.state.area?.[0].name ? (showCircle.value = false) : (showCircle.value = true)
|
name == dictData.state.area?.[0].name ? (showCircle.value = false) : (showCircle.value = true)
|
||||||
|
|
||||||
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
|
echarts.registerMap(name, await fetchConfig(name)) //注册可用的地图
|
||||||
|
|
||||||
let option = {
|
let option = {
|
||||||
title: {
|
title: {
|
||||||
left: 'center',
|
left: 'center',
|
||||||
@@ -91,6 +99,7 @@ const GetEchar = async (name: string) => {
|
|||||||
// top: 10,
|
// top: 10,
|
||||||
// bottom: 0,
|
// bottom: 0,
|
||||||
roam: true,
|
roam: true,
|
||||||
|
|
||||||
label: {
|
label: {
|
||||||
normal: {
|
normal: {
|
||||||
show: true,
|
show: true,
|
||||||
@@ -170,6 +179,7 @@ const GetEchar = async (name: string) => {
|
|||||||
}, 0)
|
}, 0)
|
||||||
window.addEventListener('resize', resizeHandler)
|
window.addEventListener('resize', resizeHandler)
|
||||||
const flag1 = ref(true)
|
const flag1 = ref(true)
|
||||||
|
|
||||||
// 点击事件
|
// 点击事件
|
||||||
myCharts.value.off('click')
|
myCharts.value.off('click')
|
||||||
myCharts.value.on('click', (e: any) => {
|
myCharts.value.on('click', (e: any) => {
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="区域" v-if="area">
|
<el-form-item label="区域" v-if="area">
|
||||||
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" />
|
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" @change-value="onAreaChange" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<slot name="select"></slot>
|
<slot name="select"></slot>
|
||||||
</el-form>
|
</el-form>
|
||||||
@@ -52,7 +52,7 @@
|
|||||||
<el-button
|
<el-button
|
||||||
@click="onExport"
|
@click="onExport"
|
||||||
v-if="showExport"
|
v-if="showExport"
|
||||||
:loading="tableStore.table.loading"
|
:loading="tableStore.table.exportLoading"
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-Download"
|
icon="el-icon-Download"
|
||||||
>
|
>
|
||||||
@@ -81,7 +81,7 @@ import { mainHeight } from '@/utils/layout'
|
|||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { Search, RefreshLeft } from '@element-plus/icons-vue'
|
import { Search, RefreshLeft } from '@element-plus/icons-vue'
|
||||||
import { defineProps } from 'vue'
|
import { defineProps } from 'vue'
|
||||||
const emit = defineEmits(['selectChange'])
|
const emit = defineEmits(['selectChange', 'areaChange'])
|
||||||
const tableStore = inject('tableStore') as TableStore
|
const tableStore = inject('tableStore') as TableStore
|
||||||
const tableHeader = ref()
|
const tableHeader = ref()
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
@@ -132,6 +132,10 @@ const headerFormSecondStyleClose = {
|
|||||||
padding: '0'
|
padding: '0'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const onAreaChange = data => {
|
||||||
|
emit('areaChange', { label: data.label })
|
||||||
|
}
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => tableStore?.table.params.deptIndex,
|
() => tableStore?.table.params.deptIndex,
|
||||||
newVal => {
|
newVal => {
|
||||||
@@ -232,14 +236,14 @@ const onResetForm = () => {
|
|||||||
//时间重置成默认值
|
//时间重置成默认值
|
||||||
datePickerRef.value?.setTheDate(3)
|
datePickerRef.value?.setTheDate(3)
|
||||||
|
|
||||||
if(props.showTimeAll){
|
if (props.showTimeAll) {
|
||||||
timeAll.value = false
|
timeAll.value = false
|
||||||
delete tableStore.table.params.searchBeginTime
|
delete tableStore.table.params.searchBeginTime
|
||||||
delete tableStore.table.params.searchEndTime
|
delete tableStore.table.params.searchEndTime
|
||||||
delete tableStore.table.params.startTime
|
delete tableStore.table.params.startTime
|
||||||
delete tableStore.table.params.endTime
|
delete tableStore.table.params.endTime
|
||||||
delete tableStore.table.params.timeFlag
|
delete tableStore.table.params.timeFlag
|
||||||
delete tableStore.table.params.interval
|
delete tableStore.table.params.interval
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.datePicker && timeAll.value) {
|
if (props.datePicker && timeAll.value) {
|
||||||
@@ -258,7 +262,6 @@ const setTheDate = (val: any) => {
|
|||||||
}
|
}
|
||||||
// 导出
|
// 导出
|
||||||
const onExport = () => {
|
const onExport = () => {
|
||||||
|
|
||||||
tableStore.onTableAction('export', { showAllFlag: true })
|
tableStore.onTableAction('export', { showAllFlag: true })
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
150
src/components/tree/pqs/areaTree.vue
Normal file
150
src/components/tree/pqs/areaTree.vue
Normal file
@@ -0,0 +1,150 @@
|
|||||||
|
<template>
|
||||||
|
<div class="point-tree">
|
||||||
|
<div style="flex: 1; overflow: hidden">
|
||||||
|
<Tree ref="treeRef" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||||
|
import Tree from '../index.vue'
|
||||||
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||||
|
import { useConfig } from '@/stores/config'
|
||||||
|
import { getAreaList } from '@/api/common'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||||
|
defineOptions({
|
||||||
|
name: 'pms/pointTree'
|
||||||
|
})
|
||||||
|
interface Props {
|
||||||
|
showSelect?: boolean
|
||||||
|
}
|
||||||
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
|
showSelect: true
|
||||||
|
})
|
||||||
|
const emit = defineEmits(['init'])
|
||||||
|
const attrs = useAttrs()
|
||||||
|
const adminInfo = useAdminInfo()
|
||||||
|
const dictData = useDictData()
|
||||||
|
const config = useConfig()
|
||||||
|
const tree = ref()
|
||||||
|
const treeRef = ref()
|
||||||
|
|
||||||
|
const loadData = () => {
|
||||||
|
let nodeKey = ''
|
||||||
|
getAreaList().then(res => {
|
||||||
|
processTreeData(res.data, res.data[0].level)
|
||||||
|
let firstLevel6Node = getDeepestFirstChildData(res.data)
|
||||||
|
|
||||||
|
nodeKey = firstLevel6Node.id
|
||||||
|
emit('init', firstLevel6Node)
|
||||||
|
|
||||||
|
tree.value = res.data
|
||||||
|
if (nodeKey) {
|
||||||
|
nextTick(() => {
|
||||||
|
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||||
|
|
||||||
|
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
const scrollToNode = (id: string) => {
|
||||||
|
// 树滚动
|
||||||
|
treeRef.value.scrollToNode(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 定义不同层级对应的图标配置(可根据实际需求调整)
|
||||||
|
const levelIconMap = {
|
||||||
|
'-1': 'el-icon-HomeFilled',
|
||||||
|
0: 'el-icon-CollectionTag',
|
||||||
|
1: 'el-icon-CollectionTag',
|
||||||
|
2: 'el-icon-Flag',
|
||||||
|
3: 'el-icon-OfficeBuilding',
|
||||||
|
4: 'el-icon-DataAnalysis',
|
||||||
|
5: 'el-icon-DataAnalysis',
|
||||||
|
7: 'el-icon-DataAnalysis',
|
||||||
|
6: 'fa-solid fa-location-dot'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归处理树形数据,为不同层级节点设置图标和颜色
|
||||||
|
* @param data 树形数据数组
|
||||||
|
* @param level 当前层级(默认从1开始)
|
||||||
|
*/
|
||||||
|
function processTreeData(data: any[], level: number = -1, alias: string = '') {
|
||||||
|
// 空值判断,避免数组为空或undefined时报错
|
||||||
|
if (!Array.isArray(data) || data.length === 0) return
|
||||||
|
|
||||||
|
data.forEach(item => {
|
||||||
|
// 1. 设置基础图标(根据层级匹配)
|
||||||
|
item.icon = levelIconMap[level] || ''
|
||||||
|
item.alias = alias + `${item.name}`
|
||||||
|
// 2. 设置基础颜色
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
|
||||||
|
// 3. 第6层特殊处理:根据comFlag调整颜色
|
||||||
|
if (level === 6 && item.hasOwnProperty('comFlag')) {
|
||||||
|
switch (item.comFlag) {
|
||||||
|
case 0:
|
||||||
|
item.color = 'red !important'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
item.color = '#00f93b !important'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
item.color = '#8c8c8c !important'
|
||||||
|
break
|
||||||
|
// 默认值:保持原有基础颜色
|
||||||
|
default:
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 递归处理子节点,层级+1
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
processTreeData(item.children, item.children[0].level, level == '-1' ? '' : item.alias + '>')
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 递归获取树形结构中一直向下的第一个children的最后一组有效数据
|
||||||
|
* @param {Array} treeData - 原始递归树形数据
|
||||||
|
* @returns {Object|null} 路径最后一组有效数据,无有效数据时返回null
|
||||||
|
*/
|
||||||
|
function getDeepestFirstChildData(treeData) {
|
||||||
|
// 递归辅助函数:逐层查找第一个children
|
||||||
|
function findDeepestNode(currentNode) {
|
||||||
|
// 检查当前节点是否有有效的children数组
|
||||||
|
if (currentNode && Array.isArray(currentNode.children) && currentNode.children.length > 0) {
|
||||||
|
// 有下一级children,继续递归查找下一级第一个元素
|
||||||
|
return findDeepestNode(currentNode.children[0])
|
||||||
|
}
|
||||||
|
// 没有下一级children,返回当前节点(递归终止)
|
||||||
|
return currentNode
|
||||||
|
}
|
||||||
|
|
||||||
|
// 边界处理:原始数据非数组/空数组时返回null
|
||||||
|
if (!Array.isArray(treeData) || treeData.length === 0) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
// 从根节点第一个元素开始递归查找
|
||||||
|
return findDeepestNode(treeData[0])
|
||||||
|
}
|
||||||
|
|
||||||
|
defineExpose({ treeRef, scrollToNode, tree })
|
||||||
|
loadData()
|
||||||
|
</script>
|
||||||
|
<style lang="scss">
|
||||||
|
.point-tree {
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
background: #fff;
|
||||||
|
border: 1px solid var(--el-border-color);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="point-tree">
|
<div class="point-tree">
|
||||||
<!-- <el-select
|
<!-- <el-select
|
||||||
@@ -37,6 +36,7 @@ const adminInfo = useAdminInfo()
|
|||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||||
const tree = ref()
|
const tree = ref()
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
const formData = ref({
|
const formData = ref({
|
||||||
@@ -55,9 +55,12 @@ const loadData = () => {
|
|||||||
}) || { code: '' }
|
}) || { code: '' }
|
||||||
let form = JSON.parse(JSON.stringify(formData.value))
|
let form = JSON.parse(JSON.stringify(formData.value))
|
||||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||||
|
if (VITE_FLAG && form.statisticalType.code == 'Power_Network') {
|
||||||
|
form.statisticalType.deptName = 'qujing'
|
||||||
|
}
|
||||||
let nodeKey = ''
|
let nodeKey = ''
|
||||||
getTerminalTreeForFive(form).then(res => {
|
getTerminalTreeForFive(form).then(res => {
|
||||||
|
console.log(res)
|
||||||
if (obj.code == 'Power_Network') {
|
if (obj.code == 'Power_Network') {
|
||||||
res.data = [
|
res.data = [
|
||||||
{
|
{
|
||||||
@@ -68,56 +71,62 @@ const loadData = () => {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
res.data.forEach((item: any) => {
|
// if (VITE_FLAG) {
|
||||||
item.icon = 'el-icon-HomeFilled'
|
processTreeData(res.data)
|
||||||
item.color = config.getColorVal('elementUiPrimary')
|
let firstLevel6Node = findFirstLevel6Node(res.data)
|
||||||
item.children.forEach((item2: any) => {
|
|
||||||
item2.icon = 'el-icon-CollectionTag'
|
|
||||||
item2.color = config.getColorVal('elementUiPrimary')
|
|
||||||
item2.children.forEach((item3: any) => {
|
|
||||||
item3.icon = 'el-icon-Flag'
|
|
||||||
item3.color = config.getColorVal('elementUiPrimary')
|
|
||||||
item3.children.forEach((item4: any) => {
|
|
||||||
item4.icon = 'el-icon-OfficeBuilding'
|
|
||||||
item4.color = config.getColorVal('elementUiPrimary')
|
|
||||||
item4.children.forEach((item5: anyObj) => {
|
|
||||||
if (item5.level == 7) {
|
|
||||||
item5.icon = 'el-icon-DataAnalysis'
|
|
||||||
item5.color = config.getColorVal('elementUiPrimary')
|
|
||||||
item5.children.forEach((item6: anyObj) => {
|
|
||||||
item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
|
||||||
item6.pid = item4.id
|
|
||||||
item6.icon = 'fa-solid fa-location-dot'
|
|
||||||
item6.color = config.getColorVal('elementUiPrimary')
|
|
||||||
if (item6.comFlag == 0) {
|
|
||||||
item6.color = 'red !important'
|
|
||||||
} else if (item6.comFlag == 1) {
|
|
||||||
item6.color = '#00f93b !important'
|
|
||||||
} else if (item6.comFlag == 2) {
|
|
||||||
item6.color = '#8c8c8c !important'
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
|
||||||
item5.pid = item4.id
|
|
||||||
item5.icon = 'fa-solid fa-location-dot'
|
|
||||||
item5.color = config.getColorVal('elementUiPrimary')
|
|
||||||
if (item5.comFlag == 0) {
|
|
||||||
item5.color = 'red !important'
|
|
||||||
} else if (item5.comFlag == 1) {
|
|
||||||
item5.color = '#00f93b !important'
|
|
||||||
} else if (item5.comFlag == 2) {
|
|
||||||
item5.color = '#8c8c8c !important'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
nodeKey = res.data[0].children[0].children[0].children[0].children[0].id
|
nodeKey = firstLevel6Node.id
|
||||||
emit('init', res.data[0].children[0].children[0].children[0].children[0])
|
emit('init', firstLevel6Node)
|
||||||
|
// res.data.forEach((item: any) => {
|
||||||
|
// item.icon = 'el-icon-HomeFilled'
|
||||||
|
// item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// item.children.forEach((item2: any) => {
|
||||||
|
// item2.icon = 'el-icon-CollectionTag'
|
||||||
|
// item2.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// item2.children.forEach((item3: any) => {
|
||||||
|
// item3.icon = 'el-icon-Flag'
|
||||||
|
// item3.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// item3.children.forEach((item4: any) => {
|
||||||
|
// item4.icon = 'el-icon-OfficeBuilding'
|
||||||
|
// item4.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// item4.children.forEach((item5: anyObj) => {
|
||||||
|
// if (item5.level == 7) {
|
||||||
|
// item5.icon = 'el-icon-DataAnalysis'
|
||||||
|
// item5.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// item5.children.forEach((item6: anyObj) => {
|
||||||
|
// item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
||||||
|
// item6.pid = item4.id
|
||||||
|
// item6.icon = 'fa-solid fa-location-dot'
|
||||||
|
// item6.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// if (item6.comFlag == 0) {
|
||||||
|
// item6.color = 'red !important'
|
||||||
|
// } else if (item6.comFlag == 1) {
|
||||||
|
// item6.color = '#00f93b !important'
|
||||||
|
// } else if (item6.comFlag == 2) {
|
||||||
|
// item6.color = '#8c8c8c !important'
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// } else {
|
||||||
|
// item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||||
|
// item5.pid = item4.id
|
||||||
|
// item5.icon = 'fa-solid fa-location-dot'
|
||||||
|
// item5.color = config.getColorVal('elementUiPrimary')
|
||||||
|
// if (item5.comFlag == 0) {
|
||||||
|
// item5.color = 'red !important'
|
||||||
|
// } else if (item5.comFlag == 1) {
|
||||||
|
// item5.color = '#00f93b !important'
|
||||||
|
// } else if (item5.comFlag == 2) {
|
||||||
|
// item5.color = '#8c8c8c !important'
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
|
||||||
|
// nodeKey = res.data[0].children[0].children[0].children[0].children[0].id
|
||||||
|
// emit('init', res.data[0].children[0].children[0].children[0].children[0])
|
||||||
|
|
||||||
tree.value = res.data
|
tree.value = res.data
|
||||||
if (nodeKey) {
|
if (nodeKey) {
|
||||||
@@ -128,9 +137,113 @@ const loadData = () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const setKey = (key: string) => {
|
const setKey = (key: string) => {
|
||||||
treeRef.value.treeRef.setCurrentKey(key)
|
treeRef.value.treeRef.setCurrentKey(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 定义不同层级对应的图标配置(可根据实际需求调整)
|
||||||
|
const levelIconMap = {
|
||||||
|
'-1': 'el-icon-HomeFilled',
|
||||||
|
0: 'el-icon-CollectionTag',
|
||||||
|
1: 'el-icon-CollectionTag',
|
||||||
|
2: 'el-icon-Flag',
|
||||||
|
3: 'el-icon-OfficeBuilding',
|
||||||
|
4: 'el-icon-DataAnalysis',
|
||||||
|
5: 'el-icon-DataAnalysis',
|
||||||
|
7: 'el-icon-DataAnalysis',
|
||||||
|
6: 'fa-solid fa-location-dot'
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 递归处理树形数据,为不同层级节点设置图标和颜色
|
||||||
|
* @param data 树形数据数组
|
||||||
|
* @param level 当前层级(默认从1开始)
|
||||||
|
*/
|
||||||
|
function processTreeData(data: any[], level: number = -1) {
|
||||||
|
// 空值判断,避免数组为空或undefined时报错
|
||||||
|
if (!Array.isArray(data) || data.length === 0) return
|
||||||
|
|
||||||
|
data.forEach(item => {
|
||||||
|
// 1. 设置基础图标(根据层级匹配)
|
||||||
|
item.icon = levelIconMap[level] || ''
|
||||||
|
|
||||||
|
// 2. 设置基础颜色
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
|
||||||
|
// 3. 第6层特殊处理:根据comFlag调整颜色
|
||||||
|
if (level === 6 && item.hasOwnProperty('comFlag')) {
|
||||||
|
switch (item.comFlag) {
|
||||||
|
case 0:
|
||||||
|
item.color = 'red !important'
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
item.color = '#00f93b !important'
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
item.color = '#8c8c8c !important'
|
||||||
|
break
|
||||||
|
// 默认值:保持原有基础颜色
|
||||||
|
default:
|
||||||
|
item.color = config.getColorVal('elementUiPrimary')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 4. 递归处理子节点,层级+1
|
||||||
|
if (item.children && item.children.length > 0) {
|
||||||
|
processTreeData(item.children, item.children[0].level)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 递归查找树形结构中第一个level===6的节点(找到即终止递归)
|
||||||
|
* @param {Object|Array} tree - 树形数据(根节点数组 或 单个根节点)
|
||||||
|
* @returns {Object|null} 第一个level为6的节点,无则返回null
|
||||||
|
*/
|
||||||
|
function findFirstLevel6Node(tree: any) {
|
||||||
|
// 统一处理入参:如果是数组,遍历根节点数组(按顺序找第一个符合条件的)
|
||||||
|
if (Array.isArray(tree)) {
|
||||||
|
for (const rootNode of tree) {
|
||||||
|
const result = traverse(rootNode)
|
||||||
|
// 找到第一个匹配节点,立即返回(终止根节点遍历)
|
||||||
|
if (result) return result
|
||||||
|
}
|
||||||
|
// 所有根节点遍历完未找到
|
||||||
|
return null
|
||||||
|
} else {
|
||||||
|
// 入参是单个节点,直接递归遍历
|
||||||
|
return traverse(tree)
|
||||||
|
}
|
||||||
|
|
||||||
|
// 核心递归遍历函数
|
||||||
|
function traverse(node) {
|
||||||
|
// 终止条件1:节点不存在,返回null
|
||||||
|
if (!node) return null
|
||||||
|
|
||||||
|
// 终止条件2:找到level===6的节点,立即返回(终止递归)
|
||||||
|
if (node.level === 6) {
|
||||||
|
return node
|
||||||
|
}
|
||||||
|
|
||||||
|
// 终止条件3:节点无children,返回null
|
||||||
|
if (!node.children || node.children.length === 0) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按顺序遍历当前节点的子节点
|
||||||
|
for (const child of node.children) {
|
||||||
|
const foundNode = traverse(child)
|
||||||
|
// 子节点中找到目标节点,立即返回(终止后续子节点遍历)
|
||||||
|
if (foundNode) {
|
||||||
|
return foundNode
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 当前节点及所有子节点都无匹配,返回null
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
defineExpose({ setKey })
|
defineExpose({ setKey })
|
||||||
loadData()
|
loadData()
|
||||||
</script>
|
</script>
|
||||||
@@ -144,4 +257,3 @@ loadData()
|
|||||||
border: 1px solid var(--el-border-color);
|
border: 1px solid var(--el-border-color);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||||
<div style="display: flex; align-items: center" class="mb10">
|
<div style="display: flex; align-items: center" class="mb10">
|
||||||
<el-input v-model="filterText" placeholder="请输入内容" clearable>
|
<el-input v-model="filterText" placeholder="请输入内容" maxlength="10" show-word-limit clearable>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
{{ Math.floor(row.eventValue * 10000) / 100 }}
|
{{ Math.floor(row.eventValue * 10000) / 100 }}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="eventType" width="100px" title="暂降类型">
|
<vxe-column field="eventType" width="100px" title="触发类型">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ event.filter(item => item.id == row.eventType)[0]?.name || '/' }}
|
{{ event.filter(item => item.id == row.eventType)[0]?.name || '/' }}
|
||||||
</template>
|
</template>
|
||||||
@@ -50,7 +50,8 @@ import { ref, reactive, onMounted } from 'vue'
|
|||||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
import MQTT from '@/utils/mqtt'
|
// import MQTT from '@/utils/mqtt'
|
||||||
|
import socketClient from '@/utils/webSocketClient'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const event = dictData.getBasicData('Event_Statis')
|
const event = dictData.getBasicData('Event_Statis')
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
@@ -68,37 +69,72 @@ const handleClose = (done: any) => {
|
|||||||
drawer.value = false
|
drawer.value = false
|
||||||
done()
|
done()
|
||||||
}
|
}
|
||||||
const init = async () => {
|
const dataSocket = reactive({
|
||||||
const mqttClient = new MQTT('/sendEvent')
|
socketServe: socketClient.Instance
|
||||||
// 设置消息接收回调
|
})
|
||||||
try {
|
// const init = async () => {
|
||||||
await mqttClient.init()
|
// const mqttClient = new MQTT('/sendEvent')
|
||||||
|
// // 设置消息接收回调
|
||||||
|
// try {
|
||||||
|
// await mqttClient.init()
|
||||||
|
|
||||||
// 订阅主题
|
// // 订阅主题
|
||||||
await mqttClient.subscribe()
|
// await mqttClient.subscribe()
|
||||||
// 设置消息接收回调
|
// // 设置消息接收回调
|
||||||
mqttClient.onMessage((topic, message) => {
|
// mqttClient.onMessage((topic, message) => {
|
||||||
const msg = JSON.parse(message.toString())
|
// const msg = JSON.parse(message.toString())
|
||||||
// console.log('🚀 ~ init ~ msg:', msg)
|
// // console.log('🚀 ~ init ~ msg:', msg)
|
||||||
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
// if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
||||||
drawer.value = true
|
// drawer.value = true
|
||||||
isLoading.value = true
|
// isLoading.value = true
|
||||||
eventList.value.unshift(msg)
|
// eventList.value.unshift(msg)
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
isLoading.value = false
|
// isLoading.value = false
|
||||||
}, 500)
|
// }, 500)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
} catch (error) {
|
// } catch (error) {
|
||||||
console.error('MQTT 初始化失败:', error)
|
// // console.error('MQTT 初始化失败:', error)
|
||||||
}
|
// }
|
||||||
|
// }
|
||||||
|
const socket = async () => {
|
||||||
|
const url = localStorage.getItem('WebSocketUrl3') || 'null' //'ws://192.168.2.130:10203/event/'
|
||||||
|
|
||||||
|
|
||||||
|
// const url = 'ws://192.168.1.68:10203/event/'
|
||||||
|
|
||||||
|
await dataSocket.socketServe.connect(`${url}${adminInfo.id}`)
|
||||||
|
|
||||||
|
await dataSocket.socketServe.registerCallBack('message', (res: any) => {
|
||||||
|
if (res.deptList.includes(adminInfo.$state.deptId)) {
|
||||||
|
drawer.value = true
|
||||||
|
isLoading.value = true
|
||||||
|
eventList.value.unshift(res)
|
||||||
|
setTimeout(() => {
|
||||||
|
isLoading.value = false
|
||||||
|
}, 500)
|
||||||
|
}
|
||||||
|
// logList.value.push({
|
||||||
|
// type: res.code == 500 ? 'error' : '',
|
||||||
|
// time: formatDate(new Date(), 'YYYY-MM-DD hh:mm:ss'),
|
||||||
|
// name: res.message
|
||||||
|
// })
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
dataSocket.socketServe?.closeWs()
|
||||||
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
// startMqtt('/sendEvent', (topic, message) => {
|
// startMqtt('/sendEvent', (topic, message) => {
|
||||||
// const msg = JSON.parse(message.toString())
|
// const msg = JSON.parse(message.toString())
|
||||||
// console.log(msg)
|
// console.log(msg)
|
||||||
// })
|
// })
|
||||||
init()
|
|
||||||
|
setTimeout(() => {
|
||||||
|
socket()
|
||||||
|
}, 3000)
|
||||||
})
|
})
|
||||||
defineExpose({
|
defineExpose({
|
||||||
open,
|
open,
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ import { ElMessage } from 'element-plus'
|
|||||||
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
import { passwordConfirm, updatePassword } from '@/api/user-boot/user'
|
||||||
import { validatePwd } from '@/utils/common'
|
import { validatePwd } from '@/utils/common'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
|
import router from '@/router'
|
||||||
|
import { useNavTabs } from '@/stores/navTabs'
|
||||||
|
const navTabs = useNavTabs()
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('修改密码')
|
const title = ref('修改密码')
|
||||||
@@ -97,8 +99,14 @@ const submit = () => {
|
|||||||
id: adminInfo.$state.userIndex,
|
id: adminInfo.$state.userIndex,
|
||||||
newPassword: form.newPwd
|
newPassword: form.newPwd
|
||||||
}).then((res: any) => {
|
}).then((res: any) => {
|
||||||
ElMessage.success('密码修改成功')
|
ElMessage.success('密码修改成功,请重新登录!')
|
||||||
dialogVisible.value = false
|
dialogVisible.value = false
|
||||||
|
setTimeout(() => {
|
||||||
|
navTabs.closeTabs()
|
||||||
|
window.localStorage.clear()
|
||||||
|
adminInfo.reset()
|
||||||
|
router.push({ name: 'login' })
|
||||||
|
}, 0)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ router.beforeEach((to, from, next) => {
|
|||||||
const token = adminInfo.getToken()
|
const token = adminInfo.getToken()
|
||||||
// token 不存在
|
// token 不存在
|
||||||
if (token === null || token === '') {
|
if (token === null || token === '') {
|
||||||
ElMessage.error('您还没有登录,请先登录')
|
// ElMessage.error('您还没有登录,请先登录')
|
||||||
next('/login')
|
next('/login')
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ export const useConfig = defineStore(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const getColorVal = function (name: keyof Layout): string {
|
const getColorVal = function (name: keyof Layout): string {
|
||||||
const colors = layout[name] as string[]
|
const colors = layout[name] as string[] || ['#082E6C', '#0e8780']
|
||||||
if (layout.isDark) {
|
if (layout.isDark) {
|
||||||
return colors[1]
|
return colors[1]
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -29,12 +29,10 @@ export const useMonitoringPoint = defineStore(
|
|||||||
const setShowCheckBox = (val: boolean) => {
|
const setShowCheckBox = (val: boolean) => {
|
||||||
if (val && state.lineIds.length === 0) {
|
if (val && state.lineIds.length === 0) {
|
||||||
state.lineIds = [state.lineId]
|
state.lineIds = [state.lineId]
|
||||||
// console.log('====================================')
|
|
||||||
// console.log(state.lineIds)
|
|
||||||
// console.log('====================================')
|
|
||||||
}
|
}
|
||||||
state.showCheckBox = val
|
state.showCheckBox = val
|
||||||
}
|
}
|
||||||
|
|
||||||
return { state, setValue, setShowCheckBox }
|
return { state, setValue, setShowCheckBox }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -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 },
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
|
|||||||
} else if (value > -1 && value < 0 && isMin == false) {
|
} else if (value > -1 && value < 0 && isMin == false) {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
let base
|
let base
|
||||||
if (Math.abs(o) >= 100) {
|
if (Math.abs(o) >= 100) {
|
||||||
base = 100
|
base = 100
|
||||||
@@ -19,8 +20,11 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
|
|||||||
} else if (Math.abs(o) >= 1) {
|
} else if (Math.abs(o) >= 1) {
|
||||||
base = 1
|
base = 1
|
||||||
} else {
|
} else {
|
||||||
base = 0.1
|
const multiple = 1 / 0.1
|
||||||
|
|
||||||
|
base = Math.ceil(Math.abs(o) * multiple) / multiple
|
||||||
}
|
}
|
||||||
|
|
||||||
let calculatedValue
|
let calculatedValue
|
||||||
if (isMin) {
|
if (isMin) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
@@ -35,18 +39,19 @@ const calculateValue = (o: number, value: number, num: number, isMin: boolean) =
|
|||||||
calculatedValue = value + num * value
|
calculatedValue = value + num * value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (base === 0.1) {
|
if (base === 0.1) {
|
||||||
return parseFloat(calculatedValue.toFixed(1))
|
// return parseFloat(calculatedValue.toFixed(1))
|
||||||
|
return Math.ceil(calculatedValue * 10) / 10
|
||||||
} else if (isMin) {
|
} else if (isMin) {
|
||||||
return Math.floor(calculatedValue / base) * base
|
return Math.floor(calculatedValue / base) * base
|
||||||
} else {
|
} else {
|
||||||
return Math.ceil(calculatedValue / base) * base
|
return Math.ceil(calculatedValue / base) * base
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理y轴最大最小值
|
// 处理y轴最大最小值
|
||||||
export const yMethod = (arr: any) => {
|
export const yMethod = (arr: any) => {
|
||||||
let num = 0.1
|
let num = 0.2
|
||||||
let numList = dataProcessing(arr)
|
let numList = dataProcessing(arr)
|
||||||
let maxValue = 0
|
let maxValue = 0
|
||||||
let minValue = 0
|
let minValue = 0
|
||||||
@@ -54,12 +59,9 @@ export const yMethod = (arr: any) => {
|
|||||||
let min = 0
|
let min = 0
|
||||||
maxValue = Math.max(...numList)
|
maxValue = Math.max(...numList)
|
||||||
minValue = Math.min(...numList)
|
minValue = Math.min(...numList)
|
||||||
const o = maxValue - minValue
|
const o = maxValue - minValue == 0 ? maxValue : maxValue - minValue
|
||||||
if (Math.abs(o) >= 300) {
|
|
||||||
num = 0.02
|
|
||||||
}
|
|
||||||
|
|
||||||
min = calculateValue(o, minValue, num, true)
|
min = calculateValue(o, minValue, num, true)
|
||||||
|
|
||||||
max = calculateValue(o, maxValue, num, false)
|
max = calculateValue(o, maxValue, num, false)
|
||||||
// if (-100 >= minValue) {
|
// if (-100 >= minValue) {
|
||||||
// min = Math.floor((minValue + num * minValue) / 100) * 100
|
// min = Math.floor((minValue + num * minValue) / 100) * 100
|
||||||
@@ -158,8 +160,6 @@ export const exportCSV = (title: object, data: any, filename: string) => {
|
|||||||
URL.revokeObjectURL(link.href)
|
URL.revokeObjectURL(link.href)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 补全时间序列数据中缺失的条目
|
* 补全时间序列数据中缺失的条目
|
||||||
* @param rawData 原始数据,格式为 [["时间字符串", "数值", "单位", "类型"], ...]
|
* @param rawData 原始数据,格式为 [["时间字符串", "数值", "单位", "类型"], ...]
|
||||||
|
|||||||
@@ -50,12 +50,16 @@ 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')
|
||||||
|
|
||||||
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
|
||||||
this.setupEventListeners()
|
this.setupEventListeners()
|
||||||
@@ -77,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
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,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('订阅成功')
|
||||||
@@ -153,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('取消订阅成功')
|
||||||
@@ -188,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)
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ interface TableStoreParams {
|
|||||||
publicHeight?: number //计算高度
|
publicHeight?: number //计算高度
|
||||||
resetCallback?: () => void // 重置
|
resetCallback?: () => void // 重置
|
||||||
loadCallback?: () => void // 接口调用后的回调
|
loadCallback?: () => void // 接口调用后的回调
|
||||||
exportProcessingData?:() => void //导出处理数据
|
exportProcessingData?: () => void //导出处理数据
|
||||||
beforeSearchFun?: () => void // 接口调用前的回调
|
beforeSearchFun?: () => void // 接口调用前的回调
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -45,8 +45,9 @@ export default class TableStore {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 20
|
pageSize: 20
|
||||||
},
|
},
|
||||||
filename:null,
|
filename: null,
|
||||||
loading: true,
|
loading: true,
|
||||||
|
exportLoading: false,
|
||||||
column: [],
|
column: [],
|
||||||
loadCallback: null,
|
loadCallback: null,
|
||||||
exportProcessingData: null,
|
exportProcessingData: null,
|
||||||
@@ -76,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
|
||||||
@@ -84,13 +86,11 @@ export default class TableStore {
|
|||||||
this.initData = JSON.parse(JSON.stringify(this.table.params))
|
this.initData = JSON.parse(JSON.stringify(this.table.params))
|
||||||
}
|
}
|
||||||
if (!this.timeAll) {
|
if (!this.timeAll) {
|
||||||
delete this.table.params.startTime;
|
delete this.table.params.startTime
|
||||||
delete this.table.params.endTime;
|
delete this.table.params.endTime
|
||||||
delete this.table.params.searchBeginTime;
|
delete this.table.params.searchBeginTime
|
||||||
delete this.table.params.searchEndTime;
|
delete this.table.params.searchEndTime
|
||||||
delete this.table.params.timeFlag;
|
delete this.table.params.timeFlag
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
createAxios(
|
createAxios(
|
||||||
Object.assign(
|
Object.assign(
|
||||||
@@ -98,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
|
||||||
@@ -135,8 +137,10 @@ export default class TableStore {
|
|||||||
[
|
[
|
||||||
'search',
|
'search',
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
this.table.params.pageNum = 1
|
this.table.params.pageNum = 1
|
||||||
this.index()
|
this.index()
|
||||||
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
@@ -202,8 +206,10 @@ export default class TableStore {
|
|||||||
[
|
[
|
||||||
'export',
|
'export',
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
|
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(
|
||||||
@@ -213,12 +219,17 @@ export default class TableStore {
|
|||||||
},
|
},
|
||||||
requestPayload(this.method, params, this.paramsPOST)
|
requestPayload(this.method, params, this.paramsPOST)
|
||||||
)
|
)
|
||||||
).then(res => {
|
)
|
||||||
this.table.allData = filtration(res.data.records || res.data)
|
.then(res => {
|
||||||
console.log('11111',this.table)
|
this.table.allData = filtration(res.data.records || res.data)
|
||||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||||
this.table.allFlag = data.showAllFlag || true
|
this.table.allFlag = data.showAllFlag || true
|
||||||
})
|
this.table.exportLoading = false
|
||||||
|
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.table.exportLoading = false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
|
|||||||
@@ -147,7 +147,39 @@ export const filter = <T = any>(
|
|||||||
|
|
||||||
return listFilter(tree)
|
return listFilter(tree)
|
||||||
}
|
}
|
||||||
|
export const filterTree = <T = any>(
|
||||||
|
tree: T[],
|
||||||
|
func: (n: T) => boolean,
|
||||||
|
config: Partial<TreeHelperConfig> = {}
|
||||||
|
): T[] => {
|
||||||
|
config = getConfig(config)
|
||||||
|
const children = config.children as string
|
||||||
|
|
||||||
|
function listFilter(list: T[]) {
|
||||||
|
return list
|
||||||
|
.map((node: any) => ({ ...node }))
|
||||||
|
.filter((node) => {
|
||||||
|
// 1. 如果当前节点匹配 → 直接保留【所有子节点】,不再过滤下级
|
||||||
|
if (func(node)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 2. 如果当前节点不匹配,递归过滤子节点
|
||||||
|
if (node[children]) {
|
||||||
|
const filteredChildren = listFilter(node[children]);
|
||||||
|
if (filteredChildren.length > 0) {
|
||||||
|
node[children] = filteredChildren;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 3. 都不匹配,过滤掉
|
||||||
|
return false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return listFilter(tree)
|
||||||
|
}
|
||||||
export const forEach = <T = any>(
|
export const forEach = <T = any>(
|
||||||
tree: T[],
|
tree: T[],
|
||||||
func: (n: T) => any,
|
func: (n: T) => any,
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
import { Flag } from '@element-plus/icons-vue/dist/types'
|
||||||
import { ElMessage, EVENT_CODE } from 'element-plus'
|
import { ElMessage, EVENT_CODE } from 'element-plus'
|
||||||
|
|
||||||
// 定义消息类型,用于类型检查
|
// 定义消息类型,用于类型检查
|
||||||
@@ -43,13 +44,9 @@ export default class SocketService {
|
|||||||
console.log('您的浏览器不支持WebSocket')
|
console.log('您的浏览器不支持WebSocket')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if (url == 'null' || url == null) return
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// ws://192.168.1.69:10407/mgtt
|
|
||||||
// const url =
|
|
||||||
// (localStorage.getItem('WebSocketUrl') == 'null'
|
|
||||||
// ? 'ws://192.168.1.130:10405'
|
|
||||||
// : localStorage.getItem('WebSocketUrl')) + id
|
|
||||||
this.ws = new WebSocket(url)
|
this.ws = new WebSocket(url)
|
||||||
|
|
||||||
this.ws.onopen = () => this.handleOpen()
|
this.ws.onopen = () => this.handleOpen()
|
||||||
@@ -90,7 +87,7 @@ export default class SocketService {
|
|||||||
|
|
||||||
if (event.data == '连接成功') {
|
if (event.data == '连接成功') {
|
||||||
this.sendHeartbeat()
|
this.sendHeartbeat()
|
||||||
} else if (event.data == 'connect') {
|
} else if (event.data == 'over') {
|
||||||
} else if (event.data.length > 10) {
|
} else if (event.data.length > 10) {
|
||||||
let message: MessageType
|
let message: MessageType
|
||||||
try {
|
try {
|
||||||
@@ -104,7 +101,7 @@ export default class SocketService {
|
|||||||
|
|
||||||
// 通过接受服务端发送的type字段来回调函数
|
// 通过接受服务端发送的type字段来回调函数
|
||||||
|
|
||||||
if ((message.key || message.code) && this.callBackMapping['message']) {
|
if ((message.key || message.code || message.time) && this.callBackMapping['message']) {
|
||||||
this.callBackMapping['message']!(message)
|
this.callBackMapping['message']!(message)
|
||||||
} else {
|
} else {
|
||||||
console.log('抛弃====>')
|
console.log('抛弃====>')
|
||||||
@@ -112,6 +109,7 @@ export default class SocketService {
|
|||||||
// 丢弃或继续写你的逻辑
|
// 丢弃或继续写你的逻辑
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
this.callBackMapping['message']!({ Flag: false })
|
||||||
ElMessage.error(event.data)
|
ElMessage.error(event.data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ const options1 = [
|
|||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const heightB = mainHeight(448)
|
const heightB = mainHeight(448)
|
||||||
const heightA = mainHeight(180)
|
const heightA = mainHeight(180)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
|
|||||||
@@ -321,7 +321,7 @@ const options1 = [
|
|||||||
]
|
]
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const heightB = mainHeight(445)
|
const heightB = mainHeight(445)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const detailRef = ref()
|
const detailRef = ref()
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
|
|||||||
@@ -64,10 +64,10 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'longitude', title: '经度' },
|
{ field: 'longitude', title: '经度' },
|
||||||
{ field: 'latitude', title: '纬度' },
|
{ field: 'latitude', title: '纬度' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
fixed: 'right',
|
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
name: 'edit',
|
name: 'edit',
|
||||||
|
|||||||
@@ -38,6 +38,7 @@ const tableStore = new TableStore({
|
|||||||
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
echarts.value.Grade(tableStore.table.data.voltageStatistics)
|
||||||
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
echarts.value.Relation(tableStore.table.data.monthlyStatistics)
|
||||||
table.value.info(tableStore.table.data)
|
table.value.info(tableStore.table.data)
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader datePicker :showReset="false" showExport ref="TableHeaderRef">
|
<TableHeader datePicker :showReset="false" showExport ref="TableHeaderRef">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.loginName" placeholder="请输入"></el-input>
|
<el-input v-model="tableStore.table.params.loginName" placeholder="请输入" clearable maxlength="32" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|||||||
@@ -289,17 +289,20 @@ const equipment = (row: any) => {}
|
|||||||
const assess = () => {
|
const assess = () => {
|
||||||
// vxeRef.value.getRadioRecord()
|
// vxeRef.value.getRadioRecord()
|
||||||
|
|
||||||
if (equipmentList.value.length == null) {
|
if (equipmentList.value.length == 0) {
|
||||||
return ElMessage.warning('请选择用户')
|
return ElMessage.warning('请选择有终端设备的用户')
|
||||||
}
|
}
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formRef.value.validate((valid: any) => {
|
formRef.value.validate((valid: any) => {
|
||||||
|
|
||||||
if (valid) {
|
if (valid) {
|
||||||
form.value.devList = equipmentList.value
|
form.value.devList = equipmentList.value
|
||||||
carryCapacityEvaluate(form.value).then(res => {
|
carryCapacityEvaluate(form.value).then(res => {
|
||||||
rendering(res.data)
|
rendering(res.data)
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
}else{
|
||||||
|
loading.value = false
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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,10 +202,10 @@ 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(23)
|
const size = ref(19)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const datePickerRef = ref()
|
const datePickerRef = ref()
|
||||||
const height = mainHeight(80).height
|
const height = mainHeight(80).height
|
||||||
@@ -734,6 +734,7 @@ const choose = (e: any) => {
|
|||||||
|
|
||||||
uploadExcel(e.raw, form).then(res => {
|
uploadExcel(e.raw, form).then(res => {
|
||||||
ElMessage.success('导入成功')
|
ElMessage.success('导入成功')
|
||||||
|
onSubmit()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
const tabChange = (e: any) => {
|
const tabChange = (e: any) => {
|
||||||
@@ -843,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) {
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'evaluateDate', title: '评估日期' },
|
{ field: 'evaluateDate', title: '评估日期' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
@@ -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({
|
||||||
@@ -188,6 +195,7 @@ const tableStore: any = new TableStore({
|
|||||||
{ field: 'createTime', title: '创建日期' },
|
{ field: 'createTime', title: '创建日期' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
@@ -258,9 +266,7 @@ const tableStore: any = new TableStore({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {}
|
||||||
console.log(tableStore.table.data)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
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
|
||||||
}
|
}
|
||||||
// 保存
|
// 保存
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
<TableHeader datePicker showExport :showReset="false">
|
<TableHeader datePicker showExport :showReset="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
<div :key="key">
|
<div :key="key">
|
||||||
<Table ref="tableRef" :height="'49vh'"></Table>
|
<Table ref="tableRef" :height="'calc(50vh - 100px)'"></Table>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -31,10 +31,12 @@ const dialogVisible = ref(false)
|
|||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/system-boot/frontLog/queryLogCHild',
|
url: '/system-boot/frontLog/queryLogCHild',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
filename: '前置交互日志详情',
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
field: 'index',
|
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
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<TableHeader datePicker showExport>
|
<TableHeader datePicker showExport>
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -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 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>
|
||||||
@@ -83,7 +90,7 @@
|
|||||||
v-else
|
v-else
|
||||||
class="box-item"
|
class="box-item"
|
||||||
title="确定重启吗?"
|
title="确定重启吗?"
|
||||||
placement="bottom"
|
placement="left"
|
||||||
@confirm="restart(data)"
|
@confirm="restart(data)"
|
||||||
>
|
>
|
||||||
<template #actions="{ confirm, cancel }">
|
<template #actions="{ confirm, cancel }">
|
||||||
@@ -141,7 +148,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
<el-form-item label="最大终端数:" prop="nodeDevNum" class="top">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.nodeDevNum"
|
v-model.trim.number="formData.nodeDevNum"
|
||||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||||
maxlength="5"
|
maxlength="5"
|
||||||
placeholder="请输入最大终端数"
|
placeholder="请输入最大终端数"
|
||||||
@@ -149,7 +156,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
<el-form-item label="最大进程数:" prop="maxProcessNum" class="top">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="formData.maxProcessNum"
|
v-model.trim.number="formData.maxProcessNum"
|
||||||
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
onkeyup="value = value.replace(/[^0-9]/g,'')"
|
||||||
maxlength="5"
|
maxlength="5"
|
||||||
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
placeholder="请根据监测点规模填写合适进程数(1个进程最大可承载200个监测点)"
|
||||||
@@ -209,7 +216,8 @@ import {
|
|||||||
updateNode,
|
updateNode,
|
||||||
nodeDeviceTree,
|
nodeDeviceTree,
|
||||||
updateDeviceProcess,
|
updateDeviceProcess,
|
||||||
askRestartProcess
|
askRestartProcess,
|
||||||
|
allotTerminal
|
||||||
} from '@/api/device-boot/Business'
|
} from '@/api/device-boot/Business'
|
||||||
import TableStore from '@/utils/tableStore'
|
import TableStore from '@/utils/tableStore'
|
||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
@@ -240,6 +248,7 @@ const tableRef = ref()
|
|||||||
const processNo = ref('')
|
const processNo = ref('')
|
||||||
const ruleFormRef = ref()
|
const ruleFormRef = ref()
|
||||||
const dataSource: any = ref([])
|
const dataSource: any = ref([])
|
||||||
|
const deviceInfoList: any = ref([])
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
children: 'deviceInfoList',
|
children: 'deviceInfoList',
|
||||||
label: 'name'
|
label: 'name'
|
||||||
@@ -271,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',
|
||||||
@@ -288,7 +297,7 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '最大监测点数量',
|
title: '最大终端数量',
|
||||||
field: 'nodeDevNum'
|
field: 'nodeDevNum'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -316,6 +325,7 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -350,7 +360,7 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
askRestartProcess({
|
askRestartProcess({
|
||||||
deviceRebootType: null,
|
deviceRebootType: 1,
|
||||||
nodeId: row.id,
|
nodeId: row.id,
|
||||||
processNo: 1
|
processNo: 1
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@@ -373,11 +383,41 @@ const tableStore = new TableStore({
|
|||||||
title: '确定删除吗?'
|
title: '确定删除吗?'
|
||||||
},
|
},
|
||||||
click: row => {
|
click: row => {
|
||||||
|
if (hasDevices.value) {
|
||||||
|
ElMessage.warning('此前置机绑定了设备,无法删除!')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
delNode(row.id).then(res => {
|
delNode(row.id).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '分配终端',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'InfoFilled',
|
||||||
|
render: 'confirmButton',
|
||||||
|
popconfirm: {
|
||||||
|
confirmButtonText: '确认',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
confirmButtonType: 'primary',
|
||||||
|
title: '确定分配终端吗?'
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
// if (!hasDevices.value) {
|
||||||
|
// ElMessage.warning('此前置机下无设备,无法分配终端!')
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
allotTerminal({
|
||||||
|
nodeId: row.id
|
||||||
|
}).then(res => {
|
||||||
|
ElMessage.success(res.message)
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -395,12 +435,14 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
const nodeId = ref('')
|
const nodeId = ref('')
|
||||||
// 点击行
|
const hasDevices = ref(false)
|
||||||
|
/// 点击行
|
||||||
const currentChangeEvent = () => {
|
const currentChangeEvent = () => {
|
||||||
// 确保 tableRef 和当前记录存在
|
// 确保 tableRef 和当前记录存在
|
||||||
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
if (!tableRef.value || !tableRef.value.getRef().getCurrentRecord()) {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -413,15 +455,26 @@ const currentChangeEvent = () => {
|
|||||||
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
nodeId.value = tableRef.value.getRef().getCurrentRecord().id
|
||||||
// 检查返回的数据是否存在且不为空
|
// 检查返回的数据是否存在且不为空
|
||||||
if (res.data && res.data.processDeviceList) {
|
if (res.data && res.data.processDeviceList) {
|
||||||
dataSource.value = res.data.processDeviceList.filter(item => (item.name = item.processNo + ''))
|
// 检查是否有设备绑定
|
||||||
|
const hasAnyDevices = res.data.processDeviceList.some(
|
||||||
|
item => item.deviceInfoList && item.deviceInfoList.length > 0
|
||||||
|
)
|
||||||
|
hasDevices.value = hasAnyDevices
|
||||||
|
|
||||||
|
dataSource.value = res.data.processDeviceList.filter(item => {
|
||||||
|
item.name = item.processNo + ''
|
||||||
|
return true // 保持原有的过滤逻辑
|
||||||
|
})
|
||||||
} else {
|
} else {
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false
|
||||||
}
|
}
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
// 添加错误处理,确保 loading 状态也能关闭
|
// 添加错误处理,确保 loading 状态也能关闭
|
||||||
dataSource.value = []
|
dataSource.value = []
|
||||||
|
hasDevices.value = false
|
||||||
loading.value = false
|
loading.value = false
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -430,11 +483,11 @@ const currentChangeEvent = () => {
|
|||||||
|
|
||||||
// 重启进程
|
// 重启进程
|
||||||
const restart = (data: any) => {
|
const restart = (data: any) => {
|
||||||
// console.log('🚀 ~ restart ~ data:', data)
|
// console.log('🚀 ~ restart ~ data:', data)
|
||||||
askRestartProcess({
|
askRestartProcess({
|
||||||
deviceRebootType: data.processNo,
|
deviceRebootType: null,
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeId.value,
|
||||||
processNo: 2
|
processNo: data.processNo
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
ElMessage.success('重启成功')
|
ElMessage.success('重启成功')
|
||||||
currentChangeEvent()
|
currentChangeEvent()
|
||||||
@@ -472,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
|
||||||
@@ -583,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"
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
></el-option>
|
></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.program" clearable placeholder="请选择程序版本">
|
<el-select v-model="tableStore.table.params.program" clearable placeholder="请选择程序版本">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in programoption"
|
v-for="item in programoption"
|
||||||
@@ -41,19 +41,21 @@
|
|||||||
:value="item.id"
|
:value="item.id"
|
||||||
></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"
|
||||||
|
maxlength="32"
|
||||||
|
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>
|
||||||
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
<el-button icon="el-icon-Check" @click="add">批量升级</el-button>
|
||||||
</template>
|
</template> -->
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
<div :style="`height: calc(${tableStore.table.height} + 58px)`">
|
||||||
<vxe-table
|
<vxe-table
|
||||||
@@ -104,7 +106,7 @@
|
|||||||
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
<vxe-column field="updateTime" title="最新升级时间"></vxe-column>
|
||||||
<vxe-column title="操作" min-width="100">
|
<vxe-column title="操作" min-width="100">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button>
|
<!-- <el-button v-if="row.level == 4" size="small" link @click="updateprogram(row)">升级</el-button> -->
|
||||||
<el-button
|
<el-button
|
||||||
v-if="row.level == 4"
|
v-if="row.level == 4"
|
||||||
:disabled="row.state == 1 ? true : false"
|
:disabled="row.state == 1 ? true : false"
|
||||||
@@ -250,8 +252,9 @@ const tableStore = new TableStore({
|
|||||||
}, 0)
|
}, 0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
tableStore.table.params.teriminal = ''
|
tableStore.table.params.devType = ''
|
||||||
tableStore.table.params.state = ''
|
tableStore.table.params.runFlag = ''
|
||||||
|
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 = ''
|
||||||
|
|||||||
@@ -43,6 +43,8 @@
|
|||||||
v-model="tableStore.table.params.filterName"
|
v-model="tableStore.table.params.filterName"
|
||||||
@keyup="searchEvent"
|
@keyup="searchEvent"
|
||||||
clearable
|
clearable
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
placeholder="输入关键字筛选"
|
placeholder="输入关键字筛选"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -75,6 +77,7 @@
|
|||||||
:checkbox-config="{ labelField: 'name' }"
|
:checkbox-config="{ labelField: 'name' }"
|
||||||
>
|
>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
|
v-if="treeData && treeData.length > 0"
|
||||||
field="name"
|
field="name"
|
||||||
align="left"
|
align="left"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@@ -82,6 +85,15 @@
|
|||||||
min-width="200"
|
min-width="200"
|
||||||
tree-node
|
tree-node
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
|
<!-- 没有数据时显示普通列 -->
|
||||||
|
<vxe-column
|
||||||
|
v-else
|
||||||
|
field="name"
|
||||||
|
align="left"
|
||||||
|
title="电网拓扑"
|
||||||
|
min-width="200"
|
||||||
|
tree-node
|
||||||
|
></vxe-column>
|
||||||
<vxe-column field="devType" title="终端型号">
|
<vxe-column field="devType" title="终端型号">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
{{ teriminaloption.find((item: any) => item.id === row.devType)?.name }}
|
||||||
|
|||||||
@@ -1694,7 +1694,7 @@ import { useDictData } from '@/stores/dictData'
|
|||||||
import { ref, reactive, onMounted } from 'vue'
|
import { ref, reactive, onMounted } from 'vue'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
import { getYwZtSubstation } from '@/api/device-boot/device'
|
import { getYwZtSubstation } from '@/api/device-boot/device'
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const TerminalRef = ref()
|
const TerminalRef = ref()
|
||||||
const pageHeight = mainHeight(20)
|
const pageHeight = mainHeight(20)
|
||||||
const Height = mainHeight(100)
|
const Height = mainHeight(100)
|
||||||
@@ -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: '',
|
||||||
/**监测点 */
|
/**监测点 */
|
||||||
@@ -2397,35 +2397,45 @@ const onsubmit = () => {
|
|||||||
/**
|
/**
|
||||||
* 提交数据
|
* 提交数据
|
||||||
*/
|
*/
|
||||||
const submitData = () => {
|
const submitData = async () => {
|
||||||
const project = JSON.parse(JSON.stringify(AddProjectBO.value))
|
const project = JSON.parse(JSON.stringify(AddProjectBO.value))
|
||||||
|
await mainForm.value.validate((valid: any) => {
|
||||||
// project: JSON.stringify(project)
|
if (valid) {
|
||||||
addTerminal(project).then((res: any) => {
|
addTerminal(project).then((res: any) => {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: res.message
|
message: res.message
|
||||||
})
|
})
|
||||||
reaseStatus()
|
reaseStatus()
|
||||||
initAddProjectBo()
|
initAddProjectBo()
|
||||||
initAddProjectBoId()
|
initAddProjectBoId()
|
||||||
treedata()
|
treedata()
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
// project: JSON.stringify(project)
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 修改数据
|
* 修改数据
|
||||||
*/
|
*/
|
||||||
const updateDate = () => {
|
const updateDate = async () => {
|
||||||
// console.log("updateProject:", this.updateProject);
|
// console.log("updateProject:", this.updateProject);
|
||||||
let data = updateProject.value
|
await mainForm.value.validate((valid: any) => {
|
||||||
updateTerminal(data).then((res: any) => {
|
if (valid){
|
||||||
ElMessage({
|
let data = updateProject.value
|
||||||
type: 'success',
|
updateTerminal(data).then((res: any) => {
|
||||||
message: res.message
|
ElMessage({
|
||||||
})
|
type: 'success',
|
||||||
pageStatus.value = 1
|
message: res.message
|
||||||
treedata()
|
})
|
||||||
|
pageStatus.value = 1
|
||||||
|
treedata()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
const updateProjectF = () => {
|
const updateProjectF = () => {
|
||||||
updateProject.value = {
|
updateProject.value = {
|
||||||
|
|||||||
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>
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
>
|
>
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
<el-form :model="ruleForm" :rules="rules" ref="ruleFormRef" label-width="100px">
|
||||||
<el-form-item label="变压器名:" prop="tfName">
|
<el-form-item label="变压器名:" prop="tfName">
|
||||||
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable></el-input>
|
<el-input v-model="ruleForm.tfName" placeholder="请输入" clearable maxlength="32" show-word-limit></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="接线方式:" prop="wiring" class="top">
|
<el-form-item label="接线方式:" prop="wiring" class="top">
|
||||||
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
<el-select style="width: 100%" v-model="ruleForm.wiring" clearable placeholder="请选择接线方式">
|
||||||
@@ -113,7 +113,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div style="border-right: 1px solid; height: 100%" class="xiaoshou">
|
<div style="border-right: 1px solid; height: 100%" class="xiaoshou">
|
||||||
<div style="overflow-y: auto; height: 100%; overflow-x: auto;max-height: 350px;" class="tree mr10 xiaoshou">
|
<div style="overflow-y: auto; height: 100%; overflow-x: auto;max-height: 350px;" class="tree mr10 xiaoshou">
|
||||||
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable></el-input>
|
<el-input placeholder="输入关键字检索" v-model="filterText1" clearable maxlength="32" show-word-limit></el-input>
|
||||||
<el-tree
|
<el-tree
|
||||||
style="cursor: pointer;display: inline-block;"
|
style="cursor: pointer;display: inline-block;"
|
||||||
:data="treeMenuLeftData"
|
:data="treeMenuLeftData"
|
||||||
@@ -163,7 +163,7 @@
|
|||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<div style="border-left: 1px solid; height: 100%" class="xiaoshou">
|
<div style="border-left: 1px solid; height: 100%" class="xiaoshou">
|
||||||
<div style="overflow-y: auto; height: 100%;overflow-x: auto;max-height: 350px;" class="ml10 tree xiaoshou">
|
<div style="overflow-y: auto; height: 100%;overflow-x: auto;max-height: 350px;" class="ml10 tree xiaoshou">
|
||||||
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable></el-input>
|
<el-input placeholder="输入关键字检索" v-model="filterText2" clearable maxlength="32" show-word-limit></el-input>
|
||||||
<el-tree
|
<el-tree
|
||||||
style="cursor: pointer"
|
style="cursor: pointer"
|
||||||
:data="treeMenuRightData"
|
:data="treeMenuRightData"
|
||||||
@@ -328,7 +328,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
@@ -372,6 +372,7 @@ const tableStore = new TableStore({
|
|||||||
click: row => {
|
click: row => {
|
||||||
delTransformer([row.tfIndex]).then(res => {
|
delTransformer([row.tfIndex]).then(res => {
|
||||||
ElMessage.success('删除成功')
|
ElMessage.success('删除成功')
|
||||||
|
menuTree.value.loadData()
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -413,6 +414,7 @@ const transformerAdd = () => {
|
|||||||
message: '请选择变电站'
|
message: '请选择变电站'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
ruleForm.subIndex = parentId.value
|
||||||
transformerTitle.value = '新增变压器信息'
|
transformerTitle.value = '新增变压器信息'
|
||||||
transformerInformation.value = true
|
transformerInformation.value = true
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
@@ -602,55 +604,73 @@ const maintenanceData = reactive({
|
|||||||
//上节点选择
|
//上节点选择
|
||||||
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
const checkLeft = (checkedNodes: any, checkedKeys: any) => {
|
||||||
maintenanceData.upNode = checkedNodes.id
|
maintenanceData.upNode = checkedNodes.id
|
||||||
if (maintenanceData.upNode === maintenanceData.downNode) {
|
if (maintenanceData.upNode === maintenanceData.downNode) {
|
||||||
menuTreeRight.value?.setCheckedKeys([])
|
menuTreeRight.value?.setCheckedKeys([])
|
||||||
maintenanceData.downNode = ''
|
maintenanceData.downNode = ''
|
||||||
}
|
}
|
||||||
if (checkedKeys.checkedKeys.length > 1) {
|
if (checkedKeys.checkedKeys.length > 1) {
|
||||||
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
menuTreeLeft.value?.setCheckedKeys([checkedNodes.id])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//下节点选择
|
//下节点选择
|
||||||
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
const checkRight = (checkedNodes: any, checkedKeys: any) => {
|
||||||
maintenanceData.downNode = checkedNodes.id
|
maintenanceData.downNode = checkedNodes.id
|
||||||
if (maintenanceData.downNode === maintenanceData.upNode) {
|
|
||||||
menuTreeLeft.value?.setCheckedKeys([])
|
if (maintenanceData.downNode === maintenanceData.upNode) {
|
||||||
maintenanceData.upNode = ''
|
menuTreeLeft.value?.setCheckedKeys([])
|
||||||
}
|
maintenanceData.upNode = ''
|
||||||
if (checkedKeys.checkedKeys.length > 1) {
|
}
|
||||||
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
if (checkedKeys.checkedKeys.length > 1) {
|
||||||
}
|
menuTreeRight.value?.setCheckedKeys([checkedNodes.id])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//节点维护提交
|
//节点维护提交
|
||||||
const maintenanceOnsubmit = () => {
|
const maintenanceOnsubmit = () => {
|
||||||
for (let i = 0; i < bind.value.length; i++) {
|
|
||||||
if (bind.value[i][0] == maintenanceData.upNode) {
|
if(maintenanceData.downNode == '' || maintenanceData.upNode == '') {
|
||||||
for (let j = 0; j < bind.value.length; j++) {
|
ElMessage({
|
||||||
if (bind.value[j][1] == maintenanceData.downNode) {
|
type: 'warning',
|
||||||
ElMessage({
|
message: '请确保上下节点各自选择一个母线!'
|
||||||
type: 'warning',
|
})
|
||||||
message: '上下节点无法选择相同母线!!!'
|
return
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bindLevel.value != 5) {
|
|
||||||
for (let i = 0; i < bind.value.length; i++) {
|
if (maintenanceData.upNode == maintenanceData.downNode) {
|
||||||
if (maintenanceData.upNode == bind.value[i][1] && maintenanceData.downNode == bind.value[i][0]) {
|
ElMessage({
|
||||||
ElMessage({
|
type: 'warning',
|
||||||
type: 'warning',
|
message: '上下节点无法选择相同母线!'
|
||||||
message: '上下节点无法选择相同母线!!!'
|
})
|
||||||
})
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// for (let i = 0; i < bind.value.length; i++) {
|
||||||
|
// if (bind.value[i] == maintenanceData.upNode) {
|
||||||
|
// for (let j = 0; j < bind.value.length; j++) {
|
||||||
|
|
||||||
|
// if (bind.value[j] == maintenanceData.downNode) {
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'warning',
|
||||||
|
// message: '上下节点无法选择相同母线!!!'
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if (bindLevel.value != 5) {
|
||||||
|
// for (let i = 0; i < bind.value.length; i++) {
|
||||||
|
// if (maintenanceData.upNode == bind.value[i] && maintenanceData.downNode == bind.value[i]) {
|
||||||
|
// ElMessage({
|
||||||
|
// type: 'warning',
|
||||||
|
// message: '上下节点无法选择相同母线!!!'
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
nodeMaintenance(maintenanceData).then((res: any) => {
|
nodeMaintenance(maintenanceData).then((res: any) => {
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
|
|||||||
@@ -53,12 +53,12 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="14">
|
<el-col :span="14">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<el-form :model="form" label-width="100px" ref="ruleFormRef">
|
<el-form :model="form" label-width="100px" ref="ruleFormRef" :rules="rules">
|
||||||
<el-form-item label="名称:">
|
<el-form-item label="名称:" prop="tpName">
|
||||||
<el-input v-model="form.tpName" placeholder="请输入"></el-input>
|
<el-input v-model="form.tpName" placeholder="请输入" maxlength="32" show-word-limit clearable></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="描述:" class="mt20">
|
<el-form-item label="描述:" class="mt20">
|
||||||
<el-input v-model="form.tfDescribe" placeholder="请输入"></el-input>
|
<el-input v-model="form.tfDescribe" placeholder="请输入" ></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item class="mt20 ml20">
|
<el-form-item class="mt20 ml20">
|
||||||
<el-button @click="dialogFormVisible = false">取消</el-button>
|
<el-button @click="dialogFormVisible = false">取消</el-button>
|
||||||
@@ -122,13 +122,8 @@ const menuTree = ref()
|
|||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
|
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
tpName: [{ required: true, message: '名称不可为空', trigger: 'blur' }],
|
||||||
ip: [{ required: true, message: 'ip不可为空', trigger: 'blur' }],
|
|
||||||
nodeGrade: [{ required: true, message: '等级不可为空', trigger: 'blur' }],
|
|
||||||
nodeDevNum: [{ required: true, message: '最大终端数不可为空', trigger: 'blur' }],
|
|
||||||
maxProcessNum: [{ required: true, message: '最大进程数不可为空', trigger: 'blur' }],
|
|
||||||
sort: [{ required: true, message: '排序不可为空', trigger: 'blur' }],
|
|
||||||
remark: [{ required: true, message: '描述不可为空', trigger: 'blur' }]
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
@@ -161,7 +156,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'tfDescribe'
|
field: 'tfDescribe'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
|
|||||||
@@ -48,7 +48,7 @@
|
|||||||
v-model.trim="form.projectName"
|
v-model.trim="form.projectName"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入项目名称"
|
placeholder="请输入项目名称"
|
||||||
maxlength="64"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -112,7 +112,7 @@
|
|||||||
v-model.trim="form.substation"
|
v-model.trim="form.substation"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入厂站名称"
|
placeholder="请输入厂站名称"
|
||||||
maxlength="64"
|
maxlength="32"
|
||||||
show-word-limit
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -364,6 +364,8 @@
|
|||||||
v-model.trim="form.evaluationChekDept"
|
v-model.trim="form.evaluationChekDept"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="请输入预测评估评审单位"
|
placeholder="请输入预测评估评审单位"
|
||||||
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
<el-form-item for="-" label="预测评估结论:" style="width: 100%">
|
||||||
@@ -398,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' ||
|
||||||
{{ proviteData?.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() // 查询参数
|
||||||
@@ -332,6 +339,7 @@ const powerSupplyInfoOptionList = dictData.getBasicData('supply_condition')
|
|||||||
/** 获得数据 */
|
/** 获得数据 */
|
||||||
const getInfo = async () => {
|
const getInfo = async () => {
|
||||||
detailLoading.value = true
|
detailLoading.value = true
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (props.update) {
|
if (props.update) {
|
||||||
await getUserReportUpdateById(props.id || queryId).then(res => {
|
await getUserReportUpdateById(props.id || queryId).then(res => {
|
||||||
@@ -339,8 +347,9 @@ 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()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -383,7 +392,6 @@ const preview = (val: any, url: any) => {
|
|||||||
}
|
}
|
||||||
//预测评估报告
|
//预测评估报告
|
||||||
if (val == 'predictionEvaluationReport') {
|
if (val == 'predictionEvaluationReport') {
|
||||||
|
|
||||||
predictionEvaluationReportRef?.value.open(url)
|
predictionEvaluationReportRef?.value.open(url)
|
||||||
}
|
}
|
||||||
//预测评估评审意见报告
|
//预测评估评审意见报告
|
||||||
@@ -414,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: [
|
||||||
@@ -112,9 +112,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
minWidth: 150,
|
minWidth: 150,
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -20,7 +20,7 @@
|
|||||||
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
<el-radio-button v-for="(item, i) in dotList?.childrens" :label="item.name" :value="i" />
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="information">
|
<div >
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
||||||
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
<el-button icon="el-icon-Delete" type="primary" @click="deletes">删除</el-button>
|
||||||
@@ -134,7 +134,7 @@ defineOptions({
|
|||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const heightTab = mainHeight(82)
|
const heightTab = mainHeight(82)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const addTreeRef = ref()
|
const addTreeRef = ref()
|
||||||
const editorRef = ref()
|
const editorRef = ref()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const emits = defineEmits(['algorithm'])
|
const emits = defineEmits(['algorithm'])
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
|
|
||||||
const popupEditFlag = ref(false)
|
const popupEditFlag = ref(false)
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<el-drawer v-model="drawer" size="60%">
|
<el-drawer v-model="drawer" size="60%">
|
||||||
<div class="box mt20">
|
<div class="box mt20">
|
||||||
<el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
<el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||||
v-if="information">
|
v-if="information" >
|
||||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||||
@@ -15,16 +15,16 @@
|
|||||||
<el-collapse-item title="国家电网有限公司企业标准" name="2">
|
<el-collapse-item title="国家电网有限公司企业标准" name="2">
|
||||||
<!-- <el-empty description="暂无数据" class="custom-empty iframe" /> -->
|
<!-- <el-empty description="暂无数据" class="custom-empty iframe" /> -->
|
||||||
<div :style="`overflow: auto;`" class="iframe">
|
<div :style="`overflow: auto;`" class="iframe">
|
||||||
<vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
||||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url"
|
<vue-office-excel v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')" :src="url"
|
||||||
:options="excelOptions" />
|
:options="excelOptions" />
|
||||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url" /> -->
|
<!-- <vue-office-pdf v-if="urlKey.includes('.pdf')" :src="url" /> -->
|
||||||
<iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
<iframe v-if="urlKey.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||||
<img v-if="
|
<img v-if="
|
||||||
url.includes('.png') ||
|
urlKey.includes('.png') ||
|
||||||
url.includes('.jpg') ||
|
urlKey.includes('.jpg') ||
|
||||||
url.includes('.gif') ||
|
urlKey.includes('.gif') ||
|
||||||
url.includes('.bmp')
|
urlKey.includes('.bmp')
|
||||||
" :src="url" />
|
" :src="url" />
|
||||||
</div>
|
</div>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
@@ -45,6 +45,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||||
|
import { previewFile } from '@/utils/fileDownLoad'
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const drawer = ref(false)
|
const drawer = ref(false)
|
||||||
const activeName = ref('2')
|
const activeName = ref('2')
|
||||||
@@ -53,17 +54,14 @@ const url = ref('')
|
|||||||
const excelOptions = ref({})
|
const excelOptions = ref({})
|
||||||
const information = adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
|
|
||||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
|
||||||
const open = (row: any) => {
|
|
||||||
// console.log('🚀 ~ open ~ row:', row)
|
|
||||||
// url.value = row
|
|
||||||
drawer.value = true
|
|
||||||
if(VITE_FLAG){
|
|
||||||
url.value = `/api-docx/excelreport` + row
|
|
||||||
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
|
|
||||||
}else{
|
|
||||||
|
|
||||||
}
|
const urlKey=ref('')
|
||||||
|
const open = async (row: any) => {
|
||||||
|
drawer.value = true
|
||||||
|
urlKey.value=row
|
||||||
|
const previewUrl = await previewFile(row);
|
||||||
|
url.value = previewUrl;
|
||||||
|
|
||||||
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
||||||
// url.value = res.data.url
|
// url.value = res.data.url
|
||||||
// })
|
// })
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ const tableStore = new TableStore({
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '200',
|
width: '200',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ defineOptions({
|
|||||||
const excelOptions = ref({})
|
const excelOptions = ref({})
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const treeRef = ref()
|
const treeRef = ref()
|
||||||
const addTreeRef = ref()
|
const addTreeRef = ref()
|
||||||
const url = ref('')
|
const url = ref('')
|
||||||
@@ -88,6 +88,7 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
if (data?.url != null && data?.url != '') {
|
if (data?.url != null && data?.url != '') {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
urlKey.value = data.url
|
urlKey.value = data.url
|
||||||
|
console.log('urlKey.value',urlKey.value)
|
||||||
setTimeout(async () => {
|
setTimeout(async () => {
|
||||||
if(VITE_FLAG){
|
if(VITE_FLAG){
|
||||||
url.value = `/api-docx/excelreport` + data.url
|
url.value = `/api-docx/excelreport` + data.url
|
||||||
|
|||||||
@@ -91,8 +91,10 @@ const submit = () => {
|
|||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (urlList.value.length > 0) {
|
if (urlList.value.length > 0) {
|
||||||
|
|
||||||
const promises = urlList.value.map(async (item: any) => {
|
const promises = urlList.value.map(async (item: any) => {
|
||||||
if (urlList.value[0].raw) {
|
if (urlList.value[0].raw) {
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
uploadFile(item.raw, '/supervision/')
|
uploadFile(item.raw, '/supervision/')
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
field: 'createTime'
|
field: 'createTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '280',
|
width: '280',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -38,20 +38,20 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="电网标识">
|
<el-form-item label="电网标识">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.powerFlag"
|
v-model="tableStore.table.params.powerFlag"
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
placeholder="请选择电网标识"
|
placeholder="请选择电网标识"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in powerFlagList"
|
v-for="item in powerFlagList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.algoDescribe"
|
:value="item.algoDescribe"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="终端厂家:">
|
<el-form-item label="终端厂家:">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="tableStore.table.params.manufacturer"
|
v-model="tableStore.table.params.manufacturer"
|
||||||
@@ -88,6 +88,14 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入关键字筛选"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -96,7 +104,7 @@
|
|||||||
<el-tab-pane :name="0" :lazy="true" label="稳态指标符合性占比表格">
|
<el-tab-pane :name="0" :lazy="true" label="稳态指标符合性占比表格">
|
||||||
<Table
|
<Table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
:tree-config="{ transform: true, parentField: 'uPid', rowField: 'uId' }"
|
||||||
:scroll-y="{ enabled: true }"
|
:scroll-y="{ enabled: true }"
|
||||||
v-if="activeName == 0"
|
v-if="activeName == 0"
|
||||||
/>
|
/>
|
||||||
@@ -117,6 +125,7 @@ import TableHeader from '@/components/table/header/index.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 charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
import { filterTree } from '@/utils/tree'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/SteadyState'
|
name: 'harmonic-boot/area/SteadyState'
|
||||||
})
|
})
|
||||||
@@ -214,7 +223,12 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(
|
||||||
|
filterTree(tableStore.table.data, node => {
|
||||||
|
return node.name.includes(tableStore.table.params.searchValue)
|
||||||
|
}),
|
||||||
|
Math.random() * 1000
|
||||||
|
)
|
||||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
@@ -230,6 +244,7 @@ tableStore.table.params.manufacturer = []
|
|||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
tableStore.table.params.powerFlag = 2
|
tableStore.table.params.powerFlag = 2
|
||||||
tableStore.table.params.serverName = 'harmonicBoot'
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const tree2List = (list: any, id?: string) => {
|
const tree2List = (list: any, id?: string) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TableHeader datePicker area showExport>
|
<TableHeader datePicker area showExport>
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="筛选数据">
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" />
|
<el-input v-model="tableStore.table.params.searchValue" placeholder="输入关键字筛选" clearable maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="统计类型:">
|
<el-form-item label="统计类型:">
|
||||||
<el-select
|
<el-select
|
||||||
@@ -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)
|
||||||
@@ -179,7 +180,7 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '120',
|
width: '120',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -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
|
||||||
}
|
}
|
||||||
@@ -385,7 +473,7 @@ const makeUpSubmit = () => {
|
|||||||
logPopUp.value = true
|
logPopUp.value = true
|
||||||
}
|
}
|
||||||
const socket = async (form: any) => {
|
const socket = async (form: any) => {
|
||||||
const url = (localStorage.getItem('WebSocketUrl2') || 'ws://192.168.1.67:10405/api/recell/')
|
const url = (localStorage.getItem('WebSocketUrl2') || 'null')//'ws://192.168.1.67:10405/api/recell/')
|
||||||
logList.value = []
|
logList.value = []
|
||||||
await dataSocket.socketServe.connect(`${url}${adminInfo.id}`)
|
await dataSocket.socketServe.connect(`${url}${adminInfo.id}`)
|
||||||
await dataSocket.socketServe.send(form)
|
await dataSocket.socketServe.send(form)
|
||||||
|
|||||||
@@ -83,6 +83,14 @@
|
|||||||
/>
|
/>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入关键字筛选"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,6 +120,7 @@ import TableHeader from '@/components/table/header/index.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 charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
import { filterTree } from '@/utils/tree'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/harmonicDistortionRate'
|
name: 'harmonic-boot/area/harmonicDistortionRate'
|
||||||
})
|
})
|
||||||
@@ -200,7 +209,13 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(
|
||||||
|
filterTree(tableStore.table.data, node => {
|
||||||
|
// 筛选条件:name 包含关键词
|
||||||
|
return node.name.includes(tableStore.table.params.searchValue)
|
||||||
|
}),
|
||||||
|
Math.random() * 1000
|
||||||
|
)
|
||||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@@ -215,6 +230,7 @@ tableStore.table.params.manufacturer = []
|
|||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||||
tableStore.table.params.serverName = 'harmonicBoot'
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const tree2List = (list: any, id?: string) => {
|
const tree2List = (list: any, id?: string) => {
|
||||||
//存储结果的数组
|
//存储结果的数组
|
||||||
|
|||||||
@@ -0,0 +1,189 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader date-picker area showExport>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="统计类型:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.statisticalType"
|
||||||
|
placeholder="请选择统计类型"
|
||||||
|
value-key="id"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in classificationData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电压等级:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.scale"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择电压等级"
|
||||||
|
style="width: 100%"
|
||||||
|
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="终端厂家:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.manufacturer"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择终端厂家"
|
||||||
|
style="width: 100%"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in terminaloption"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="干扰源类型:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.loadType"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择干扰源类型"
|
||||||
|
style="width: 100%"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in interfereoption"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电网标志">
|
||||||
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
|
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getAreaDept } from '@/api/harmonic-boot/area'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'harmonic-boot/area/harmonicDistortionRate'
|
||||||
|
})
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
//字典获取电压等级
|
||||||
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
|
//字典获取终端厂家
|
||||||
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
|
//字典获取统计类型
|
||||||
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
|
//字典获取干扰源类型
|
||||||
|
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||||
|
const sign = dictData.getBasicData('power_flag')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/tHDistortion/getTHDistortionTableData',
|
||||||
|
isWebPaging: true,
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
field: 'index',
|
||||||
|
title: '序号',
|
||||||
|
width: '80',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'subStation',
|
||||||
|
title: '变电站',
|
||||||
|
minWidth: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'city',
|
||||||
|
title: '所在地市',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'manufacturer',
|
||||||
|
title: '终端厂家',
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deviceName',
|
||||||
|
title: '终端名称',
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '网络参数',
|
||||||
|
field: 'ip',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '监测点名称',
|
||||||
|
field: 'lineName',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '总谐波畸变率(%)',
|
||||||
|
field: 'distortion',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue
|
||||||
|
},
|
||||||
|
minWidth: 120
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.statisticalType = classificationData[0]
|
||||||
|
tableStore.table.params.scale = []
|
||||||
|
tableStore.table.params.manufacturer = []
|
||||||
|
tableStore.table.params.loadType = []
|
||||||
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
|
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -107,7 +107,7 @@ const tableStore = new TableStore({
|
|||||||
var tips = ''
|
var tips = ''
|
||||||
|
|
||||||
for (var i = 0; i < params.length; i++) {
|
for (var i = 0; i < params.length; i++) {
|
||||||
if (params[i].value == 1) {
|
if (params[i].value == 3.14159) {
|
||||||
tips += params[i].name + '</br>'
|
tips += params[i].name + '</br>'
|
||||||
tips += params[i].marker + '在线率:暂无数据'
|
tips += params[i].marker + '在线率:暂无数据'
|
||||||
} else {
|
} else {
|
||||||
@@ -143,7 +143,21 @@ const tableStore = new TableStore({
|
|||||||
//color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
|
//color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
|
||||||
// 定制显示(按顺序)
|
// 定制显示(按顺序)
|
||||||
color: function (params: any) {
|
color: function (params: any) {
|
||||||
if (params.value >= 90) {
|
if (params.value == 3.14159) {
|
||||||
|
return new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#ccc'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
|
}else if (params.value >= 90) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -171,7 +185,7 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
} else if (params.value <= 60 && params.value > 1) {
|
} else if (params.value > 0 && params.value <= 60) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
@@ -180,12 +194,12 @@ const tableStore = new TableStore({
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
offset: 1,
|
offset: 1,
|
||||||
color: '#A52a2a'
|
color: '#CC0100'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
false
|
false
|
||||||
)
|
)
|
||||||
} else if (params.value > 0 && params.value <= 1) {
|
} else if (params.value == 0) {
|
||||||
return new echarts.graphic.LinearGradient(
|
return new echarts.graphic.LinearGradient(
|
||||||
0,
|
0,
|
||||||
1,
|
1,
|
||||||
|
|||||||
@@ -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(() => {})
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="default-main">
|
<div class="default-main">
|
||||||
<TableHeader datePicker ref="header">
|
<TableHeader area datePicker ref="header">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="电网标志">
|
<el-form-item label="电网标志">
|
||||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
@@ -11,82 +11,119 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div v-loading="tableStore.table.loading" class="pr10">
|
<div v-loading="tableStore.table.loading" class="pr10">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" class="pd10">
|
<el-col :span="12" class="pd10" v-if="!VITE_FLAG">
|
||||||
<el-tag style="background: #339966;" class="tag" size="small">5级</el-tag>
|
<el-tag style="background: #339966" class="tag" size="small">5级</el-tag>
|
||||||
<span style="color: #339966;" class="text">:优秀--(4.5,5]</span>
|
<span style="color: #339966" class="text">:优秀--(4.5,5]</span>
|
||||||
<el-tag style="background: #3399ff;" class="tag" size="small">4级</el-tag>
|
<el-tag style="background: #3399ff" class="tag" size="small">4级</el-tag>
|
||||||
<span style="color: #3399ff;" class="text">:良好--(4,4.5]</span>
|
<span style="color: #3399ff" class="text">:良好--(4,4.5]</span>
|
||||||
<el-tag style="background: #ffcc33;" class="tag" size="small">3级</el-tag>
|
<el-tag style="background: #ffcc33" class="tag" size="small">3级</el-tag>
|
||||||
<span style="color: #ffcc33;" class="text">:合格--(3,4]</span>
|
<span style="color: #ffcc33" class="text">:合格--(3,4]</span>
|
||||||
<el-tag style="background: #ff9900;" class="tag" size="small">2级</el-tag>
|
<el-tag style="background: #ff9900" class="tag" size="small">2级</el-tag>
|
||||||
<span style="color: #ff9900;" class="text">:较差--(2,3]</span>
|
<span style="color: #ff9900" class="text">:较差--(2,3]</span>
|
||||||
<el-tag style="background: #A52a2a;" class="tag" size="small">1级</el-tag>
|
<el-tag style="background: #a52a2a" class="tag" size="small">1级</el-tag>
|
||||||
<span style="color: #A52a2a;" class="text">:极差--[1,2]</span>
|
<span style="color: #a52a2a" class="text">:极差--[1,2]</span>
|
||||||
<div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10">
|
<div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10">
|
||||||
<div class=" cardBox">
|
<div class="cardBox">
|
||||||
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="cursor: pointer;">
|
<div style="cursor: pointer">
|
||||||
<el-tag v-if="item.data == 3.14159 || item.data == 0"
|
<el-tag
|
||||||
style="background: #ccc; color: #fff" size="small">
|
v-if="item.data == 3.14159 || item.data == 0"
|
||||||
|
style="background: #ccc; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
无
|
无
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="4.5 < item.data && item.data <= 5 && item.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #339966; color: #fff" size="small">
|
v-if="4.5 < item.data && item.data <= 5 && item.data !== 3.14159"
|
||||||
|
style="background: #339966; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
5级
|
5级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="4 < item.data && item.data <= 4.5 && item.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #3399ff; color: #fff" size="small">
|
v-if="4 < item.data && item.data <= 4.5 && item.data !== 3.14159"
|
||||||
|
style="background: #3399ff; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
4级
|
4级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="3 < item.data && item.data <= 4 && item.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #ffcc33; color: #fff" size="small">
|
v-if="3 < item.data && item.data <= 4 && item.data !== 3.14159"
|
||||||
|
style="background: #ffcc33; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
3级
|
3级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="2 < item.data && item.data <= 3 && item.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #ff9900; color: #fff" size="small">
|
v-if="2 < item.data && item.data <= 3 && item.data !== 3.14159"
|
||||||
|
style="background: #ff9900; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
4级
|
4级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="1 <= item.data && item.data <= 2 && item.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #A52a2a; color: #fff" size="small">
|
v-if="1 <= item.data && item.data <= 2 && item.data !== 3.14159"
|
||||||
|
style="background: #a52a2a; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
1级
|
1级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<span>{{ item.name }}</span>
|
<span>{{ item.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1">
|
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1">
|
||||||
<el-tag v-if="item1.data == 3.14159 || item1.data == 0"
|
<el-tag
|
||||||
style="background: #ccc; color: #fff" size="small">
|
v-if="item1.data == 3.14159 || item1.data == 0"
|
||||||
|
style="background: #ccc; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
无
|
无
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="4.5 < item1.data && item1.data <= 5 && item1.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #339966; color: #fff" size="small">
|
v-if="4.5 < item1.data && item1.data <= 5 && item1.data !== 3.14159"
|
||||||
|
style="background: #339966; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
5级
|
5级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="4 < item1.data && item1.data <= 4.5 && item1.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #3399ff; color: #fff" size="small">
|
v-if="4 < item1.data && item1.data <= 4.5 && item1.data !== 3.14159"
|
||||||
|
style="background: #3399ff; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
4级
|
4级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="3 < item1.data && item1.data <= 4 && item1.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #ffcc33; color: #fff" size="small">
|
v-if="3 < item1.data && item1.data <= 4 && item1.data !== 3.14159"
|
||||||
|
style="background: #ffcc33; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
3级
|
3级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="2 < item1.data && item1.data <= 3 && item1.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #ff9900; color: #fff" size="small">
|
v-if="2 < item1.data && item1.data <= 3 && item1.data !== 3.14159"
|
||||||
|
style="background: #ff9900; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
2级
|
2级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<el-tag v-if="1 <= item1.data && item1.data <= 2 && item1.data !== 3.14159"
|
<el-tag
|
||||||
style="background: #A52a2a; color: #fff" size="small">
|
v-if="1 <= item1.data && item1.data <= 2 && item1.data !== 3.14159"
|
||||||
|
style="background: #a52a2a; color: #fff"
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
1级
|
1级
|
||||||
</el-tag>
|
</el-tag>
|
||||||
<span class="xdf">
|
<span class="xdf">
|
||||||
<el-tooltip :show-arrow="false" :offset="-0" :content="item1.name"
|
<el-tooltip
|
||||||
popper-class="atooltip" placement="bottom-start">
|
:show-arrow="false"
|
||||||
|
:offset="-0"
|
||||||
|
:content="item1.name"
|
||||||
|
placement="bottom-start"
|
||||||
|
|
||||||
|
>
|
||||||
<div class="tooltipText">
|
<div class="tooltipText">
|
||||||
{{ item1.name }}
|
{{ item1.name }}
|
||||||
</div>
|
</div>
|
||||||
@@ -98,34 +135,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="VITE_FLAG ? 24 : 12">
|
||||||
<my-echart class="tall" :options="echartList" />
|
<my-echart class="tall" :options="echartList" />
|
||||||
<div class="tall">
|
<div class="tall mb10">
|
||||||
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
|
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
|
||||||
|
|
||||||
<vxe-column field="name" title="名称"></vxe-column>
|
<vxe-column field="name" title="名称"></vxe-column>
|
||||||
<vxe-column field="zc" title="综合评估值">
|
<vxe-column field="zc" title="综合评估值">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.data == 3.14159" style="color: #000;">
|
<span v-if="scope.row.data == 3.14159" style="color: #000">暂无数据</span>
|
||||||
暂无数据
|
<span v-if="scope.row.data !== 3.14159" style="color: #000">
|
||||||
</span>
|
|
||||||
<span v-if="scope.row.data !== 3.14159" style="color: #000;">
|
|
||||||
{{ scope.row.data }}
|
{{ scope.row.data }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="monitors" title="监测点个数(个)"></vxe-column>
|
<vxe-column field="monitors" title="监测点个数(个)"></vxe-column>
|
||||||
<vxe-column field="level" title="评估等级">
|
<vxe-column field="level" title="评估等级"></vxe-column>
|
||||||
|
|
||||||
</vxe-column>
|
|
||||||
</vxe-table>
|
</vxe-table>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -138,14 +167,22 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import * as echarts from 'echarts/core'
|
import * as echarts from 'echarts/core'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/qydetailedAnalysis/pollutionqy'
|
name: 'harmonic-boot/area/powerAssessment'
|
||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const echartList = ref({})
|
const echartList = ref({})
|
||||||
const sign = dictData.getBasicData('power_flag')
|
const sign = dictData.getBasicData('power_flag')
|
||||||
const header = ref()
|
const header = ref()
|
||||||
const options = dictData.getBasicData('Pollution_Statis', ['I_Neg', 'V_Inharm', 'V_Dev', 'V_Unbalance', 'Plt', 'Freq_Dev'])
|
const options = dictData.getBasicData('Pollution_Statis', [
|
||||||
|
'I_Neg',
|
||||||
|
'V_Inharm',
|
||||||
|
'V_Dev',
|
||||||
|
'V_Unbalance',
|
||||||
|
'Plt',
|
||||||
|
'Freq_Dev'
|
||||||
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/harmonic-boot/comAccess/getComAccessData',
|
url: '/harmonic-boot/comAccess/getComAccessData',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -153,10 +190,6 @@ const tableStore = new TableStore({
|
|||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
histogram(tableStore.table.data)
|
histogram(tableStore.table.data)
|
||||||
header.value.areaRef.change()
|
header.value.areaRef.change()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
@@ -167,26 +200,23 @@ tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
|||||||
|
|
||||||
tableStore.table.params.statisticalType = {}
|
tableStore.table.params.statisticalType = {}
|
||||||
|
|
||||||
|
|
||||||
// 柱状图数据处理
|
// 柱状图数据处理
|
||||||
const histogram = (res: any) => {
|
const histogram = (res: any) => {
|
||||||
|
|
||||||
|
|
||||||
echartList.value = {
|
echartList.value = {
|
||||||
title: {
|
title: {
|
||||||
text: '区域'
|
text: '区域'
|
||||||
},
|
},
|
||||||
|
|
||||||
legend: {
|
legend: {
|
||||||
show: false
|
show: false
|
||||||
},
|
},
|
||||||
|
|
||||||
xAxis: {
|
xAxis: {
|
||||||
name: '区域',
|
name: '区域',
|
||||||
data: res.map((item: any) => item.name)
|
data: res.map((item: any) => item.name)
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
name: '等级',// 给X轴加单位
|
name: '等级', // 给X轴加单位
|
||||||
min: 0,
|
min: 0,
|
||||||
max: 5,
|
max: 5,
|
||||||
splitLine: {
|
splitLine: {
|
||||||
@@ -208,11 +238,10 @@ const histogram = (res: any) => {
|
|||||||
texts.push('4级')
|
texts.push('4级')
|
||||||
} else if (value == 5) {
|
} else if (value == 5) {
|
||||||
texts.push('5级')
|
texts.push('5级')
|
||||||
|
|
||||||
}
|
}
|
||||||
return texts
|
return texts
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
options: {
|
options: {
|
||||||
@@ -222,10 +251,10 @@ const histogram = (res: any) => {
|
|||||||
name: '评估值',
|
name: '评估值',
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
data: res.map((item: any) => {
|
data: res.map((item: any) => {
|
||||||
return item.data == 3.14159 ? 0.14159 : item.data
|
return item.data == 3.14159 ? 0.14159 : item.data == 0 ? 0.14158 : item.data
|
||||||
}),
|
}),
|
||||||
barMaxWidth: 30,
|
barMaxWidth: 30,
|
||||||
|
barMinHeight: 10,
|
||||||
itemStyle: {
|
itemStyle: {
|
||||||
normal: {
|
normal: {
|
||||||
// 随机显示
|
// 随机显示
|
||||||
@@ -234,44 +263,106 @@ const histogram = (res: any) => {
|
|||||||
// 定制显示(按顺序)
|
// 定制显示(按顺序)
|
||||||
color: function (params) {
|
color: function (params) {
|
||||||
if (4.5 < params.value && params.value <= 5 && params.value !== 0.2) {
|
if (4.5 < params.value && params.value <= 5 && params.value !== 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: '#339966',
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#339966'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
} else if (4 < params.value && params.value <= 4.5 && params.value !== 0.2) {
|
} else if (4 < params.value && params.value <= 4.5 && params.value !== 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: '#3399FF'
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#3399FF'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
} else if (3 < params.value && params.value <= 4 && params.value !== 0.2) {
|
} else if (3 < params.value && params.value <= 4 && params.value !== 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: '#FFCC33'
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#FFCC33'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
} else if (2 < params.value && params.value <= 3 && params.value !== 0.2) {
|
} else if (2 < params.value && params.value <= 3 && params.value !== 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: '#FF9900'
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#FF9900'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
} else if (params.value >= 1 && params.value <= 2 && params.value !== 0.2) {
|
} else if (params.value >= 1 && params.value <= 2 && params.value !== 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: '#A52a2a'
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#A52a2a'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
} else if (params.value == 0.2) {
|
} else if (params.value == 0.2) {
|
||||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
return new echarts.graphic.LinearGradient(
|
||||||
{
|
0,
|
||||||
offset: 1,
|
1,
|
||||||
color: "#999999"
|
0,
|
||||||
}], false)
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#ccc'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
|
} else if (params.value == 0.14158) {
|
||||||
|
return new echarts.graphic.LinearGradient(
|
||||||
|
0,
|
||||||
|
1,
|
||||||
|
0,
|
||||||
|
0,
|
||||||
|
[
|
||||||
|
{
|
||||||
|
offset: 1,
|
||||||
|
color: '#ccc'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
false
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
markLine: {
|
markLine: {
|
||||||
silent: false,
|
silent: false,
|
||||||
@@ -283,90 +374,81 @@ const histogram = (res: any) => {
|
|||||||
emphasis: {
|
emphasis: {
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
width: 1
|
width: 1
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
data: [
|
data: [
|
||||||
|
|
||||||
{
|
{
|
||||||
name: "",
|
name: '',
|
||||||
yAxis: 1,
|
yAxis: 1,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#A52a2a',
|
color: '#A52a2a'
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
// position:"middle",
|
// position:"middle",
|
||||||
formatter: '{b}',
|
formatter: '{b}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#A52a2a',
|
color: '#A52a2a'
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "",
|
name: '',
|
||||||
yAxis: 2,
|
yAxis: 2,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#FF9900',
|
color: '#FF9900'
|
||||||
|
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
// position:"middle",
|
// position:"middle",
|
||||||
formatter: '{b}',
|
formatter: '{b}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#FF9900',
|
color: '#FF9900'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "",
|
name: '',
|
||||||
yAxis: 3,
|
yAxis: 3,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#FFCC33',
|
color: '#FFCC33'
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
// position:"middle",
|
// position:"middle",
|
||||||
formatter: '{b}',
|
formatter: '{b}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#FFCC33',
|
color: '#FFCC33'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "",
|
name: '',
|
||||||
yAxis: 4,
|
yAxis: 4,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#3399FF',
|
color: '#3399FF'
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
// position:"middle",
|
// position:"middle",
|
||||||
formatter: '{b}',
|
formatter: '{b}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#3399FF',
|
color: '#3399FF'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "",
|
name: '',
|
||||||
yAxis: 5,
|
yAxis: 5,
|
||||||
lineStyle: {
|
lineStyle: {
|
||||||
color: '#339966',
|
color: '#339966'
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
// position:"middle",
|
// position:"middle",
|
||||||
formatter: '{b}',
|
formatter: '{b}',
|
||||||
textStyle: {
|
textStyle: {
|
||||||
color: '#339966',
|
color: '#339966'
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
]
|
]
|
||||||
},
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
@@ -397,7 +479,6 @@ const layout1 = mainHeight(93) as any
|
|||||||
}
|
}
|
||||||
|
|
||||||
:deep(.cardBox) {
|
:deep(.cardBox) {
|
||||||
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -410,8 +491,6 @@ const layout1 = mainHeight(93) as any
|
|||||||
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
|
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.el-card__header {
|
.el-card__header {
|
||||||
padding: 10px !important;
|
padding: 10px !important;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -420,7 +499,6 @@ const layout1 = mainHeight(93) as any
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-card__body {
|
.el-card__body {
|
||||||
@@ -440,7 +518,6 @@ const layout1 = mainHeight(93) as any
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
display: flex;
|
display: flex;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.xdf {
|
.xdf {
|
||||||
@@ -456,11 +533,8 @@ const layout1 = mainHeight(93) as any
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -74,10 +74,23 @@
|
|||||||
</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.powerFlag" placeholder="请选择电网标志">
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
<el-option
|
||||||
</el-select>
|
v-for="item in sign"
|
||||||
</el-form-item>
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.algoDescribe"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入关键字筛选"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -98,6 +111,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, watch } from 'vue'
|
import { ref, onMounted, watch } from 'vue'
|
||||||
import { useDictData } from '@/stores/dictData'
|
import { useDictData } from '@/stores/dictData'
|
||||||
@@ -107,6 +121,7 @@ import TableHeader from '@/components/table/header/index.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 charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
import { filterTree } from '@/utils/tree'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/qualifiedRate'
|
name: 'harmonic-boot/area/qualifiedRate'
|
||||||
})
|
})
|
||||||
@@ -158,6 +173,8 @@ const tableStore = new TableStore({
|
|||||||
title: '电压等级',
|
title: '电压等级',
|
||||||
field: 'voltageLevel',
|
field: 'voltageLevel',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
|
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -166,6 +183,7 @@ const tableStore = new TableStore({
|
|||||||
title: '网络参数',
|
title: '网络参数',
|
||||||
field: 'networkParam',
|
field: 'networkParam',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -174,6 +192,7 @@ const tableStore = new TableStore({
|
|||||||
title: '监测点名称',
|
title: '监测点名称',
|
||||||
field: 'lineName',
|
field: 'lineName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 120,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -182,6 +201,7 @@ const tableStore = new TableStore({
|
|||||||
title: '厂家',
|
title: '厂家',
|
||||||
field: 'factoryName',
|
field: 'factoryName',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -190,6 +210,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电压(%)',
|
title: '谐波电压(%)',
|
||||||
field: 'harmonicVoltage',
|
field: 'harmonicVoltage',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -198,6 +219,7 @@ const tableStore = new TableStore({
|
|||||||
title: '电压偏差(%)',
|
title: '电压偏差(%)',
|
||||||
field: 'voltageOffset',
|
field: 'voltageOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -206,6 +228,7 @@ const tableStore = new TableStore({
|
|||||||
title: '三相电压不平衡度(%)',
|
title: '三相电压不平衡度(%)',
|
||||||
field: 'voltageUnbalance',
|
field: 'voltageUnbalance',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -214,6 +237,7 @@ const tableStore = new TableStore({
|
|||||||
title: '间谐波电压含有率(%)',
|
title: '间谐波电压含有率(%)',
|
||||||
field: 'interHarmonic',
|
field: 'interHarmonic',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 100,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -222,6 +246,7 @@ const tableStore = new TableStore({
|
|||||||
title: '谐波电流(%)',
|
title: '谐波电流(%)',
|
||||||
field: 'harmonicCurrent',
|
field: 'harmonicCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -230,6 +255,7 @@ const tableStore = new TableStore({
|
|||||||
title: '负序电流(%)',
|
title: '负序电流(%)',
|
||||||
field: 'negativeCurrent',
|
field: 'negativeCurrent',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -238,6 +264,7 @@ const tableStore = new TableStore({
|
|||||||
title: '频率偏差(%)',
|
title: '频率偏差(%)',
|
||||||
field: 'freqOffset',
|
field: 'freqOffset',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -246,6 +273,7 @@ const tableStore = new TableStore({
|
|||||||
title: '闪变(%)',
|
title: '闪变(%)',
|
||||||
field: 'flicker',
|
field: 'flicker',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
|
minWidth: 80,
|
||||||
formatter: function (row) {
|
formatter: function (row) {
|
||||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
@@ -253,7 +281,13 @@ const tableStore = new TableStore({
|
|||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => {
|
loadCallback: () => {
|
||||||
tableStore.table.data = tree2List(tableStore.table.data, Math.random() * 1000)
|
tableStore.table.data = tree2List(
|
||||||
|
filterTree(tableStore.table.data, node => {
|
||||||
|
// 筛选条件:name 包含关键词
|
||||||
|
return node.name.includes(tableStore.table.params.searchValue)
|
||||||
|
}),
|
||||||
|
Math.random() * 1000
|
||||||
|
)
|
||||||
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
tableStore.table.column[0].title = tableStore.table.params.statisticalType.name
|
||||||
|
|
||||||
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
chartsRef.value && chartsRef.value.getTableStoreParams(tableStore.table.params)
|
||||||
@@ -269,6 +303,7 @@ tableStore.table.params.manufacturer = []
|
|||||||
tableStore.table.params.loadType = []
|
tableStore.table.params.loadType = []
|
||||||
tableStore.table.params.serverName = 'harmonicBoot'
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
// const tree2List = (list: any, pid?: string) => {
|
// const tree2List = (list: any, pid?: string) => {
|
||||||
// //存储结果的数组
|
// //存储结果的数组
|
||||||
@@ -311,11 +346,12 @@ const tree2List = (list: any, id?: string) => {
|
|||||||
})
|
})
|
||||||
// 返回结果数组
|
// 返回结果数组
|
||||||
return arr
|
return arr
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tableStore.index()
|
tableStore.index()
|
||||||
})
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
// .online {
|
// .online {
|
||||||
// width: 100%;
|
// width: 100%;
|
||||||
|
|||||||
253
src/views/pqs/harmonicMonitoring/area/qualifiedRate/index1.vue
Normal file
253
src/views/pqs/harmonicMonitoring/area/qualifiedRate/index1.vue
Normal file
@@ -0,0 +1,253 @@
|
|||||||
|
<template>
|
||||||
|
<div class="default-main">
|
||||||
|
<TableHeader date-picker area showExport>
|
||||||
|
<template #select>
|
||||||
|
<el-form-item label="统计类型:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.statisticalType"
|
||||||
|
placeholder="请选择统计类型"
|
||||||
|
value-key="id"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in classificationData"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="电压等级:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.scale"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择电压等级"
|
||||||
|
style="width: 100%"
|
||||||
|
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="终端厂家:" v-if="false">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.manufacturer"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择终端厂家"
|
||||||
|
style="width: 100%"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in terminaloption"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="干扰源类型:">
|
||||||
|
<el-select
|
||||||
|
v-model="tableStore.table.params.loadType"
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
clearable
|
||||||
|
placeholder="请选择干扰源类型"
|
||||||
|
style="width: 100%"
|
||||||
|
value-key="id"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="(item, index) in interfereoption"
|
||||||
|
:key="index"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="电网标志">
|
||||||
|
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||||
|
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
|
import { getAreaDept } from '@/api/harmonic-boot/area'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
|
||||||
|
defineOptions({
|
||||||
|
name: 'harmonic-boot/area/qualifiedRate'
|
||||||
|
})
|
||||||
|
|
||||||
|
const dictData = useDictData()
|
||||||
|
//字典获取电压等级
|
||||||
|
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
|
//字典获取终端厂家
|
||||||
|
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||||
|
//字典获取统计类型
|
||||||
|
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||||
|
//字典获取干扰源类型
|
||||||
|
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||||
|
const sign = dictData.getBasicData('power_flag')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/harmonic-boot/steadyQualify/getSteadyQualifyTableData',
|
||||||
|
isWebPaging: true,
|
||||||
|
method: 'POST',
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
field: 'index',
|
||||||
|
title: '序号',
|
||||||
|
width: '80',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
field: 'subStation',
|
||||||
|
title: '变电站',
|
||||||
|
minWidth: 150
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'city',
|
||||||
|
title: '所在地市',
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'manufacturer',
|
||||||
|
title: '终端厂家',
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'deviceName',
|
||||||
|
title: '终端名称',
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '网络参数',
|
||||||
|
field: 'ip',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 120
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '监测点名称',
|
||||||
|
field: 'lineName',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 100
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '谐波电压(%)',
|
||||||
|
field: 'harmonicVoltage',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '电压偏差(%)',
|
||||||
|
field: 'voltageOffset',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '三相电压不平衡度(%)',
|
||||||
|
field: 'voltageUnbalance',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '间谐波电压含有率(%)',
|
||||||
|
field: 'interHarmonic',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '谐波电流(%)',
|
||||||
|
field: 'harmonicCurrent',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '负序电流(%)',
|
||||||
|
field: 'negativeCurrent',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '频率偏差(%)',
|
||||||
|
field: 'freqOffset',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '闪变(%)',
|
||||||
|
field: 'flicker',
|
||||||
|
align: 'center',
|
||||||
|
formatter: function (row) {
|
||||||
|
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||||
|
},
|
||||||
|
minWidth: 80
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
tableStore.table.params.statisticalType = classificationData[0]
|
||||||
|
tableStore.table.params.scale = []
|
||||||
|
tableStore.table.params.manufacturer = []
|
||||||
|
tableStore.table.params.loadType = []
|
||||||
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
|
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
tableStore.index()
|
||||||
|
})
|
||||||
|
</script>
|
||||||
@@ -37,6 +37,14 @@
|
|||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="关键字筛选">
|
||||||
|
<el-input
|
||||||
|
v-model.trim="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
style="width: 200px"
|
||||||
|
placeholder="请输入关键字筛选"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
@@ -88,7 +96,7 @@
|
|||||||
<span style="color: #ffcc33">检修状态</span>
|
<span style="color: #ffcc33">检修状态</span>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<p style="background: #A52a2a">
|
<p style="background: #a52a2a">
|
||||||
<svg
|
<svg
|
||||||
t="1722910570852"
|
t="1722910570852"
|
||||||
class="icon"
|
class="icon"
|
||||||
@@ -106,7 +114,7 @@
|
|||||||
></path>
|
></path>
|
||||||
</svg>
|
</svg>
|
||||||
</p>
|
</p>
|
||||||
<span style="color: #A52a2a">停运状态</span>
|
<span style="color: #a52a2a">停运状态</span>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@@ -133,6 +141,7 @@ import TableHeader from '@/components/table/header/index.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 charts from './components/charts.vue'
|
import charts from './components/charts.vue'
|
||||||
|
import { filterTree } from '@/utils/tree'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/terminalonlinerate'
|
name: 'harmonic-boot/area/terminalonlinerate'
|
||||||
})
|
})
|
||||||
@@ -279,7 +288,12 @@ 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(
|
||||||
|
filterTree(tableStore.table.data, node => {
|
||||||
|
return node.name.includes(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)
|
||||||
@@ -294,7 +308,7 @@ tableStore.table.params.scale = voltageleveloption
|
|||||||
tableStore.table.params.manufacturer = terminaloption
|
tableStore.table.params.manufacturer = terminaloption
|
||||||
tableStore.table.params.loadType = interfereoption
|
tableStore.table.params.loadType = interfereoption
|
||||||
tableStore.table.params.serverName = 'harmonicBoot'
|
tableStore.table.params.serverName = 'harmonicBoot'
|
||||||
|
tableStore.table.params.searchValue = ''
|
||||||
|
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const tree2List = (list: any, id?: string) => {
|
const tree2List = (list: any, id?: string) => {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<TableHeader :showReset="false" ref="TableHeaderRef">
|
<TableHeader :showReset="false" ref="TableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="关键字">
|
<el-form-item label="关键字">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" />
|
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="请输入关键字" maxlength="32" show-word-limit/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
@@ -69,7 +69,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '更新时间', field: 'updateTime' },
|
{ title: '更新时间', field: 'updateTime' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ const dotList: any = ref({})
|
|||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const heightB = mainHeight(70)
|
const heightB = mainHeight(70)
|
||||||
const harmonic = harmonicOptions.slice(1)
|
const harmonic = harmonicOptions.slice(1)
|
||||||
const size = ref(23)
|
const size = ref(19)
|
||||||
const showTabs = ref(false)
|
const showTabs = ref(false)
|
||||||
const loadDataOptions: any = ref([])
|
const loadDataOptions: any = ref([])
|
||||||
const form: any = reactive({
|
const form: any = reactive({
|
||||||
@@ -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;
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '计算时间', field: 'updateTime' },
|
{ title: '计算时间', field: 'updateTime' },
|
||||||
{ title: '计算窗口', field: 'timeWindow' },
|
{ title: '计算窗口', field: 'timeWindow' },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
|||||||
@@ -32,7 +32,7 @@
|
|||||||
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
||||||
<template #header>
|
<template #header>
|
||||||
<div style="cursor: pointer;" @click="queryline(item, false)">
|
<div style="cursor: pointer;" @click="queryline(item, false)">
|
||||||
<el-tag v-if="item.data < 60 && item.data >= 0"
|
<el-tag v-if="item.data < 60 && item.data >= 0 && item.data !== 3.14159"
|
||||||
style="color: #fff; background: #339966" size="small">
|
style="color: #fff; background: #339966" size="small">
|
||||||
优
|
优
|
||||||
</el-tag>
|
</el-tag>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<div class="card-item" v-for="(item1, index1) in item.children"
|
<div class="card-item" v-for="(item1, index1) in item.children"
|
||||||
:key="index1" @click="queryline(item1, true)">
|
:key="index1" @click="queryline(item1, true)">
|
||||||
|
|
||||||
<el-tag v-if="item1.data < 60 && item1.data >= 0"
|
<el-tag v-if="item1.data < 60 && item1.data >= 0 && item1.data !== 3.14159"
|
||||||
style="color: #fff; background: #339966" size="small">
|
style="color: #fff; background: #339966" size="small">
|
||||||
优
|
优
|
||||||
</el-tag>
|
</el-tag>
|
||||||
|
|||||||
@@ -68,14 +68,14 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'lineScale', title: '电压等级', minWidth: "120px", },
|
{ field: 'lineScale', title: '电压等级', minWidth: "120px", },
|
||||||
{ field: 'lineName', title: '监测点名称', minWidth: "150px", },
|
{ field: 'lineName', title: '监测点名称', minWidth: "150px", },
|
||||||
{ field: 'loadType', title: '干扰源类型', minWidth: "150px", },
|
{ field: 'loadType', title: '干扰源类型', minWidth: "150px", },
|
||||||
{ field: 'lineObjectName', title: '监测点对象名称', minWidth: "150px", formatter: (row: any) => { return row.cellValue == null ? '/' : row.cellValue } },
|
{ field: 'lineObjectName', title: '监测点对象名称', minWidth: "180px", formatter: (row: any) => { return row.cellValue == null ? '/' : row.cellValue } },
|
||||||
{ field: 'overDay', title: '超标天数', minWidth: "80px", },
|
{ field: 'overDay', title: '超标天数', minWidth: "80px", },
|
||||||
{ field: 'freqOverDay', title: '频率偏差超标天数', minWidth: "100px", },
|
{ field: 'freqOverDay', title: '频率偏差', minWidth: "100px", },
|
||||||
{ field: 'volDevOverDay', title: '电压偏差超标天数', minWidth: "100px", },
|
{ field: 'volDevOverDay', title: '电压偏差', minWidth: "100px", },
|
||||||
{ field: 'volDisOverDay', title: '电压总畸变率超标天数', minWidth: "100px", },
|
{ field: 'volDisOverDay', title: '电压总畸变率', minWidth: "100px", },
|
||||||
{ field: 'volContainOverDay', title: '谐波电压含有率超标天数', minWidth: "110px", },
|
{ field: 'volContainOverDay', title: '谐波电压含有率', minWidth: "100px", },
|
||||||
{ field: 'harmVolOverDay', title: '谐波电压超标天数', minWidth: "100px", },
|
{ field: 'harmVolOverDay', title: '谐波电压', minWidth: "100px", },
|
||||||
{ field: 'harmCurOverDay', title: '谐波电流超标天数', minWidth: "100px", },
|
{ field: 'harmCurOverDay', title: '谐波电流', minWidth: "100px", },
|
||||||
{
|
{
|
||||||
title: '各次谐波电压含有率超标天数',
|
title: '各次谐波电压含有率超标天数',
|
||||||
children: [
|
children: [
|
||||||
@@ -104,10 +104,11 @@ const tableStore = new TableStore({
|
|||||||
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{ field: 'threeUnbalance', title: '三相电压不平衡度超标天数', minWidth: "110px", },
|
{ field: 'intHarmOverDay', title: '间谐波电压含有率', minWidth: "100px", },
|
||||||
{ field: 'negativeOverDay', title: '负序电流超标天数', minWidth: "100px", },
|
{ field: 'threeUnbalance', title: '三相电压不平衡度', minWidth: "100px", },
|
||||||
{ field: 'flickerOverDay', title: '闪变超标天数', minWidth: "100px", },
|
{ field: 'negativeOverDay', title: '负序电流', minWidth: "100px", },
|
||||||
{ field: 'monitorNumber', title: '监测点编号', minWidth: "180px", formatter: (row: any) => { return row.cellValue == null ? '/' : row.cellValue } },
|
{ field: 'flickerOverDay', title: '闪变', minWidth: "100px", },
|
||||||
|
{ field: 'monitorNumber', title: '监测点编号', minWidth: "100px", formatter: (row: any) => { return row.cellValue == null ? '/' : row.cellValue } },
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -107,9 +107,9 @@ const tableStore = new TableStore({
|
|||||||
minWidth: 150
|
minWidth: 150
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -106,9 +106,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',fixed: 'right',
|
||||||
width: '180',
|
width: '180',
|
||||||
fixed: 'right',
|
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'frequencyMonitorNumber',
|
field: 'frequencyMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -144,7 +144,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'frequencyBiLi',
|
field: 'frequencyBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'frequencyDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -165,7 +173,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'voltageMonitorNumber',
|
field: 'voltageMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -173,7 +181,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'voltageBiLi',
|
field: 'voltageBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'voltageDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -194,15 +210,24 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'harmonicVoltageMonitorNumber',
|
field: 'harmonicVoltageMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
field: 'harmonicVoltageBiLi',
|
field: 'harmonicVoltageBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'harmonicVoltageDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -223,7 +248,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'harmonicCurrentMonitorNumber',
|
field: 'harmonicCurrentMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -231,7 +256,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'harmonicCurrentBiLi',
|
field: 'harmonicCurrentBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'harmonicCurrentDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -252,7 +285,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'threePhaseVoltageMonitorNumber',
|
field: 'threePhaseVoltageMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -260,7 +293,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'threePhaseVoltageBiLi',
|
field: 'threePhaseVoltageBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'threePhaseVoltageDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -281,7 +322,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'flickerMonitorNumber',
|
field: 'flickerMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -289,7 +330,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'flickerBiLi',
|
field: 'flickerBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'flickerDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -310,7 +359,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'negativeMonitorNumber',
|
field: 'negativeMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -318,7 +367,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'negativeBiLi',
|
field: 'negativeBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'negativeDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -339,7 +396,7 @@ const tableStore = new TableStore({
|
|||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
field: 'interHarmonicMonitorNumber',
|
field: 'interHarmonicMonitorNumber',
|
||||||
title: '超标点数(天/点)',
|
title: '超标点数(个)',
|
||||||
minWidth: '140px',
|
minWidth: '140px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
@@ -347,7 +404,15 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'interHarmonicBiLi',
|
field: 'interHarmonicBiLi',
|
||||||
title: '超标占比(%)',
|
title: '累计占比(%)',
|
||||||
|
minWidth: '100px',
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: 'interHarmonicDayAvgBiLi',
|
||||||
|
title: '日均占比(%)',
|
||||||
minWidth: '100px',
|
minWidth: '100px',
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return row.cellValue == -1 ? '/' : row.cellValue
|
return row.cellValue == -1 ? '/' : row.cellValue
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user