修改海南测试问题

This commit is contained in:
GGJ
2024-11-21 11:36:36 +08:00
parent 5b0e94cf68
commit 94ac7ee227
11 changed files with 99 additions and 99 deletions

View File

@@ -86,9 +86,40 @@ 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 onAddTree = () => {

View File

@@ -45,7 +45,7 @@ const formData = ref({
loadType: null,
manufacturer: null,
serverName: 'event-boot',
statisticalType: classificationData[2].id,
statisticalType: classificationData[0].id,
scale: null
})
const loadData = () => {
@@ -68,16 +68,16 @@ const loadData = () => {
]
}
res.data.forEach((item: any) => {
item.icon = 'fa-solid fa-synagogue'
item.icon = 'el-icon-HomeFilled'
item.color = config.getColorVal('elementUiPrimary')
item.children.forEach((item2: any) => {
item2.icon = 'fa-solid fa-city'
item2.icon = 'el-icon-CollectionTag'
item.color = config.getColorVal('elementUiPrimary')
item2.children.forEach((item3: any) => {
item3.icon = 'fa-solid fa-building'
item3.icon = 'el-icon-Flag'
item3.color = config.getColorVal('elementUiPrimary')
item3.children.forEach((item4: any) => {
item4.icon = 'fa-solid fa-tower-observation'
item4.icon = 'el-icon-OfficeBuilding'
item4.color = config.getColorVal('elementUiPrimary')
item4.children.forEach((item5: anyObj) => {
item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
@@ -99,7 +99,7 @@ const loadData = () => {
nodeKey = res.data[0].children[0].children[0].children[0].children[0].id
emit('init', res.data[0].children[0].children[0].children[0].children[0])
tree.value = res.data[0].children
tree.value = res.data
if (nodeKey) {
nextTick(() => {
treeRef.value.treeRef.setCurrentKey(nodeKey)

View File

@@ -16,14 +16,7 @@
<Icon name="el-icon-Search" style="font-size: 16px" />
</template>
</el-input>
<!-- <Icon
@click="onMenuCollapse"
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
:class="menuCollapse ? 'unfold' : ''"
size="18"
class="fold ml10 menu-collapse"
style="cursor: pointer"
/> -->
</div>
<el-tree
style="flex: 1; overflow: auto"

View File

@@ -45,7 +45,7 @@ const formData = ref({
loadType: null,
manufacturer: null,
serverName: 'event-boot',
statisticalType: classificationData[2].id,
statisticalType: classificationData[0].id,
scale: null
})
const loadData = () => {

View File

@@ -39,14 +39,14 @@
</el-dropdown-menu>
</template>
</el-dropdown>
<div @click="configStore.setLayout('showDrawer', true)" class="nav-menu-item">
<!-- <div @click="configStore.setLayout('showDrawer', true)" class="nav-menu-item">
<Icon
:color="configStore.getColorVal('headerBarTabColor')"
class="nav-menu-icon"
name="fa fa-cogs"
size="18"
/>
</div>
</div> -->
<Config />
<PopupPwd ref="popupPwd" />
<AdminInfo ref="popupAdminInfo" />

View File

@@ -12,7 +12,7 @@ export const useConfig = defineStore(
// 是否收缩布局(小屏终端)
shrink: false,
// 后台布局方式,可选值<Default|Classic|Streamline|Double>
layoutMode: 'Streamline',
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: 'slide-right',
// 是否暗黑模式

View File

@@ -2,14 +2,10 @@
<div>
<splitpanes :style="{ height: height }" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<bearingTree
ref="TreeRef"
:default-expand-all="false"
<bearingTree ref="TreeRef" :default-expand-all="false"
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
:current-node-key="monitoringPoint.state.lineId"
@node-click="handleNodeClick"
@init="handleNodeClick"
></bearingTree>
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
@init="handleNodeClick"></bearingTree>
</pane>
<pane style="background: #fff">
<el-form :inline="true" v-show="props.rowList.id == undefined">
@@ -31,16 +27,9 @@
<div v-loading="loading">
<el-descriptions class="mb10" title="基础数据" :column="2" size="" border>
<el-descriptions-item label="待评估用户" label-align="center" width="25%">
<el-select
v-model="user"
placeholder="请选择待评估用户"
size="small"
filterable
:disabled="props.rowList.id != undefined"
style="width: 240px"
value-key="userId"
@change="userChange"
>
<el-select v-model="user" placeholder="请选择待评估用户" size="small" filterable
:disabled="props.rowList.id != undefined" style="width: 240px" value-key="userId"
@change="userChange">
<el-option v-for="item in userList" :key="item" :label="item.userName" :value="item" />
</el-select>
</el-descriptions-item>
@@ -63,17 +52,10 @@
</el-tab-pane>
<el-tab-pane label="谐波电流幅值" name="3" class="mt10">
<div style="position: relative; height: 32px">
<el-select
v-model="harmonicValue"
style="position: absolute; right: 0px; width: 200px"
placeholder="请选择谐波"
>
<el-option
v-for="item in harmonic"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
<el-select v-model="harmonicValue" style="position: absolute; right: 0px; width: 200px"
placeholder="请选择谐波">
<el-option v-for="item in harmonic" :key="item.value" :label="item.label"
:value="item.value"></el-option>
</el-select>
</div>
<MyEChart :options="options3" />
@@ -92,19 +74,10 @@
</el-tabs>
<div class="bottomBox">
<el-row v-if="showAssess">
<el-col
:span="16"
:style="`height: calc(${tabsHeight} / 2 - ${
props.rowList.id == undefined ? 12 + 45 : 12
}px)`"
>
<vxe-table
style="flex: 1.5"
v-bind="defaultAttribute"
height="auto"
ref="xTable"
:data="tableData"
>
<el-col :span="16" :style="`height: calc(${tabsHeight} / 2 - ${props.rowList.id == undefined ? 12 + 45 : 12
}px)`">
<vxe-table style="flex: 1.5" v-bind="defaultAttribute" height="auto" ref="xTable"
:data="tableData">
<vxe-colgroup field="group0" title="等级">
<vxe-column field="name" width="180" title="结果"></vxe-column>
</vxe-colgroup>
@@ -134,22 +107,14 @@
</vxe-column>
</vxe-table>
</el-col>
<el-col
:span="8"
:style="`height: calc(${tabsHeight} / 2 - ${
props.rowList.id == undefined ? 62 + 45 : 62
}px)`"
>
<el-col :span="8" :style="`height: calc(${tabsHeight} / 2 - ${props.rowList.id == undefined ? 62 + 45 : 62
}px)`">
<MyEChart style="flex: 1" :options="pieCharts" />
</el-col>
</el-row>
<el-button
type="primary"
icon="el-icon-Document"
@click="assess"
v-show="showBtn && props.rowList.id == undefined"
>
<el-button type="primary" icon="el-icon-Document" @click="assess"
v-show="showBtn && props.rowList.id == undefined">
承载能力评估
</el-button>
</div>
@@ -188,7 +153,7 @@ const props = defineProps(['rowList'])
const harmonic = harmonicOptions.filter(item => item.value < 26)
const monitoringPoint = useMonitoringPoint()
const size = ref(20)
const size = ref(0)
const dictData = useDictData()
const datePickerRef = ref()
const height = mainHeight(80).height
@@ -251,8 +216,10 @@ const dotList: any = ref({
})
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
size.value = Math.round((180 / dom.offsetHeight) * 100)
size.value = Math.round((180 / (dom.offsetHeight + 60)) * 100)
}
datePickerRef.value.setTimeOptions([{ label: '周', value: 4 }])
datePickerRef.value.setInterval(4)
@@ -336,7 +303,7 @@ const modelTrain = () => {
startTime: datePickerRef.value.timeValue[0],
time: 0,
userId: dictData.state.area[0].id
}).then(res => {})
}).then(res => { })
}
const setEChart = (val: any, data: any, text: string, name: string) => {
@@ -401,10 +368,10 @@ const setEChart = (val: any, data: any, text: string, name: string) => {
val == 1
? (options1.value = options)
: val == 2
? (options2.value = options)
: val == 3
? (options3.value = options)
: ''
? (options2.value = options)
: val == 3
? (options3.value = options)
: ''
}
// 承载能力评估
@@ -552,11 +519,14 @@ const handleNodeClick = (data: any, node: any) => {
.splitpanes.default-theme .splitpanes__pane {
background: #eaeef1;
}
.grid-content {
text-align: center;
}
.bottomBox {
position: relative;
.el-button {
position: absolute;
top: 0;
@@ -564,35 +534,43 @@ const handleNodeClick = (data: any, node: any) => {
right: 10px;
}
}
:deep(.vxe-table--header thead tr:first-of-type th:first-of-type) {
background: #f8f8f9;
}
:deep(.vxe-table--header thead tr:first-of-type th:first-of-type:before) {
content: '';
position: absolute;
width: 1px;
height: 98px; /*这里需要自己调整根据td的宽度和高度*/
height: 98px;
/*这里需要自己调整根据td的宽度和高度*/
top: 0;
left: 0;
background-color: grey;
opacity: 0.3;
display: block;
transform: rotate(-66deg); /*这里需要自己调整,根据线的位置*/
transform: rotate(-66deg);
/*这里需要自己调整,根据线的位置*/
transform-origin: top;
}
:deep(.vxe-table--header thead tr:last-of-type th:first-of-type:before) {
content: '';
position: absolute;
width: 1px;
height: 98px; /*这里需要自己调整根据td的宽度和高度*/
height: 98px;
/*这里需要自己调整根据td的宽度和高度*/
bottom: 0;
right: 0;
background-color: grey;
opacity: 0.3;
display: block;
transform: rotate(-66deg); /*这里需要自己调整,根据线的位置*/
transform: rotate(-66deg);
/*这里需要自己调整,根据线的位置*/
transform-origin: bottom;
}
.SelectIcon {
height: 30px;
margin-top: 5px;

View File

@@ -2,17 +2,11 @@
<div class="default-main" style="padding: 10px">
<splitpanes :style="height" class="default-theme" id="navigation-splitpanes">
<pane :size="size">
<PointTree
ref="pointTree"
:default-expand-all="false"
<PointTree ref="pointTree" :default-expand-all="false"
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
:current-node-key="monitoringPoint.state.lineId"
:show-checkbox="monitoringPoint.state.showCheckBox"
:default-checked-keys="monitoringPoint.state.lineIds"
@check="handleCheckChange"
@node-click="handleNodeClick"
@init="handleNodeClick"
></PointTree>
:current-node-key="monitoringPoint.state.lineId" :show-checkbox="monitoringPoint.state.showCheckBox"
:default-checked-keys="monitoringPoint.state.lineIds" @check="handleCheckChange"
@node-click="handleNodeClick" @init="handleNodeClick"></PointTree>
</pane>
<pane>
<div style="position: relative; height: 100%">
@@ -26,7 +20,7 @@
<el-tab-pane label="稳态数据分析" name="3" lazy v-if="!isReload">
<Wentaishujufenxi />
</el-tab-pane>
<el-tab-pane label="谐波频" name="4" lazy v-if="!isReload">
<el-tab-pane label="谐波频" name="4" lazy v-if="!isReload">
<Xiebopingpu />
</el-tab-pane>
<el-tab-pane label="告警数据统计" name="5" lazy v-if="!isReload">
@@ -122,6 +116,7 @@ const changeTab = (e: string) => {
.splitpanes.default-theme .splitpanes__pane {
background: #eaeef1;
}
.monitoring-point {
position: absolute;
top: 12px;

View File

@@ -28,7 +28,7 @@
:auto-upload="false"
>
<template #trigger>
<el-button icon="el-icon-Upload" type="primary" class="mr10">上传接线图</el-button>
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
</template>
</el-upload>
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">生成</el-button>
@@ -81,7 +81,10 @@ provide('tableStore', tableStore)
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
console.log("🚀 ~ onMounted ~ dom.offsetHeight:", dom.offsetHeight)
size.value = Math.round((180 / dom.offsetHeight) * 100)
}
})

View File

@@ -215,7 +215,7 @@ onMounted(() => {
min-width: 100px;
.el-select__wrapper {
height: 46px;
height: 46px !important;
border-radius: 8px;
}
}

View File

@@ -777,7 +777,7 @@ const rules = ref({
],
powerSubstationName: [
{
required: false,
required: true,
message: '请选择电网侧变电站',
trigger: 'change'
}