修改云南测试用例

This commit is contained in:
guanj
2025-07-29 19:00:54 +08:00
parent 24c590478e
commit cc47d9b02c
22 changed files with 531 additions and 302 deletions

View File

@@ -7,8 +7,15 @@
<script lang="ts" setup> <script lang="ts" setup>
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import useSetTheme from '@/utils/setTheme' import useSetTheme from '@/utils/setTheme'
import { onMounted } from 'vue'
useSetTheme() useSetTheme()
onMounted(async () => {
const response = await fetch('/')
const WebSocketUrl:any = response.headers.get('X-WebSocket-Url')
const MqttUrl:any = response.headers.get('X-MqttUrl-Url')
localStorage.setItem('WebSocketUrl', WebSocketUrl)
localStorage.setItem('MqttUrl', MqttUrl)
})
</script> </script>
<style lang="scss"> <style lang="scss">

View File

@@ -166,3 +166,19 @@ export function updateDeviceProcess(data: any) {
data data
}) })
} }
//导出台账模板
export function downTerminalTemplate() {
return createAxios({
url: '/device-boot/device/downTerminalTemplate',
method: 'get',
responseType: 'blob'
})
}
//导出台账信息
export function exportTerminalBase() {
return createAxios({
url: '/device-boot/device/exportTerminalBase',
method: 'get',
responseType: 'blob'
})
}

View File

