修改浙江无线测试用例bug
This commit is contained in:
@@ -110,3 +110,11 @@ export function queryDictType(data?: any) {
|
|||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//根据监测点id获取监测点详情
|
||||||
|
export function getById(data?: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/cs-device-boot/csline/getById',
|
||||||
|
method: 'POST',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -85,3 +85,11 @@ export function delDevice(data: any) {
|
|||||||
data
|
data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
//方案数据-》根据测试项获取暂态事件
|
||||||
|
export function getEventByItem(data: any) {
|
||||||
|
return createAxios({
|
||||||
|
url: '/cs-harmonic-boot/data/getEventByItem',
|
||||||
|
method: 'POST',
|
||||||
|
params: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -150,3 +150,11 @@ export const getAllUserSimpleList = () => {
|
|||||||
method: 'GET'
|
method: 'GET'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
export const getSysConfig =()=> {
|
||||||
|
return request({
|
||||||
|
url: "/system-boot/config/getSysConfig",
|
||||||
|
method: "get",
|
||||||
|
});
|
||||||
|
}
|
||||||
@@ -496,6 +496,7 @@ export default {
|
|||||||
colors.push('#CC0000')
|
colors.push('#CC0000')
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (waveDatas[0].unit === '电压') {
|
if (waveDatas[0].unit === '电压') {
|
||||||
if (this.value === 1) {
|
if (this.value === 1) {
|
||||||
@@ -506,6 +507,8 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
unit = 'A'
|
unit = 'A'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//把剩余的DIV先拼接好
|
//把剩余的DIV先拼接好
|
||||||
for (var step = 1; step < waveDatas.length; step++) {
|
for (var step = 1; step < waveDatas.length; step++) {
|
||||||
var waveId = 'wave' + step
|
var waveId = 'wave' + step
|
||||||
|
|||||||
@@ -4,13 +4,13 @@
|
|||||||
|
|
||||||
<!-- switch -->
|
<!-- switch -->
|
||||||
<el-switch v-if="field.render == 'switch'" @change="onChangeField(field, $event)"
|
<el-switch v-if="field.render == 'switch'" @change="onChangeField(field, $event)"
|
||||||
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue" :active-text="field.activeText"
|
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue"
|
||||||
:inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
:active-text="field.activeText" :inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||||
|
|
||||||
<!-- image -->
|
<!-- image -->
|
||||||
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
<div v-if="field.render == 'image' && fieldValue" class="ba-render-image">
|
||||||
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fullUrl(fieldValue)]"
|
<el-image :hide-on-click-modal="true" :preview-teleported="true" :preview-src-list="[fullUrl(fieldValue)]"
|
||||||
:src="fullUrl(fieldValue)"></el-image>
|
:src="fieldValue.length > 100 ? fieldValue : fullUrl(fieldValue)"></el-image>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- tag -->
|
<!-- tag -->
|
||||||
@@ -196,7 +196,7 @@ const handlerCommand = (item: OptButton) => {
|
|||||||
|
|
||||||
.el-image {
|
.el-image {
|
||||||
height: 36px;
|
height: 36px;
|
||||||
width: 36px;
|
// width: 36px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.table-operate-text {
|
.table-operate-text {
|
||||||
|
|||||||
@@ -158,9 +158,41 @@ const onMenuCollapse = () => {
|
|||||||
menuCollapse.value = !menuCollapse.value
|
menuCollapse.value = !menuCollapse.value
|
||||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||||
}
|
}
|
||||||
const filterNode = (value: string, data: any) => {
|
const filterNode = (value: string, data: any, node: any) => {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
return data.name.includes(value)
|
// return data.name.includes(value)
|
||||||
|
if (data.name) {
|
||||||
|
|
||||||
|
return chooseNode(value, data, node)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||||
|
const chooseNode = (value: string, data: any, node: any) => {
|
||||||
|
|
||||||
|
if (data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const level = node.level
|
||||||
|
// 如果传入的节点本身就是一级节点就不用校验了
|
||||||
|
if (level === 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 先取当前节点的父节点
|
||||||
|
let parentData = node.parent
|
||||||
|
// 遍历当前节点的父节点
|
||||||
|
let index = 0
|
||||||
|
while (index < level - 1) {
|
||||||
|
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
||||||
|
if (parentData.data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 否则的话再往上一层做匹配
|
||||||
|
parentData = parentData.parent
|
||||||
|
index++
|
||||||
|
}
|
||||||
|
// 没匹配到返回false
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
//治理
|
//治理
|
||||||
const treeRef1 = ref<InstanceType<typeof ElTree>>()
|
const treeRef1 = ref<InstanceType<typeof ElTree>>()
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -8,19 +8,17 @@
|
|||||||
size="18"
|
size="18"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- <span class="nav-bar-title">{{ getTheme.name }}</span> -->
|
<span class="nav-bar-title">{{ getTheme.name }}</span>
|
||||||
<span class='nav-bar-title'>电能质量数据监测云平台</span>
|
|
||||||
<NavMenus />
|
<NavMenus />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted } from 'vue'
|
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import NavTabs from '@/layouts/admin/components/navBar/tabs.vue'
|
import NavTabs from '@/layouts/admin/components/navBar/tabs.vue'
|
||||||
import NavMenus from '../navMenus.vue'
|
import NavMenus from '../navMenus.vue'
|
||||||
import { showShade } from '@/utils/pageShade'
|
import { showShade } from '@/utils/pageShade'
|
||||||
|
import { onMounted } from 'vue'
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||||
|
|
||||||
@@ -30,9 +28,9 @@ const onMenuCollapse = () => {
|
|||||||
})
|
})
|
||||||
config.setLayout('menuCollapse', false)
|
config.setLayout('menuCollapse', false)
|
||||||
}
|
}
|
||||||
// onMounted(() => {
|
onMounted(() => {
|
||||||
// document.title = getTheme.name
|
document.title = getTheme.name
|
||||||
// })
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ export const useConfig = defineStore(
|
|||||||
const layout: Layout = reactive({
|
const layout: Layout = reactive({
|
||||||
/* 全局 */
|
/* 全局 */
|
||||||
showDrawer: false,
|
showDrawer: false,
|
||||||
// 是否收缩布局(小屏设备)
|
// 是否收缩布局(小屏终端)
|
||||||
shrink: false,
|
shrink: false,
|
||||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||||
layoutMode: 'Classic',
|
layoutMode: 'Classic',
|
||||||
@@ -111,6 +111,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[]
|
||||||
|
|
||||||
if (layout.isDark) {
|
if (layout.isDark) {
|
||||||
return colors[1]
|
return colors[1]
|
||||||
} else {
|
} else {
|
||||||
@@ -120,6 +121,124 @@ export const useConfig = defineStore(
|
|||||||
|
|
||||||
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||||
},
|
},
|
||||||
|
// () => {
|
||||||
|
//
|
||||||
|
// console.log('🚀 ~ subject:', subject)
|
||||||
|
// const layout: Layout = reactive({
|
||||||
|
// /* 全局 */
|
||||||
|
// showDrawer: false,
|
||||||
|
// // 是否收缩布局(小屏终端)
|
||||||
|
// shrink: false,
|
||||||
|
// // 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||||
|
// layoutMode: 'Classic',
|
||||||
|
// // 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||||
|
// mainAnimation: subject.mainAnimation,
|
||||||
|
// // 是否暗黑模式
|
||||||
|
// isDark: false,
|
||||||
|
// elementUiPrimary: JSON.parse(subject.elementUiPrimary),
|
||||||
|
// tableHeaderBackground: JSON.parse(subject.tableHeaderBackground),
|
||||||
|
// tableHeaderColor:JSON.parse(subject.tableHeaderColor),
|
||||||
|
// tableCurrent: JSON.parse(subject.tableCurrent),
|
||||||
|
// /* 侧边菜单 */
|
||||||
|
// // 侧边菜单背景色
|
||||||
|
// menuBackground: JSON.parse(subject.menuBackground),
|
||||||
|
// // 侧边菜单文字颜色
|
||||||
|
// menuColor:JSON.parse(subject.menuColor),
|
||||||
|
// // 侧边菜单激活项背景色
|
||||||
|
// menuActiveBackground:JSON.parse(subject.menuActiveBackground),
|
||||||
|
// // 侧边菜单激活项文字色
|
||||||
|
// menuActiveColor:JSON.parse(subject.menuActiveColor),
|
||||||
|
// // 侧边菜单顶栏背景色
|
||||||
|
// menuTopBarBackground: JSON.parse(subject.menuTopBarBackground),
|
||||||
|
// // 侧边菜单宽度(展开时),单位px
|
||||||
|
// menuWidth: 260,
|
||||||
|
// // 侧边菜单项默认图标
|
||||||
|
// menuDefaultIcon: 'fa fa-circle-o',
|
||||||
|
// // 是否水平折叠收起菜单
|
||||||
|
// menuCollapse: false,
|
||||||
|
// // 是否只保持一个子菜单的展开(手风琴)
|
||||||
|
// menuUniqueOpened: false,
|
||||||
|
// // 显示菜单栏顶栏(LOGO)
|
||||||
|
// menuShowTopBar: true,
|
||||||
|
|
||||||
|
// /* 顶栏 */
|
||||||
|
// // 顶栏文字色
|
||||||
|
// headerBarTabColor:JSON.parse(subject.headerBarTabColor),
|
||||||
|
// // // 顶栏激活项背景色
|
||||||
|
// headerBarTabActiveBackground: ['#ffffff', '#1d1e1f'],
|
||||||
|
// // 顶栏激活项文字色
|
||||||
|
// headerBarTabActiveColor: ['#000000', '#409EFF'],
|
||||||
|
// // 顶栏背景色
|
||||||
|
// headerBarBackground: JSON.parse(subject.headerBarBackground),
|
||||||
|
// // 顶栏悬停时背景色
|
||||||
|
// headerBarHoverBackground: ['#f5f5f5', '#18222c']
|
||||||
|
// })
|
||||||
|
// // console.log(123, window.localStorage.getItem('getTheme'))
|
||||||
|
|
||||||
|
// const lang = reactive({
|
||||||
|
// // 默认语言,可选值<zh-cn|en>
|
||||||
|
// defaultLang: 'zh-cn',
|
||||||
|
// // 当在默认语言包找不到翻译时,继续在 fallbackLang 语言包内查找翻译
|
||||||
|
// fallbackLang: 'zh-cn',
|
||||||
|
// // 支持的语言列表
|
||||||
|
// langArray: [
|
||||||
|
// { name: 'zh-cn', value: '中文简体' },
|
||||||
|
// { name: 'en', value: 'English' }
|
||||||
|
// ]
|
||||||
|
// })
|
||||||
|
|
||||||
|
// function menuWidth() {
|
||||||
|
// if (layout.shrink) {
|
||||||
|
// return layout.menuCollapse ? '0px' : layout.menuWidth + 'px'
|
||||||
|
// }
|
||||||
|
// // 菜单是否折叠
|
||||||
|
// return layout.menuCollapse ? '64px' : layout.menuWidth + 'px'
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function setLang(val: string) {
|
||||||
|
// lang.defaultLang = val
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function onSetLayoutColor(data = layout.layoutMode) {
|
||||||
|
// // 切换布局时,如果是为默认配色方案,对菜单激活背景色重新赋值
|
||||||
|
// const tempValue = layout.isDark
|
||||||
|
// ? { idx: 1, color: '#1d1e1f', newColor: '#141414' }
|
||||||
|
// : { idx: 0, color: '#ffffff', newColor: '#f5f5f5' }
|
||||||
|
// if (
|
||||||
|
// data == 'Classic' &&
|
||||||
|
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
|
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.color
|
||||||
|
// ) {
|
||||||
|
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.newColor
|
||||||
|
// } else if (
|
||||||
|
// data == 'Default' &&
|
||||||
|
// layout.headerBarBackground[tempValue.idx] == tempValue.color &&
|
||||||
|
// layout.headerBarTabActiveBackground[tempValue.idx] == tempValue.newColor
|
||||||
|
// ) {
|
||||||
|
// layout.headerBarTabActiveBackground[tempValue.idx] = tempValue.color
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// function setLayoutMode(data: string) {
|
||||||
|
// layout.layoutMode = data
|
||||||
|
// onSetLayoutColor(data)
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const setLayout = (name: keyof Layout, value: any) => {
|
||||||
|
// layout[name] = value as never
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const getColorVal = function (name: keyof Layout): string {
|
||||||
|
// const colors = layout[name] as string[]
|
||||||
|
// if (layout.isDark) {
|
||||||
|
// return colors[1]
|
||||||
|
// } else {
|
||||||
|
// return colors[0]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// return { layout, lang, menuWidth, setLang, setLayoutMode, setLayout, getColorVal, onSetLayoutColor }
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
persist: {
|
persist: {
|
||||||
key: STORE_CONFIG
|
key: STORE_CONFIG
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
</template> -->
|
</template> -->
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="设备名称">
|
<el-form-item label="设备名称">
|
||||||
<el-input maxlength="32" show-word-limit v-model="tableStore.table.params.searchValue"
|
<el-input maxlength="32" clearable show-word-limit v-model="tableStore.table.params.searchValue"
|
||||||
placeholder="请输入设备名称" />
|
placeholder="请输入设备名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -69,12 +69,19 @@ const tableStore = new TableStore({
|
|||||||
{ title: '项目名称', field: 'projectName', align: 'center' },
|
{ title: '项目名称', field: 'projectName', align: 'center' },
|
||||||
{
|
{
|
||||||
title: '告警代码', field: 'code', align: 'center', formatter: (row: any) => {
|
title: '告警代码', field: 'code', align: 'center', formatter: (row: any) => {
|
||||||
console.log("🚀 ~ row:", row)
|
|
||||||
|
|
||||||
return row.cellValue ? row.cellValue : '/'
|
return row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '事件描述', field: 'showName', align: 'center' },
|
{
|
||||||
|
title: '事件描述', field: 'showName',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '级别', field: 'level',formatter: (row: any) => {
|
||||||
|
|
||||||
|
return row.cellValue == 1 ? '1级' : row.cellValue == 2 ? '2级' : row.cellValue == 3 ? '3级' : '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
{ title: '发生时刻', field: 'startTime', align: 'center' }
|
||||||
],
|
],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
|
|||||||
@@ -23,11 +23,11 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div v-if="view2" style="display: flex">
|
<div v-if="view2" style="display: flex">
|
||||||
<span style="font-size: 14px; line-height: 30px">值类型选择</span>
|
<el-radio-group v-model="value" @change="changeView">
|
||||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
<el-radio-button label="一次值" :value="1" />
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
<el-radio-button label="二次值" :value="2" />
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
|
|||||||
@@ -11,16 +11,16 @@
|
|||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div v-if="view2" style="display: flex">
|
<div v-if="view2" style="display: flex">
|
||||||
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
<el-radio-group v-model="value" @change="changeView">
|
||||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
<el-radio-button label="一次值" :value="1" />
|
||||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
<el-radio-button label="二次值" :value="2" />
|
||||||
:value="item.value"></el-option>
|
|
||||||
</el-select>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<el-button v-if="view2" @click="backbxlb" class="el-icon-refresh-right"
|
<el-button v-if="view2" @click="backbxlb" class="el-icon-refresh-right" icon="el-icon-Back"
|
||||||
icon="el-icon-Back" style="float: right">
|
style="float: right">
|
||||||
返回
|
返回
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<!-- @init="nodeClick" -->
|
<!-- @init="nodeClick" -->
|
||||||
<PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange"></PointTree>
|
<PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange"></PointTree>
|
||||||
<div class="device-control-right" v-if="deviceData">
|
<div class="device-control-right" v-if="deviceData">
|
||||||
<el-descriptions title="监测点信息" class="mb10" :column="3" border>
|
<el-descriptions title="监测点信息" class="mb10" width="180" :column="3" border>
|
||||||
<template #extra>
|
<template #extra>
|
||||||
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
|
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
|
||||||
模版下载
|
模版下载
|
||||||
@@ -21,24 +21,49 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-descriptions-item label="名称">
|
<el-descriptions-item label="名称">
|
||||||
{{ deviceData.name ? deviceData.name : '/' }}
|
{{ devData.name || '/' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="测量间隔" width="160">
|
||||||
|
{{ devData.lineInterval }}分钟
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="电压等级" width="160">
|
||||||
|
{{ devData.volGrade }}kV
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="接线方式" width="160">
|
||||||
|
{{ devData.conType == 0 ? '星型接线' : devData.conType == 1 ? '角型接线' : devData.conType == 2 ? 'V型接线' : '/' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
<!-- <el-descriptions-item label="安装位置" width="160">
|
||||||
|
{{ devData.position || '/' }}
|
||||||
|
</el-descriptions-item> -->
|
||||||
|
|
||||||
|
<el-descriptions-item label="PT变比" width="160">
|
||||||
|
{{ devData.ptRatio || '/' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item label="CT变比" width="160">
|
||||||
|
{{ devData.ctRatio || '/' }}
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- <el-descriptions-item label="名称">
|
||||||
|
{{ devData.name ? devData.name : '/' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="类型">
|
<el-descriptions-item label="类型">
|
||||||
{{ echoName(deviceData.devType, devTypeOptions) }}
|
{{ echoName(devData.devType, devTypeOptions) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
|
|
||||||
<el-descriptions-item label="接入方式">
|
<el-descriptions-item label="接入方式">
|
||||||
{{ deviceData.devAccessMethod ? deviceData.devAccessMethod : '/' }}
|
{{ devData.devAccessMethod ? devData.devAccessMethod : '/' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="网络设备ID">
|
<el-descriptions-item label="网络设备ID">
|
||||||
{{ deviceData.ndid ? deviceData.ndid : '/' }}
|
{{ devData.ndid ? devData.ndid : '/' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="型号">
|
<el-descriptions-item label="型号">
|
||||||
{{ echoName(deviceData.devModel, devModelOptions) }}
|
{{ echoName(devData.devModel, devModelOptions) }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
<el-descriptions-item label="接入日期">
|
<el-descriptions-item label="接入日期">
|
||||||
{{ deviceData.time ? deviceData.time : '/' }}
|
{{ devData.time ? devData.time : '/' }}
|
||||||
</el-descriptions-item>
|
</el-descriptions-item> -->
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
<el-tabs v-model="dataSet" type="border-card" class="device-control-box-card" @tab-click="handleClick">
|
<el-tabs v-model="dataSet" type="border-card" class="device-control-box-card" @tab-click="handleClick">
|
||||||
<el-tab-pane lazy :label="item.name" :name="item.id" v-for="(item, index) in deviceData.dataSetList"
|
<el-tab-pane lazy :label="item.name" :name="item.id" v-for="(item, index) in deviceData.dataSetList"
|
||||||
@@ -110,15 +135,15 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据来源" v-if="dataSet.includes('_items')">
|
<el-form-item label="数据来源" v-if="dataSet.includes('_items')">
|
||||||
<el-select v-model="formInline.targetType">
|
<el-select v-model="formInline.dataSource" placeholder="请选择数据来源" clearable>
|
||||||
|
|
||||||
<el-option v-for="item in dataSource" :key="item.id" :label="item.name"
|
<el-option v-for="item in dataSourceList" :key="item.id" :label="item.name"
|
||||||
:value="item.id" />
|
:value="item.id" />
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="关键字" v-if="!dataSet.includes('_')">
|
<el-form-item label="关键字" v-if="!dataSet.includes('_')">
|
||||||
<el-input maxlength="32" show-word-limit v-model="searchValue"
|
<el-input maxlength="32" show-word-limit v-model="searchValue" autocomplete="off" clearable
|
||||||
autocomplete="off" clearable @input="handleSearch" placeholder="请输入关键词"></el-input>
|
@input="handleSearch" placeholder="请输入关键词"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
@@ -139,7 +164,7 @@
|
|||||||
height: realTimeFlag ? '30px' : '40px',
|
height: realTimeFlag ? '30px' : '40px',
|
||||||
alignItems: realTimeFlag ? 'flex-end' : 'center'
|
alignItems: realTimeFlag ? 'flex-end' : 'center'
|
||||||
}" v-if="dataSet.includes('_realtimedata') && mqttMessage && mqttMessage.dataTime && sonTab != 2">
|
}" v-if="dataSet.includes('_realtimedata') && mqttMessage && mqttMessage.dataTime && sonTab != 2">
|
||||||
<p>
|
<p class="mb5">
|
||||||
<span v-if="trendDataTime && !realTimeFlag">数据时间:{{ trendDataTime }}</span>
|
<span v-if="trendDataTime && !realTimeFlag">数据时间:{{ trendDataTime }}</span>
|
||||||
<span v-if="realTimeFlag">数据时间:{{ mqttMessage.dataTime }}</span>
|
<span v-if="realTimeFlag">数据时间:{{ mqttMessage.dataTime }}</span>
|
||||||
</p>
|
</p>
|
||||||
@@ -360,7 +385,7 @@
|
|||||||
<div v-if="!tableData" style="height: 42px"></div>
|
<div v-if="!tableData" style="height: 42px"></div>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
<el-empty v-else description="请选择设备" class="device-control-right" />
|
<el-empty v-else description="请添加设备" class="device-control-right" />
|
||||||
<Detail ref="detailRef" :detail="detail" @close="detail = null" :dataLevel="dataLevel" v-if="detail"></Detail>
|
<Detail ref="detailRef" :detail="detail" @close="detail = null" :dataLevel="dataLevel" v-if="detail"></Detail>
|
||||||
<!-- 离线数据导入组件 -->
|
<!-- 离线数据导入组件 -->
|
||||||
<!-- <offLineDataImport ref="offLineDataImportRef"></offLineDataImport> -->
|
<!-- <offLineDataImport ref="offLineDataImportRef"></offLineDataImport> -->
|
||||||
@@ -379,6 +404,7 @@ import {
|
|||||||
getHarmRealData,
|
getHarmRealData,
|
||||||
getOverLimitData,
|
getOverLimitData,
|
||||||
queryDictType,
|
queryDictType,
|
||||||
|
getById
|
||||||
|
|
||||||
} from '@/api/cs-device-boot/EquipmentDelivery'
|
} from '@/api/cs-device-boot/EquipmentDelivery'
|
||||||
import { deviceHisData, deviceRtData, realTimeData, getTestData } from '@/api/cs-device-boot/csGroup'
|
import { deviceHisData, deviceRtData, realTimeData, getTestData } from '@/api/cs-device-boot/csGroup'
|
||||||
@@ -394,6 +420,7 @@ import offLineDataImport from './offLineDataImport/index.vue'
|
|||||||
import Event from './tabs/event.vue'
|
import Event from './tabs/event.vue'
|
||||||
import nearRealTimeData from './nearRealTimeData.vue'
|
import nearRealTimeData from './nearRealTimeData.vue'
|
||||||
import testItemRecords from './testItemRecords.vue'
|
import testItemRecords from './testItemRecords.vue'
|
||||||
|
import { useDictData } from '@/stores/dictData'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
@@ -401,7 +428,7 @@ import { Histogram, TrendCharts, DataLine, DataAnalysis, Odometer, Monitor, Time
|
|||||||
import analysisList from './analysisList/index.vue'
|
import analysisList from './analysisList/index.vue'
|
||||||
import mqtt from 'mqtt'
|
import mqtt from 'mqtt'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/device/control'
|
// name: 'govern/device/control'
|
||||||
})
|
})
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const pageHeight = mainHeight(20)
|
const pageHeight = mainHeight(20)
|
||||||
@@ -432,8 +459,16 @@ const formInline = reactive({
|
|||||||
id: '',
|
id: '',
|
||||||
lineId: '',
|
lineId: '',
|
||||||
targetType: '',
|
targetType: '',
|
||||||
|
dataSource: '',
|
||||||
dataLevel: 'Secondary'
|
dataLevel: 'Secondary'
|
||||||
})
|
})
|
||||||
|
const dataSourceList = [{
|
||||||
|
id: '0',
|
||||||
|
name: '补召'
|
||||||
|
}, {
|
||||||
|
id: '1',
|
||||||
|
name: '在线监测'
|
||||||
|
}]
|
||||||
const oddAndEvenList = [
|
const oddAndEvenList = [
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
@@ -455,6 +490,11 @@ const detail = ref<any>(null)
|
|||||||
const realTimeFlag = ref(true)
|
const realTimeFlag = ref(true)
|
||||||
//实时数据子菜单
|
//实时数据子菜单
|
||||||
const sonTab = ref()
|
const sonTab = ref()
|
||||||
|
const dictData = useDictData()
|
||||||
|
//电压等级
|
||||||
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
|
//接线方式
|
||||||
|
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||||
//实时录波
|
//实时录波
|
||||||
// const handleRecordWaves = () => {
|
// const handleRecordWaves = () => {
|
||||||
// realTimeFlag.value = false
|
// realTimeFlag.value = false
|
||||||
@@ -645,12 +685,17 @@ const handleaddDevice = () => {
|
|||||||
}
|
}
|
||||||
//树节点点击事件
|
//树节点点击事件
|
||||||
const deviceId: any = ref('')
|
const deviceId: any = ref('')
|
||||||
|
const devData: any = ref({})
|
||||||
const lineId: any = ref('')
|
const lineId: any = ref('')
|
||||||
const dataLevel: any = ref('')
|
const dataLevel: any = ref('')
|
||||||
const dataSource = ref([])
|
const dataSource = ref([])
|
||||||
const nodeClick = async (e: anyObj) => {
|
const nodeClick = async (e: anyObj) => {
|
||||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
console.log("🚀 ~ nodeClick ~ e:", e)
|
||||||
if (e.level == 2) return
|
|
||||||
|
|
||||||
|
if (e==undefined || e.level == 2){
|
||||||
|
return loading.value = false
|
||||||
|
}
|
||||||
searchValue.value = ''
|
searchValue.value = ''
|
||||||
await queryDictType({
|
await queryDictType({
|
||||||
lineId: e?.id,
|
lineId: e?.id,
|
||||||
@@ -676,6 +721,10 @@ const nodeClick = async (e: anyObj) => {
|
|||||||
formInline.lineId = e.level == 3 ? e.id : e.children[0].id
|
formInline.lineId = e.level == 3 ? e.id : e.children[0].id
|
||||||
await getDeviceData(e.level == 3 ? e.pid : e.id, 'history', e.level == 3 ? e.id : e.children[0].id)
|
await getDeviceData(e.level == 3 ? e.pid : e.id, 'history', e.level == 3 ? e.id : e.children[0].id)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
getById({ lineId: e.level == 3 ? e.id : e.children[0].id }).then((res: any) => {
|
||||||
|
|
||||||
|
devData.value = res.data
|
||||||
|
})
|
||||||
|
|
||||||
deviceData.value = res.data
|
deviceData.value = res.data
|
||||||
formInline.dataLevel = res.data.dataLevel
|
formInline.dataLevel = res.data.dataLevel
|
||||||
@@ -784,6 +833,7 @@ const getRealDataMqttMsg = async () => {
|
|||||||
// JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
// JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||||
// )
|
// )
|
||||||
let obj = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
let obj = JSON.parse(JSON.stringify(JSON.parse(new TextDecoder().decode(message))))
|
||||||
|
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
||||||
if (lineId.value != obj.lineId && adminInfo.userIndex != obj.userId) return
|
if (lineId.value != obj.lineId && adminInfo.userIndex != obj.userId) return
|
||||||
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
||||||
// console.log("🚀 ~ mqttRef.value.on ~ formInline.dataLevel:", obj.dataLevel, formInline.dataLevel)
|
// console.log("🚀 ~ mqttRef.value.on ~ formInline.dataLevel:", obj.dataLevel, formInline.dataLevel)
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<div class="home_header">
|
<div class="home_header">
|
||||||
<el-form-item label="值类型选择">
|
<!-- <el-form-item label="值类型选择">
|
||||||
<el-select @change="changeView" v-model="value" placeholder="请选择值类型">
|
<el-select @change="changeView" v-model="value" placeholder="请选择值类型">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in options"
|
v-for="(item, index) in options"
|
||||||
@@ -11,27 +11,27 @@
|
|||||||
:value="item.value"
|
:value="item.value"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item> -->
|
||||||
|
<el-radio-group v-model="value" @change="changeView">
|
||||||
|
<el-radio-button label="一次值" :value="1" />
|
||||||
|
<el-radio-button label="二次值" :value="2" />
|
||||||
|
|
||||||
|
</el-radio-group>
|
||||||
<el-form-item label="">
|
<el-form-item label="">
|
||||||
<el-button @click="handleBack" :icon="Back">返回</el-button>
|
<el-button @click="handleBack" :icon="Back">返回</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</div>
|
</div>
|
||||||
<el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick">
|
<el-tabs class="home_body" type="border-card" v-model="activeName" @tab-click="handleClick">
|
||||||
|
|
||||||
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
<el-tab-pane label="瞬时波形" name="ssbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||||
<shushiboxi
|
<shushiboxi v-if="isWp && wp && activeName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||||
v-if="isWp && wp && activeName == 'ssbx'"
|
:wp="wp">
|
||||||
:value="value"
|
</shushiboxi>
|
||||||
:boxoList="boxoList"
|
|
||||||
:wp="wp"
|
|
||||||
></shushiboxi>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||||
<rmsboxi
|
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||||
v-if="isWp && wp && activeName == 'rmsbx'"
|
:wp="wp">
|
||||||
:value="value"
|
</rmsboxi>
|
||||||
:boxoList="boxoList"
|
|
||||||
:wp="wp"
|
|
||||||
></rmsboxi>
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,7 +127,7 @@ const handleClick = (tab: any, event: any) => {
|
|||||||
const handleBack = () => {
|
const handleBack = () => {
|
||||||
emit('handleHideCharts')
|
emit('handleHideCharts')
|
||||||
}
|
}
|
||||||
onMounted(() => {})
|
onMounted(() => { })
|
||||||
defineExpose({ getWpData })
|
defineExpose({ getWpData })
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="view">
|
<div class="view">
|
||||||
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts"></TableHeader>
|
<TableHeader datePicker ref="headerRef" v-if="!isWaveCharts" :showReset="false"></TableHeader>
|
||||||
<Table ref="tableRef" v-if="!isWaveCharts" />
|
<Table ref="tableRef" v-if="!isWaveCharts" />
|
||||||
<waveFormAnalysis
|
<waveFormAnalysis
|
||||||
v-if="isWaveCharts"
|
v-if="isWaveCharts"
|
||||||
|
|||||||
@@ -49,7 +49,8 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
</div>
|
</div>
|
||||||
<div class="history_chart" :style="pageHeight" v-loading="loading">
|
<div class="history_chart" :style="pageHeight" v-loading="loading">
|
||||||
<MyEchart ref="historyChart" :options="echartsData" />
|
<MyEchart ref="historyChart" :options="echartsData" v-if="showEchart" />
|
||||||
|
<el-empty :style="pageHeight" v-else description="暂无数据" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -76,7 +77,7 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
console.log("🚀 ~ props:", props.TrendList)
|
console.log("🚀 ~ props:", props.TrendList)
|
||||||
|
const showEchart = ref(true)
|
||||||
//电压等级
|
//电压等级
|
||||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
//接线方式
|
//接线方式
|
||||||
@@ -132,6 +133,41 @@ queryByCode(props?.TrendList?.lineType == 0 ? 'apf-harmonic' : 'portable-harmoni
|
|||||||
})
|
})
|
||||||
queryStatistical(res.data.id).then(vv => {
|
queryStatistical(res.data.id).then(vv => {
|
||||||
legendDictList.value = vv.data
|
legendDictList.value = vv.data
|
||||||
|
indexOptions.value.map((item: any, index: any) => {
|
||||||
|
if (!countDataCopy.value[index]) {
|
||||||
|
countDataCopy.value[index] = {
|
||||||
|
index: item.id,
|
||||||
|
countOptions: [],
|
||||||
|
count: [],
|
||||||
|
name: indexOptions.value.find((vv: any) => {
|
||||||
|
return vv.id == item.id
|
||||||
|
})?.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
||||||
|
//查找相等的指标
|
||||||
|
if (item.id == vv.dataType) {
|
||||||
|
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
||||||
|
if (kk.harmStart && kk.harmEnd) {
|
||||||
|
range(0, 0, 0)
|
||||||
|
|
||||||
|
if (kk.showName == '间谐波电压含有率') {
|
||||||
|
countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
||||||
|
(item: any) => {
|
||||||
|
return item - 0.5
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||||
|
}
|
||||||
|
if (!countDataCopy.value[index].count || countDataCopy.value[index].count.length == 0) {
|
||||||
|
countDataCopy.value[index].count = countDataCopy.value[index].countOptions[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const activeName: any = ref()
|
const activeName: any = ref()
|
||||||
@@ -171,7 +207,7 @@ const init = async () => {
|
|||||||
//颜色数组
|
//颜色数组
|
||||||
const colorList = color
|
const colorList = color
|
||||||
//选择的指标使用方法处理
|
//选择的指标使用方法处理
|
||||||
formatCountOptions(searchForm.value.index)
|
formatCountOptions()
|
||||||
//查询历史趋势
|
//查询历史趋势
|
||||||
historyDataList.value = []
|
historyDataList.value = []
|
||||||
chartTitle.value = ''
|
chartTitle.value = ''
|
||||||
@@ -212,9 +248,15 @@ const init = async () => {
|
|||||||
}
|
}
|
||||||
if (obj.devId && obj.list.length != 0) {
|
if (obj.devId && obj.list.length != 0) {
|
||||||
try {
|
try {
|
||||||
|
showEchart.value = true
|
||||||
await getTabsDataByType(obj)
|
await getTabsDataByType(obj)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
if (res.code == 'A0000') {
|
if (res.code == 'A0000') {
|
||||||
|
if (res.data.length == 0) {
|
||||||
|
loading.value = false
|
||||||
|
showEchart.value = false
|
||||||
|
return
|
||||||
|
}
|
||||||
historyDataList.value = res.data
|
historyDataList.value = res.data
|
||||||
let chartsList = JSON.parse(JSON.stringify(res.data))
|
let chartsList = JSON.parse(JSON.stringify(res.data))
|
||||||
echartsData.value = {}
|
echartsData.value = {}
|
||||||
@@ -578,47 +620,56 @@ const handleExport = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const countData: any = ref([])
|
const countData: any = ref([])
|
||||||
|
const countDataCopy: any = ref([])
|
||||||
|
|
||||||
//根据选择的指标处理谐波次数
|
//根据选择的指标处理谐波次数
|
||||||
const formatCountOptions = (list: any) => {
|
const formatCountOptions = () => {
|
||||||
countData.value = []
|
countData.value = []
|
||||||
if (list.length != 0) {
|
if (searchForm.value.index.length != 0) {
|
||||||
list.map((item: any, index: any) => {
|
searchForm.value.index.forEach((item: any, index: any) => {
|
||||||
if (!countData.value[index]) {
|
countDataCopy.value.forEach((vv: any, vvs: any) => {
|
||||||
countData.value[index] = {
|
if (vv.index == item) {
|
||||||
index: item,
|
countData.value.push(vv)
|
||||||
countOptions: [],
|
|
||||||
count: '',
|
|
||||||
name: indexOptions.value.find((vv: any) => {
|
|
||||||
return vv.id == item
|
|
||||||
})?.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
|
||||||
//查找相等的指标
|
|
||||||
if (item == vv.dataType) {
|
|
||||||
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
|
||||||
if (kk.harmStart && kk.harmEnd) {
|
|
||||||
range(0, 0, 0)
|
|
||||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
|
||||||
if (kk.showName == '间谐波电压含有率') {
|
|
||||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
|
||||||
(item: any) => {
|
|
||||||
return item - 0.5
|
|
||||||
}
|
|
||||||
)
|
|
||||||
} else {
|
|
||||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
|
||||||
}
|
|
||||||
//添加默认值
|
|
||||||
if (countData.value[index].count.length == 0) {
|
|
||||||
countData.value[index].count = countData.value[index].countOptions[0]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
// list.map((item: any, index: any) => {
|
||||||
|
// if (!countData.value[index]) {
|
||||||
|
// countData.value[index] = {
|
||||||
|
// index: item,
|
||||||
|
// countOptions: [],
|
||||||
|
// count: '',
|
||||||
|
// name: indexOptions.value.find((vv: any) => {
|
||||||
|
// return vv.id == item
|
||||||
|
// })?.name
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
||||||
|
// //查找相等的指标
|
||||||
|
// if (item == vv.dataType) {
|
||||||
|
// vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
||||||
|
// if (kk.harmStart && kk.harmEnd) {
|
||||||
|
// range(0, 0, 0)
|
||||||
|
// countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||||
|
// if (kk.showName == '间谐波电压含有率') {
|
||||||
|
// countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
||||||
|
// (item: any) => {
|
||||||
|
// return item - 0.5
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
// } else {
|
||||||
|
// countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||||
|
// }
|
||||||
|
// //添加默认值
|
||||||
|
// if (countData.value[index].count.length == 0) {
|
||||||
|
// countData.value[index].count = countData.value[index].countOptions[0]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
countData.value.map((item: any, key: any) => {
|
countData.value.map((item: any, key: any) => {
|
||||||
if (item.name == '谐波电流有效值') {
|
if (item.name == '谐波电流有效值') {
|
||||||
item.name = '谐波电流次数'
|
item.name = '谐波电流次数'
|
||||||
@@ -651,7 +702,7 @@ const onIndexChange = (val: any) => {
|
|||||||
})
|
})
|
||||||
searchForm.value.index = pp
|
searchForm.value.index = pp
|
||||||
flag.value = true
|
flag.value = true
|
||||||
|
formatCountOptions()
|
||||||
|
|
||||||
// if (val.length == 0) {
|
// if (val.length == 0) {
|
||||||
// searchForm.value.index = [indexOptions.value[0].id]
|
// searchForm.value.index = [indexOptions.value[0].id]
|
||||||
@@ -660,23 +711,23 @@ const onIndexChange = (val: any) => {
|
|||||||
watch(
|
watch(
|
||||||
() => searchForm.value.index,
|
() => searchForm.value.index,
|
||||||
(val: any, oldval: any) => {
|
(val: any, oldval: any) => {
|
||||||
if (val) {
|
// if (val) {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
formatCountOptions(val)
|
// formatCountOptions(val)
|
||||||
}, 100)
|
// }, 100)
|
||||||
if (val == 0) {
|
// if (val == 0) {
|
||||||
countData.value = []
|
// countData.value = []
|
||||||
}
|
// }
|
||||||
countData.value.map((item: any, key: any) => {
|
// countData.value.map((item: any, key: any) => {
|
||||||
if (
|
// if (
|
||||||
val.findIndex((vv: any) => {
|
// val.findIndex((vv: any) => {
|
||||||
return vv == item.index
|
// return vv == item.index
|
||||||
}) == -1
|
// }) == -1
|
||||||
) {
|
// ) {
|
||||||
countData.value.splice(key, 1)
|
// countData.value.splice(key, 1)
|
||||||
}
|
// }
|
||||||
})
|
// })
|
||||||
}
|
// }
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
|
|||||||
@@ -35,12 +35,11 @@ const column: any = ref([
|
|||||||
{ field: 'itemName', title: '数据来源', width: '100px' },
|
{ field: 'itemName', title: '数据来源', width: '100px' },
|
||||||
{ field: 'statisticalInterval', title: '时间间隔(分钟)', width: '120px', },
|
{ field: 'statisticalInterval', title: '时间间隔(分钟)', width: '120px', },
|
||||||
{ field: 'voltageLevel', title: '电压等级', width: '100px', sortable: true },
|
{ field: 'voltageLevel', title: '电压等级', width: '100px', sortable: true },
|
||||||
|
|
||||||
{ field: 'volConType', title: ' 电压接线方式', width: '120px', sortable: true },
|
{ field: 'volConType', title: ' 电压接线方式', width: '120px', sortable: true },
|
||||||
{
|
{
|
||||||
field: 'pt', title: 'PT变比', width: '100px',
|
field: 'pt', title: 'PT', width: '100px',
|
||||||
},
|
},
|
||||||
{ field: 'ct', title: 'CT变比', width: '100px', },
|
{ field: 'ct', title: 'CT', width: '100px', },
|
||||||
{ field: 'capacitySi', title: '用户协议容量(MVA)', width: '140px', },
|
{ field: 'capacitySi', title: '用户协议容量(MVA)', width: '140px', },
|
||||||
{ field: 'capacitySt', title: '供电设备容量(MVA)', width: '140px', },
|
{ field: 'capacitySt', title: '供电设备容量(MVA)', width: '140px', },
|
||||||
{ field: 'capacitySscb', title: '基准短路容量(MVA)', width: '140px', },
|
{ field: 'capacitySscb', title: '基准短路容量(MVA)', width: '140px', },
|
||||||
@@ -58,10 +57,6 @@ const setData = (data: any) => {
|
|||||||
const formatter = (row: any) => {
|
const formatter = (row: any) => {
|
||||||
if (row.column.field == 'voltageLevel') {
|
if (row.column.field == 'voltageLevel') {
|
||||||
return row.cellValue == null ? '/' : voltageLevelList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
return row.cellValue == null ? '/' : voltageLevelList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||||
} else if (row.column.field == 'pt') {
|
|
||||||
return row.row.pt == null ? '/' : (row.row.pt + '/' + row.row.pt1)
|
|
||||||
} else if (row.column.field == 'ct') {
|
|
||||||
return row.row.ct == null ? '/' : (row.row.ct + '/' + row.row.ct1)
|
|
||||||
} else if (row.column.field == 'volConType') {
|
} else if (row.column.field == 'volConType') {
|
||||||
return row.cellValue == null ? '/' : volConTypeList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
return row.cellValue == null ? '/' : volConTypeList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||||
} else {
|
} else {
|
||||||
@@ -77,8 +72,22 @@ const remove = (row: any) => {
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
|
|
||||||
passwordConfirm(value).then(res => {
|
passwordConfirm(value).then(res => {
|
||||||
console.log('密码正确');
|
console.log('密码正确');
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
<el-input maxlength="32" show-word-limit style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称"
|
<el-input maxlength="32" show-word-limit style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称"
|
||||||
clearable v-model="filterText" type="text"></el-input>
|
clearable v-model="filterText" type="text"></el-input>
|
||||||
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
|
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
|
||||||
<el-button @click="handleRefresh" :icon="Refresh">重置</el-button>
|
<!-- <el-button @click="handleRefresh" :icon="Refresh">重置</el-button> -->
|
||||||
<el-upload v-if="activePath != '/'" action="" :auto-upload="false" :show-file-list="false" :on-change="(file: any, fileList: any) => {
|
<el-upload v-if="activePath != '/'" action="" :auto-upload="false" :show-file-list="false" :on-change="(file: any, fileList: any) => {
|
||||||
handleUpload(file, fileList, activePath)
|
handleUpload(file, fileList, activePath)
|
||||||
}
|
}
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
<el-form ref="formRef" :model="form"
|
<el-form ref="formRef" :model="form"
|
||||||
:rules="{ path: [{ required: true, message: '请输入文件夹名称', trigger: 'blur' }] }">
|
:rules="{ path: [{ required: true, message: '请输入文件夹名称', trigger: 'blur' }] }">
|
||||||
<el-form-item label="文件夹名称" prop="path">
|
<el-form-item label="文件夹名称" prop="path">
|
||||||
<el-input maxlength="32" show-word-limit v-model="form.path" placeholder="请输入文件夹名称" />
|
<el-input maxlength="32" show-word-limit v-model.trim="form.path" placeholder="请输入文件夹名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@@ -249,7 +249,22 @@ const handleRestartDevice = () => {
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
@@ -386,6 +401,7 @@ const reloadCurrentMenu = (msg: string) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
loading.value = false
|
loading.value = false
|
||||||
|
|
||||||
if (!msg) return
|
if (!msg) return
|
||||||
ElMessage({ message: msg, type: 'success', duration: 5000 })
|
ElMessage({ message: msg, type: 'success', duration: 5000 })
|
||||||
}
|
}
|
||||||
@@ -417,11 +433,26 @@ const submitDeviceDir = () => {
|
|||||||
}
|
}
|
||||||
//删除文件夹或文件
|
//删除文件夹或文件
|
||||||
const handleDelDirOrFile = (row: any) => {
|
const handleDelDirOrFile = (row: any) => {
|
||||||
ElMessageBox.prompt('二次校验密码确认', '删除', {
|
ElMessageBox.prompt('二次校验密码确认', '', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
ElMessage.warning('请输入密码')
|
ElMessage.warning('请输入密码')
|
||||||
|
|||||||
@@ -204,7 +204,22 @@ const handleRestartDevice = () => {
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.then(({ value }) => {
|
.then(({ value }) => {
|
||||||
if (!value) {
|
if (!value) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
<el-icon :style="{ color: '#0000FF' }">
|
<el-icon :style="{ color: '#0000FF' }">
|
||||||
<el-tooltip placement="bottom" :hide-after="0">
|
<el-tooltip placement="bottom" :hide-after="0">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span>绑定测试项</span>
|
<span>数据绑定</span>
|
||||||
</template>
|
</template>
|
||||||
<SetUp @click.stop="bind(node, data)" />
|
<SetUp @click.stop="bind(node, data)" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
<el-icon :style="{ color: '#0000FF' }">
|
<el-icon :style="{ color: '#0000FF' }">
|
||||||
<el-tooltip placement="bottom" :hide-after="0">
|
<el-tooltip placement="bottom" :hide-after="0">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span>修改测试项</span>
|
<span> {{ data.pid ? '修改测试项' : ' 修改测试方案' }}</span>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<Edit @click.stop="edit(node, data)" />
|
<Edit @click.stop="edit(node, data)" />
|
||||||
@@ -104,6 +104,7 @@ import { ElTree } from 'element-plus'
|
|||||||
import { Plus, Edit, Delete, SetUp } from '@element-plus/icons-vue'
|
import { Plus, Edit, Delete, SetUp } from '@element-plus/icons-vue'
|
||||||
import { delRecord } from '@/api/cs-device-boot/planData'
|
import { delRecord } from '@/api/cs-device-boot/planData'
|
||||||
import popup from './popup.vue'
|
import popup from './popup.vue'
|
||||||
|
import { getDeviceList } from '@/api/cs-device-boot/planData'
|
||||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/schemeTree'
|
name: 'govern/schemeTree'
|
||||||
@@ -112,6 +113,7 @@ interface Props {
|
|||||||
width?: string
|
width?: string
|
||||||
canExpand?: boolean
|
canExpand?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
const visible1 = ref(false)
|
const visible1 = ref(false)
|
||||||
const visible2 = ref(false)
|
const visible2 = ref(false)
|
||||||
const visible3 = ref(false)
|
const visible3 = ref(false)
|
||||||
@@ -269,10 +271,20 @@ const edit = async (node: Node, data: any) => {
|
|||||||
.catch(e => { })
|
.catch(e => { })
|
||||||
}
|
}
|
||||||
/** 删除树节点 */
|
/** 删除树节点 */
|
||||||
const del = (node: Node, data: any) => {
|
const del =async (node: Node, data: any) => {
|
||||||
|
let titleList = ''
|
||||||
planId.value = data.id
|
planId.value = data.id
|
||||||
|
await getDeviceList({
|
||||||
|
id: data.id,
|
||||||
|
isTrueFlag: 1
|
||||||
|
}).then(res => {
|
||||||
|
if (res.data.length > 0) {
|
||||||
|
titleList = '已绑定数据_'
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
//删除方案/测试项
|
//删除方案/测试项
|
||||||
ElMessageBox.confirm('是否确认删除?', {
|
ElMessageBox.confirm(titleList + '是否确认删除?', {
|
||||||
confirmButtonText: '确定',
|
confirmButtonText: '确定',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
|
|||||||
85
src/views/govern/device/planData/components/transient.vue
Normal file
85
src/views/govern/device/planData/components/transient.vue
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
<template>
|
||||||
|
|
||||||
|
<TableHeader :showReset="false">
|
||||||
|
<!-- <template v-slot:select>
|
||||||
|
<el-form-item label="用户状态">
|
||||||
|
<el-select v-model="tableStore.table.params.searchState" placeholder="选择用户状态">
|
||||||
|
<el-option v-for="(item, index) in userState" :label="item.label" :key="index"
|
||||||
|
:value="item.value"></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
-->
|
||||||
|
</TableHeader>
|
||||||
|
<Table ref="tableRef" />
|
||||||
|
|
||||||
|
</template>
|
||||||
|
<script setup lang='ts'>
|
||||||
|
import { ref, provide, onMounted } from 'vue'
|
||||||
|
import { getEventByItem } from '@/api/cs-device-boot/planData'
|
||||||
|
import TableStore from '@/utils/tableStore'
|
||||||
|
import Table from '@/components/table/index.vue'
|
||||||
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
|
const props = defineProps({
|
||||||
|
activeName: String
|
||||||
|
})
|
||||||
|
const tableStore = new TableStore({
|
||||||
|
url: '/cs-harmonic-boot/data/getEventByItem',
|
||||||
|
method: 'POST',
|
||||||
|
paramsPOST: true,
|
||||||
|
showPage: false,
|
||||||
|
column: [
|
||||||
|
{ title: '项目名称', field: 'projectName', minWidth: '130' },
|
||||||
|
{ title: '测试项名称', field: 'itemName', minWidth: '130' },
|
||||||
|
{ title: '装置名称', field: 'devName', minWidth: '130' },
|
||||||
|
{ title: '发生时刻', field: 'startTime', minWidth: '130' },
|
||||||
|
{ title: '持续时间', field: 'persistTime', minWidth: '130' },
|
||||||
|
{ title: '事件描述', field: 'showName', minWidth: '130' },
|
||||||
|
{ title: '暂降幅值', field: 'featureAmplitude', minWidth: '130' },
|
||||||
|
{ title: '相别', field: 'phaseType', minWidth: '130' },
|
||||||
|
|
||||||
|
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
width: '180',
|
||||||
|
render: 'buttons',
|
||||||
|
fixed: 'right',
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'edit',
|
||||||
|
title: '编辑',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
disabled: row => {
|
||||||
|
return row.state !== 1
|
||||||
|
},
|
||||||
|
click: row => {
|
||||||
|
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
loadCallback: () => {
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
provide('tableStore', tableStore)
|
||||||
|
const init = () => {
|
||||||
|
tableStore.table.params.id = props.activeName
|
||||||
|
// getEventByItem({ id: props.activeName }).then(res => {
|
||||||
|
|
||||||
|
// })
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
onMounted(() => {
|
||||||
|
|
||||||
|
})
|
||||||
|
defineExpose({ init })
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<style lang="scss" scoped></style>
|
||||||
@@ -189,9 +189,41 @@ export default {
|
|||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
//组件搜索
|
//组件搜索
|
||||||
filterNode(value, data) {
|
filterNode(value, data, node) {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
return data.name.indexOf(value) !== -1
|
// return data.name.includes(value)
|
||||||
|
if (data.name) {
|
||||||
|
|
||||||
|
return this.chooseNode(value, data, node)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
// 过滤父节点 / 子节点 (如果输入的参数是父节点且能匹配,则返回该节点以及其下的所有子节点;如果参数是子节点,则返回该节点的父节点。name是中文字符,enName是英文字符.
|
||||||
|
chooseNode(value, data, node) {
|
||||||
|
|
||||||
|
if (data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
const level = node.level
|
||||||
|
// 如果传入的节点本身就是一级节点就不用校验了
|
||||||
|
if (level === 1) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
// 先取当前节点的父节点
|
||||||
|
let parentData = node.parent
|
||||||
|
// 遍历当前节点的父节点
|
||||||
|
let index = 0
|
||||||
|
while (index < level - 1) {
|
||||||
|
// 如果匹配到直接返回,此处name值是中文字符,enName是英文字符。判断匹配中英文过滤
|
||||||
|
if (parentData.data.name.indexOf(value) !== -1) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
// 否则的话再往上一层做匹配
|
||||||
|
parentData = parentData.parent
|
||||||
|
index++
|
||||||
|
}
|
||||||
|
// 没匹配到返回false
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,8 +102,8 @@
|
|||||||
|
|
||||||
<div v-if="JSON.stringify(echartsData) != '{}' && deviceData?.records?.length != 0">
|
<div v-if="JSON.stringify(echartsData) != '{}' && deviceData?.records?.length != 0">
|
||||||
<!-- <h3 class="mt10 mb10">历史趋势</h3> -->
|
<!-- <h3 class="mt10 mb10">历史趋势</h3> -->
|
||||||
<el-tabs type="border-card" class="mt10">
|
<el-tabs v-model="childTab" type="border-card" class="mt10">
|
||||||
<el-tab-pane label="历史趋势">
|
<el-tab-pane label="历史趋势" name="0">
|
||||||
<div class="history_trend" v-if="titleList != '(未绑定数据)'">
|
<div class="history_trend" v-if="titleList != '(未绑定数据)'">
|
||||||
<div class="history_header" ref="headerRef">
|
<div class="history_header" ref="headerRef">
|
||||||
<!-- <el-form :model="searchForm" class="history_select" id="history_select"> -->
|
<!-- <el-form :model="searchForm" class="history_select" id="history_select"> -->
|
||||||
@@ -117,6 +117,17 @@
|
|||||||
:label="item.name" :value="item.id"></el-option>
|
:label="item.name" :value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<!-- <el-select style="width: 12px !important" v-model="searchForm.dataLevel">
|
||||||
|
<el-option value="Primary" label="一次值"></el-option>
|
||||||
|
<el-option value="Secondary" label="二次值"></el-option>
|
||||||
|
</el-select> -->
|
||||||
|
<el-radio-group v-model="searchForm.dataLevel" @change="init(true)">
|
||||||
|
<el-radio-button label="一次值" value="Primary" />
|
||||||
|
<el-radio-button label="二次值" value="Secondary" />
|
||||||
|
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item for="-" label="统计类型" label-width="80px">
|
<el-form-item for="-" label="统计类型" label-width="80px">
|
||||||
<el-select style="width: 120px" v-model="searchForm.type"
|
<el-select style="width: 120px" v-model="searchForm.type"
|
||||||
placeholder="请选择值类型">
|
placeholder="请选择值类型">
|
||||||
@@ -124,12 +135,8 @@
|
|||||||
:value="item.id"></el-option>
|
:value="item.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item for="-" label="值类型">
|
|
||||||
<el-select style="width: 12px !important" v-model="searchForm.dataLevel">
|
|
||||||
<el-option value="Primary" label="一次值"></el-option>
|
|
||||||
<el-option value="Secondary" label="二次值"></el-option>
|
|
||||||
</el-select>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item for="-" v-for="(item, index) in countData" :key="index"
|
<el-form-item for="-" v-for="(item, index) in countData" :key="index"
|
||||||
:label="item.name.includes('次数') ? item.name : item.name.includes('幅值') ? item.name.slice(0, -2) + '次数' : item.name + '谐波次数'"
|
:label="item.name.includes('次数') ? item.name : item.name.includes('幅值') ? item.name.slice(0, -2) + '次数' : item.name + '谐波次数'"
|
||||||
v-show="item.countOptions.length != 0">
|
v-show="item.countOptions.length != 0">
|
||||||
@@ -162,8 +169,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<el-empty :style="EcharHeight" v-else description="未绑定数据" />
|
<el-empty :style="EcharHeight" v-else description="未绑定数据" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
<el-tab-pane label="暂态数据">
|
<el-tab-pane label="暂态数据" name="1">
|
||||||
暂态数据
|
<transient :activeName='activeName' ref="transientRef" />
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
|
|
||||||
</el-tabs>
|
</el-tabs>
|
||||||
@@ -192,12 +199,15 @@ import { color, gradeColor3 } from '@/components/echarts/color'
|
|||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { useConfig } from '@/stores/config'
|
import { useConfig } from '@/stores/config'
|
||||||
import { getDeviceList } from '@/api/cs-device-boot/planData'
|
import { getDeviceList } from '@/api/cs-device-boot/planData'
|
||||||
|
import transient from './components/transient.vue'
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
defineOptions({
|
defineOptions({
|
||||||
// name: 'govern/device/planData/index'
|
// name: 'govern/device/planData/index'
|
||||||
})
|
})
|
||||||
|
const childTab = ref('0')
|
||||||
const num = ref(0)
|
const num = ref(0)
|
||||||
const config = useConfig()
|
const config = useConfig()
|
||||||
|
const transientRef = ref()
|
||||||
color[0] = config.layout.elementUiPrimary[0]
|
color[0] = config.layout.elementUiPrimary[0]
|
||||||
//电压等级
|
//电压等级
|
||||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||||
@@ -249,6 +259,41 @@ queryByCode('portable-harmonic').then(res => {
|
|||||||
})
|
})
|
||||||
queryStatistical(res.data.id).then(vv => {
|
queryStatistical(res.data.id).then(vv => {
|
||||||
legendDictList.value = vv.data
|
legendDictList.value = vv.data
|
||||||
|
indexOptions.value.map((item: any, index: any) => {
|
||||||
|
if (!countDataCopy.value[index]) {
|
||||||
|
countDataCopy.value[index] = {
|
||||||
|
index: item.id,
|
||||||
|
countOptions: [],
|
||||||
|
count: [],
|
||||||
|
name: indexOptions.value.find((vv: any) => {
|
||||||
|
return vv.id == item.id
|
||||||
|
})?.name
|
||||||
|
}
|
||||||
|
}
|
||||||
|
legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
||||||
|
//查找相等的指标
|
||||||
|
if (item.id == vv.dataType) {
|
||||||
|
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
||||||
|
if (kk.harmStart && kk.harmEnd) {
|
||||||
|
range(0, 0, 0)
|
||||||
|
|
||||||
|
if (kk.showName == '间谐波电压含有率') {
|
||||||
|
countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
||||||
|
(item: any) => {
|
||||||
|
return item - 0.5
|
||||||
|
}
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||||
|
}
|
||||||
|
if (!countDataCopy.value[index].count || countDataCopy.value[index].count.length == 0) {
|
||||||
|
countDataCopy.value[index].count = countDataCopy.value[index].countOptions[0]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const activeName: any = ref()
|
const activeName: any = ref()
|
||||||
@@ -284,21 +329,23 @@ const nodeClick = async (e: anyObj) => {
|
|||||||
if (res.data.records.length == 1) {
|
if (res.data.records.length == 1) {
|
||||||
activeName.value = res.data.records[0].id
|
activeName.value = res.data.records[0].id
|
||||||
} else {
|
} else {
|
||||||
res.data.records.map((item: any, index: any) => {
|
|
||||||
//多层
|
for (const item of res.data.records) {
|
||||||
if (item.id == e.id) {
|
if (item.id == e.id) {
|
||||||
activeName.value = item.id
|
activeName.value = item.id;
|
||||||
return
|
break; // 找到匹配项后停止遍历
|
||||||
} else {
|
|
||||||
activeName.value = res.data.records[0].id
|
|
||||||
return
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
// 如果没有找到匹配项,默认设置为第一个元素的id
|
||||||
|
if (activeName.value !== e.id) { // 假设e.id是一个用于比较的初始值,表示未找到匹配项
|
||||||
|
activeName.value = res.data.records[0].id;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// if (searchForm.value.index.length == 0) {
|
// if (searchForm.value.index.length == 0) {
|
||||||
// searchForm.value.index = [indexOptions.value[0].id]
|
// searchForm.value.index = [indexOptions.value[0].id]
|
||||||
// }
|
// }
|
||||||
|
|
||||||
schemeTreeRef.value.getPlanData(deviceData.value)
|
schemeTreeRef.value.getPlanData(deviceData.value)
|
||||||
await setTimeout(() => {
|
await setTimeout(() => {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
@@ -307,6 +354,7 @@ const nodeClick = async (e: anyObj) => {
|
|||||||
} else {
|
} else {
|
||||||
init(false)
|
init(false)
|
||||||
}
|
}
|
||||||
|
transientRef.value && transientRef.value.init()
|
||||||
}, 100)
|
}, 100)
|
||||||
|
|
||||||
loading.value = false
|
loading.value = false
|
||||||
@@ -326,6 +374,8 @@ const onIndexChange = (val: any) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
searchForm.value.index = pp
|
searchForm.value.index = pp
|
||||||
|
formatCountOptions()
|
||||||
|
|
||||||
// if (val.length == 0) {
|
// if (val.length == 0) {
|
||||||
// searchForm.value.index = [indexOptions.value[0].id]
|
// searchForm.value.index = [indexOptions.value[0].id]
|
||||||
// }
|
// }
|
||||||
@@ -402,7 +452,7 @@ const init = (flag: boolean) => {
|
|||||||
|
|
||||||
|
|
||||||
//选择的指标使用方法处理
|
//选择的指标使用方法处理
|
||||||
formatCountOptions(searchForm.value.index)
|
formatCountOptions()
|
||||||
//查询历史趋势
|
//查询历史趋势
|
||||||
historyDataList.value = []
|
historyDataList.value = []
|
||||||
let middleTitle = ''
|
let middleTitle = ''
|
||||||
@@ -822,46 +872,61 @@ const handleExport = async () => {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
const countData: any = ref([])
|
const countData: any = ref([])
|
||||||
|
const countDataCopy: any = ref([])
|
||||||
const tableHeaderRef = ref()
|
const tableHeaderRef = ref()
|
||||||
//根据选择的指标处理谐波次数
|
|
||||||
const formatCountOptions = (list: any) => {
|
|
||||||
countData.value = []
|
|
||||||
if (list.length != 0) {
|
|
||||||
list.map((item: any, index: any) => {
|
|
||||||
if (!countData.value[index]) {
|
|
||||||
countData.value[index] = {
|
|
||||||
index: item,
|
|
||||||
countOptions: [],
|
|
||||||
count: [],
|
|
||||||
name: indexOptions.value.find((vv: any) => {
|
|
||||||
return vv.id == item
|
|
||||||
})?.name
|
|
||||||
}
|
|
||||||
}
|
|
||||||
legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
|
||||||
//查找相等的指标
|
|
||||||
if (item == vv.dataType) {
|
|
||||||
vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
|
||||||
if (kk.harmStart && kk.harmEnd) {
|
|
||||||
range(0, 0, 0)
|
|
||||||
|
|
||||||
if (kk.showName == '间谐波电压含有率') {
|
//根据选择的指标处理谐波次数
|
||||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
const formatCountOptions = () => {
|
||||||
(item: any) => {
|
|
||||||
return item - 0.5
|
countData.value = []
|
||||||
}
|
console.log(123, indexOptions.value);
|
||||||
)
|
|
||||||
} else {
|
if (searchForm.value.index.length != 0) {
|
||||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
searchForm.value.index.forEach((item: any, index: any) => {
|
||||||
}
|
countDataCopy.value.forEach((vv: any, vvs: any) => {
|
||||||
if (!countData.value[index].count || countData.value[index].count.length == 0) {
|
if (vv.index == item) {
|
||||||
countData.value[index].count = countData.value[index].countOptions[0]
|
countData.value.push(vv)
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
|
// indexOptions.value.map((item: any, index: any) => {
|
||||||
|
// if (!countDataCopy.value[index]) {
|
||||||
|
// countDataCopy.value[index] = {
|
||||||
|
// index: item.id,
|
||||||
|
// countOptions: [],
|
||||||
|
// count: [],
|
||||||
|
// name: indexOptions.value.find((vv: any) => {
|
||||||
|
// return vv.id == item.id
|
||||||
|
// })?.name
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// legendDictList.value?.selectedList?.map((vv: any, vvs: any) => {
|
||||||
|
// //查找相等的指标
|
||||||
|
// if (item.id == vv.dataType) {
|
||||||
|
// vv.eleEpdPqdVOS.map((kk: any, kks: any) => {
|
||||||
|
// if (kk.harmStart && kk.harmEnd) {
|
||||||
|
// range(0, 0, 0)
|
||||||
|
|
||||||
|
// if (kk.showName == '间谐波电压含有率') {
|
||||||
|
// countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1).map(
|
||||||
|
// (item: any) => {
|
||||||
|
// return item - 0.5
|
||||||
|
// }
|
||||||
|
// )
|
||||||
|
// } else {
|
||||||
|
// countDataCopy.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||||
|
// }
|
||||||
|
// if (!countDataCopy.value[index].count || countDataCopy.value[index].count.length == 0) {
|
||||||
|
// countDataCopy.value[index].count = countDataCopy.value[index].countOptions[0]
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// })
|
||||||
|
console.log("🚀 ~ vv.eleEpdPqdVOS.map ~ countData.value:", countDataCopy.value)
|
||||||
|
|
||||||
countData.value.map((item: any, key: any) => {
|
countData.value.map((item: any, key: any) => {
|
||||||
if (item.name.includes('谐波电流有效值')) {
|
if (item.name.includes('谐波电流有效值')) {
|
||||||
item.name = '谐波电流次数'
|
item.name = '谐波电流次数'
|
||||||
@@ -922,26 +987,24 @@ watch(
|
|||||||
() => searchForm.value.index,
|
() => searchForm.value.index,
|
||||||
(val: any, oldval: any) => {
|
(val: any, oldval: any) => {
|
||||||
|
|
||||||
if (val) {
|
// if (val) {
|
||||||
|
|
||||||
|
// let list = val
|
||||||
|
// setTimeout(() => {
|
||||||
|
// formatCountOptions(list)
|
||||||
|
// }, 100)
|
||||||
|
// countData.value.map((item: any, key: any) => {
|
||||||
|
// if (
|
||||||
|
// list.findIndex((vv: any) => {
|
||||||
|
// return vv == item.index
|
||||||
|
// }) == -1
|
||||||
|
// ) {
|
||||||
|
// countData.value.splice(key, 1)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
|
||||||
|
// init(false)
|
||||||
let list = val
|
// }
|
||||||
setTimeout(() => {
|
|
||||||
formatCountOptions(list)
|
|
||||||
}, 100)
|
|
||||||
countData.value.map((item: any, key: any) => {
|
|
||||||
if (
|
|
||||||
list.findIndex((vv: any) => {
|
|
||||||
return vv == item.index
|
|
||||||
}) == -1
|
|
||||||
) {
|
|
||||||
countData.value.splice(key, 1)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
init(false)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
deep: true,
|
deep: true,
|
||||||
@@ -949,6 +1012,7 @@ watch(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
init(true)
|
init(true)
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
|||||||
@@ -64,8 +64,23 @@ const deletes = (row: any) => {
|
|||||||
ElMessageBox.prompt('二次校验密码确认', '·', {
|
ElMessageBox.prompt('二次校验密码确认', '·', {
|
||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
passwordConfirm(value).then(res => {
|
passwordConfirm(value).then(res => {
|
||||||
auditEngineering({
|
auditEngineering({
|
||||||
|
|||||||
@@ -47,11 +47,11 @@
|
|||||||
:before-close="resetForm" draggable width="800px">
|
:before-close="resetForm" draggable width="800px">
|
||||||
<el-form :model="form" label-width="auto" :rules="rules" ref="ruleFormRef" class="form-two">
|
<el-form :model="form" label-width="auto" :rules="rules" ref="ruleFormRef" class="form-two">
|
||||||
<el-form-item label="设备名称:" prop="name">
|
<el-form-item label="设备名称:" prop="name">
|
||||||
<el-input maxlength="32" show-word-limit v-model="form.name" autocomplete="off" clearable
|
<el-input maxlength="32" show-word-limit v-model.trim="form.name" autocomplete="off" clearable
|
||||||
placeholder="请输入(项目名称+设备名称)"></el-input>
|
placeholder="请输入(项目名称+设备名称)"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网络设备ID:" prop="ndid" class="top">
|
<el-form-item label="网络设备ID:" prop="ndid" class="top">
|
||||||
<el-input maxlength="32" show-word-limit v-model="form.ndid" autocomplete="off"
|
<el-input maxlength="32" show-word-limit v-model.trim="form.ndid" autocomplete="off"
|
||||||
placeholder="请输入"></el-input>
|
placeholder="请输入"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="设备类型:" prop="devType" class="top">
|
<el-form-item label="设备类型:" prop="devType" class="top">
|
||||||
@@ -72,6 +72,9 @@
|
|||||||
<el-option label="CLD" value="CLD"></el-option>
|
<el-option label="CLD" value="CLD"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<el-form-item label="排序:" class="top" prop="sort">
|
||||||
|
<el-input maxlength="32" show-word-limit-number v-model.trim="form.sort" :min="0" />
|
||||||
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="合同号:" prop="cntractNo" class="top">
|
<!-- <el-form-item label="合同号:" prop="cntractNo" class="top">
|
||||||
<el-input maxlength="32" show-word-limit v-model="form.cntractNo" autocomplete="off" placeholder="请输入"></el-input>
|
<el-input maxlength="32" show-word-limit v-model="form.cntractNo" autocomplete="off" placeholder="请输入"></el-input>
|
||||||
@@ -123,7 +126,8 @@ const form = reactive({
|
|||||||
devModel: '',
|
devModel: '',
|
||||||
devType: '',
|
devType: '',
|
||||||
name: '',
|
name: '',
|
||||||
ndid: ''
|
ndid: '',
|
||||||
|
sort: 0
|
||||||
})
|
})
|
||||||
const rules = reactive({
|
const rules = reactive({
|
||||||
name: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
|
name: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
|
||||||
@@ -131,7 +135,8 @@ const rules = reactive({
|
|||||||
devType: [{ required: true, message: '设备类型不能为空', trigger: 'change' }],
|
devType: [{ required: true, message: '设备类型不能为空', trigger: 'change' }],
|
||||||
devModel: [{ required: true, message: '设备型号不能为空', trigger: 'change' }],
|
devModel: [{ required: true, message: '设备型号不能为空', trigger: 'change' }],
|
||||||
devAccessMethod: [{ required: true, message: '接入方式不能为空', trigger: 'blur' }],
|
devAccessMethod: [{ required: true, message: '接入方式不能为空', trigger: 'blur' }],
|
||||||
cntractNo: [{ required: true, message: '合同号不能为空', trigger: 'blur' }]
|
cntractNo: [{ required: true, message: '合同号不能为空', trigger: 'blur' }],
|
||||||
|
sort: [{ required: true, message: '排序不能为空', trigger: 'blur' }]
|
||||||
})
|
})
|
||||||
const dialogFormVisible = ref(false)
|
const dialogFormVisible = ref(false)
|
||||||
const dialogTitle = ref('设备出厂管理')
|
const dialogTitle = ref('设备出厂管理')
|
||||||
@@ -233,7 +238,22 @@ const tableStore = new TableStore({
|
|||||||
confirmButtonText: '确认',
|
confirmButtonText: '确认',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
customClass: 'customInput',
|
customClass: 'customInput',
|
||||||
inputType: 'text'
|
inputType: 'text',
|
||||||
|
beforeClose: (action, instance, done) => {
|
||||||
|
|
||||||
|
if (action === 'confirm') {
|
||||||
|
if (instance.inputValue == null) {
|
||||||
|
return ElMessage.warning('请输入密码')
|
||||||
|
} else if (instance.inputValue?.length > 32) {
|
||||||
|
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
}
|
||||||
}).then(({ value }) => {
|
}).then(({ value }) => {
|
||||||
passwordConfirm(value).then(res => {
|
passwordConfirm(value).then(res => {
|
||||||
editEquipmentDelivery({ ...row, status: row.status == 5 ? 1 : row.status, usageStatus: row.usageStatus == 1 ? 0 : 1 }).then(res => {
|
editEquipmentDelivery({ ...row, status: row.status == 5 ? 1 : row.status, usageStatus: row.usageStatus == 1 ? 0 : 1 }).then(res => {
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
</pointTreeWx>
|
</pointTreeWx>
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" :style="height">
|
||||||
<TableHeader ref="TableHeaderRef" >
|
<TableHeader ref="TableHeaderRef" :showReset="false">
|
||||||
<template v-slot:select>
|
<template v-slot:select>
|
||||||
<el-form-item label="模板策略">
|
<el-form-item label="模板策略">
|
||||||
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
|
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ const options = ref([
|
|||||||
{ name: 'APF模块', value: 3 },
|
{ name: 'APF模块', value: 3 },
|
||||||
{ name: '星型接线', value: 4 },
|
{ name: '星型接线', value: 4 },
|
||||||
{ name: '角型接线', value: 5 },
|
{ name: '角型接线', value: 5 },
|
||||||
{ name: 'v型接线', value: 6 },
|
{ name: 'V型接线', value: 6 },
|
||||||
])
|
])
|
||||||
|
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
|
|||||||
@@ -5,11 +5,12 @@
|
|||||||
<el-button :icon='Plus' type='primary' @click='addMenu'>新增</el-button>
|
<el-button :icon='Plus' type='primary' @click='addMenu'>新增</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<el-tabs type="border-card">
|
<Table ref='tableRef' />
|
||||||
|
<!-- <el-tabs type="border-card">
|
||||||
<el-tab-pane v-for="item in tabPane" :label="item.name">
|
<el-tab-pane v-for="item in tabPane" :label="item.name">
|
||||||
<Table ref='tableRef' />
|
|
||||||
</el-tab-pane>
|
</el-tab-pane>
|
||||||
</el-tabs>
|
</el-tabs> -->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -41,14 +42,14 @@ const options = ref([
|
|||||||
{ name: 'APF模块', value: 3 },
|
{ name: 'APF模块', value: 3 },
|
||||||
{ name: '星型接线', value: 4 },
|
{ name: '星型接线', value: 4 },
|
||||||
{ name: '角型接线', value: 5 },
|
{ name: '角型接线', value: 5 },
|
||||||
{ name: 'v型接线', value: 6 },
|
{ name: 'V型接线', value: 6 },
|
||||||
])
|
])
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
showPage: false,
|
showPage: false,
|
||||||
url: '/system-boot/dictTree/query',
|
url: '/system-boot/dictTree/query',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
paramsPOST: true,
|
paramsPOST: true,
|
||||||
publicHeight: 60,
|
// publicHeight: 60,
|
||||||
column: [
|
column: [
|
||||||
{
|
{
|
||||||
title: '序号', width: 80, formatter: (row: any) => {
|
title: '序号', width: 80, formatter: (row: any) => {
|
||||||
@@ -141,7 +142,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
const addMenu = () => {
|
const addMenu = () => {
|
||||||
console.log(bindingRef)
|
console.log(bindingRef)
|
||||||
addRef.value.open('新增菜单', {
|
addRef.value.open('新增', {
|
||||||
sort: tableStore.table.data.length ? tableStore.table.data[tableStore.table.data.length - 1].sort + 1 : 1,
|
sort: tableStore.table.data.length ? tableStore.table.data[tableStore.table.data.length - 1].sort + 1 : 1,
|
||||||
code: '',
|
code: '',
|
||||||
pid: '',
|
pid: '',
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ import { addTheme, updateTheme } from '@/api/system/subject/index'
|
|||||||
const emit = defineEmits(['Cancels'])
|
const emit = defineEmits(['Cancels'])
|
||||||
const configStore = ref({
|
const configStore = ref({
|
||||||
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
// 后台主页面切换动画,可选值<slide-right|slide-left|el-fade-in-linear|el-fade-in|el-zoom-in-center|el-zoom-in-top|el-zoom-in-bottom>
|
||||||
mainAnimation: 'slide-right',
|
mainAnimation: 'el-fade-in',
|
||||||
elementUiPrimary: ['#0e8780', '#0e8780'],
|
elementUiPrimary: ['#0e8780', '#0e8780'],
|
||||||
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
||||||
tableHeaderColor: ['#111', '#fff'],
|
tableHeaderColor: ['#111', '#fff'],
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const tableStore: any = new TableStore({
|
|||||||
},
|
},
|
||||||
{ field: 'name', title: '主题名称' },
|
{ field: 'name', title: '主题名称' },
|
||||||
{ field: 'remark', title: '描述' },
|
{ field: 'remark', title: '描述' },
|
||||||
// { field: 'logoUrl', title: '主题图标', render: 'image' },
|
{ field: 'logoUrl', title: '主题图标', render: 'image' },
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
|
|||||||
@@ -7,29 +7,47 @@
|
|||||||
<div class="login-container-form">
|
<div class="login-container-form">
|
||||||
<div class="title-container">
|
<div class="title-container">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<span style="font-size: 28px">电能质量数据监测云平台</span>
|
<span style="font-size: 28px">{{ getThemeList.name || '电能质量监测系统' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
|
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<el-input ref="usernameRef" v-model="form.username" type="text"
|
<el-input
|
||||||
clearable style="width: 368px" placeholder="用户名" autocomplete="off">
|
ref="usernameRef"
|
||||||
|
v-model="form.username"
|
||||||
|
type="text"
|
||||||
|
clearable
|
||||||
|
placeholder="用户名"
|
||||||
|
autocomplete="off"
|
||||||
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<span class="iconfont icon-yonghu" style="color: #003078"></span>
|
<!-- <span class="iconfont icon-yonghu" style="color: var(--el-color-primary)"></span> -->
|
||||||
|
<Icon name="fa fa-user" style="color: var(--el-color-primary); font-size: 16px" />
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<el-input ref="passwordRef" v-model="form.password" type="password"
|
<el-input
|
||||||
placeholder="密码" show-password style="width: 368px" autocomplete="off">
|
ref="passwordRef"
|
||||||
|
v-model="form.password"
|
||||||
|
type="password"
|
||||||
|
placeholder="密码"
|
||||||
|
autocomplete="off"
|
||||||
|
>
|
||||||
<template #prefix>
|
<template #prefix>
|
||||||
<span class="iconfont icon-mima" style="color: #003078"></span>
|
<Icon name="local-password" style="color: var(--el-color-primary); font-size: 16px" />
|
||||||
|
<!-- <span class="iconfont icon-mima" style="color: var(--el-color-primary)"></span> -->
|
||||||
</template>
|
</template>
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button :loading="state.submitLoading" class="submit-btn" round style="width: 368px" type="info"
|
<el-button
|
||||||
@click="onSubmit(formRef)">
|
:loading="state.submitLoading"
|
||||||
|
class="submit-btn"
|
||||||
|
round
|
||||||
|
type="info"
|
||||||
|
@click="onSubmit(formRef)"
|
||||||
|
>
|
||||||
登录
|
登录
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -50,18 +68,19 @@
|
|||||||
import { onMounted, onBeforeUnmount, reactive, ref, nextTick } from 'vue'
|
import { onMounted, onBeforeUnmount, reactive, ref, nextTick } from 'vue'
|
||||||
import * as pageBubble from '@/utils/pageBubble'
|
import * as pageBubble from '@/utils/pageBubble'
|
||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { gongkey, login } from '@/api/user-boot/user'
|
import { gongkey, login,getSysConfig } from '@/api/user-boot/user'
|
||||||
import { useAdminInfo } from '@/stores/adminInfo'
|
import { useAdminInfo } from '@/stores/adminInfo'
|
||||||
import type { FormInstance, InputInstance, FormRules } from 'element-plus'
|
import type { FormInstance, InputInstance, FormRules } from 'element-plus'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { ADMIN_INFO } from '@/stores/constant/cacheKey'
|
import { ADMIN_INFO } from '@/stores/constant/cacheKey'
|
||||||
import { Local } from '@/utils/storage'
|
import { Local } from '@/utils/storage'
|
||||||
|
import { getTheme } from '@/api/systerm'
|
||||||
|
import { useConfig } from '@/stores/config'
|
||||||
import PopupUpdatePwd from './popupUpdatePwd.vue'
|
import PopupUpdatePwd from './popupUpdatePwd.vue'
|
||||||
import { encrypt } from '@/assets/commjs/sm2.js';
|
|
||||||
|
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
let timer: number
|
let timer: number
|
||||||
|
const configStore = useConfig()
|
||||||
const popupUpdatePwdRef = ref()
|
const popupUpdatePwdRef = ref()
|
||||||
const formRef = ref<FormInstance>()
|
const formRef = ref<FormInstance>()
|
||||||
const usernameRef = ref<InputInstance>()
|
const usernameRef = ref<InputInstance>()
|
||||||
@@ -69,7 +88,7 @@ const passwordRef = ref<InputInstance>()
|
|||||||
const userInfo = useAdminInfo()
|
const userInfo = useAdminInfo()
|
||||||
Local.remove(ADMIN_INFO)
|
Local.remove(ADMIN_INFO)
|
||||||
userInfo.removeToken()
|
userInfo.removeToken()
|
||||||
|
const getThemeList: any = ref([])
|
||||||
interface RuleForm {
|
interface RuleForm {
|
||||||
username: string
|
username: string
|
||||||
password: string
|
password: string
|
||||||
@@ -107,7 +126,29 @@ onBeforeUnmount(() => {
|
|||||||
clearTimeout(timer)
|
clearTimeout(timer)
|
||||||
pageBubble.removeListeners()
|
pageBubble.removeListeners()
|
||||||
})
|
})
|
||||||
|
getTheme().then(res => {
|
||||||
|
document.title = res.data.name || '电能质量在线监测系统'
|
||||||
|
|
||||||
|
let list: any = [
|
||||||
|
'elementUiPrimary',
|
||||||
|
'tableHeaderBackground',
|
||||||
|
'tableHeaderColor',
|
||||||
|
'tableCurrent',
|
||||||
|
'menuBackground',
|
||||||
|
'menuColor',
|
||||||
|
'menuTopBarBackground',
|
||||||
|
'menuActiveBackground',
|
||||||
|
'menuActiveColor',
|
||||||
|
'headerBarTabColor',
|
||||||
|
'headerBarBackground'
|
||||||
|
]
|
||||||
|
getThemeList.value = res.data
|
||||||
|
window.localStorage.setItem('getTheme', JSON.stringify(res.data))
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
configStore.setLayout(list[i], JSON.parse(res.data[list[i]]))
|
||||||
|
}
|
||||||
|
configStore.setLayout('elementUiPrimary', JSON.parse(res.data['elementUiPrimary']))
|
||||||
|
})
|
||||||
const onSubmit = async (formEl: FormInstance | undefined) => {
|
const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||||
if (!formEl) return
|
if (!formEl) return
|
||||||
await formEl.validate((valid, fields) => {
|
await formEl.validate((valid, fields) => {
|
||||||
@@ -123,6 +164,9 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
.then(res => {
|
.then(res => {
|
||||||
userInfo.dataFill(res.data)
|
userInfo.dataFill(res.data)
|
||||||
state.submitLoading = false
|
state.submitLoading = false
|
||||||
|
getSysConfig().then(res => {
|
||||||
|
window.localStorage.setItem('sysdata', JSON.stringify(res.data))
|
||||||
|
})
|
||||||
router.push({
|
router.push({
|
||||||
path: '/'
|
path: '/'
|
||||||
})
|
})
|
||||||
@@ -146,7 +190,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: #003078 !important;
|
background-color: var(--el-color-primary) !important;
|
||||||
background-position: center 110px;
|
background-position: center 110px;
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
background-size: 100%;
|
background-size: 100%;
|
||||||
@@ -264,8 +308,13 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 0px;
|
margin-top: 0px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
background: #4d6ea1;
|
background: var(--el-color-primary-light-3);
|
||||||
|
// background: #009688;
|
||||||
|
//background: #4d6ea1;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
&:hover {
|
||||||
|
background: var(--el-color-primary-light-5);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (max-width: 720px) {
|
@media screen and (max-width: 720px) {
|
||||||
|
|||||||
Reference in New Issue
Block a user