修改浙江无线测试用例bug
This commit is contained in:
@@ -110,3 +110,11 @@ export function queryDictType(data?: any) {
|
||||
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
|
||||
})
|
||||
}
|
||||
//方案数据-》根据测试项获取暂态事件
|
||||
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'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
export const getSysConfig =()=> {
|
||||
return request({
|
||||
url: "/system-boot/config/getSysConfig",
|
||||
method: "get",
|
||||
});
|
||||
}
|
||||
@@ -497,6 +497,7 @@ export default {
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
if (waveDatas[0].unit === '电压') {
|
||||
if (this.value === 1) {
|
||||
unit = 'kV'
|
||||
@@ -506,6 +507,8 @@ export default {
|
||||
} else {
|
||||
unit = 'A'
|
||||
}
|
||||
|
||||
|
||||
//把剩余的DIV先拼接好
|
||||
for (var step = 1; step < waveDatas.length; step++) {
|
||||
var waveId = 'wave' + step
|
||||
|
||||
@@ -4,13 +4,13 @@
|
||||
|
||||
<!-- switch -->
|
||||
<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"
|
||||
:inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||
:model-value="fieldValue.toString()" :loading="row.loading" inline-prompt :active-value="field.activeValue"
|
||||
:active-text="field.activeText" :inactive-value="field.inactiveValue" :inactive-text="field.inactiveText" />
|
||||
|
||||
<!-- 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)]"
|
||||
:src="fullUrl(fieldValue)"></el-image>
|
||||
:src="fieldValue.length > 100 ? fieldValue : fullUrl(fieldValue)"></el-image>
|
||||
</div>
|
||||
|
||||
<!-- tag -->
|
||||
@@ -196,7 +196,7 @@ const handlerCommand = (item: OptButton) => {
|
||||
|
||||
.el-image {
|
||||
height: 36px;
|
||||
width: 36px;
|
||||
// width: 36px;
|
||||
}
|
||||
|
||||
.table-operate-text {
|
||||
|
||||
@@ -158,9 +158,41 @@ const onMenuCollapse = () => {
|
||||
menuCollapse.value = !menuCollapse.value
|
||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||
}
|
||||
const filterNode = (value: string, data: any) => {
|
||||
const filterNode = (value: string, data: any, node: any) => {
|
||||
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>>()
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -8,19 +8,17 @@
|
||||
size="18"
|
||||
/>
|
||||
</div>
|
||||
<!-- <span class="nav-bar-title">{{ getTheme.name }}</span> -->
|
||||
<span class='nav-bar-title'>电能质量数据监测云平台</span>
|
||||
<span class="nav-bar-title">{{ getTheme.name }}</span>
|
||||
<NavMenus />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted } from 'vue'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import NavTabs from '@/layouts/admin/components/navBar/tabs.vue'
|
||||
import NavMenus from '../navMenus.vue'
|
||||
import { showShade } from '@/utils/pageShade'
|
||||
|
||||
import { onMounted } from 'vue'
|
||||
const config = useConfig()
|
||||
const getTheme = JSON.parse(window.localStorage.getItem('getTheme') as string)
|
||||
|
||||
@@ -30,9 +28,9 @@ const onMenuCollapse = () => {
|
||||
})
|
||||
config.setLayout('menuCollapse', false)
|
||||
}
|
||||
// onMounted(() => {
|
||||
// document.title = getTheme.name
|
||||
// })
|
||||
onMounted(() => {
|
||||
document.title = getTheme.name
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
@@ -9,7 +9,7 @@ export const useConfig = defineStore(
|
||||
const layout: Layout = reactive({
|
||||
/* 全局 */
|
||||
showDrawer: false,
|
||||
// 是否收缩布局(小屏设备)
|
||||
// 是否收缩布局(小屏终端)
|
||||
shrink: false,
|
||||
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
|
||||
layoutMode: 'Classic',
|
||||
@@ -111,6 +111,7 @@ export const useConfig = defineStore(
|
||||
|
||||
const getColorVal = function (name: keyof Layout): string {
|
||||
const colors = layout[name] as string[]
|
||||
|
||||
if (layout.isDark) {
|
||||
return colors[1]
|
||||
} else {
|
||||
@@ -120,6 +121,124 @@ export const useConfig = defineStore(
|
||||
|
||||
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: {
|
||||
key: STORE_CONFIG
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
</template> -->
|
||||
<template #select>
|
||||
<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="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -69,12 +69,19 @@ const tableStore = new TableStore({
|
||||
{ title: '项目名称', field: 'projectName', align: 'center' },
|
||||
{
|
||||
title: '告警代码', field: 'code', align: 'center', formatter: (row: any) => {
|
||||
console.log("🚀 ~ row:", row)
|
||||
|
||||
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' }
|
||||
],
|
||||
beforeSearchFun: () => {
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div v-if="view2" style="display: flex">
|
||||
<span style="font-size: 14px; line-height: 30px">值类型选择</span>
|
||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-radio-group v-model="value" @change="changeView">
|
||||
<el-radio-button label="一次值" :value="1" />
|
||||
<el-radio-button label="二次值" :value="2" />
|
||||
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<div v-if="view2" style="display: flex">
|
||||
<span style="font-size: 14px; line-height: 30px">值类型选择:</span>
|
||||
<el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
|
||||
<el-option v-for="item in options" :key="item.value" :label="item.label"
|
||||
:value="item.value"></el-option>
|
||||
</el-select>
|
||||
<el-radio-group v-model="value" @change="changeView">
|
||||
<el-radio-button label="一次值" :value="1" />
|
||||
<el-radio-button label="二次值" :value="2" />
|
||||
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-button v-if="view2" @click="backbxlb" class="el-icon-refresh-right"
|
||||
icon="el-icon-Back" style="float: right">
|
||||
<el-button v-if="view2" @click="backbxlb" class="el-icon-refresh-right" icon="el-icon-Back"
|
||||
style="float: right">
|
||||
返回
|
||||
</el-button>
|
||||
</el-col>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<!-- @init="nodeClick" -->
|
||||
<PointTree @node-click="nodeClick" @pointTypeChange="pointTypeChange"></PointTree>
|
||||
<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>
|
||||
<!-- <el-button v-if="deviceType == '1'" type="primary" @click="handleDownLoadTemplate">
|
||||
模版下载
|
||||
@@ -21,24 +21,49 @@
|
||||
</el-button>
|
||||
</template>
|
||||
<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 label="类型">
|
||||
{{ echoName(deviceData.devType, devTypeOptions) }}
|
||||
{{ echoName(devData.devType, devTypeOptions) }}
|
||||
</el-descriptions-item>
|
||||
|
||||
<el-descriptions-item label="接入方式">
|
||||
{{ deviceData.devAccessMethod ? deviceData.devAccessMethod : '/' }}
|
||||
{{ devData.devAccessMethod ? devData.devAccessMethod : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="网络设备ID">
|
||||
{{ deviceData.ndid ? deviceData.ndid : '/' }}
|
||||
{{ devData.ndid ? devData.ndid : '/' }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="型号">
|
||||
{{ echoName(deviceData.devModel, devModelOptions) }}
|
||||
{{ echoName(devData.devModel, devModelOptions) }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="接入日期">
|
||||
{{ deviceData.time ? deviceData.time : '/' }}
|
||||
</el-descriptions-item>
|
||||
{{ devData.time ? devData.time : '/' }}
|
||||
</el-descriptions-item> -->
|
||||
</el-descriptions>
|
||||
<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"
|
||||
@@ -110,15 +135,15 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<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" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字" v-if="!dataSet.includes('_')">
|
||||
<el-input maxlength="32" show-word-limit v-model="searchValue"
|
||||
autocomplete="off" clearable @input="handleSearch" placeholder="请输入关键词"></el-input>
|
||||
<el-input maxlength="32" show-word-limit v-model="searchValue" autocomplete="off" clearable
|
||||
@input="handleSearch" placeholder="请输入关键词"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -139,7 +164,7 @@
|
||||
height: realTimeFlag ? '30px' : '40px',
|
||||
alignItems: realTimeFlag ? 'flex-end' : 'center'
|
||||
}" v-if="dataSet.includes('_realtimedata') && mqttMessage && mqttMessage.dataTime && sonTab != 2">
|
||||
<p>
|
||||
<p class="mb5">
|
||||
<span v-if="trendDataTime && !realTimeFlag">数据时间:{{ trendDataTime }}</span>
|
||||
<span v-if="realTimeFlag">数据时间:{{ mqttMessage.dataTime }}</span>
|
||||
</p>
|
||||
@@ -360,7 +385,7 @@
|
||||
<div v-if="!tableData" style="height: 42px"></div>
|
||||
</el-tabs>
|
||||
</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>
|
||||
<!-- 离线数据导入组件 -->
|
||||
<!-- <offLineDataImport ref="offLineDataImportRef"></offLineDataImport> -->
|
||||
@@ -379,6 +404,7 @@ import {
|
||||
getHarmRealData,
|
||||
getOverLimitData,
|
||||
queryDictType,
|
||||
getById
|
||||
|
||||
} from '@/api/cs-device-boot/EquipmentDelivery'
|
||||
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 nearRealTimeData from './nearRealTimeData.vue'
|
||||
import testItemRecords from './testItemRecords.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { useRouter } from 'vue-router'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
@@ -401,7 +428,7 @@ import { Histogram, TrendCharts, DataLine, DataAnalysis, Odometer, Monitor, Time
|
||||
import analysisList from './analysisList/index.vue'
|
||||
import mqtt from 'mqtt'
|
||||
defineOptions({
|
||||
name: 'govern/device/control'
|
||||
// name: 'govern/device/control'
|
||||
})
|
||||
const adminInfo = useAdminInfo()
|
||||
const pageHeight = mainHeight(20)
|
||||
@@ -432,8 +459,16 @@ const formInline = reactive({
|
||||
id: '',
|
||||
lineId: '',
|
||||
targetType: '',
|
||||
dataSource: '',
|
||||
dataLevel: 'Secondary'
|
||||
})
|
||||
const dataSourceList = [{
|
||||
id: '0',
|
||||
name: '补召'
|
||||
}, {
|
||||
id: '1',
|
||||
name: '在线监测'
|
||||
}]
|
||||
const oddAndEvenList = [
|
||||
{
|
||||
value: '3',
|
||||
@@ -455,6 +490,11 @@ const detail = ref<any>(null)
|
||||
const realTimeFlag = ref(true)
|
||||
//实时数据子菜单
|
||||
const sonTab = ref()
|
||||
const dictData = useDictData()
|
||||
//电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//接线方式
|
||||
const volConTypeList = dictData.getBasicData('Dev_Connect')
|
||||
//实时录波
|
||||
// const handleRecordWaves = () => {
|
||||
// realTimeFlag.value = false
|
||||
@@ -645,12 +685,17 @@ const handleaddDevice = () => {
|
||||
}
|
||||
//树节点点击事件
|
||||
const deviceId: any = ref('')
|
||||
const devData: any = ref({})
|
||||
const lineId: any = ref('')
|
||||
const dataLevel: any = ref('')
|
||||
const dataSource = ref([])
|
||||
const nodeClick = async (e: anyObj) => {
|
||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
if (e.level == 2) return
|
||||
console.log("🚀 ~ nodeClick ~ e:", e)
|
||||
|
||||
|
||||
if (e==undefined || e.level == 2){
|
||||
return loading.value = false
|
||||
}
|
||||
searchValue.value = ''
|
||||
await queryDictType({
|
||||
lineId: e?.id,
|
||||
@@ -676,6 +721,10 @@ const nodeClick = async (e: anyObj) => {
|
||||
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)
|
||||
.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
|
||||
formInline.dataLevel = res.data.dataLevel
|
||||
@@ -784,6 +833,7 @@ const getRealDataMqttMsg = async () => {
|
||||
// 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
|
||||
// console.log("🚀 ~ mqttRef.value.on ~ obj:", obj)
|
||||
// console.log("🚀 ~ mqttRef.value.on ~ formInline.dataLevel:", obj.dataLevel, formInline.dataLevel)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<template>
|
||||
<div class="home">
|
||||
<div class="home_header">
|
||||
<el-form-item label="值类型选择">
|
||||
<!-- <el-form-item label="值类型选择">
|
||||
<el-select @change="changeView" v-model="value" placeholder="请选择值类型">
|
||||
<el-option
|
||||
v-for="(item, index) in options"
|
||||
@@ -11,27 +11,27 @@
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</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-button @click="handleBack" :icon="Back">返回</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
<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;'">
|
||||
<shushiboxi
|
||||
v-if="isWp && wp && activeName == 'ssbx'"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></shushiboxi>
|
||||
<shushiboxi v-if="isWp && wp && activeName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
</shushiboxi>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="RMS波形" name="rmsbx" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
|
||||
<rmsboxi
|
||||
v-if="isWp && wp && activeName == 'rmsbx'"
|
||||
:value="value"
|
||||
:boxoList="boxoList"
|
||||
:wp="wp"
|
||||
></rmsboxi>
|
||||
<rmsboxi v-if="isWp && wp && activeName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList"
|
||||
:wp="wp">
|
||||
</rmsboxi>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
@@ -127,7 +127,7 @@ const handleClick = (tab: any, event: any) => {
|
||||
const handleBack = () => {
|
||||
emit('handleHideCharts')
|
||||
}
|
||||
onMounted(() => {})
|
||||
onMounted(() => { })
|
||||
defineExpose({ getWpData })
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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" />
|
||||
<waveFormAnalysis
|
||||
v-if="isWaveCharts"
|
||||
|
||||
@@ -49,7 +49,8 @@
|
||||
</TableHeader>
|
||||
</div>
|
||||
<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>
|
||||
</template>
|
||||
@@ -76,7 +77,7 @@ const props = defineProps({
|
||||
}
|
||||
})
|
||||
console.log("🚀 ~ props:", props.TrendList)
|
||||
|
||||
const showEchart = ref(true)
|
||||
//电压等级
|
||||
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 => {
|
||||
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()
|
||||
@@ -171,7 +207,7 @@ const init = async () => {
|
||||
//颜色数组
|
||||
const colorList = color
|
||||
//选择的指标使用方法处理
|
||||
formatCountOptions(searchForm.value.index)
|
||||
formatCountOptions()
|
||||
//查询历史趋势
|
||||
historyDataList.value = []
|
||||
chartTitle.value = ''
|
||||
@@ -212,9 +248,15 @@ const init = async () => {
|
||||
}
|
||||
if (obj.devId && obj.list.length != 0) {
|
||||
try {
|
||||
showEchart.value = true
|
||||
await getTabsDataByType(obj)
|
||||
.then((res: any) => {
|
||||
if (res.code == 'A0000') {
|
||||
if (res.data.length == 0) {
|
||||
loading.value = false
|
||||
showEchart.value = false
|
||||
return
|
||||
}
|
||||
historyDataList.value = res.data
|
||||
let chartsList = JSON.parse(JSON.stringify(res.data))
|
||||
echartsData.value = {}
|
||||
@@ -578,47 +620,56 @@ const handleExport = async () => {
|
||||
return
|
||||
}
|
||||
const countData: any = ref([])
|
||||
const countDataCopy: any = ref([])
|
||||
|
||||
//根据选择的指标处理谐波次数
|
||||
const formatCountOptions = (list: any) => {
|
||||
const formatCountOptions = () => {
|
||||
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)
|
||||
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]
|
||||
}
|
||||
}
|
||||
})
|
||||
if (searchForm.value.index.length != 0) {
|
||||
searchForm.value.index.forEach((item: any, index: any) => {
|
||||
countDataCopy.value.forEach((vv: any, vvs: any) => {
|
||||
if (vv.index == item) {
|
||||
countData.value.push(vv)
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
// 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) => {
|
||||
if (item.name == '谐波电流有效值') {
|
||||
item.name = '谐波电流次数'
|
||||
@@ -651,7 +702,7 @@ const onIndexChange = (val: any) => {
|
||||
})
|
||||
searchForm.value.index = pp
|
||||
flag.value = true
|
||||
|
||||
formatCountOptions()
|
||||
|
||||
// if (val.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
@@ -660,23 +711,23 @@ const onIndexChange = (val: any) => {
|
||||
watch(
|
||||
() => searchForm.value.index,
|
||||
(val: any, oldval: any) => {
|
||||
if (val) {
|
||||
setTimeout(() => {
|
||||
formatCountOptions(val)
|
||||
}, 100)
|
||||
if (val == 0) {
|
||||
countData.value = []
|
||||
}
|
||||
countData.value.map((item: any, key: any) => {
|
||||
if (
|
||||
val.findIndex((vv: any) => {
|
||||
return vv == item.index
|
||||
}) == -1
|
||||
) {
|
||||
countData.value.splice(key, 1)
|
||||
}
|
||||
})
|
||||
}
|
||||
// if (val) {
|
||||
// setTimeout(() => {
|
||||
// formatCountOptions(val)
|
||||
// }, 100)
|
||||
// if (val == 0) {
|
||||
// countData.value = []
|
||||
// }
|
||||
// countData.value.map((item: any, key: any) => {
|
||||
// if (
|
||||
// val.findIndex((vv: any) => {
|
||||
// return vv == item.index
|
||||
// }) == -1
|
||||
// ) {
|
||||
// countData.value.splice(key, 1)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
|
||||
@@ -35,12 +35,11 @@ const column: any = ref([
|
||||
{ field: 'itemName', title: '数据来源', width: '100px' },
|
||||
{ field: 'statisticalInterval', title: '时间间隔(分钟)', width: '120px', },
|
||||
{ field: 'voltageLevel', title: '电压等级', width: '100px', 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: 'capacitySt', title: '供电设备容量(MVA)', width: '140px', },
|
||||
{ field: 'capacitySscb', title: '基准短路容量(MVA)', width: '140px', },
|
||||
@@ -58,10 +57,6 @@ const setData = (data: any) => {
|
||||
const formatter = (row: any) => {
|
||||
if (row.column.field == 'voltageLevel') {
|
||||
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') {
|
||||
return row.cellValue == null ? '/' : volConTypeList.filter((item: any) => item.id == row.cellValue)[0]?.name
|
||||
} else {
|
||||
@@ -77,8 +72,22 @@ const remove = (row: any) => {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
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 }) => {
|
||||
|
||||
passwordConfirm(value).then(res => {
|
||||
console.log('密码正确');
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<el-input maxlength="32" show-word-limit style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称"
|
||||
clearable v-model="filterText" type="text"></el-input>
|
||||
<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) => {
|
||||
handleUpload(file, fileList, activePath)
|
||||
}
|
||||
@@ -130,7 +130,7 @@
|
||||
<el-form ref="formRef" :model="form"
|
||||
:rules="{ path: [{ required: true, message: '请输入文件夹名称', trigger: 'blur' }] }">
|
||||
<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>
|
||||
<template #footer>
|
||||
@@ -249,7 +249,22 @@ const handleRestartDevice = () => {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
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 }) => {
|
||||
if (!value) {
|
||||
@@ -386,6 +401,7 @@ const reloadCurrentMenu = (msg: string) => {
|
||||
}
|
||||
})
|
||||
loading.value = false
|
||||
|
||||
if (!msg) return
|
||||
ElMessage({ message: msg, type: 'success', duration: 5000 })
|
||||
}
|
||||
@@ -417,11 +433,26 @@ const submitDeviceDir = () => {
|
||||
}
|
||||
//删除文件夹或文件
|
||||
const handleDelDirOrFile = (row: any) => {
|
||||
ElMessageBox.prompt('二次校验密码确认', '删除', {
|
||||
ElMessageBox.prompt('二次校验密码确认', '', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
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 }) => {
|
||||
if (!value) {
|
||||
ElMessage.warning('请输入密码')
|
||||
|
||||
@@ -204,7 +204,22 @@ const handleRestartDevice = () => {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
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 }) => {
|
||||
if (!value) {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>绑定测试项</span>
|
||||
<span>数据绑定</span>
|
||||
</template>
|
||||
<SetUp @click.stop="bind(node, data)" />
|
||||
</el-tooltip>
|
||||
@@ -70,7 +70,7 @@
|
||||
<el-icon :style="{ color: '#0000FF' }">
|
||||
<el-tooltip placement="bottom" :hide-after="0">
|
||||
<template #content>
|
||||
<span>修改测试项</span>
|
||||
<span> {{ data.pid ? '修改测试项' : ' 修改测试方案' }}</span>
|
||||
</template>
|
||||
|
||||
<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 { delRecord } from '@/api/cs-device-boot/planData'
|
||||
import popup from './popup.vue'
|
||||
import { getDeviceList } from '@/api/cs-device-boot/planData'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'govern/schemeTree'
|
||||
@@ -112,6 +113,7 @@ interface Props {
|
||||
width?: string
|
||||
canExpand?: boolean
|
||||
}
|
||||
|
||||
const visible1 = ref(false)
|
||||
const visible2 = ref(false)
|
||||
const visible3 = ref(false)
|
||||
@@ -269,10 +271,20 @@ const edit = async (node: Node, data: any) => {
|
||||
.catch(e => { })
|
||||
}
|
||||
/** 删除树节点 */
|
||||
const del = (node: Node, data: any) => {
|
||||
const del =async (node: Node, data: any) => {
|
||||
let titleList = ''
|
||||
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: '确定',
|
||||
cancelButtonText: '取消',
|
||||
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()
|
||||
},
|
||||
//组件搜索
|
||||
filterNode(value, data) {
|
||||
filterNode(value, data, node) {
|
||||
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">
|
||||
<!-- <h3 class="mt10 mb10">历史趋势</h3> -->
|
||||
<el-tabs type="border-card" class="mt10">
|
||||
<el-tab-pane label="历史趋势">
|
||||
<el-tabs v-model="childTab" type="border-card" class="mt10">
|
||||
<el-tab-pane label="历史趋势" name="0">
|
||||
<div class="history_trend" v-if="titleList != '(未绑定数据)'">
|
||||
<div class="history_header" ref="headerRef">
|
||||
<!-- <el-form :model="searchForm" class="history_select" id="history_select"> -->
|
||||
@@ -117,6 +117,17 @@
|
||||
:label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</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-select style="width: 120px" v-model="searchForm.type"
|
||||
placeholder="请选择值类型">
|
||||
@@ -124,12 +135,8 @@
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
</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"
|
||||
:label="item.name.includes('次数') ? item.name : item.name.includes('幅值') ? item.name.slice(0, -2) + '次数' : item.name + '谐波次数'"
|
||||
v-show="item.countOptions.length != 0">
|
||||
@@ -162,8 +169,8 @@
|
||||
</div>
|
||||
<el-empty :style="EcharHeight" v-else description="未绑定数据" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂态数据">
|
||||
暂态数据
|
||||
<el-tab-pane label="暂态数据" name="1">
|
||||
<transient :activeName='activeName' ref="transientRef" />
|
||||
</el-tab-pane>
|
||||
|
||||
</el-tabs>
|
||||
@@ -192,12 +199,15 @@ import { color, gradeColor3 } from '@/components/echarts/color'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { getDeviceList } from '@/api/cs-device-boot/planData'
|
||||
import transient from './components/transient.vue'
|
||||
const dictData = useDictData()
|
||||
defineOptions({
|
||||
// name: 'govern/device/planData/index'
|
||||
})
|
||||
const childTab = ref('0')
|
||||
const num = ref(0)
|
||||
const config = useConfig()
|
||||
const transientRef = ref()
|
||||
color[0] = config.layout.elementUiPrimary[0]
|
||||
//电压等级
|
||||
const voltageLevelList = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
@@ -249,6 +259,41 @@ queryByCode('portable-harmonic').then(res => {
|
||||
})
|
||||
queryStatistical(res.data.id).then(vv => {
|
||||
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()
|
||||
@@ -284,17 +329,19 @@ const nodeClick = async (e: anyObj) => {
|
||||
if (res.data.records.length == 1) {
|
||||
activeName.value = res.data.records[0].id
|
||||
} else {
|
||||
res.data.records.map((item: any, index: any) => {
|
||||
//多层
|
||||
|
||||
for (const item of res.data.records) {
|
||||
if (item.id == e.id) {
|
||||
activeName.value = item.id
|
||||
return
|
||||
} else {
|
||||
activeName.value = res.data.records[0].id
|
||||
return
|
||||
activeName.value = item.id;
|
||||
break; // 找到匹配项后停止遍历
|
||||
}
|
||||
})
|
||||
}
|
||||
// 如果没有找到匹配项,默认设置为第一个元素的id
|
||||
if (activeName.value !== e.id) { // 假设e.id是一个用于比较的初始值,表示未找到匹配项
|
||||
activeName.value = res.data.records[0].id;
|
||||
}
|
||||
}
|
||||
|
||||
// if (searchForm.value.index.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
// }
|
||||
@@ -307,6 +354,7 @@ const nodeClick = async (e: anyObj) => {
|
||||
} else {
|
||||
init(false)
|
||||
}
|
||||
transientRef.value && transientRef.value.init()
|
||||
}, 100)
|
||||
|
||||
loading.value = false
|
||||
@@ -326,6 +374,8 @@ const onIndexChange = (val: any) => {
|
||||
}
|
||||
})
|
||||
searchForm.value.index = pp
|
||||
formatCountOptions()
|
||||
|
||||
// if (val.length == 0) {
|
||||
// searchForm.value.index = [indexOptions.value[0].id]
|
||||
// }
|
||||
@@ -402,7 +452,7 @@ const init = (flag: boolean) => {
|
||||
|
||||
|
||||
//选择的指标使用方法处理
|
||||
formatCountOptions(searchForm.value.index)
|
||||
formatCountOptions()
|
||||
//查询历史趋势
|
||||
historyDataList.value = []
|
||||
let middleTitle = ''
|
||||
@@ -822,46 +872,61 @@ const handleExport = async () => {
|
||||
return
|
||||
}
|
||||
const countData: any = ref([])
|
||||
const countDataCopy: any = 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(
|
||||
(item: any) => {
|
||||
return item - 0.5
|
||||
}
|
||||
)
|
||||
} else {
|
||||
countData.value[index].countOptions = range(kk.harmStart, kk.harmEnd, 1)
|
||||
}
|
||||
if (!countData.value[index].count || countData.value[index].count.length == 0) {
|
||||
countData.value[index].count = countData.value[index].countOptions[0]
|
||||
}
|
||||
}
|
||||
})
|
||||
//根据选择的指标处理谐波次数
|
||||
const formatCountOptions = () => {
|
||||
|
||||
countData.value = []
|
||||
console.log(123, indexOptions.value);
|
||||
|
||||
if (searchForm.value.index.length != 0) {
|
||||
searchForm.value.index.forEach((item: any, index: any) => {
|
||||
countDataCopy.value.forEach((vv: any, vvs: any) => {
|
||||
if (vv.index == item) {
|
||||
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) => {
|
||||
if (item.name.includes('谐波电流有效值')) {
|
||||
item.name = '谐波电流次数'
|
||||
@@ -922,26 +987,24 @@ watch(
|
||||
() => searchForm.value.index,
|
||||
(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)
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
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)
|
||||
}
|
||||
// init(false)
|
||||
// }
|
||||
},
|
||||
{
|
||||
deep: true,
|
||||
@@ -949,6 +1012,7 @@ watch(
|
||||
}
|
||||
)
|
||||
onMounted(() => {
|
||||
|
||||
setTimeout(() => {
|
||||
init(true)
|
||||
}, 1500)
|
||||
|
||||
@@ -64,8 +64,23 @@ const deletes = (row: any) => {
|
||||
ElMessageBox.prompt('二次校验密码确认', '·', {
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
customClass: 'customInput',
|
||||
inputType: 'text'
|
||||
customClass: 'customInput',
|
||||
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 }) => {
|
||||
passwordConfirm(value).then(res => {
|
||||
auditEngineering({
|
||||
|
||||
@@ -47,11 +47,11 @@
|
||||
:before-close="resetForm" draggable width="800px">
|
||||
<el-form :model="form" label-width="auto" :rules="rules" ref="ruleFormRef" class="form-two">
|
||||
<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>
|
||||
</el-form-item>
|
||||
<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>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型:" prop="devType" class="top">
|
||||
@@ -72,6 +72,9 @@
|
||||
<el-option label="CLD" value="CLD"></el-option>
|
||||
</el-select>
|
||||
</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-input maxlength="32" show-word-limit v-model="form.cntractNo" autocomplete="off" placeholder="请输入"></el-input>
|
||||
@@ -123,7 +126,8 @@ const form = reactive({
|
||||
devModel: '',
|
||||
devType: '',
|
||||
name: '',
|
||||
ndid: ''
|
||||
ndid: '',
|
||||
sort: 0
|
||||
})
|
||||
const rules = reactive({
|
||||
name: [{ required: true, message: '设备名不能为空', trigger: 'blur' }],
|
||||
@@ -131,7 +135,8 @@ const rules = reactive({
|
||||
devType: [{ required: true, message: '设备类型不能为空', trigger: 'change' }],
|
||||
devModel: [{ required: true, message: '设备型号不能为空', trigger: 'change' }],
|
||||
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 dialogTitle = ref('设备出厂管理')
|
||||
@@ -233,7 +238,22 @@ const tableStore = new TableStore({
|
||||
confirmButtonText: '确认',
|
||||
cancelButtonText: '取消',
|
||||
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 }) => {
|
||||
passwordConfirm(value).then(res => {
|
||||
editEquipmentDelivery({ ...row, status: row.status == 5 ? 1 : row.status, usageStatus: row.usageStatus == 1 ? 0 : 1 }).then(res => {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</pointTreeWx>
|
||||
</pane>
|
||||
<pane style="background: #fff" :style="height">
|
||||
<TableHeader ref="TableHeaderRef" >
|
||||
<TableHeader ref="TableHeaderRef" :showReset="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="模板策略">
|
||||
<el-select v-model="Template" @change="changetype" placeholder="请选择模版" value-key="id">
|
||||
|
||||
@@ -59,7 +59,7 @@ const options = ref([
|
||||
{ name: 'APF模块', value: 3 },
|
||||
{ name: '星型接线', value: 4 },
|
||||
{ name: '角型接线', value: 5 },
|
||||
{ name: 'v型接线', value: 6 },
|
||||
{ name: 'V型接线', value: 6 },
|
||||
])
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
@@ -5,11 +5,12 @@
|
||||
<el-button :icon='Plus' type='primary' @click='addMenu'>新增</el-button>
|
||||
</template>
|
||||
</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">
|
||||
<Table ref='tableRef' />
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tabs> -->
|
||||
|
||||
|
||||
|
||||
@@ -41,14 +42,14 @@ const options = ref([
|
||||
{ name: 'APF模块', value: 3 },
|
||||
{ name: '星型接线', value: 4 },
|
||||
{ name: '角型接线', value: 5 },
|
||||
{ name: 'v型接线', value: 6 },
|
||||
{ name: 'V型接线', value: 6 },
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
url: '/system-boot/dictTree/query',
|
||||
method: 'POST',
|
||||
paramsPOST: true,
|
||||
publicHeight: 60,
|
||||
// publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
title: '序号', width: 80, formatter: (row: any) => {
|
||||
@@ -141,7 +142,7 @@ onMounted(() => {
|
||||
|
||||
const addMenu = () => {
|
||||
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,
|
||||
code: '',
|
||||
pid: '',
|
||||
|
||||
@@ -105,7 +105,7 @@ import { addTheme, updateTheme } from '@/api/system/subject/index'
|
||||
const emit = defineEmits(['Cancels'])
|
||||
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>
|
||||
mainAnimation: 'slide-right',
|
||||
mainAnimation: 'el-fade-in',
|
||||
elementUiPrimary: ['#0e8780', '#0e8780'],
|
||||
tableHeaderBackground: ['#F3F6F9', '#F3F6F9'],
|
||||
tableHeaderColor: ['#111', '#fff'],
|
||||
|
||||
@@ -41,7 +41,7 @@ const tableStore: any = new TableStore({
|
||||
},
|
||||
{ field: 'name', title: '主题名称' },
|
||||
{ field: 'remark', title: '描述' },
|
||||
// { field: 'logoUrl', title: '主题图标', render: 'image' },
|
||||
{ field: 'logoUrl', title: '主题图标', render: 'image' },
|
||||
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@@ -7,29 +7,47 @@
|
||||
<div class="login-container-form">
|
||||
<div class="title-container">
|
||||
<div class="title">
|
||||
<span style="font-size: 28px">电能质量数据监测云平台</span>
|
||||
<span style="font-size: 28px">{{ getThemeList.name || '电能质量监测系统' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<el-form :rules="rules" ref="formRef" size="large" class="login-form" :model="form">
|
||||
<el-form-item prop="username">
|
||||
<el-input ref="usernameRef" v-model="form.username" type="text"
|
||||
clearable style="width: 368px" placeholder="用户名" autocomplete="off">
|
||||
<el-input
|
||||
ref="usernameRef"
|
||||
v-model="form.username"
|
||||
type="text"
|
||||
clearable
|
||||
placeholder="用户名"
|
||||
autocomplete="off"
|
||||
>
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input ref="passwordRef" v-model="form.password" type="password"
|
||||
placeholder="密码" show-password style="width: 368px" autocomplete="off">
|
||||
<el-input
|
||||
ref="passwordRef"
|
||||
v-model="form.password"
|
||||
type="password"
|
||||
placeholder="密码"
|
||||
autocomplete="off"
|
||||
>
|
||||
<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>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button :loading="state.submitLoading" class="submit-btn" round style="width: 368px" type="info"
|
||||
@click="onSubmit(formRef)">
|
||||
<el-button
|
||||
:loading="state.submitLoading"
|
||||
class="submit-btn"
|
||||
round
|
||||
type="info"
|
||||
@click="onSubmit(formRef)"
|
||||
>
|
||||
登录
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
@@ -50,18 +68,19 @@
|
||||
import { onMounted, onBeforeUnmount, reactive, ref, nextTick } from 'vue'
|
||||
import * as pageBubble from '@/utils/pageBubble'
|
||||
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 type { FormInstance, InputInstance, FormRules } from 'element-plus'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ADMIN_INFO } from '@/stores/constant/cacheKey'
|
||||
import { Local } from '@/utils/storage'
|
||||
import { getTheme } from '@/api/systerm'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import PopupUpdatePwd from './popupUpdatePwd.vue'
|
||||
import { encrypt } from '@/assets/commjs/sm2.js';
|
||||
|
||||
const router = useRouter()
|
||||
let timer: number
|
||||
|
||||
const configStore = useConfig()
|
||||
const popupUpdatePwdRef = ref()
|
||||
const formRef = ref<FormInstance>()
|
||||
const usernameRef = ref<InputInstance>()
|
||||
@@ -69,7 +88,7 @@ const passwordRef = ref<InputInstance>()
|
||||
const userInfo = useAdminInfo()
|
||||
Local.remove(ADMIN_INFO)
|
||||
userInfo.removeToken()
|
||||
|
||||
const getThemeList: any = ref([])
|
||||
interface RuleForm {
|
||||
username: string
|
||||
password: string
|
||||
@@ -107,7 +126,29 @@ onBeforeUnmount(() => {
|
||||
clearTimeout(timer)
|
||||
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) => {
|
||||
if (!formEl) return
|
||||
await formEl.validate((valid, fields) => {
|
||||
@@ -123,6 +164,9 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
.then(res => {
|
||||
userInfo.dataFill(res.data)
|
||||
state.submitLoading = false
|
||||
getSysConfig().then(res => {
|
||||
window.localStorage.setItem('sysdata', JSON.stringify(res.data))
|
||||
})
|
||||
router.push({
|
||||
path: '/'
|
||||
})
|
||||
@@ -146,7 +190,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
width: 100%;
|
||||
min-height: 100%;
|
||||
overflow: hidden;
|
||||
background-color: #003078 !important;
|
||||
background-color: var(--el-color-primary) !important;
|
||||
background-position: center 110px;
|
||||
background-repeat: repeat;
|
||||
background-size: 100%;
|
||||
@@ -264,8 +308,13 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
||||
width: 100%;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 20px;
|
||||
background: #4d6ea1;
|
||||
background: var(--el-color-primary-light-3);
|
||||
// background: #009688;
|
||||
//background: #4d6ea1;
|
||||
border-radius: 0;
|
||||
&:hover {
|
||||
background: var(--el-color-primary-light-5);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 720px) {
|
||||
|
||||
Reference in New Issue
Block a user