@@ -3,6 +3,7 @@
<vxe-table <vxe-table
ref="tableRef" ref="tableRef"
height="auto" height="auto"
:key="key"
:data="tableStore.table.data" :data="tableStore.table.data"
v-loading="tableStore.table.loading" v-loading="tableStore.table.loading"
v-bind="Object.assign({}, defaultAttribute, $attrs)" v-bind="Object.assign({}, defaultAttribute, $attrs)"
@@ -21,7 +22,6 @@
:key="key + '-column'" :key="key + '-column'"
v-for="(item, key) in tableStore.table.column" v-for="(item, key) in tableStore.table.column"
:tree-node="item.treeNode" :tree-node="item.treeNode"
> >
<!-- tableStore 预设的列 render 方案 --> <!-- tableStore 预设的列 render 方案 -->
<template v-if="item.render" #default="scope"> <template v-if="item.render" #default="scope">
@@ -76,7 +76,7 @@ const config = useConfig()
const tableRef = ref<VxeTableInstance>() const tableRef = ref<VxeTableInstance>()
const tableStore = inject('tableStore') as TableStoreClass const tableStore = inject('tableStore') as TableStoreClass
const router = useRouter() const router = useRouter()
const key = ref(0)
interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>> { interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>> {
isGroup?: boolean isGroup?: boolean
showOverflow?: boolean showOverflow?: boolean
@@ -129,6 +129,7 @@ const handleSortChange = ({ column, order }: { column: TableColumn; order: 'asc'
tableStore.table.params.pageNum = 1 tableStore.table.params.pageNum = 1
tableStore.index() tableStore.index()
key.value += 1
// // 在这里可以根据 column 和 order 进行相应的数据排序操作 // // 在这里可以根据 column 和 order 进行相应的数据排序操作
// if (order === 'asc') { // if (order === 'asc') {
// } else if (order === 'desc') { // } else if (order === 'desc') {

View File

@@ -1,17 +1,24 @@
<template> <template>
<Tree ref="treRef" :data="tree" style="height: 100%" :width="'100%'" :expanded="expanded" /> <Tree ref="treRef" :data="tree" style="height: 100%" :width="'100%'" :expanded="expanded" />
</template> </template>
<!-- <div class="mb10">
<el-button type="primary" icon="el-icon-Download" size="small" @click="exportExcelTemplate" :loading="loading">模版下载</el-button>
<el-button type="primary" icon="el-icon-Upload" size="small">导入</el-button>
<el-button type="primary" icon="el-icon-Download" size="small" @click="ledgerEverywhere" :loading="loading1">导出</el-button>
</div> -->
<script lang="ts" setup> <script lang="ts" setup>
import { ref, nextTick } from 'vue' import { ref, nextTick } from 'vue'
import Tree from './index.vue' import Tree from './index.vue'
import { getTerminalTree } from '@/api/device-boot/Business.ts' import { getTerminalTree,downTerminalTemplate,exportTerminalBase } from '@/api/device-boot/Business'
import { useConfig } from '@/stores/config' import { useConfig } from '@/stores/config'
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei' const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
defineOptions({ defineOptions({
name: 'govern/deviceTree' name: 'govern/deviceTree'
}) })
const loading = ref(false)
const loading1 = ref(false)
const emit = defineEmits(['init']) const emit = defineEmits(['init'])
const config = useConfig() const config = useConfig()
const expanded: any = ref([]) const expanded: any = ref([])
@@ -141,6 +148,44 @@ const info = (id: any) => {
}) })
}) })
} }
// 下载模版
const exportExcelTemplate = async() => {
loading.value = true
downTerminalTemplate().then((res: any) => {
let blob = new Blob([res], {
type: 'application/vnd.ms-excel'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '终端台账模版'
document.body.appendChild(link)
link.click()
link.remove()
})
await setTimeout(() => {
loading.value = false
}, 0)
}
// 导出台账
const ledgerEverywhere = async() => {
loading1.value = true
exportTerminalBase().then((res: any) => {
let blob = new Blob([res], {
type: 'application/vnd.ms-excel'
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
link.href = url
link.download = '终端台账'
document.body.appendChild(link)
link.click()
link.remove()
})
await setTimeout(() => {
loading1.value = false
}, 0)
}
info('') info('')
defineExpose({ info }) defineExpose({ info })

View File

@@ -1,251 +1,238 @@
import type { MqttClient, OnMessageCallback, IClientOptions, IClientSubscribeOptions } from 'mqtt'; import type { MqttClient, OnMessageCallback, IClientOptions, IClientSubscribeOptions } from 'mqtt'
import mqtt from 'mqtt'; import mqtt from 'mqtt'
interface MQTTOptions { interface MQTTOptions {
protocolId?: string; protocolId?: string
qos?: 0 | 1 | 2; qos?: 0 | 1 | 2
clean?: boolean; clean?: boolean
connectTimeout?: number; connectTimeout?: number
clientId?: string; clientId?: string
username?: string; username?: string
password?: string; password?: string
reconnectPeriod?: number; // 重连间隔(ms) reconnectPeriod?: number // 重连间隔(ms)
maxReconnectTimes?: number; // 最大重连次数 maxReconnectTimes?: number // 最大重连次数
} }
class MQTT { class MQTT {
private topic: string; private topic: string
private client: MqttClient | null = null; private client: MqttClient | null = null
private isConnected: boolean = false; private isConnected: boolean = false
private reconnectCount: number = 0; private reconnectCount: number = 0
private maxReconnectTimes: number; private maxReconnectTimes: number
private reconnectPeriod: number; private reconnectPeriod: number
private isManuallyDisconnected: boolean = false; private isManuallyDisconnected: boolean = false
private defaultOptions: MQTTOptions = { private defaultOptions: MQTTOptions = {
protocolId: 'MQTT', protocolId: 'MQTT',
qos: 2, qos: 2,
clean: true, clean: true,
connectTimeout: 30 * 1000, connectTimeout: 30 * 1000,
clientId: `mqttjs_${Math.random().toString(16).substr(2, 8)}`, clientId: `mqttjs_${Math.random().toString(16).substr(2, 8)}`,
username: 't_user', username: 't_user',
password: 'njcnpqs', password: 'njcnpqs',
reconnectPeriod: 1000, // 默认1秒重试一次 reconnectPeriod: 1000, // 默认1秒重试一次
maxReconnectTimes: 3, // 默认最大重连5次 maxReconnectTimes: 3 // 默认最大重连5次
};
constructor(topic: string, options: MQTTOptions = {}) {
this.topic = topic;
this.maxReconnectTimes = options.maxReconnectTimes || this.defaultOptions.maxReconnectTimes!;
this.reconnectPeriod = options.reconnectPeriod || this.defaultOptions.reconnectPeriod!;
// 合并选项
this.defaultOptions = { ...this.defaultOptions, ...options };
}
/**
* 初始化 MQTT 客户端
* @returns Promise<void>
*/
async init(): Promise<void> {
if (this.client) {
throw new Error('MQTT 客户端已初始化');
} }
try { constructor(topic: string, options: MQTTOptions = {}) {
const response = await fetch('/'); this.topic = topic
const mqttUrl = response.headers.get('X-Mqtt-Url') || 'ws://192.168.1.68:8083/mqtt'; this.maxReconnectTimes = options.maxReconnectTimes || this.defaultOptions.maxReconnectTimes!
this.reconnectPeriod = options.reconnectPeriod || this.defaultOptions.reconnectPeriod!
this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions); // 合并选项
this.setupEventListeners(); this.defaultOptions = { ...this.defaultOptions, ...options }
// 等待连接成功或超时
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => {
if (!this.isConnected) {
reject(new Error('MQTT 连接超时'));
}
}, this.defaultOptions.connectTimeout);
this.client?.on('connect', () => {
clearTimeout(timeout);
this.isConnected = true;
this.reconnectCount = 0; // 连接成功重置重连计数
resolve();
});
this.client?.on('error', (error) => {
clearTimeout(timeout);
console.error('MQTT 连接错误:', error);
reject(error);
});
});
} catch (error) {
console.error('初始化 MQTT 失败:', error);
throw error;
}
}
/**
* 设置事件监听器
*/
private setupEventListeners(): void {
if (!this.client) return;
this.client.on('close', () => {
console.log('MQTT 连接已关闭');
this.isConnected = false;
});
this.client.on('offline', () => {
console.log('MQTT 客户端离线');
this.isConnected = false;
});
this.client.on('reconnect', () => {
console.log(`MQTT 正在尝试重连 (${this.reconnectCount + 1}/${this.maxReconnectTimes})...`);
// 检查是否超过最大重连次数
if (this.reconnectCount >= this.maxReconnectTimes) {
console.log('已达到最大重连次数,停止重连');
this.client?.end(true);
this.client = null;
return;
}
this.reconnectCount++;
});
}
/**
* 订阅主题
* @param subscribeOptions 可选的订阅选项
* @returns Promise<void>
*/
async subscribe(subscribeOptions: IClientSubscribeOptions = {}): Promise<void> {
if (!this.client || !this.isConnected) {
throw new Error('MQTT 客户端未连接');
} }
return new Promise((resolve, reject) => { /**
this.client?.subscribe( * 初始化 MQTT 客户端
this.topic, * @returns Promise<void>
{ qos: this.defaultOptions.qos, ...subscribeOptions }, */
(error) => { async init(): Promise<void> {
if (error) { if (this.client) {
console.error('订阅失败:', error); throw new Error('MQTT 客户端已初始化')
reject(error);
} else {
console.log('订阅成功');
resolve();
}
} }
);
});
}
/** try {
* 取消订阅 const mqttUrl = localStorage.getItem('MqttUrl') || 'ws://192.168.1.68:8083/mqtt'
* @returns Promise<void>
*/
async unsubscribe(): Promise<void> {
if (!this.client || !this.isConnected) {
throw new Error('MQTT 客户端未连接');
}
return new Promise((resolve, reject) => { this.client = mqtt.connect(mqttUrl, this.defaultOptions as IClientOptions)
this.client?.unsubscribe(this.topic, (error) => { this.setupEventListeners()
if (error) {
console.error('取消订阅失败:', error); // 等待连接成功或超时
reject(error); return new Promise((resolve, reject) => {
} else { const timeout = setTimeout(() => {
console.log('取消订阅成功'); if (!this.isConnected) {
resolve(); reject(new Error('MQTT 连接超时'))
}
}, this.defaultOptions.connectTimeout)
this.client?.on('connect', () => {
clearTimeout(timeout)
this.isConnected = true
this.reconnectCount = 0 // 连接成功重置重连计数
resolve()
})
this.client?.on('error', error => {
clearTimeout(timeout)
console.error('MQTT 连接错误:', error)
reject(error)
})
})
} catch (error) {
console.error('初始化 MQTT 失败:', error)
throw error
} }
});
});
}
/**
* 设置消息回调
* @param callback 消息回调函数
*/
onMessage(callback: OnMessageCallback): void {
if (!this.client) {
throw new Error('MQTT 客户端未初始化');
}
this.client.on('message', callback);
}
/**
* 发布消息
* @param message 要发布的消息
* @param options 发布选项
* @returns Promise<void>
*/
async publish(
message: string | Buffer,
options: { qos?: 0 | 1 | 2; retain?: boolean } = {}
): Promise<void> {
if (!this.client || !this.isConnected) {
throw new Error('MQTT 客户端未连接');
} }
return new Promise((resolve, reject) => { /**
this.client?.publish( * 设置事件监听器
this.topic, */
message, private setupEventListeners(): void {
{ qos: this.defaultOptions.qos, ...options }, if (!this.client) return
(error) => {
if (error) { this.client.on('close', () => {
console.error('消息发布失败:', error); console.log('MQTT 连接已关闭')
reject(error); this.isConnected = false
} else { })
console.log('消息发布成功');
resolve(); this.client.on('offline', () => {
} console.log('MQTT 客户端离线')
this.isConnected = false
})
this.client.on('reconnect', () => {
console.log(`MQTT 正在尝试重连 (${this.reconnectCount + 1}/${this.maxReconnectTimes})...`)
// 检查是否超过最大重连次数
if (this.reconnectCount >= this.maxReconnectTimes) {
console.log('已达到最大重连次数,停止重连')
this.client?.end(true)
this.client = null
return
}
this.reconnectCount++
})
}
/**
* 订阅主题
* @param subscribeOptions 可选的订阅选项
* @returns Promise<void>
*/
async subscribe(subscribeOptions: IClientSubscribeOptions = {}): Promise<void> {
if (!this.client || !this.isConnected) {
throw new Error('MQTT 客户端未连接')
} }
);
});
}
/** return new Promise((resolve, reject) => {
* 断开连接 this.client?.subscribe(this.topic, { qos: this.defaultOptions.qos, ...subscribeOptions }, error => {
* @param force 是否强制断开 if (error) {
*/ console.error('订阅失败:', error)
disconnect(force: boolean = false): void { reject(error)
this.isManuallyDisconnected = true; } else {
console.log('订阅成功')
if (this.client) { resolve()
this.client.end(force, () => { }
console.log('MQTT 连接已断开'); })
this.isConnected = false; })
this.client = null;
});
} }
}
/** /**
* 检查连接状态 * 取消订阅
* @returns boolean * @returns Promise<void>
*/ */
isConnectedToBroker(): boolean { async unsubscribe(): Promise<void> {
return this.isConnected; if (!this.client || !this.isConnected) {
} throw new Error('MQTT 客户端未连接')
}
/** return new Promise((resolve, reject) => {
* 获取当前重连次数 this.client?.unsubscribe(this.topic, error => {
* @returns number if (error) {
*/ console.error('取消订阅失败:', error)
getReconnectCount(): number { reject(error)
return this.reconnectCount; } else {
} console.log('取消订阅成功')
resolve()
}
})
})
}
/** /**
* 重置重连计数器 * 设置消息回调
*/ * @param callback 消息回调函数
resetReconnectCount(): void { */
this.reconnectCount = 0; onMessage(callback: OnMessageCallback): void {
} if (!this.client) {
throw new Error('MQTT 客户端未初始化')
}
this.client.on('message', callback)
}
/**
* 发布消息
* @param message 要发布的消息
* @param options 发布选项
* @returns Promise<void>
*/
async publish(message: string | Buffer, options: { qos?: 0 | 1 | 2; retain?: boolean } = {}): Promise<void> {
if (!this.client || !this.isConnected) {
throw new Error('MQTT 客户端未连接')
}
return new Promise((resolve, reject) => {
this.client?.publish(this.topic, message, { qos: this.defaultOptions.qos, ...options }, error => {
if (error) {
console.error('消息发布失败:', error)
reject(error)
} else {
console.log('消息发布成功')
resolve()
}
})
})
}
/**
* 断开连接
* @param force 是否强制断开
*/
disconnect(force: boolean = false): void {
this.isManuallyDisconnected = true
if (this.client) {
this.client.end(force, () => {
console.log('MQTT 连接已断开')
this.isConnected = false
this.client = null
})
}
}
/**
* 检查连接状态
* @returns boolean
*/
isConnectedToBroker(): boolean {
return this.isConnected
}
/**
* 获取当前重连次数
* @returns number
*/
getReconnectCount(): number {
return this.reconnectCount
}
/**
* 重置重连计数器
*/
resetReconnectCount(): void {
this.reconnectCount = 0
}
} }
export default MQTT; export default MQTT

View File

@@ -44,11 +44,9 @@ export default class SocketService {
return return
} }
const response = await fetch('/')
const WebSocketUrl = response.headers.get('X-WebSocket-Url')
setTimeout(() => { setTimeout(() => {
// ws://192.168.1.69:10407/mgtt/api/pushMessage/ // ws://192.168.1.69:10407/mgtt/api/pushMessage/
const url = (WebSocketUrl || 'ws://192.168.1.68:10407/api/pushMessage/') + id const url = (localStorage.getItem('WebSocketUrl') || 'ws://192.168.1.68:10407/api/pushMessage/') + id
this.ws = new WebSocket(url) this.ws = new WebSocket(url)
this.ws.onopen = () => this.handleOpen() this.ws.onopen = () => this.handleOpen()

View File

@@ -0,0 +1,88 @@
<template>
<div class="default-main">
<TableHeader datePicker showExport>
<template v-slot:select>
<el-form-item label="筛选数据">
<el-input v-model="tableStore.table.params.searchValue" placeholder="请输入筛选数据" clearable />
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef"></Table>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, reactive, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { useDictData } from '@/stores/dictData'
import { ElMessage, ElMessageBox } from 'element-plus'
defineOptions({
name: 'frontLog'
})
const pushDisplayRef = ref()
const dictData = useDictData()
const fontdveoption = dictData.getBasicData('Dev_Ops')
const tableStore = new TableStore({
url: '/system-boot/frontLog/query',
method: 'POST',
column: [
{
field: 'index',
title: '序号',
width: '80',
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
// { title: '名称', field: 'name', width: '200' },
{
title: '进程号',
field: 'processNo',
width: '80'
},
{
title: '业务名称',
field: 'businessName',
width: '250'
},
{
title: '日志层级',
field: 'level',
width: '100'
},
{
title: '前置业务类型',
field: 'frontType',
width: '120'
},
{
title: '更改时间',
field: 'updateTime',
width: '180',
sortable: true
},
{ title: '日志详情', field: 'log' }
],
beforeSearchFun: () => {}
})
const tableRef = ref()
provide('tableRef', tableRef)
tableStore.table.params.type = ''
tableStore.table.params.searchValue = ''
provide('tableStore', tableStore)
onMounted(() => {
tableStore.index()
})
const addMenu = () => {}
</script>
<style lang="scss" scoped></style>

View File

@@ -54,8 +54,8 @@
</el-button> </el-button>
</el-form-item> </el-form-item>
<el-form-item style="right: 500px; position: absolute; overflow: hidden"> <el-form-item style="right: 500px; position: absolute; overflow: hidden">
<LocationInformation style="width: 16px; margin-right: 8px; color: #396" /> <LocationInformation style="width: 16px; margin-right: 8px; color: var(--el-color-primary)" />
<span style="font-size: 16px; font-weight: bold; color: #396">当前操作节点</span> <span style="font-size: 16px; font-weight: bold; color: var(--el-color-primary)">当前操作节点</span>
</el-form-item> </el-form-item>
<el-form-item style="right: 0; position: absolute; overflow: hidden"> <el-form-item style="right: 0; position: absolute; overflow: hidden">
<div class="title" :class="titleList.length > 5 ? 'titleScroll' : ''"> <div class="title" :class="titleList.length > 5 ? 'titleScroll' : ''">

View File

@@ -120,7 +120,7 @@ const tableStore = new TableStore({
{ field: 'gdName', title: '供电公司', minWidth: '120' }, { field: 'gdName', title: '供电公司', minWidth: '120' },
{ field: 'subName', title: '变电站', minWidth: '150' }, { field: 'subName', title: '变电站', minWidth: '150' },
{ field: 'ip', title: '网络参数', minWidth: '110' }, { field: 'ip', title: '网络参数', minWidth: '110' },
{ field: 'scale', title: '电压等级', minWidth: '90' }, { field: 'scale', title: '电压等级', minWidth: '110' },
{ {
field: 'advanceType', field: 'advanceType',
title: '暂降类型', title: '暂降类型',
@@ -140,7 +140,7 @@ const tableStore = new TableStore({
{ {
field: 'eventType', field: 'eventType',
title: '暂态统计类型', title: '暂态统计类型',
minWidth: '100', minWidth: '120',
formatter: (row: any) => { formatter: (row: any) => {
return eventList.filter(item => item.id === row.cellValue)[0]?.name return eventList.filter(item => item.id === row.cellValue)[0]?.name
} }
@@ -153,7 +153,7 @@ const tableStore = new TableStore({
{ {
field: 'featureAmplitude', field: 'featureAmplitude',
title: '暂降幅值(%)', title: '暂降幅值(%)',
minWidth: '90', minWidth: '110',
formatter: (row: any) => { formatter: (row: any) => {
return (row.cellValue * 100).toFixed(2) return (row.cellValue * 100).toFixed(2)
} }
@@ -161,14 +161,14 @@ const tableStore = new TableStore({
{ {
field: 'eventDescribe', field: 'eventDescribe',
title: '暂降深度(%)', title: '暂降深度(%)',
minWidth: '90', minWidth: '110',
formatter: (row: any) => { formatter: (row: any) => {
let data: any = (100 - row.row.featureAmplitude * 100).toFixed(2) let data: any = (100 - row.row.featureAmplitude * 100).toFixed(2)
return data >= 0 ? data : '/' return data >= 0 ? data : '/'
} }
}, },
{ field: 'duration', title: '持续时间(s)', minWidth: '80' }, { field: 'duration', title: '持续时间(s)', minWidth: '100' },
{ {
title: '操作', title: '操作',

View File

@@ -252,27 +252,27 @@ const tableStore = new TableStore({
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue.toFixed(2) return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue.toFixed(2)
} }
}, },
{ // {
title: '评估', // title: '评估',
field: 'valueOver', // field: 'valueOver',
align: 'center', // align: 'center',
effect: 'dark', // effect: 'dark',
render: 'tag', // render: 'tag',
custom: { // custom: {
null: 'info', // null: 'info',
0: 'danger', // 0: 'danger',
1: 'success', // 1: 'success',
2: 'primary', // 2: 'primary',
3: 'danger' // 3: 'danger'
}, // },
replaceValue: { // replaceValue: {
null: '暂无评估', // null: '暂无评估',
0: '暂无评估', // 0: '暂无评估',
1: '优秀', // 1: '优秀',
2: '合格', // 2: '合格',
3: '不合格' // 3: '不合格'
} // }
} // }
], ],
beforeSearchFun: () => { beforeSearchFun: () => {
tableStore.table.params.deptIndex = formData.value.deptIndex tableStore.table.params.deptIndex = formData.value.deptIndex

View File

@@ -98,7 +98,9 @@ import TableStore from '@/utils/tableStore'
import waveForm from '@/components/echarts/waveForm.vue' import waveForm from '@/components/echarts/waveForm.vue'
import html2canvas from 'html2canvas' import html2canvas from 'html2canvas'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
import { yMethod } from '@/utils/echartMethod'
import * as echarts from 'echarts' // 全引入 import * as echarts from 'echarts' // 全引入
import { min } from 'xe-utils'
const datePickerRef = ref() const datePickerRef = ref()
const monitoringPoint = useMonitoringPoint() const monitoringPoint = useMonitoringPoint()
const checked = ref(monitoringPoint.state.showCheckBox) const checked = ref(monitoringPoint.state.showCheckBox)
@@ -131,6 +133,7 @@ const tableStore = new TableStore({
method: 'POST', method: 'POST',
column: [] column: []
}) })
const tableData = ref([])
const tableHeaderRef = ref() const tableHeaderRef = ref()
const options = ref({}) const options = ref({})
const traceability = ref<any>([]) const traceability = ref<any>([])
@@ -201,6 +204,7 @@ const init = () => {
} }
const shujuchuli = (res: any) => { const shujuchuli = (res: any) => {
let shujuData = res.data let shujuData = res.data
tableData.value = res.data
shujuData.forEach((item: any, i: number) => { shujuData.forEach((item: any, i: number) => {
//判断是否存在暂降点 //判断是否存在暂降点
@@ -269,7 +273,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -321,7 +327,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -337,7 +345,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -407,7 +417,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -450,7 +462,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -465,7 +479,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -530,7 +546,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -573,7 +591,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -588,7 +608,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -653,7 +675,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue > 1 ? (item.minValue - 0.5).toFixed(3) : item.minValue.toFixed(3), minValue: item.minValue > 1 ? (item.minValue - 0.5).toFixed(3) : item.minValue.toFixed(3),
@@ -696,7 +720,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -710,7 +736,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -774,7 +802,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -814,7 +844,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -830,7 +862,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -890,7 +924,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
maxValue: item.maxValue.toFixed(3), maxValue: item.maxValue.toFixed(3),
@@ -927,7 +963,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -941,7 +979,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -1001,7 +1041,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -1038,7 +1080,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -1052,7 +1096,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -1107,7 +1153,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -1138,7 +1186,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: item.minValue.toFixed(3), minValue: item.minValue.toFixed(3),
@@ -1151,7 +1201,9 @@ const shujuchuli = (res: any) => {
let shuju = { let shuju = {
id: 'qushifenx' + i, id: 'qushifenx' + i,
title: item.lineName + '--' + item.targetName, title: item.lineName + '--' + item.targetName,
wiringMethod: item.wiringMethod || '0',
targetName: item.targetName, targetName: item.targetName,
value: item.value,
legend: item.phaiscType, legend: item.phaiscType,
valueName: item.unit[0], valueName: item.unit[0],
minValue: null, minValue: null,
@@ -1390,11 +1442,25 @@ const rendering = () => {
} }
const getEcharts = () => { const getEcharts = () => {
list.value.forEach((item: any, i: number) => { list.value.forEach((item: any, i: number) => {
console.log('🚀 ~ getEcharts ~ item:', item)
const values = item.value && item.value.length > 0 ? item.value.map(k => k[1]) : [0]
let [min, max] = yMethod([item.maxValue, item.minValue, ...values])
item.option = { item.option = {
backgroundColor: '#fff', backgroundColor: '#fff',
title: { title: {
left: 'center', left: 'center',
text: item.title text: item.title,
subtext:
item.wiringMethod == '1'
? item.targetName == '相电压有效值'
? '该监测点为三角型接线,相电压有效值没有数据'
: ''
: '', // 副标题
subtextStyle: {
fontSize: 14,
color: '#ff0000'
}
}, },
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
@@ -1531,6 +1597,7 @@ const getEcharts = () => {
}, },
xAxis: [ xAxis: [
{ {
name: '时间',
type: 'time', type: 'time',
axisLine: { axisLine: {
show: true, show: true,
@@ -1556,9 +1623,12 @@ const getEcharts = () => {
{ {
type: 'value', type: 'value',
// min: item.minValue, min: min,
max: max,
name: item.valueName, name: item.valueName,
minInterval: 1, minInterval: 1,
// max:10,
// min:0,
// axisLabel: { // axisLabel: {
// interval: 0, // interval: 0,
// // formatter: function (value: any) { // // formatter: function (value: any) {

View File

@@ -229,20 +229,20 @@ const init = () => {
opacity: 0.35, opacity: 0.35,
fontSize: 14 fontSize: 14
}, },
backgroundColor: 'rgba(0,0,0,0.55)' backgroundColor: 'rgba(0,0,0,0.55)',
// formatter: function (params: any) { formatter: function (params: any) {
// //console.log(params) //console.log(params)
// let msg = '' let msg = ''
// msg += params[0].name + '<br/>' msg += params[0].name + '<br/>'
// for (let i in params) { for (let i in params) {
// if (params[i].data == 1) { if (params[i].data == 3.14159) {
// msg += params[i].seriesName + ': 暂无数据<br/>' msg +=params[i].marker+ params[i].seriesName + ': 暂无数据<br/>'
// } else { } else {
// msg += params[i].seriesName + ': ' + params[i].data + '<br/>' msg += params[i].marker+ params[i].seriesName + ': ' + params[i].data + '<br/>'
// } }
// } }
// return msg return msg
// } }
}, },
xAxis: { xAxis: {
name: '指标类型', name: '指标类型',

View File

@@ -63,8 +63,10 @@ const init = () => {
formData.searchBeginTime = datePickerRef.value.timeValue[0] formData.searchBeginTime = datePickerRef.value.timeValue[0]
formData.searchEndTime = datePickerRef.value.timeValue[1] formData.searchEndTime = datePickerRef.value.timeValue[1]
getHarmInHarmData(formData).then((res: any) => { getHarmInHarmData(formData).then((res: any) => {
let xName = ''
analysisData.value = [] analysisData.value = []
if (formData.harmState === 1) { if (formData.harmState === 1) {
xName = 'A'
analysisData.value.push( analysisData.value.push(
{ {
name: '谐波电流幅值(A)', name: '谐波电流幅值(A)',
@@ -82,6 +84,7 @@ const init = () => {
} }
) )
} else { } else {
xName = '%'
analysisData.value.push( analysisData.value.push(
{ {
name: '谐波电压含有率(%)', name: '谐波电压含有率(%)',
@@ -101,10 +104,12 @@ const init = () => {
} }
options.value = { options.value = {
xAxis: { xAxis: {
name: '次数',
type: 'category', type: 'category',
data: Array.from({ length: 49 }, (_, i) => `${i + 2}`) data: Array.from({ length: 49 }, (_, i) => `${i + 2}`)
}, },
yAxis: { yAxis: {
name: xName,
type: 'value' type: 'value'
}, },
color: ['#2E8B57', '#DAA520'], color: ['#2E8B57', '#DAA520'],

View File

@@ -29,13 +29,13 @@
<span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span> <span>{{ (pageNum - 1) * pageSize + rowIndex + 1 }}</span>
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="time" title="时间" :formatter="formatter" ></vxe-column> <vxe-column field="time" title="时间" :formatter="formatter"></vxe-column>
<vxe-column <vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column>
field="targetName" <vxe-column field="phaseType" title="相别" width="80px">
title="指标类型" <template v-slot="{ row }">
min-width="100px" {{ row.phaseType == 'T' ? '/' : row.phaseType }}
></vxe-column> </template>
<vxe-column field="phaseType" title="相别" width="80px"></vxe-column> </vxe-column>
<vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column> <vxe-column field="type" title="数据类型" width="105px" :formatter="formatter"></vxe-column>
<vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column> <vxe-column field="val" title="值" width="85px" :formatter="formatter"></vxe-column>

View File

@@ -31,9 +31,13 @@
</template> </template>
</vxe-column> </vxe-column>
<vxe-column field="time" title="时间" width="150px"></vxe-column> <vxe-column field="time" title="时间" width="150px"></vxe-column>
<vxe-column field="targetName" title="指标类型" min-width="100px"></vxe-column> <vxe-column field="targetName" title="指标类型" min-width="80px"></vxe-column>
<vxe-column field="phaseType" title="相别" width="60px"></vxe-column> <vxe-column field="phaseType" title="相别" width="60px">
<vxe-column field="rangeDesc" title="合理范围" min-width="60px"></vxe-column> <template v-slot="{ row }">
{{ row.phaseType=='T'?'/':row.phaseType }}
</template>
</vxe-column>
<vxe-column field="rangeDesc" title="合理范围" min-width="90px"></vxe-column>
<vxe-column field="max" title="最大" width="85px" :formatter="formatter"></vxe-column> <vxe-column field="max" title="最大" width="85px" :formatter="formatter"></vxe-column>
<vxe-column field="min" title="最小" width="85px" :formatter="formatter"></vxe-column> <vxe-column field="min" title="最小" width="85px" :formatter="formatter"></vxe-column>
<vxe-column field="avg" title="平均" width="85px" :formatter="formatter"></vxe-column> <vxe-column field="avg" title="平均" width="85px" :formatter="formatter"></vxe-column>

View File

@@ -107,9 +107,9 @@ const handleCheckedSourceChange = (val: any) => {
const info = async (list: any) => { const info = async (list: any) => {
datalist.value = [] datalist.value = []
list.forEach((item: any) => { list.forEach((item: any) => {
if (item.eventValue < 2 && item.eventValue > 0) { // if (item.eventValue < 2 && item.eventValue > 0) {
datalist.value.push(item) datalist.value.push(item)
} // }
}) })
await gongfunction() await gongfunction()
@@ -302,6 +302,7 @@ const info = async (list: any) => {
radioChange(radio.value) radioChange(radio.value)
} }
const radioChange = (e: any) => { const radioChange = (e: any) => {
if (e == 'ITIC') { if (e == 'ITIC') {
echartList.value = ITIC.value echartList.value = ITIC.value
TableData.value[0].totalEvents = pointI.value.length + pointIun.value.length TableData.value[0].totalEvents = pointI.value.length + pointIun.value.length
@@ -329,6 +330,7 @@ const gongfunction = () => {
if (total == 0) { if (total == 0) {
} else { } else {
for (var i = 0; i < datalist.value.length; i++) { for (var i = 0; i < datalist.value.length; i++) {
var point = [] var point = []
var xx = datalist.value[i].persistTime var xx = datalist.value[i].persistTime
var yy = datalist.value[i].eventValue * 100 var yy = datalist.value[i].eventValue * 100
@@ -413,6 +415,8 @@ const gongfunction = () => {
} }
} }
if (xx < 0.05) { if (xx < 0.05) {
standF++ standF++
pointF.value.push({ pointF.value.push({

View File

@@ -53,6 +53,8 @@ const tableStore = new TableStore({
} }
}, },
loadCallback: () => { loadCallback: () => {
if (activeName.value == '1') { if (activeName.value == '1') {
Statistics.value.info(tableStore.table.data) Statistics.value.info(tableStore.table.data)
} else { } else {

View File

@@ -12,7 +12,7 @@
<div class="first"> <div class="first">
<div class="mb10">DISDIP表格(国际发配电联盟UNIPEDE)</div> <div class="mb10">DISDIP表格(国际发配电联盟UNIPEDE)</div>
<div style="flex: 1; overflow: hidden"> <div style="flex: 1; overflow: hidden">
<vxe-table v-bind="defaultAttribute" height="100%" size="mini" :data="firstData"> <vxe-table v-bind="defaultAttribute" height="400px" size="mini" :data="firstData">
<vxe-colgroup title="剩余电压" field="name" width="80px"></vxe-colgroup> <vxe-colgroup title="剩余电压" field="name" width="80px"></vxe-colgroup>
<vxe-colgroup title="持续时间"> <vxe-colgroup title="持续时间">
<vxe-column field="twentyMs" title="20ms" :formatter="formatter" /> <vxe-column field="twentyMs" title="20ms" :formatter="formatter" />
@@ -30,7 +30,7 @@
<div class="second"> <div class="second">
<div class="mb10">EC61000-4-11(用电终端的电压暂降抗度)</div> <div class="mb10">EC61000-4-11(用电终端的电压暂降抗度)</div>
<div style="flex: 1; overflow: hidden"> <div style="flex: 1; overflow: hidden">
<vxe-table v-bind="defaultAttribute" height="100%" size="mini" :data="secondData"> <vxe-table v-bind="defaultAttribute" height="220px" size="mini" :data="secondData">
<vxe-colgroup title="剩余电压" field="name" width="80px"></vxe-colgroup> <vxe-colgroup title="剩余电压" field="name" width="80px"></vxe-colgroup>
<vxe-colgroup title="持续时间"> <vxe-colgroup title="持续时间">
<vxe-column field="tenTwentyMs" title="10-20ms" :formatter="formatter" /> <vxe-column field="tenTwentyMs" title="10-20ms" :formatter="formatter" />

View File

@@ -3,9 +3,9 @@
<div v-show="view"> <div v-show="view">
<!-- 表头 --> <!-- 表头 -->
<TableHeader date-picker showExport> <TableHeader date-picker showExport>
<!-- <template v-slot:operation> <template v-slot:operation>
<el-button :icon='Download' type='primary' @click='download'>下载波形</el-button> <el-button :icon='Download' type='primary' @click='download'>下载波形</el-button>
</template> --> </template>
</TableHeader> </TableHeader>
<!-- 表格 --> <!-- 表格 -->
<Table ref='tableRef' :checkboxConfig='checkboxConfig' /> <Table ref='tableRef' :checkboxConfig='checkboxConfig' />
@@ -48,10 +48,10 @@ const tableStore = new TableStore({
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
} }
}, },
{ title: '变电站名称', field: 'subName', minWidth: '130' }, { title: '变电站名称', field: 'subName', minWidth: '140' },
{ title: '监测点名称', field: 'lineName', minWidth: '130' }, { title: '监测点名称', field: 'lineName', minWidth: '130' },
{ title: '网络参数', field: 'ip', minWidth: '130' }, { title: '网络参数', field: 'ip', minWidth: '130' },
{ title: '电压等级(kV)', field: 'voltageScale', width: '100' }, { title: '电压等级(kV)', field: 'voltageScale', width: '120' },
{ title: '暂降发生时刻', field: 'startTime', width: '200' }, { title: '暂降发生时刻', field: 'startTime', width: '200' },
{ title: '暂降类型', field: 'advanceType', minWidth: '130' }, { title: '暂降类型', field: 'advanceType', minWidth: '130' },
{ title: '暂降原因', field: 'advanceReason', minWidth: '130' }, { title: '暂降原因', field: 'advanceReason', minWidth: '130' },
@@ -61,12 +61,14 @@ const tableStore = new TableStore({
} }
}, },
{ {
title: '暂降(骤升)幅值(%)', field: 'featureAmplitude', minWidth: '120', formatter: (row: any) => { title: '暂降(骤升)幅值(%)', field: 'featureAmplitude', minWidth: '140',
formatter: (row: any) => {
return (row.cellValue * 100).toFixed(2) return (row.cellValue * 100).toFixed(2)
}, },
}, },
{ title: '持续时间(s)', field: 'duration', minWidth: '80' }, { title: '持续时间(s)', field: 'duration', minWidth: '100' },
// { title: '严重度', field: 'severity', minWidth: '80' }, // { title: '严重度', field: 'severity', minWidth: '80' },
{ {
title: '操作', title: '操作',

View File

@@ -126,7 +126,7 @@
<el-descriptions-item> <el-descriptions-item>
<!-- <el-button type="primary" size="small" @click="lookPoint">查看监测点</el-button> --> <!-- <el-button type="primary" size="small" @click="lookPoint">查看监测点</el-button> -->
<el-button type="primary" size="small" @click="lookEvent"> <el-button type="primary" size="small" @click="lookEvent">
未处理事件({{ infoWindowPoint.noDealCount }}) 暂态事件({{ infoWindowPoint.noDealCount }})
</el-button> </el-button>
</el-descriptions-item> </el-descriptions-item>
</el-descriptions> </el-descriptions>

View File

@@ -1,5 +1,5 @@
<template> <template>
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" title="暂降事件列表"> <el-dialog draggable width="1100px" v-model="dialogVisible" title="暂降事件列表">
<div style="height: 40vh"> <div style="height: 40vh">
<vxe-table v-loading="loading" height="auto" auto-resize :data="tableData" v-bind="defaultAttribute"> <vxe-table v-loading="loading" height="auto" auto-resize :data="tableData" v-bind="defaultAttribute">
<vxe-column type="seq" title="序号" width="80px"></vxe-column> <vxe-column type="seq" title="序号" width="80px"></vxe-column>

View File

@@ -18,7 +18,7 @@
<div class="overview-right-item" style="padding-top: 0"> <div class="overview-right-item" style="padding-top: 0">
<div class="overview-right-item-title"> <div class="overview-right-item-title">
<div style="font-weight: 700">未处理暂态事件</div> <div style="font-weight: 700">未处理暂态事件</div>
<el-button type="primary" size="small" icon="el-icon-Promotion" @click="jump">事件关联分析</el-button> <!-- <el-button type="primary" size="small" icon="el-icon-Promotion" @click="jump">事件关联分析</el-button> -->
</div> </div>
<div style="flex: 1; overflow: hidden"> <div style="flex: 1; overflow: hidden">
<vxe-table height="auto" auto-resize :data="tableData" v-bind="defaultAttribute"> <vxe-table height="auto" auto-resize :data="tableData" v-bind="defaultAttribute">