Compare commits
18 Commits
2025-12
...
e65df4daad
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e65df4daad | ||
|
|
136248eec2 | ||
|
|
bfafb6dc5b | ||
|
|
0b91027da4 | ||
|
|
22aeb0bf4c | ||
|
|
87bc9d9017 | ||
|
|
43d4d37cd0 | ||
|
|
ad1528e53b | ||
|
|
c1e36440e7 | ||
|
|
16f5213d7a | ||
|
|
ab891e6125 | ||
|
|
36c8ab87a2 | ||
|
|
6c3037f19b | ||
|
|
54517c0d5f | ||
|
|
715cdb892f | ||
|
|
953b96fe05 | ||
|
|
cb19fef4c6 | ||
|
|
98c887b79d |
6
.env.qujing
Normal file
6
.env.qujing
Normal file
@@ -0,0 +1,6 @@
|
||||
# 云南曲靖
|
||||
NODE_ENV = qujing
|
||||
VITE_NAME="qujing"
|
||||
# 电网一张图 地图图层
|
||||
VITE_NARIMAP=null
|
||||
VITE_NRGISCOMMON=null
|
||||
@@ -7,10 +7,12 @@
|
||||
"dev": "vite --mode dev",
|
||||
"dev:jibei": "vite --mode jibei",
|
||||
"dev:hainan": "vite --mode hainan",
|
||||
"dev:qujing": "vite --mode qujing",
|
||||
"dev:removeMode": "vite --mode removeMode",
|
||||
"build": "vite build --mode dev",
|
||||
"build:jibei": "vite build --mode jibei",
|
||||
"build:hainan": "vite build --mode hainan",
|
||||
"build:qujing": "vite build --mode qujing",
|
||||
"build:removeMode": "vite build --mode removeMode",
|
||||
"preview": "vite preview"
|
||||
},
|
||||
|
||||
@@ -1,10 +1,18 @@
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
export function exportModel(data: any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/exportmodel/exportModel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
import createAxios from '@/utils/request'
|
||||
|
||||
export function exportModel(data: any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/exportmodel/exportModel',
|
||||
method: 'post',
|
||||
data: data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
export function areaHarmonicReport(data: any) {
|
||||
return createAxios({
|
||||
url: '/harmonic-boot/areaHarmonicReport/areaHarmonicReport',
|
||||
method: 'post',
|
||||
data: data,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
||||
BIN
src/assets/img/region.png
Normal file
BIN
src/assets/img/region.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 263 KiB |
@@ -23,7 +23,7 @@ export function upper(str) {
|
||||
}
|
||||
|
||||
export function makeOptionsRule(t, to, userOptions) {
|
||||
console.log(userOptions[0])
|
||||
//console.log(userOptions[0])
|
||||
const options = [
|
||||
{ label: t('props.optionsType.struct'), value: 0 },
|
||||
{ label: t('props.optionsType.json'), value: 1 },
|
||||
|
||||
@@ -43,7 +43,6 @@ if (VITE_FLAG) {
|
||||
})
|
||||
} else {
|
||||
setTimeout(async () => {
|
||||
|
||||
const previewUrl = await previewFile(currentRoute.value?.href?.split('?')[1])
|
||||
url.value = previewUrl
|
||||
excelOptions.value = ref({
|
||||
|
||||
@@ -707,7 +707,7 @@ const processSave = async () => {
|
||||
// return result.value || ' '
|
||||
// }
|
||||
onBeforeMount(() => {
|
||||
console.log(props, 'propspropspropsprops')
|
||||
//console.log(props, 'propspropspropsprops')
|
||||
})
|
||||
onMounted(() => {
|
||||
initBpmnModeler()
|
||||
|
||||
@@ -15,7 +15,7 @@ const addTask = (event, options: any = {}) => {
|
||||
const ElementFactory = bpmnInstances().elementFactory
|
||||
const create = bpmnInstances().modeler.get('create')
|
||||
|
||||
console.log(ElementFactory, create)
|
||||
//console.log(ElementFactory, create)
|
||||
|
||||
const shape = ElementFactory.createShape(assign({ type: 'bpmn:UserTask' }, options))
|
||||
|
||||
@@ -23,8 +23,8 @@ const addTask = (event, options: any = {}) => {
|
||||
shape.businessObject.di.isExpanded = options.isExpanded
|
||||
}
|
||||
|
||||
console.log(event, 'event')
|
||||
console.log(shape, 'shape')
|
||||
//console.log(event, 'event')
|
||||
//console.log(shape, 'shape')
|
||||
create.start(event, shape)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -172,7 +172,7 @@ const unwatchBpmn = watch(
|
||||
return
|
||||
}
|
||||
|
||||
console.log('props.bpmnModeler 有值了!!!')
|
||||
//console.log('props.bpmnModeler 有值了!!!')
|
||||
const w = window as any
|
||||
w.bpmnInstances = {
|
||||
modeler: props.bpmnModeler,
|
||||
|
||||
@@ -179,7 +179,7 @@ onBeforeUnmount(() => {
|
||||
watch(
|
||||
() => props.businessObject,
|
||||
(val) => {
|
||||
console.log(val, 'val')
|
||||
//console.log(val, 'val')
|
||||
nextTick(() => {
|
||||
resetFlowCondition()
|
||||
})
|
||||
|
||||
@@ -376,7 +376,7 @@ const openListenerForm = (listener, index?) => {
|
||||
}
|
||||
// 移除监听器
|
||||
const removeListener = (listener, index?) => {
|
||||
console.log(listener, 'listener')
|
||||
//console.log(listener, 'listener')
|
||||
ElMessageBox.confirm('确认移除该监听器吗?', '提示', {
|
||||
confirmButtonText: '确 认',
|
||||
cancelButtonText: '取 消'
|
||||
|
||||
@@ -20,7 +20,7 @@ export function initListenerForm(listener) {
|
||||
self.eventDefinitionType = key.replace('time', '').toLowerCase()
|
||||
}
|
||||
}
|
||||
console.log(k)
|
||||
//console.log(k)
|
||||
self.eventTimeDefinitions = listener.eventDefinitions[0][k].body
|
||||
}
|
||||
}
|
||||
|
||||
@@ -68,7 +68,7 @@ const modelConfig = computed(() => {
|
||||
const bpmnInstances = () => (window as any)?.bpmnInstances
|
||||
|
||||
const initDataList = () => {
|
||||
console.log(window, 'window')
|
||||
//console.log(window, 'window')
|
||||
rootElements.value = bpmnInstances().modeler.getDefinitions().rootElements
|
||||
messageIdMap.value = {}
|
||||
signalIdMap.value = {}
|
||||
|
||||
@@ -39,7 +39,7 @@ function xml2json(xml) {
|
||||
|
||||
function xmlObj2json(xml) {
|
||||
const xmlObj = xmlStr2XmlObj(xml)
|
||||
console.log(xmlObj)
|
||||
// console.log(xmlObj)
|
||||
let jsonObj = {}
|
||||
if (xmlObj.childNodes.length > 0) {
|
||||
jsonObj = xml2json(xmlObj)
|
||||
|
||||
@@ -223,7 +223,7 @@ const echart = () => {
|
||||
|
||||
series: [
|
||||
{
|
||||
name: '异常总数',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
data: [100],
|
||||
@@ -240,7 +240,7 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
@@ -249,7 +249,7 @@ const echart = () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '异常占比',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 13,
|
||||
data: [
|
||||
@@ -270,11 +270,11 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FF9100' // 0% 处的颜色
|
||||
color: '#57bc6e ' // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
|
||||
@@ -222,7 +222,7 @@ const echart = () => {
|
||||
|
||||
series: [
|
||||
{
|
||||
name: '异常总数',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
data: [100],
|
||||
@@ -239,7 +239,7 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
@@ -248,7 +248,7 @@ const echart = () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '异常占比',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 13,
|
||||
data: [
|
||||
@@ -269,11 +269,11 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FF9100' // 0% 处的颜色
|
||||
color: '#57bc6e' // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
|
||||
@@ -70,6 +70,8 @@ const initChart = () => {
|
||||
const value =
|
||||
item.value === 3.14159 || item.value === 0.14159
|
||||
? '暂无数据'
|
||||
: item.value === 0.14158
|
||||
? 0
|
||||
: Math.round(item.value * 100) / 100 // 处理特殊值
|
||||
tips += `<div style=" display: flex;justify-content: space-between;">
|
||||
<span>${item.marker}
|
||||
@@ -154,7 +156,6 @@ const initChart = () => {
|
||||
if (params.seriesName == '暂态触发点') {
|
||||
emit('triggerPoint', params.data)
|
||||
} else {
|
||||
|
||||
emit('echartClick', params)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onBeforeUnmount, ref, watch, onMounted, defineEmits } from 'vue'
|
||||
import { onBeforeUnmount, ref, watch, onMounted, } from 'vue'
|
||||
import * as echarts from 'echarts'
|
||||
import 'echarts-gl'
|
||||
import 'echarts-liquidfill'
|
||||
@@ -19,14 +19,22 @@ const myCharts = ref()
|
||||
const showCircle = ref(false)
|
||||
|
||||
const fetchConfig = async (name: string) => {
|
||||
const res = await import(`../../assets/map/${name.replace(/市$/, "")}.json`)
|
||||
return res.default
|
||||
try {
|
||||
// 处理城市名称(去掉末尾的"市")并尝试导入对应文件
|
||||
const res = await import(`../../assets/map/${name.replace(/市$/, '')}.json`)
|
||||
return res.default
|
||||
} catch (error) {
|
||||
const chinaRes = await import(`../../assets/map/中国.json`) // 请确认中国文件的实际命名
|
||||
return chinaRes.default
|
||||
}
|
||||
// const res = await import(`../../assets/map/${name.replace(/市$/, "")}.json`)
|
||||
// return res.default
|
||||
// GetEchar(res.default)
|
||||
}
|
||||
// fetchConfig()
|
||||
|
||||
const emit = defineEmits(['getRegionByRegion', 'eliminate', 'clickMap'])
|
||||
onMounted(() => { })
|
||||
onMounted(() => {})
|
||||
|
||||
const GetEchar = async (name: string) => {
|
||||
let chartDom = document.getElementById('chartMap')
|
||||
|
||||
@@ -127,7 +127,7 @@ const timeChange = (e: number) => {
|
||||
|
||||
// 当前
|
||||
const nowTime = () => {
|
||||
console.log(interval.value, '000000000')
|
||||
//console.log(interval.value, '000000000')
|
||||
timeChange(interval.value)
|
||||
}
|
||||
// 上一个
|
||||
@@ -312,7 +312,7 @@ const next = () => {
|
||||
}
|
||||
} else {
|
||||
month = month + 3
|
||||
console.log('🚀 ~ next ~ presentM:', presentM, month)
|
||||
// console.log('🚀 ~ next ~ presentM:', presentM, month)
|
||||
|
||||
// 季度进位后,超过当前月份是不科学的
|
||||
if (year == presentY && !props.nextFlag) {
|
||||
@@ -327,7 +327,7 @@ const next = () => {
|
||||
endTime = year + '-0' + presentM + '-' + presentD
|
||||
}
|
||||
} else if (presentM > 3 && presentM < 7) {
|
||||
console.log(123123)
|
||||
// console.log(123123)
|
||||
// 第二季度
|
||||
startTime = year + '-04-01'
|
||||
if (presentD < 10) {
|
||||
@@ -380,7 +380,7 @@ const next = () => {
|
||||
}
|
||||
}
|
||||
}
|
||||
console.log(startTime, endTime)
|
||||
// console.log(startTime, endTime)
|
||||
} else if (interval.value == 5) {
|
||||
} else if (interval.value == 4) {
|
||||
//根据开始时间推
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="区域" v-if="area">
|
||||
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" />
|
||||
<Area ref="areaRef" v-model="tableStore.table.params.deptIndex" @change-value="onAreaChange" />
|
||||
</el-form-item>
|
||||
<slot name="select"></slot>
|
||||
</el-form>
|
||||
@@ -52,7 +52,7 @@
|
||||
<el-button
|
||||
@click="onExport"
|
||||
v-if="showExport"
|
||||
:loading="tableStore.table.loading"
|
||||
:loading="tableStore.table.exportLoading"
|
||||
type="primary"
|
||||
icon="el-icon-Download"
|
||||
>
|
||||
@@ -81,7 +81,7 @@ import { mainHeight } from '@/utils/layout'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { Search, RefreshLeft } from '@element-plus/icons-vue'
|
||||
import { defineProps } from 'vue'
|
||||
const emit = defineEmits(['selectChange'])
|
||||
const emit = defineEmits(['selectChange','areaChange'])
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const tableHeader = ref()
|
||||
const datePickerRef = ref()
|
||||
@@ -132,11 +132,17 @@ const headerFormSecondStyleClose = {
|
||||
padding: '0'
|
||||
}
|
||||
|
||||
const onAreaChange = (data) => {
|
||||
|
||||
emit('areaChange', {label: data.label})
|
||||
}
|
||||
|
||||
watch(
|
||||
() => tableStore?.table.params.deptIndex,
|
||||
newVal => {
|
||||
setTimeout(() => {
|
||||
areaRef.value && areaRef.value.change()
|
||||
|
||||
}, 0)
|
||||
}
|
||||
)
|
||||
@@ -258,7 +264,7 @@ const setTheDate = (val: any) => {
|
||||
}
|
||||
// 导出
|
||||
const onExport = () => {
|
||||
console.log('222')
|
||||
|
||||
tableStore.onTableAction('export', { showAllFlag: true })
|
||||
}
|
||||
|
||||
|
||||
187
src/components/tree/allocation.vue
Normal file
187
src/components/tree/allocation.vue
Normal file
@@ -0,0 +1,187 @@
|
||||
<template>
|
||||
<div :style="{ width: menuCollapse ? '40px' : props.width }" style="transition: all 0.3s; overflow: hidden">
|
||||
<div class="mt15 mr10" style="display: flex; justify-content: end">
|
||||
<el-button type="primary" icon="el-icon-Select" @click="save" :loading="loading">保存</el-button>
|
||||
</div>
|
||||
<Icon
|
||||
v-show="menuCollapse"
|
||||
@click="onMenuCollapse"
|
||||
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
:class="menuCollapse ? 'unfold' : ''"
|
||||
size="18"
|
||||
class="fold ml10 mt20 menu-collapse"
|
||||
style="cursor: pointer"
|
||||
/>
|
||||
<div class="cn-tree" :style="{ opacity: menuCollapse ? 0 : 1 }">
|
||||
<div style="display: flex; align-items: center" class="mb10">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="filterText" placeholder="请输入内容" clearable>
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
</el-input>
|
||||
<el-tooltip placement="bottom" :hide-after="0" v-if="props.showPush">
|
||||
<template #content>
|
||||
<span>台账推送</span>
|
||||
</template>
|
||||
|
||||
<Icon
|
||||
name="el-icon-Promotion"
|
||||
size="20"
|
||||
class="fold ml10 menu-collapse"
|
||||
style="cursor: pointer"
|
||||
:style="{ color: config.getColorVal('elementUiPrimary') }"
|
||||
@click="onAdd"
|
||||
/>
|
||||
</el-tooltip>
|
||||
<!-- <Icon @click='onMenuCollapse' :name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'" v-else
|
||||
:class="menuCollapse ? 'unfold' : ''" size='18' class='fold ml10 menu-collapse'
|
||||
style='cursor: pointer' v-if='props.canExpand' /> -->
|
||||
</div>
|
||||
|
||||
<el-tree
|
||||
:style="{ height: 'calc(100vh - 235px)' }"
|
||||
style="overflow: auto"
|
||||
ref="treeRef"
|
||||
:props="defaultProps"
|
||||
highlight-current
|
||||
:default-expand-all="false"
|
||||
@check-change="checkTreeNodeChange"
|
||||
:filter-node-method="filterNode"
|
||||
node-key="id"
|
||||
v-bind="$attrs"
|
||||
>
|
||||
<template #default="{ node, data }">
|
||||
<span class="custom-tree-node">
|
||||
<Icon
|
||||
:name="data.icon"
|
||||
style="font-size: 16px"
|
||||
:style="{ color: data.color }"
|
||||
v-if="data.icon"
|
||||
/>
|
||||
<span style="margin-left: 4px">{{ node.label }}</span>
|
||||
</span>
|
||||
</template>
|
||||
</el-tree>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import useCurrentInstance from '@/utils/useCurrentInstance'
|
||||
import { ElTree } from 'element-plus'
|
||||
import { emit } from 'process'
|
||||
import { ref, watch } from 'vue'
|
||||
import { t } from 'vxe-table'
|
||||
import { useConfig } from '@/stores/config'
|
||||
|
||||
defineOptions({
|
||||
name: 'govern/tree'
|
||||
})
|
||||
|
||||
interface Props {
|
||||
width?: string
|
||||
canExpand?: boolean
|
||||
showPush?: boolean
|
||||
}
|
||||
const loading = ref(false)
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
width: '280px',
|
||||
canExpand: true,
|
||||
showPush: false
|
||||
})
|
||||
const config = useConfig()
|
||||
const { proxy } = useCurrentInstance()
|
||||
const menuCollapse = ref(false)
|
||||
const filterText = ref('')
|
||||
const defaultProps = {
|
||||
label: 'name',
|
||||
value: 'id'
|
||||
}
|
||||
const emit = defineEmits(['checkTreeNodeChange', 'onAdd', 'checkChange'])
|
||||
watch(filterText, val => {
|
||||
treeRef.value!.filter(val)
|
||||
})
|
||||
const onMenuCollapse = () => {
|
||||
menuCollapse.value = !menuCollapse.value
|
||||
proxy.eventBus.emit('cnTreeCollapse', menuCollapse)
|
||||
}
|
||||
const save = () => {
|
||||
loading.value = true
|
||||
emit('checkChange')
|
||||
}
|
||||
const filterNode = (value: string, data: any, node: any) => {
|
||||
console.log(value, data, node, 'filterNode')
|
||||
if (!value) return true
|
||||
// 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 checkTreeNodeChange = () => {
|
||||
// console.log(treeRef.value?.getCheckedNodes(), "ikkkkkiisiiisis");
|
||||
emit('checkTreeNodeChange', treeRef.value?.getCheckedNodes())
|
||||
}
|
||||
|
||||
const onAdd = () => {
|
||||
emit('onAdd')
|
||||
}
|
||||
|
||||
const treeRef = ref<InstanceType<typeof ElTree>>()
|
||||
defineExpose({ treeRef, loading })
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.cn-tree {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
|
||||
:deep(.el-tree) {
|
||||
border: 1px solid var(--el-border-color);
|
||||
}
|
||||
|
||||
:deep(.el-tree--highlight-current .el-tree-node.is-current > .el-tree-node__content) {
|
||||
background-color: var(--el-color-primary-light-7);
|
||||
}
|
||||
|
||||
.menu-collapse {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
|
||||
.custom-tree-node {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
</style>
|
||||
@@ -22,7 +22,7 @@
|
||||
<template #prefix>
|
||||
<Icon name="el-icon-Search" style="font-size: 16px" />
|
||||
</template>
|
||||
</el-input>
|
||||
</el-input>
|
||||
<Icon
|
||||
@click="onMenuCollapse"
|
||||
:name="menuCollapse ? 'el-icon-Expand' : 'el-icon-Fold'"
|
||||
@@ -147,7 +147,7 @@ const onMenuCollapse = () => {
|
||||
}
|
||||
// 查看详情
|
||||
const viewDetails = (data: any) => {
|
||||
console.log('🚀 ~ viewDetails ~ data:', data)
|
||||
// console.log('🚀 ~ viewDetails ~ data:', data)
|
||||
if (data.level == 3) {
|
||||
// 变电站详情
|
||||
// substationDetails
|
||||
@@ -201,7 +201,7 @@ onMounted(async () => {
|
||||
})
|
||||
|
||||
const scrollToNode = (id: string) => {
|
||||
console.log("🚀 ~ scrollToNode ~ id:", id)
|
||||
// console.log("🚀 ~ scrollToNode ~ id:", id)
|
||||
if (!treeRef.value) return
|
||||
|
||||
// 获取目标节点的元素
|
||||
|
||||
@@ -19,7 +19,6 @@ import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import Tree from '../index.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { queryAllAlgorithmLibrary } from '@/api/supervision-boot/database/index'
|
||||
defineOptions({
|
||||
@@ -35,7 +34,7 @@ const tree = ref()
|
||||
const treeRef = ref()
|
||||
|
||||
const loadData = (id?: any) => {
|
||||
console.log('🚀 ~ loadData ~ id:', id)
|
||||
// console.log('🚀 ~ loadData ~ id:', id)
|
||||
let nodeKey = ''
|
||||
queryAllAlgorithmLibrary().then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
|
||||
150
src/components/tree/pqs/areaTree.vue
Normal file
150
src/components/tree/pqs/areaTree.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div class="point-tree">
|
||||
<div style="flex: 1; overflow: hidden">
|
||||
<Tree ref="treeRef" :data="tree" style="width: 100%; height: 100%" :canExpand="false" v-bind="$attrs" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import Tree from '../index.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { getAreaList } from '@/api/common'
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||
defineOptions({
|
||||
name: 'pms/pointTree'
|
||||
})
|
||||
interface Props {
|
||||
showSelect?: boolean
|
||||
}
|
||||
const props = withDefaults(defineProps<Props>(), {
|
||||
showSelect: true
|
||||
})
|
||||
const emit = defineEmits(['init'])
|
||||
const attrs = useAttrs()
|
||||
const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const tree = ref()
|
||||
const treeRef = ref()
|
||||
|
||||
const loadData = () => {
|
||||
let nodeKey = ''
|
||||
getAreaList().then(res => {
|
||||
processTreeData(res.data, res.data[0].level)
|
||||
let firstLevel6Node = getDeepestFirstChildData(res.data)
|
||||
|
||||
nodeKey = firstLevel6Node.id
|
||||
emit('init', firstLevel6Node)
|
||||
|
||||
tree.value = res.data
|
||||
if (nodeKey) {
|
||||
nextTick(() => {
|
||||
treeRef.value.treeRef.setCurrentKey(nodeKey)
|
||||
|
||||
// treeRef.value.treeRef.setExpandedKeys(nodeKey)
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
const scrollToNode = (id: string) => {
|
||||
// 树滚动
|
||||
treeRef.value.scrollToNode(id)
|
||||
}
|
||||
|
||||
// 定义不同层级对应的图标配置(可根据实际需求调整)
|
||||
const levelIconMap = {
|
||||
'-1': 'el-icon-HomeFilled',
|
||||
0: 'el-icon-CollectionTag',
|
||||
1: 'el-icon-CollectionTag',
|
||||
2: 'el-icon-Flag',
|
||||
3: 'el-icon-OfficeBuilding',
|
||||
4: 'el-icon-DataAnalysis',
|
||||
5: 'el-icon-DataAnalysis',
|
||||
7: 'el-icon-DataAnalysis',
|
||||
6: 'fa-solid fa-location-dot'
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归处理树形数据,为不同层级节点设置图标和颜色
|
||||
* @param data 树形数据数组
|
||||
* @param level 当前层级(默认从1开始)
|
||||
*/
|
||||
function processTreeData(data: any[], level: number = -1, alias: string = '') {
|
||||
// 空值判断,避免数组为空或undefined时报错
|
||||
if (!Array.isArray(data) || data.length === 0) return
|
||||
|
||||
data.forEach(item => {
|
||||
// 1. 设置基础图标(根据层级匹配)
|
||||
item.icon = levelIconMap[level] || ''
|
||||
item.alias = alias + `${item.name}`
|
||||
// 2. 设置基础颜色
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
// 3. 第6层特殊处理:根据comFlag调整颜色
|
||||
if (level === 6 && item.hasOwnProperty('comFlag')) {
|
||||
switch (item.comFlag) {
|
||||
case 0:
|
||||
item.color = 'red !important'
|
||||
break
|
||||
case 1:
|
||||
item.color = '#00f93b !important'
|
||||
break
|
||||
case 2:
|
||||
item.color = '#8c8c8c !important'
|
||||
break
|
||||
// 默认值:保持原有基础颜色
|
||||
default:
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 递归处理子节点,层级+1
|
||||
if (item.children && item.children.length > 0) {
|
||||
processTreeData(item.children, item.children[0].level, level == '-1' ? '' : item.alias + '>')
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 递归获取树形结构中一直向下的第一个children的最后一组有效数据
|
||||
* @param {Array} treeData - 原始递归树形数据
|
||||
* @returns {Object|null} 路径最后一组有效数据,无有效数据时返回null
|
||||
*/
|
||||
function getDeepestFirstChildData(treeData) {
|
||||
// 递归辅助函数:逐层查找第一个children
|
||||
function findDeepestNode(currentNode) {
|
||||
// 检查当前节点是否有有效的children数组
|
||||
if (currentNode && Array.isArray(currentNode.children) && currentNode.children.length > 0) {
|
||||
// 有下一级children,继续递归查找下一级第一个元素
|
||||
return findDeepestNode(currentNode.children[0])
|
||||
}
|
||||
// 没有下一级children,返回当前节点(递归终止)
|
||||
return currentNode
|
||||
}
|
||||
|
||||
// 边界处理:原始数据非数组/空数组时返回null
|
||||
if (!Array.isArray(treeData) || treeData.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
// 从根节点第一个元素开始递归查找
|
||||
return findDeepestNode(treeData[0])
|
||||
}
|
||||
|
||||
defineExpose({ treeRef, scrollToNode, tree })
|
||||
loadData()
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.point-tree {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: #fff;
|
||||
border: 1px solid var(--el-border-color);
|
||||
}
|
||||
</style>
|
||||
@@ -11,7 +11,6 @@ import { nextTick, onMounted, ref, useAttrs } from 'vue'
|
||||
import Tree from '../index.vue'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { defineProps } from 'vue'
|
||||
import { getTree } from '@/api/advance-boot/assess'
|
||||
|
||||
@@ -36,6 +36,7 @@ const adminInfo = useAdminInfo()
|
||||
const dictData = useDictData()
|
||||
const config = useConfig()
|
||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||
const tree = ref()
|
||||
const treeRef = ref()
|
||||
const formData = ref({
|
||||
@@ -54,6 +55,9 @@ const loadData = () => {
|
||||
}) || { code: '' }
|
||||
let form = JSON.parse(JSON.stringify(formData.value))
|
||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||
if (VITE_FLAG && form.statisticalType.code == 'Power_Network') {
|
||||
form.statisticalType.deptName = 'qujing'
|
||||
}
|
||||
let nodeKey = ''
|
||||
getTerminalTreeForFive(form).then(res => {
|
||||
console.log(res)
|
||||
@@ -67,56 +71,62 @@ const loadData = () => {
|
||||
}
|
||||
]
|
||||
}
|
||||
res.data.forEach((item: any) => {
|
||||
item.icon = 'el-icon-HomeFilled'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-CollectionTag'
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.children.forEach((item3: any) => {
|
||||
item3.icon = 'el-icon-Flag'
|
||||
item3.color = config.getColorVal('elementUiPrimary')
|
||||
item3.children.forEach((item4: any) => {
|
||||
item4.icon = 'el-icon-OfficeBuilding'
|
||||
item4.color = config.getColorVal('elementUiPrimary')
|
||||
item4.children.forEach((item5: anyObj) => {
|
||||
if (item5.level == 7) {
|
||||
item5.icon = 'el-icon-DataAnalysis'
|
||||
item5.color = config.getColorVal('elementUiPrimary')
|
||||
item5.children.forEach((item6: anyObj) => {
|
||||
item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
||||
item6.pid = item4.id
|
||||
item6.icon = 'fa-solid fa-location-dot'
|
||||
item6.color = config.getColorVal('elementUiPrimary')
|
||||
if (item6.comFlag == 0) {
|
||||
item6.color = 'red !important'
|
||||
} else if (item6.comFlag == 1) {
|
||||
item6.color = '#00f93b !important'
|
||||
} else if (item6.comFlag == 2) {
|
||||
item6.color = '#8c8c8c !important'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||
item5.pid = item4.id
|
||||
item5.icon = 'fa-solid fa-location-dot'
|
||||
item5.color = config.getColorVal('elementUiPrimary')
|
||||
if (item5.comFlag == 0) {
|
||||
item5.color = 'red !important'
|
||||
} else if (item5.comFlag == 1) {
|
||||
item5.color = '#00f93b !important'
|
||||
} else if (item5.comFlag == 2) {
|
||||
item5.color = '#8c8c8c !important'
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
// if (VITE_FLAG) {
|
||||
processTreeData(res.data)
|
||||
let firstLevel6Node = findFirstLevel6Node(res.data)
|
||||
|
||||
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])
|
||||
nodeKey = firstLevel6Node.id
|
||||
emit('init', firstLevel6Node)
|
||||
// res.data.forEach((item: any) => {
|
||||
// item.icon = 'el-icon-HomeFilled'
|
||||
// item.color = config.getColorVal('elementUiPrimary')
|
||||
// item.children.forEach((item2: any) => {
|
||||
// item2.icon = 'el-icon-CollectionTag'
|
||||
// item2.color = config.getColorVal('elementUiPrimary')
|
||||
// item2.children.forEach((item3: any) => {
|
||||
// item3.icon = 'el-icon-Flag'
|
||||
// item3.color = config.getColorVal('elementUiPrimary')
|
||||
// item3.children.forEach((item4: any) => {
|
||||
// item4.icon = 'el-icon-OfficeBuilding'
|
||||
// item4.color = config.getColorVal('elementUiPrimary')
|
||||
// item4.children.forEach((item5: anyObj) => {
|
||||
// if (item5.level == 7) {
|
||||
// item5.icon = 'el-icon-DataAnalysis'
|
||||
// item5.color = config.getColorVal('elementUiPrimary')
|
||||
// item5.children.forEach((item6: anyObj) => {
|
||||
// item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
||||
// item6.pid = item4.id
|
||||
// item6.icon = 'fa-solid fa-location-dot'
|
||||
// item6.color = config.getColorVal('elementUiPrimary')
|
||||
// if (item6.comFlag == 0) {
|
||||
// item6.color = 'red !important'
|
||||
// } else if (item6.comFlag == 1) {
|
||||
// item6.color = '#00f93b !important'
|
||||
// } else if (item6.comFlag == 2) {
|
||||
// item6.color = '#8c8c8c !important'
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||
// item5.pid = item4.id
|
||||
// item5.icon = 'fa-solid fa-location-dot'
|
||||
// item5.color = config.getColorVal('elementUiPrimary')
|
||||
// if (item5.comFlag == 0) {
|
||||
// item5.color = 'red !important'
|
||||
// } else if (item5.comFlag == 1) {
|
||||
// item5.color = '#00f93b !important'
|
||||
// } else if (item5.comFlag == 2) {
|
||||
// item5.color = '#8c8c8c !important'
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
// nodeKey = res.data[0].children[0].children[0].children[0].children[0].id
|
||||
// emit('init', res.data[0].children[0].children[0].children[0].children[0])
|
||||
|
||||
tree.value = res.data
|
||||
if (nodeKey) {
|
||||
@@ -127,9 +137,113 @@ const loadData = () => {
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
const setKey = (key: string) => {
|
||||
treeRef.value.treeRef.setCurrentKey(key)
|
||||
}
|
||||
|
||||
// 定义不同层级对应的图标配置(可根据实际需求调整)
|
||||
const levelIconMap = {
|
||||
'-1': 'el-icon-HomeFilled',
|
||||
0: 'el-icon-CollectionTag',
|
||||
1: 'el-icon-CollectionTag',
|
||||
2: 'el-icon-Flag',
|
||||
3: 'el-icon-OfficeBuilding',
|
||||
4: 'el-icon-DataAnalysis',
|
||||
5: 'el-icon-DataAnalysis',
|
||||
7: 'el-icon-DataAnalysis',
|
||||
6: 'fa-solid fa-location-dot'
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归处理树形数据,为不同层级节点设置图标和颜色
|
||||
* @param data 树形数据数组
|
||||
* @param level 当前层级(默认从1开始)
|
||||
*/
|
||||
function processTreeData(data: any[], level: number = -1) {
|
||||
// 空值判断,避免数组为空或undefined时报错
|
||||
if (!Array.isArray(data) || data.length === 0) return
|
||||
|
||||
data.forEach(item => {
|
||||
// 1. 设置基础图标(根据层级匹配)
|
||||
item.icon = levelIconMap[level] || ''
|
||||
|
||||
// 2. 设置基础颜色
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
// 3. 第6层特殊处理:根据comFlag调整颜色
|
||||
if (level === 6 && item.hasOwnProperty('comFlag')) {
|
||||
switch (item.comFlag) {
|
||||
case 0:
|
||||
item.color = 'red !important'
|
||||
break
|
||||
case 1:
|
||||
item.color = '#00f93b !important'
|
||||
break
|
||||
case 2:
|
||||
item.color = '#8c8c8c !important'
|
||||
break
|
||||
// 默认值:保持原有基础颜色
|
||||
default:
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 递归处理子节点,层级+1
|
||||
if (item.children && item.children.length > 0) {
|
||||
processTreeData(item.children, item.children[0].level)
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 递归查找树形结构中第一个level===6的节点(找到即终止递归)
|
||||
* @param {Object|Array} tree - 树形数据(根节点数组 或 单个根节点)
|
||||
* @returns {Object|null} 第一个level为6的节点,无则返回null
|
||||
*/
|
||||
function findFirstLevel6Node(tree: any) {
|
||||
// 统一处理入参:如果是数组,遍历根节点数组(按顺序找第一个符合条件的)
|
||||
if (Array.isArray(tree)) {
|
||||
for (const rootNode of tree) {
|
||||
const result = traverse(rootNode)
|
||||
// 找到第一个匹配节点,立即返回(终止根节点遍历)
|
||||
if (result) return result
|
||||
}
|
||||
// 所有根节点遍历完未找到
|
||||
return null
|
||||
} else {
|
||||
// 入参是单个节点,直接递归遍历
|
||||
return traverse(tree)
|
||||
}
|
||||
|
||||
// 核心递归遍历函数
|
||||
function traverse(node) {
|
||||
// 终止条件1:节点不存在,返回null
|
||||
if (!node) return null
|
||||
|
||||
// 终止条件2:找到level===6的节点,立即返回(终止递归)
|
||||
if (node.level === 6) {
|
||||
return node
|
||||
}
|
||||
|
||||
// 终止条件3:节点无children,返回null
|
||||
if (!node.children || node.children.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
// 按顺序遍历当前节点的子节点
|
||||
for (const child of node.children) {
|
||||
const foundNode = traverse(child)
|
||||
// 子节点中找到目标节点,立即返回(终止后续子节点遍历)
|
||||
if (foundNode) {
|
||||
return foundNode
|
||||
}
|
||||
}
|
||||
|
||||
// 当前节点及所有子节点都无匹配,返回null
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ setKey })
|
||||
loadData()
|
||||
</script>
|
||||
|
||||
@@ -28,6 +28,7 @@ import { useDictData } from '@/stores/dictData'
|
||||
import { getTerminalTreeForFive } from '@/api/device-boot/terminalTree'
|
||||
import { useConfig } from '@/stores/config'
|
||||
import { defineProps } from 'vue'
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||
defineOptions({
|
||||
name: 'pms/pointTree'
|
||||
})
|
||||
@@ -61,6 +62,9 @@ const loadData = () => {
|
||||
}) || { code: '' }
|
||||
let form = JSON.parse(JSON.stringify(formData.value))
|
||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||
if (VITE_FLAG && form.statisticalType.code == 'Power_Network') {
|
||||
form.statisticalType.deptName = 'qujing'
|
||||
}
|
||||
let nodeKey = ''
|
||||
getTerminalTreeForFive(form).then(res => {
|
||||
//console.log('---',res)
|
||||
@@ -74,62 +78,71 @@ const loadData = () => {
|
||||
}
|
||||
]
|
||||
}
|
||||
res.data.forEach((item: any) => {
|
||||
item.icon = 'el-icon-HomeFilled'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
item.children.forEach((item2: any) => {
|
||||
item2.icon = 'el-icon-CollectionTag'
|
||||
item2.color = config.getColorVal('elementUiPrimary')
|
||||
item2.children.forEach((item3: any) => {
|
||||
item3.icon = 'el-icon-Flag'
|
||||
item3.color = config.getColorVal('elementUiPrimary')
|
||||
item3.children.forEach((item4: any) => {
|
||||
item4.icon = 'el-icon-OfficeBuilding'
|
||||
item4.color = config.getColorVal('elementUiPrimary')
|
||||
item4.children.forEach((item5: anyObj) => {
|
||||
if (item5.level == 7) {
|
||||
item5.icon = 'el-icon-DataAnalysis'
|
||||
item5.color = config.getColorVal('elementUiPrimary')
|
||||
item5.children.forEach((item6: anyObj) => {
|
||||
item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
||||
item6.pid = item4.id
|
||||
item6.icon = 'fa-solid fa-location-dot'
|
||||
item6.color = config.getColorVal('elementUiPrimary')
|
||||
if (item6.comFlag == 0) {
|
||||
item6.color = 'red !important'
|
||||
} else if (item6.comFlag == 1) {
|
||||
item6.color = '#00f93b !important'
|
||||
} else if (item6.comFlag == 2) {
|
||||
item6.color = '#8c8c8c !important'
|
||||
}
|
||||
})
|
||||
} else {
|
||||
item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||
item5.pid = item4.id
|
||||
item5.icon = 'fa-solid fa-location-dot'
|
||||
item5.color = config.getColorVal('elementUiPrimary')
|
||||
if (item5.comFlag == 0) {
|
||||
item5.color = 'red !important'
|
||||
} else if (item5.comFlag == 1) {
|
||||
item5.color = '#00f93b !important'
|
||||
} else if (item5.comFlag == 2) {
|
||||
item5.color = '#8c8c8c !important'
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
})
|
||||
// if (VITE_FLAG) {
|
||||
processTreeData(res.data)
|
||||
let firstLevel6Node = findFirstLevel6Node(res.data)
|
||||
|
||||
nodeKey =
|
||||
res.data[0].children[0].children[0].children[0].children[0].children[0]?.id ||
|
||||
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]?.children[0] ||
|
||||
res.data[0].children[0].children[0].children[0].children[0]
|
||||
)
|
||||
nodeKey = firstLevel6Node.id
|
||||
emit('init', firstLevel6Node)
|
||||
// } else {
|
||||
// // 正常树处理
|
||||
// res.data.forEach((item: any) => {
|
||||
// item.icon = 'el-icon-HomeFilled'
|
||||
// item.color = config.getColorVal('elementUiPrimary')
|
||||
// item.children.forEach((item2: any) => {
|
||||
// item2.icon = 'el-icon-CollectionTag'
|
||||
// item2.color = config.getColorVal('elementUiPrimary')
|
||||
// item2.children.forEach((item3: any) => {
|
||||
// item3.icon = 'el-icon-Flag'
|
||||
// item3.color = config.getColorVal('elementUiPrimary')
|
||||
// item3.children.forEach((item4: any) => {
|
||||
// item4.icon = 'el-icon-OfficeBuilding'
|
||||
// item4.color = config.getColorVal('elementUiPrimary')
|
||||
// item4.children.forEach((item5: anyObj) => {
|
||||
// if (item5.level == 7) {
|
||||
// item5.icon = 'el-icon-DataAnalysis'
|
||||
// item5.color = config.getColorVal('elementUiPrimary')
|
||||
// item5.children.forEach((item6: anyObj) => {
|
||||
// item6.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}>${item6.name}`
|
||||
// item6.pid = item4.id
|
||||
// item6.icon = 'fa-solid fa-location-dot'
|
||||
// item6.color = config.getColorVal('elementUiPrimary')
|
||||
// if (item6.comFlag == 0) {
|
||||
// item6.color = 'red !important'
|
||||
// } else if (item6.comFlag == 1) {
|
||||
// item6.color = '#00f93b !important'
|
||||
// } else if (item6.comFlag == 2) {
|
||||
// item6.color = '#8c8c8c !important'
|
||||
// }
|
||||
// })
|
||||
// } else {
|
||||
// item5.alias = `${item.name}>${item2.name}>${item3.name}>${item4.name}>${item5.name}`
|
||||
// item5.pid = item4.id
|
||||
// item5.icon = 'fa-solid fa-location-dot'
|
||||
// item5.color = config.getColorVal('elementUiPrimary')
|
||||
// if (item5.comFlag == 0) {
|
||||
// item5.color = 'red !important'
|
||||
// } else if (item5.comFlag == 1) {
|
||||
// item5.color = '#00f93b !important'
|
||||
// } else if (item5.comFlag == 2) {
|
||||
// item5.color = '#8c8c8c !important'
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
// })
|
||||
|
||||
// nodeKey =
|
||||
// res.data[0].children[0].children[0].children[0].children[0].children[0]?.id ||
|
||||
// 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]?.children[0] ||
|
||||
// res.data[0].children[0].children[0].children[0].children[0]
|
||||
// )
|
||||
// }
|
||||
|
||||
tree.value = res.data
|
||||
if (nodeKey) {
|
||||
@@ -145,6 +158,109 @@ const scrollToNode = (id: string) => {
|
||||
// 树滚动
|
||||
treeRef.value.scrollToNode(id)
|
||||
}
|
||||
|
||||
// 定义不同层级对应的图标配置(可根据实际需求调整)
|
||||
const levelIconMap = {
|
||||
'-1': 'el-icon-HomeFilled',
|
||||
0: 'el-icon-CollectionTag',
|
||||
1: 'el-icon-CollectionTag',
|
||||
2: 'el-icon-Flag',
|
||||
3: 'el-icon-OfficeBuilding',
|
||||
4: 'el-icon-DataAnalysis',
|
||||
5: 'el-icon-DataAnalysis',
|
||||
7: 'el-icon-DataAnalysis',
|
||||
6: 'fa-solid fa-location-dot'
|
||||
}
|
||||
|
||||
/**
|
||||
* 递归处理树形数据,为不同层级节点设置图标和颜色
|
||||
* @param data 树形数据数组
|
||||
* @param level 当前层级(默认从1开始)
|
||||
*/
|
||||
function processTreeData(data: any[], level: number = -1, alias: string = '') {
|
||||
// 空值判断,避免数组为空或undefined时报错
|
||||
if (!Array.isArray(data) || data.length === 0) return
|
||||
|
||||
data.forEach(item => {
|
||||
// 1. 设置基础图标(根据层级匹配)
|
||||
item.icon = levelIconMap[level] || ''
|
||||
item.alias = alias + `${item.name}`
|
||||
// 2. 设置基础颜色
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
// 3. 第6层特殊处理:根据comFlag调整颜色
|
||||
if (level === 6 && item.hasOwnProperty('comFlag')) {
|
||||
switch (item.comFlag) {
|
||||
case 0:
|
||||
item.color = 'red !important'
|
||||
break
|
||||
case 1:
|
||||
item.color = '#00f93b !important'
|
||||
break
|
||||
case 2:
|
||||
item.color = '#8c8c8c !important'
|
||||
break
|
||||
// 默认值:保持原有基础颜色
|
||||
default:
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
}
|
||||
}
|
||||
|
||||
// 4. 递归处理子节点,层级+1
|
||||
if (item.children && item.children.length > 0) {
|
||||
processTreeData(item.children, item.children[0].level, level == '-1' ? '' : item.alias + '>')
|
||||
}
|
||||
})
|
||||
}
|
||||
/**
|
||||
* 递归查找树形结构中第一个level===6的节点(找到即终止递归)
|
||||
* @param {Object|Array} tree - 树形数据(根节点数组 或 单个根节点)
|
||||
* @returns {Object|null} 第一个level为6的节点,无则返回null
|
||||
*/
|
||||
function findFirstLevel6Node(tree: any) {
|
||||
// 统一处理入参:如果是数组,遍历根节点数组(按顺序找第一个符合条件的)
|
||||
if (Array.isArray(tree)) {
|
||||
for (const rootNode of tree) {
|
||||
const result = traverse(rootNode)
|
||||
// 找到第一个匹配节点,立即返回(终止根节点遍历)
|
||||
if (result) return result
|
||||
}
|
||||
// 所有根节点遍历完未找到
|
||||
return null
|
||||
} else {
|
||||
// 入参是单个节点,直接递归遍历
|
||||
return traverse(tree)
|
||||
}
|
||||
|
||||
// 核心递归遍历函数
|
||||
function traverse(node) {
|
||||
// 终止条件1:节点不存在,返回null
|
||||
if (!node) return null
|
||||
|
||||
// 终止条件2:找到level===6的节点,立即返回(终止递归)
|
||||
if (node.level === 6) {
|
||||
return node
|
||||
}
|
||||
|
||||
// 终止条件3:节点无children,返回null
|
||||
if (!node.children || node.children.length === 0) {
|
||||
return null
|
||||
}
|
||||
|
||||
// 按顺序遍历当前节点的子节点
|
||||
for (const child of node.children) {
|
||||
const foundNode = traverse(child)
|
||||
// 子节点中找到目标节点,立即返回(终止后续子节点遍历)
|
||||
if (foundNode) {
|
||||
return foundNode
|
||||
}
|
||||
}
|
||||
|
||||
// 当前节点及所有子节点都无匹配,返回null
|
||||
return null
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ treeRef, scrollToNode, tree })
|
||||
loadData()
|
||||
</script>
|
||||
|
||||
@@ -28,7 +28,7 @@ const tree = ref()
|
||||
const treeRef = ref()
|
||||
|
||||
const loadData = (id?: any) => {
|
||||
console.log('🚀 ~ loadData ~ id:', id)
|
||||
|
||||
let nodeKey = ''
|
||||
queryAll().then(res => {
|
||||
res.data.forEach((item: any) => {
|
||||
|
||||
@@ -79,7 +79,7 @@ const init = async () => {
|
||||
// 设置消息接收回调
|
||||
mqttClient.onMessage((topic, message) => {
|
||||
const msg = JSON.parse(message.toString())
|
||||
console.log('🚀 ~ init ~ msg:', msg)
|
||||
// console.log('🚀 ~ init ~ msg:', msg)
|
||||
if (msg.deptList.includes(adminInfo.$state.deptId)) {
|
||||
drawer.value = true
|
||||
isLoading.value = true
|
||||
|
||||
@@ -29,7 +29,7 @@ const emit = defineEmits(['update:modelValue'])
|
||||
const dialogVisible = computed({
|
||||
get: () => props.modelValue,
|
||||
set: (val) => {
|
||||
console.log('set: ', val)
|
||||
|
||||
emit('update:modelValue', val)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -25,16 +25,18 @@ export const useMonitoringPoint = defineStore(
|
||||
val: any
|
||||
) => {
|
||||
state[key] = val
|
||||
|
||||
}
|
||||
const setShowCheckBox = (val: boolean) => {
|
||||
if (val && state.lineIds.length === 0) {
|
||||
state.lineIds = [state.lineId]
|
||||
console.log('====================================')
|
||||
console.log(state.lineIds)
|
||||
console.log('====================================')
|
||||
// console.log('====================================')
|
||||
// console.log(state.lineIds)
|
||||
// console.log('====================================')
|
||||
}
|
||||
state.showCheckBox = val
|
||||
}
|
||||
|
||||
return { state, setValue, setShowCheckBox }
|
||||
},
|
||||
{
|
||||
|
||||
@@ -1,8 +1,13 @@
|
||||
import { downloadFile } from '@/api/system-boot/file'
|
||||
|
||||
const sanitizeUrl = (url: string): string => {
|
||||
return url.replace(/\[/g, '(').replace(/\]/g, ')')
|
||||
}
|
||||
|
||||
// 下载文件
|
||||
export const download = (urls: string) => {
|
||||
//console.log('下载', urls)
|
||||
|
||||
|
||||
downloadFile({ filePath: urls })
|
||||
.then((res: any) => {
|
||||
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
||||
@@ -55,10 +60,8 @@ function removeLastDotSuffix(str: string) {
|
||||
export const previewFile = async (urls: any) => {
|
||||
//console.log('预览', urls)
|
||||
let url = ''
|
||||
//console.log('urls', decodeURI(urls))
|
||||
await downloadFile({ filePath: decodeURI(urls) })
|
||||
.then((res: any) => {
|
||||
|
||||
.then((res: any) => {
|
||||
// 1. 确定文件MIME类型(优化:用更简洁的方式)
|
||||
const getFileType = (url: string) => {
|
||||
const ext = url.split('.').pop()?.toLowerCase() || ''
|
||||
@@ -74,11 +77,8 @@ export const previewFile = async (urls: any) => {
|
||||
jpg: 'image/jpg'
|
||||
}
|
||||
return mimeMap[ext] || ''
|
||||
}
|
||||
|
||||
}
|
||||
const blob = new Blob([res], { type: getFileType(decodeURI(urls)) })
|
||||
|
||||
|
||||
// 3. 创建下载链接
|
||||
url = window.URL.createObjectURL(blob)
|
||||
})
|
||||
|
||||
@@ -19,7 +19,7 @@ interface TableStoreParams {
|
||||
publicHeight?: number //计算高度
|
||||
resetCallback?: () => void // 重置
|
||||
loadCallback?: () => void // 接口调用后的回调
|
||||
exportProcessingData?:() => void //导出处理数据
|
||||
exportProcessingData?: () => void //导出处理数据
|
||||
beforeSearchFun?: () => void // 接口调用前的回调
|
||||
}
|
||||
|
||||
@@ -45,8 +45,9 @@ export default class TableStore {
|
||||
pageNum: 1,
|
||||
pageSize: 20
|
||||
},
|
||||
filename:null,
|
||||
filename: null,
|
||||
loading: true,
|
||||
exportLoading: false,
|
||||
column: [],
|
||||
loadCallback: null,
|
||||
exportProcessingData: null,
|
||||
@@ -65,7 +66,7 @@ export default class TableStore {
|
||||
this.table.filename = options.filename || null
|
||||
this.table.column = options.column
|
||||
this.showPage = options.showPage !== false
|
||||
|
||||
|
||||
this.table.publicHeight = options.publicHeight || 0
|
||||
this.table.resetCallback = options.resetCallback || null
|
||||
this.table.loadCallback = options.loadCallback || null
|
||||
@@ -84,13 +85,11 @@ export default class TableStore {
|
||||
this.initData = JSON.parse(JSON.stringify(this.table.params))
|
||||
}
|
||||
if (!this.timeAll) {
|
||||
delete this.table.params.startTime;
|
||||
delete this.table.params.endTime;
|
||||
delete this.table.params.searchBeginTime;
|
||||
delete this.table.params.searchEndTime;
|
||||
delete this.table.params.timeFlag;
|
||||
|
||||
|
||||
delete this.table.params.startTime
|
||||
delete this.table.params.endTime
|
||||
delete this.table.params.searchBeginTime
|
||||
delete this.table.params.searchEndTime
|
||||
delete this.table.params.timeFlag
|
||||
}
|
||||
createAxios(
|
||||
Object.assign(
|
||||
@@ -130,11 +129,11 @@ export default class TableStore {
|
||||
* @param data 携带数据
|
||||
*/
|
||||
onTableAction = (event: string, data: anyObj) => {
|
||||
|
||||
const actionFun = new Map([
|
||||
[
|
||||
'search',
|
||||
() => {
|
||||
|
||||
this.table.params.pageNum = 1
|
||||
this.index()
|
||||
}
|
||||
@@ -202,8 +201,9 @@ export default class TableStore {
|
||||
[
|
||||
'export',
|
||||
() => {
|
||||
this.table.exportLoading = true
|
||||
// this.index()
|
||||
console.log('export')
|
||||
//console.log('export')
|
||||
let params = { ...this.table.params, pageNum: 1, pageSize: this.table.total }
|
||||
createAxios(
|
||||
Object.assign(
|
||||
@@ -213,12 +213,17 @@ export default class TableStore {
|
||||
},
|
||||
requestPayload(this.method, params, this.paramsPOST)
|
||||
)
|
||||
).then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
console.log('11111',this.table)
|
||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
})
|
||||
)
|
||||
.then(res => {
|
||||
this.table.allData = filtration(res.data.records || res.data)
|
||||
this.table.exportProcessingData && this.table.exportProcessingData()
|
||||
this.table.allFlag = data.showAllFlag || true
|
||||
this.table.exportLoading = false
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
this.table.exportLoading = false
|
||||
})
|
||||
}
|
||||
]
|
||||
])
|
||||
|
||||
@@ -301,7 +301,7 @@ const options1 = [
|
||||
const height = mainHeight(20)
|
||||
const heightB = mainHeight(448)
|
||||
const heightA = mainHeight(180)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const dotList: any = ref({})
|
||||
@@ -786,7 +786,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log('🚀 ~ handleNodeClick ~ data:', data)
|
||||
//console.log('🚀 ~ handleNodeClick ~ data:', data)
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
// dotList.value.id = '6469e77fda42db12c7ca6620a092f03c1'
|
||||
|
||||
@@ -321,7 +321,7 @@ const options1 = [
|
||||
]
|
||||
const height = mainHeight(20)
|
||||
const heightB = mainHeight(445)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const TableHeaderRef = ref()
|
||||
const detailRef = ref()
|
||||
const dotList: any = ref({})
|
||||
@@ -757,7 +757,7 @@ const timeClick = (row: any) => {
|
||||
}
|
||||
// 点击越限
|
||||
const detailClick = (row: any, title: string, key: string) => {
|
||||
console.log('🚀 ~ detailClick ~ row:', row)
|
||||
// console.log('🚀 ~ detailClick ~ row:', row)
|
||||
detailRef.value.open({
|
||||
row: row,
|
||||
title: title,
|
||||
@@ -802,7 +802,7 @@ onMounted(() => {
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log('🚀 ~ handleNodeClick ~ data:', data)
|
||||
// console.log('🚀 ~ handleNodeClick ~ data:', data)
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
// dotList.value.id = '6469e77fda42db12c7ca6620a092f03c1'
|
||||
|
||||
@@ -450,7 +450,7 @@ const selChange = async (e: any) => {
|
||||
}
|
||||
// 导出
|
||||
const onExport = () => {
|
||||
console.log("🚀 ~ onExport ~ document.getElementById('exportId'):", document.getElementById('exportId'))
|
||||
// console.log("🚀 ~ onExport ~ document.getElementById('exportId'):", document.getElementById('exportId'))
|
||||
|
||||
// 转换成canvas
|
||||
html2canvas(document.getElementById('exportId'), {
|
||||
@@ -459,7 +459,7 @@ const onExport = () => {
|
||||
logging: false, // 关闭日志
|
||||
scale: 2 // 提高缩放比例以获得更清晰的截图
|
||||
}).then(function (canvas) {
|
||||
console.log('🚀 ~ onExport ~ canvas:', canvas)
|
||||
// console.log('🚀 ~ onExport ~ canvas:', canvas)
|
||||
// 创建a标签,实现下载
|
||||
let creatIMg = document.createElement('a')
|
||||
creatIMg.download = '光伏电站承载能力评估结果.png' // 设置下载的文件名,
|
||||
|
||||
@@ -205,7 +205,7 @@ const props = defineProps(['rowList'])
|
||||
const harmonic = harmonicOptions.filter(item => item.value < 26)
|
||||
const currentLod = ref(false)
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const dictData = useDictData()
|
||||
const datePickerRef = ref()
|
||||
const height = mainHeight(80).height
|
||||
|
||||
@@ -176,7 +176,7 @@ const info = () => {
|
||||
})
|
||||
})
|
||||
})
|
||||
console.log('🚀 ~ queyDetail ~ photovoltaicData.value:', photovoltaicData.value)
|
||||
// console.log('🚀 ~ queyDetail ~ photovoltaicData.value:', photovoltaicData.value)
|
||||
})
|
||||
// 电弧炉
|
||||
queyDetailDhl().then(res => {
|
||||
|
||||
@@ -430,7 +430,7 @@ const currentChangeEvent = () => {
|
||||
|
||||
// 重启进程
|
||||
const restart = (data: any) => {
|
||||
console.log('🚀 ~ restart ~ data:', data)
|
||||
// console.log('🚀 ~ restart ~ data:', data)
|
||||
askRestartProcess({
|
||||
deviceRebootType: data.processNo,
|
||||
nodeId: nodeId.value,
|
||||
|
||||
@@ -35,7 +35,7 @@ const dialogVisible = ref(false)
|
||||
const tableData = ref([])
|
||||
|
||||
const open = (e: any) => {
|
||||
console.log("🚀 ~ open ~ e:", e)
|
||||
//console.log("🚀 ~ open ~ e:", e)
|
||||
echartsXq.value = {
|
||||
title: {
|
||||
text: e.name + '性能详情'
|
||||
|
||||
@@ -223,7 +223,7 @@ const manage = (name: string, key: number) => {
|
||||
.getCheckboxRecords()
|
||||
.filter((item: any) => item.level == 4)
|
||||
.map(item => item.id)
|
||||
console.log('🚀 ~ deviceData ~ selectRecords:', selectRecords)
|
||||
//console.log('🚀 ~ deviceData ~ selectRecords:', selectRecords)
|
||||
if (selectRecords.length == 0) {
|
||||
return ElMessage({
|
||||
message: '请至少选择一台装置',
|
||||
|
||||
@@ -1694,7 +1694,7 @@ import { useDictData } from '@/stores/dictData'
|
||||
import { ref, reactive, onMounted } from 'vue'
|
||||
import { ElMessage, ElMessageBox } from 'element-plus'
|
||||
import { getYwZtSubstation } from '@/api/device-boot/device'
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const TerminalRef = ref()
|
||||
const pageHeight = mainHeight(20)
|
||||
const Height = mainHeight(100)
|
||||
@@ -2313,7 +2313,7 @@ const remove = () => {
|
||||
const next = async () => {
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
console.log('🚀 ~ awaitmainForm.value.validate ~ nodeLevel.value:', nodeLevel.value)
|
||||
// console.log('🚀 ~ awaitmainForm.value.validate ~ nodeLevel.value:', nodeLevel.value)
|
||||
|
||||
switch (nodeLevel.value) {
|
||||
case 100:
|
||||
|
||||
@@ -1059,7 +1059,7 @@ const filterUsers = (arr: any) => {
|
||||
userTypeList.value = userTypeList.value.filter(item => !arr.includes(item.value))
|
||||
}
|
||||
const setcontroFlag = () => {
|
||||
console.log(12333)
|
||||
|
||||
|
||||
controFlag.value = true
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ const preview = (val: any, url: any) => {
|
||||
}
|
||||
//预测评估报告
|
||||
if (val == 'predictionEvaluationReport') {
|
||||
console.log(url, '9999999')
|
||||
|
||||
predictionEvaluationReportRef?.value.open(url)
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
|
||||
@@ -181,7 +181,7 @@ const zoom = (value: any) => {
|
||||
component: registerComponent(item.path)
|
||||
}))
|
||||
}
|
||||
console.log('🚀 ~ zoom ~ layout.value:', layout.value)
|
||||
// console.log('🚀 ~ zoom ~ layout.value:', layout.value)
|
||||
|
||||
flag.value = !flag.value
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ const cycle = [
|
||||
{ value: '3', label: '年' }
|
||||
]
|
||||
const changeTree = (row: any) => {
|
||||
console.log("🚀 ~ changeTree ~ row:", row)
|
||||
// console.log("🚀 ~ changeTree ~ row:", row)
|
||||
TreeList.value = row
|
||||
if (title.value == '修改算法') {
|
||||
if (row.level != 4) {
|
||||
|
||||
@@ -134,7 +134,7 @@ defineOptions({
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(20)
|
||||
const heightTab = mainHeight(82)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const addTreeRef = ref()
|
||||
const editorRef = ref()
|
||||
const dialogVisible = ref(false)
|
||||
|
||||
@@ -26,7 +26,7 @@ defineOptions({
|
||||
})
|
||||
const emits = defineEmits(['algorithm'])
|
||||
const height = mainHeight(20)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
|
||||
const popupEditFlag = ref(false)
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<el-drawer v-model="drawer" size="60%">
|
||||
<div class="box mt20">
|
||||
<el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||
v-if="information">
|
||||
v-if="information" >
|
||||
<el-button icon="el-icon-Top" type="primary">上传常见治理措施</el-button>
|
||||
</el-upload>
|
||||
<el-button icon="el-icon-Download" type="primary" class="ml10" @click="downloadTheReport">
|
||||
@@ -15,16 +15,16 @@
|
||||
<el-collapse-item title="国家电网有限公司企业标准" name="2">
|
||||
<!-- <el-empty description="暂无数据" class="custom-empty iframe" /> -->
|
||||
<div :style="`overflow: auto;`" class="iframe">
|
||||
<vue-office-docx v-if="url.includes('.doc') || url.includes('.docx')" :src="url" />
|
||||
<vue-office-excel v-if="url.includes('.xls') || url.includes('.xlsx')" :src="url"
|
||||
<vue-office-docx v-if="urlKey.includes('.doc') || urlKey.includes('.docx')" :src="url" />
|
||||
<vue-office-excel v-if="urlKey.includes('.xls') || urlKey.includes('.xlsx')" :src="url"
|
||||
:options="excelOptions" />
|
||||
<!-- <vue-office-pdf v-if="url.includes('.pdf')" :src="url" /> -->
|
||||
<iframe v-if="url.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||
<!-- <vue-office-pdf v-if="urlKey.includes('.pdf')" :src="url" /> -->
|
||||
<iframe v-if="urlKey.includes('.pdf')" :src="url" style="width: 100%; height: 99%"></iframe>
|
||||
<img v-if="
|
||||
url.includes('.png') ||
|
||||
url.includes('.jpg') ||
|
||||
url.includes('.gif') ||
|
||||
url.includes('.bmp')
|
||||
urlKey.includes('.png') ||
|
||||
urlKey.includes('.jpg') ||
|
||||
urlKey.includes('.gif') ||
|
||||
urlKey.includes('.bmp')
|
||||
" :src="url" />
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
@@ -45,6 +45,7 @@ import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
|
||||
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
|
||||
import { previewFile } from '@/utils/fileDownLoad'
|
||||
const adminInfo = useAdminInfo()
|
||||
const drawer = ref(false)
|
||||
const activeName = ref('2')
|
||||
@@ -53,17 +54,14 @@ const url = ref('')
|
||||
const excelOptions = ref({})
|
||||
const information = adminInfo.roleCode.includes('information_info')
|
||||
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
const open = (row: any) => {
|
||||
// console.log('🚀 ~ open ~ row:', row)
|
||||
// url.value = row
|
||||
|
||||
const urlKey=ref('')
|
||||
const open = async (row: any) => {
|
||||
drawer.value = true
|
||||
if(VITE_FLAG){
|
||||
url.value = `/api-docx/excelreport` + row
|
||||
excelOptions.value = { xls: row.split('.')[1] == 'xls' ? true : false }
|
||||
}else{
|
||||
urlKey.value=row
|
||||
const previewUrl = await previewFile(row);
|
||||
url.value = previewUrl;
|
||||
|
||||
}
|
||||
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
||||
// url.value = res.data.url
|
||||
// })
|
||||
|
||||
@@ -64,7 +64,7 @@ defineOptions({
|
||||
const excelOptions = ref({})
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(20)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const treeRef = ref()
|
||||
const addTreeRef = ref()
|
||||
const url = ref('')
|
||||
@@ -81,13 +81,14 @@ onMounted(() => {
|
||||
const urlKey=ref('')
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||
// console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||
dotList.value = data
|
||||
url.value = ''
|
||||
flag.value = false
|
||||
if (data?.url != null && data?.url != '') {
|
||||
flag.value = true
|
||||
urlKey.value = data.url
|
||||
console.log('urlKey.value',urlKey.value)
|
||||
setTimeout(async () => {
|
||||
if(VITE_FLAG){
|
||||
url.value = `/api-docx/excelreport` + data.url
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker area showExport>
|
||||
<template #select>
|
||||
<el-form-item label="统计类型:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.statisticalType"
|
||||
placeholder="请选择统计类型"
|
||||
value-key="id"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classificationData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="电压等级:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.scale"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择电压等级"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in voltageleveloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端厂家:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacturer"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择终端厂家"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in terminaloption"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.loadType"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择干扰源类型"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in interfereoption"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电网标志">
|
||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getAreaDept } from '@/api/harmonic-boot/area'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/area/harmonicDistortionRate'
|
||||
})
|
||||
|
||||
const dictData = useDictData()
|
||||
//字典获取电压等级
|
||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典获取终端厂家
|
||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||
//字典获取统计类型
|
||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||
//字典获取干扰源类型
|
||||
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||
const sign = dictData.getBasicData('power_flag')
|
||||
|
||||
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/tHDistortion/getTHDistortionTableData',
|
||||
isWebPaging: true,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'subStation',
|
||||
title: '变电站',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在地市',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
field: 'manufacturer',
|
||||
title: '终端厂家',
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
field: 'deviceName',
|
||||
title: '终端名称',
|
||||
minWidth: 80
|
||||
},
|
||||
|
||||
{
|
||||
title: '网络参数',
|
||||
field: 'ip',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '监测点名称',
|
||||
field: 'lineName',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
title: '总谐波畸变率(%)',
|
||||
field: 'distortion',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue == 3.14159 ? '暂无数据' : row.cellValue
|
||||
},
|
||||
minWidth: 120
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
})
|
||||
|
||||
tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.scale = []
|
||||
tableStore.table.params.manufacturer = []
|
||||
tableStore.table.params.loadType = []
|
||||
tableStore.table.params.serverName = 'harmonicBoot'
|
||||
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -107,7 +107,7 @@ const tableStore = new TableStore({
|
||||
var tips = ''
|
||||
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
if (params[i].value == 1) {
|
||||
if (params[i].value == 3.14159) {
|
||||
tips += params[i].name + '</br>'
|
||||
tips += params[i].marker + '在线率:暂无数据'
|
||||
} else {
|
||||
@@ -143,7 +143,21 @@ const tableStore = new TableStore({
|
||||
//color:function(d){return "#"+Math.floor(Math.random()*(256*256*256-1)).toString(16);}
|
||||
// 定制显示(按顺序)
|
||||
color: function (params: any) {
|
||||
if (params.value >= 90) {
|
||||
if (params.value == 3.14159) {
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ccc'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
}else if (params.value >= 90) {
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
@@ -171,7 +185,7 @@ const tableStore = new TableStore({
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (params.value <= 60 && params.value > 1) {
|
||||
} else if (params.value > 0 && params.value <= 60) {
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
@@ -180,12 +194,12 @@ const tableStore = new TableStore({
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#A52a2a'
|
||||
color: '#CC0100'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (params.value > 0 && params.value <= 1) {
|
||||
} else if (params.value == 0) {
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
|
||||
@@ -153,7 +153,7 @@ const treeData = ref([])
|
||||
const idArr = ref([])
|
||||
const activeName = ref(0)
|
||||
const getTreeData = async () => {
|
||||
console.log('getTreeData')
|
||||
|
||||
await getAreaDept().then(res => {
|
||||
var data = res.data
|
||||
data.forEach(element => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader datePicker ref="header">
|
||||
<TableHeader area datePicker ref="header">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="电网标志">
|
||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||
@@ -11,82 +11,119 @@
|
||||
</TableHeader>
|
||||
<div v-loading="tableStore.table.loading" class="pr10">
|
||||
<el-row>
|
||||
<el-col :span="12" class="pd10">
|
||||
<el-tag style="background: #339966;" class="tag" size="small">5级</el-tag>
|
||||
<span style="color: #339966;" class="text">:优秀--(4.5,5]</span>
|
||||
<el-tag style="background: #3399ff;" class="tag" size="small">4级</el-tag>
|
||||
<span style="color: #3399ff;" class="text">:良好--(4,4.5]</span>
|
||||
<el-tag style="background: #ffcc33;" class="tag" size="small">3级</el-tag>
|
||||
<span style="color: #ffcc33;" class="text">:合格--(3,4]</span>
|
||||
<el-tag style="background: #ff9900;" class="tag" size="small">2级</el-tag>
|
||||
<span style="color: #ff9900;" class="text">:较差--(2,3]</span>
|
||||
<el-tag style="background: #A52a2a;" class="tag" size="small">1级</el-tag>
|
||||
<span style="color: #A52a2a;" class="text">:极差--[1,2]</span>
|
||||
<el-col :span="12" class="pd10" v-if="!VITE_FLAG">
|
||||
<el-tag style="background: #339966" class="tag" size="small">5级</el-tag>
|
||||
<span style="color: #339966" class="text">:优秀--(4.5,5]</span>
|
||||
<el-tag style="background: #3399ff" class="tag" size="small">4级</el-tag>
|
||||
<span style="color: #3399ff" class="text">:良好--(4,4.5]</span>
|
||||
<el-tag style="background: #ffcc33" class="tag" size="small">3级</el-tag>
|
||||
<span style="color: #ffcc33" class="text">:合格--(3,4]</span>
|
||||
<el-tag style="background: #ff9900" class="tag" size="small">2级</el-tag>
|
||||
<span style="color: #ff9900" class="text">:较差--(2,3]</span>
|
||||
<el-tag style="background: #a52a2a" class="tag" size="small">1级</el-tag>
|
||||
<span style="color: #a52a2a" class="text">:极差--[1,2]</span>
|
||||
<div :style="{ height: layout.height }" style="overflow-y: auto" class="mt10">
|
||||
<div class=" cardBox">
|
||||
<div class="cardBox">
|
||||
<el-card v-for="(item, index) in tableStore.table.data" :key="index">
|
||||
<template #header>
|
||||
<div style="cursor: pointer;">
|
||||
<el-tag v-if="item.data == 3.14159 || item.data == 0"
|
||||
style="background: #ccc; color: #fff" size="small">
|
||||
<div style="cursor: pointer">
|
||||
<el-tag
|
||||
v-if="item.data == 3.14159 || item.data == 0"
|
||||
style="background: #ccc; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
无
|
||||
</el-tag>
|
||||
<el-tag v-if="4.5 < item.data && item.data <= 5 && item.data !== 3.14159"
|
||||
style="background: #339966; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="4.5 < item.data && item.data <= 5 && item.data !== 3.14159"
|
||||
style="background: #339966; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
5级
|
||||
</el-tag>
|
||||
<el-tag v-if="4 < item.data && item.data <= 4.5 && item.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="4 < item.data && item.data <= 4.5 && item.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
4级
|
||||
</el-tag>
|
||||
<el-tag v-if="3 < item.data && item.data <= 4 && item.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="3 < item.data && item.data <= 4 && item.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
3级
|
||||
</el-tag>
|
||||
<el-tag v-if="2 < item.data && item.data <= 3 && item.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="2 < item.data && item.data <= 3 && item.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
4级
|
||||
</el-tag>
|
||||
<el-tag v-if="1 <= item.data && item.data <= 2 && item.data !== 3.14159"
|
||||
style="background: #A52a2a; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1 <= item.data && item.data <= 2 && item.data !== 3.14159"
|
||||
style="background: #a52a2a; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
1级
|
||||
</el-tag>
|
||||
<span>{{ item.name }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
<div class="card-content">
|
||||
<div class="card-item" v-for="(item1, index1) in item.children" :key="index1">
|
||||
<el-tag v-if="item1.data == 3.14159 || item1.data == 0"
|
||||
style="background: #ccc; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="item1.data == 3.14159 || item1.data == 0"
|
||||
style="background: #ccc; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
无
|
||||
</el-tag>
|
||||
<el-tag v-if="4.5 < item1.data && item1.data <= 5 && item1.data !== 3.14159"
|
||||
style="background: #339966; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="4.5 < item1.data && item1.data <= 5 && item1.data !== 3.14159"
|
||||
style="background: #339966; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
5级
|
||||
</el-tag>
|
||||
<el-tag v-if="4 < item1.data && item1.data <= 4.5 && item1.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="4 < item1.data && item1.data <= 4.5 && item1.data !== 3.14159"
|
||||
style="background: #3399ff; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
4级
|
||||
</el-tag>
|
||||
<el-tag v-if="3 < item1.data && item1.data <= 4 && item1.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="3 < item1.data && item1.data <= 4 && item1.data !== 3.14159"
|
||||
style="background: #ffcc33; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
3级
|
||||
</el-tag>
|
||||
<el-tag v-if="2 < item1.data && item1.data <= 3 && item1.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="2 < item1.data && item1.data <= 3 && item1.data !== 3.14159"
|
||||
style="background: #ff9900; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
2级
|
||||
</el-tag>
|
||||
<el-tag v-if="1 <= item1.data && item1.data <= 2 && item1.data !== 3.14159"
|
||||
style="background: #A52a2a; color: #fff" size="small">
|
||||
<el-tag
|
||||
v-if="1 <= item1.data && item1.data <= 2 && item1.data !== 3.14159"
|
||||
style="background: #a52a2a; color: #fff"
|
||||
size="small"
|
||||
>
|
||||
1级
|
||||
</el-tag>
|
||||
<span class="xdf">
|
||||
<el-tooltip :show-arrow="false" :offset="-0" :content="item1.name"
|
||||
popper-class="atooltip" placement="bottom-start">
|
||||
|
||||
<el-tooltip
|
||||
:show-arrow="false"
|
||||
:offset="-0"
|
||||
:content="item1.name"
|
||||
placement="bottom-start"
|
||||
|
||||
>
|
||||
<div class="tooltipText">
|
||||
{{ item1.name }}
|
||||
</div>
|
||||
@@ -98,34 +135,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-col :span="VITE_FLAG ? 24 : 12">
|
||||
<my-echart class="tall" :options="echartList" />
|
||||
<div class="tall">
|
||||
<div class="tall mb10">
|
||||
<vxe-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
|
||||
|
||||
<vxe-column field="name" title="名称"></vxe-column>
|
||||
<vxe-column field="zc" title="综合评估值">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.data == 3.14159" style="color: #000;">
|
||||
暂无数据
|
||||
</span>
|
||||
<span v-if="scope.row.data !== 3.14159" style="color: #000;">
|
||||
<span v-if="scope.row.data == 3.14159" style="color: #000">暂无数据</span>
|
||||
<span v-if="scope.row.data !== 3.14159" style="color: #000">
|
||||
{{ scope.row.data }}
|
||||
</span>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="monitors" title="监测点个数(个)"></vxe-column>
|
||||
<vxe-column field="level" title="评估等级">
|
||||
|
||||
</vxe-column>
|
||||
<vxe-column field="level" title="评估等级"></vxe-column>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -138,14 +167,22 @@ import TableStore from '@/utils/tableStore'
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import * as echarts from 'echarts/core'
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/qydetailedAnalysis/pollutionqy'
|
||||
name: 'harmonic-boot/area/powerAssessment'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const echartList = ref({})
|
||||
const sign = dictData.getBasicData('power_flag')
|
||||
const header = ref()
|
||||
const options = dictData.getBasicData('Pollution_Statis', ['I_Neg', 'V_Inharm', 'V_Dev', 'V_Unbalance', 'Plt', 'Freq_Dev'])
|
||||
const options = dictData.getBasicData('Pollution_Statis', [
|
||||
'I_Neg',
|
||||
'V_Inharm',
|
||||
'V_Dev',
|
||||
'V_Unbalance',
|
||||
'Plt',
|
||||
'Freq_Dev'
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/comAccess/getComAccessData',
|
||||
method: 'POST',
|
||||
@@ -153,10 +190,6 @@ const tableStore = new TableStore({
|
||||
loadCallback: () => {
|
||||
histogram(tableStore.table.data)
|
||||
header.value.areaRef.change()
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
@@ -167,26 +200,23 @@ tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||
|
||||
tableStore.table.params.statisticalType = {}
|
||||
|
||||
|
||||
// 柱状图数据处理
|
||||
const histogram = (res: any) => {
|
||||
console.log(123);
|
||||
|
||||
echartList.value = {
|
||||
title: {
|
||||
text: '区域'
|
||||
},
|
||||
|
||||
|
||||
legend: {
|
||||
show: false
|
||||
},
|
||||
show: false
|
||||
},
|
||||
|
||||
xAxis: {
|
||||
name: '区域',
|
||||
data: res.map((item: any) => item.name)
|
||||
},
|
||||
yAxis: {
|
||||
name: '等级',// 给X轴加单位
|
||||
name: '等级', // 给X轴加单位
|
||||
min: 0,
|
||||
max: 5,
|
||||
splitLine: {
|
||||
@@ -208,11 +238,10 @@ const histogram = (res: any) => {
|
||||
texts.push('4级')
|
||||
} else if (value == 5) {
|
||||
texts.push('5级')
|
||||
|
||||
}
|
||||
return texts
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
options: {
|
||||
@@ -222,10 +251,10 @@ const histogram = (res: any) => {
|
||||
name: '评估值',
|
||||
type: 'bar',
|
||||
data: res.map((item: any) => {
|
||||
return item.data == 3.14159 ? 0.14159 : item.data
|
||||
return item.data == 3.14159 ? 0.14159 : item.data == 0 ? 0.14158 : item.data
|
||||
}),
|
||||
barMaxWidth: 30,
|
||||
|
||||
barMinHeight: 10,
|
||||
itemStyle: {
|
||||
normal: {
|
||||
// 随机显示
|
||||
@@ -234,44 +263,106 @@ const histogram = (res: any) => {
|
||||
// 定制显示(按顺序)
|
||||
color: function (params) {
|
||||
if (4.5 < params.value && params.value <= 5 && params.value !== 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#339966',
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#339966'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (4 < params.value && params.value <= 4.5 && params.value !== 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#3399FF'
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#3399FF'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (3 < params.value && params.value <= 4 && params.value !== 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FFCC33'
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FFCC33'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (2 < params.value && params.value <= 3 && params.value !== 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9900'
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9900'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (params.value >= 1 && params.value <= 2 && params.value !== 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#A52a2a'
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#A52a2a'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (params.value == 0.2) {
|
||||
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
|
||||
{
|
||||
offset: 1,
|
||||
color: "#999999"
|
||||
}], false)
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ccc'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
} else if (params.value == 0.14158) {
|
||||
return new echarts.graphic.LinearGradient(
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
0,
|
||||
[
|
||||
{
|
||||
offset: 1,
|
||||
color: '#ccc'
|
||||
}
|
||||
],
|
||||
false
|
||||
)
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
markLine: {
|
||||
silent: false,
|
||||
@@ -283,90 +374,81 @@ const histogram = (res: any) => {
|
||||
emphasis: {
|
||||
lineStyle: {
|
||||
width: 1
|
||||
},
|
||||
}
|
||||
},
|
||||
data: [
|
||||
|
||||
{
|
||||
name: "",
|
||||
name: '',
|
||||
yAxis: 1,
|
||||
lineStyle: {
|
||||
color: '#A52a2a',
|
||||
color: '#A52a2a'
|
||||
},
|
||||
label: {
|
||||
// position:"middle",
|
||||
formatter: '{b}',
|
||||
textStyle: {
|
||||
color: '#A52a2a',
|
||||
|
||||
|
||||
color: '#A52a2a'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
name: '',
|
||||
yAxis: 2,
|
||||
lineStyle: {
|
||||
color: '#FF9900',
|
||||
|
||||
color: '#FF9900'
|
||||
},
|
||||
label: {
|
||||
// position:"middle",
|
||||
formatter: '{b}',
|
||||
textStyle: {
|
||||
color: '#FF9900',
|
||||
|
||||
color: '#FF9900'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
name: '',
|
||||
yAxis: 3,
|
||||
lineStyle: {
|
||||
color: '#FFCC33',
|
||||
color: '#FFCC33'
|
||||
},
|
||||
label: {
|
||||
// position:"middle",
|
||||
formatter: '{b}',
|
||||
textStyle: {
|
||||
color: '#FFCC33',
|
||||
|
||||
color: '#FFCC33'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
name: '',
|
||||
yAxis: 4,
|
||||
lineStyle: {
|
||||
color: '#3399FF',
|
||||
color: '#3399FF'
|
||||
},
|
||||
label: {
|
||||
// position:"middle",
|
||||
formatter: '{b}',
|
||||
textStyle: {
|
||||
color: '#3399FF',
|
||||
|
||||
color: '#3399FF'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "",
|
||||
name: '',
|
||||
yAxis: 5,
|
||||
lineStyle: {
|
||||
color: '#339966',
|
||||
color: '#339966'
|
||||
},
|
||||
label: {
|
||||
// position:"middle",
|
||||
formatter: '{b}',
|
||||
textStyle: {
|
||||
color: '#339966',
|
||||
|
||||
color: '#339966'
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -397,7 +479,6 @@ const layout1 = mainHeight(93) as any
|
||||
}
|
||||
|
||||
:deep(.cardBox) {
|
||||
|
||||
box-sizing: border-box;
|
||||
overflow: auto;
|
||||
display: grid;
|
||||
@@ -410,8 +491,6 @@ const layout1 = mainHeight(93) as any
|
||||
background-image: linear-gradient(var(--el-color-primary), var(--el-color-primary-light-3));
|
||||
font-weight: bold;
|
||||
|
||||
|
||||
|
||||
.el-card__header {
|
||||
padding: 10px !important;
|
||||
color: #fff;
|
||||
@@ -420,7 +499,6 @@ const layout1 = mainHeight(93) as any
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.el-card__body {
|
||||
@@ -440,7 +518,6 @@ const layout1 = mainHeight(93) as any
|
||||
width: 50%;
|
||||
display: flex;
|
||||
cursor: pointer;
|
||||
|
||||
}
|
||||
|
||||
.xdf {
|
||||
@@ -456,11 +533,8 @@ const layout1 = mainHeight(93) as any
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
margin-left: 5px;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
</div>
|
||||
@@ -98,6 +98,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
@@ -316,6 +317,7 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
// .online {
|
||||
// width: 100%;
|
||||
|
||||
253
src/views/pqs/harmonicMonitoring/area/qualifiedRate/index1.vue
Normal file
253
src/views/pqs/harmonicMonitoring/area/qualifiedRate/index1.vue
Normal file
@@ -0,0 +1,253 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker area showExport>
|
||||
<template #select>
|
||||
<el-form-item label="统计类型:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.statisticalType"
|
||||
placeholder="请选择统计类型"
|
||||
value-key="id"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in classificationData"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="电压等级:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.scale"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择电压等级"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in voltageleveloption"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="终端厂家:" v-if="false">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.manufacturer"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择终端厂家"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in terminaloption"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="干扰源类型:">
|
||||
<el-select
|
||||
v-model="tableStore.table.params.loadType"
|
||||
multiple
|
||||
collapse-tags
|
||||
clearable
|
||||
placeholder="请选择干扰源类型"
|
||||
style="width: 100%"
|
||||
value-key="id"
|
||||
>
|
||||
<el-option
|
||||
v-for="(item, index) in interfereoption"
|
||||
:key="index"
|
||||
:label="item.name"
|
||||
:value="item"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="电网标志">
|
||||
<el-select v-model="tableStore.table.params.powerFlag" placeholder="请选择电网标志">
|
||||
<el-option v-for="item in sign" :key="item.id" :label="item.name" :value="item.algoDescribe" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted, watch } from 'vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getAreaDept } from '@/api/harmonic-boot/area'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/area/qualifiedRate'
|
||||
})
|
||||
|
||||
const dictData = useDictData()
|
||||
//字典获取电压等级
|
||||
const voltageleveloption = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
//字典获取终端厂家
|
||||
const terminaloption = dictData.getBasicData('Dev_Manufacturers')
|
||||
//字典获取统计类型
|
||||
const classificationData = dictData.getBasicData('Statistical_Type', ['Report_Type'])
|
||||
//字典获取干扰源类型
|
||||
const interfereoption = dictData.getBasicData('Interference_Source')
|
||||
const sign = dictData.getBasicData('power_flag')
|
||||
|
||||
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/harmonic-boot/steadyQualify/getSteadyQualifyTableData',
|
||||
isWebPaging: true,
|
||||
method: 'POST',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'subStation',
|
||||
title: '变电站',
|
||||
minWidth: 150
|
||||
},
|
||||
{
|
||||
field: 'city',
|
||||
title: '所在地市',
|
||||
minWidth: 100
|
||||
},
|
||||
{
|
||||
field: 'manufacturer',
|
||||
title: '终端厂家',
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
field: 'deviceName',
|
||||
title: '终端名称',
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '网络参数',
|
||||
field: 'ip',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 120
|
||||
},
|
||||
{
|
||||
title: '监测点名称',
|
||||
field: 'lineName',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 100
|
||||
},
|
||||
|
||||
{
|
||||
title: '谐波电压(%)',
|
||||
field: 'harmonicVoltage',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '电压偏差(%)',
|
||||
field: 'voltageOffset',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '三相电压不平衡度(%)',
|
||||
field: 'voltageUnbalance',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '间谐波电压含有率(%)',
|
||||
field: 'interHarmonic',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '谐波电流(%)',
|
||||
field: 'harmonicCurrent',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '负序电流(%)',
|
||||
field: 'negativeCurrent',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '频率偏差(%)',
|
||||
field: 'freqOffset',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
},
|
||||
{
|
||||
title: '闪变(%)',
|
||||
field: 'flicker',
|
||||
align: 'center',
|
||||
formatter: function (row) {
|
||||
return row.cellValue != 3.14159 ? row.cellValue : '/'
|
||||
},
|
||||
minWidth: 80
|
||||
}
|
||||
],
|
||||
|
||||
|
||||
})
|
||||
|
||||
tableStore.table.params.statisticalType = classificationData[0]
|
||||
tableStore.table.params.scale = []
|
||||
tableStore.table.params.manufacturer = []
|
||||
tableStore.table.params.loadType = []
|
||||
tableStore.table.params.serverName = 'harmonicBoot'
|
||||
tableStore.table.params.powerFlag = sign[0]?.algoDescribe || 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
@@ -85,7 +85,7 @@ const title = ref('')
|
||||
const key = ref(0)
|
||||
const statisticalName = ref('')
|
||||
const open = (row: any, flag: boolean, params: any) => {
|
||||
console.log('🚀 ~ open ~ row:', row)
|
||||
|
||||
voltageLevelFlag.value = flag
|
||||
loading.value = true
|
||||
title.value = row.name + '详情'
|
||||
|
||||
@@ -194,7 +194,7 @@ const dotList: any = ref({})
|
||||
const height = mainHeight(20)
|
||||
const heightB = mainHeight(70)
|
||||
const harmonic = harmonicOptions.slice(1)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const showTabs = ref(false)
|
||||
const loadDataOptions: any = ref([])
|
||||
const form: any = reactive({
|
||||
|
||||
@@ -62,7 +62,7 @@ const tableStore = new TableStore({
|
||||
render: 'basicButton',
|
||||
|
||||
click: row => {
|
||||
console.log("🚀 ~ row:", row)
|
||||
|
||||
push({
|
||||
path: "/admin/division/detail",
|
||||
query: {
|
||||
|
||||
@@ -122,7 +122,7 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
detailDialogTitle.value = '监测点污染详情'
|
||||
console.log('🚀 ~ row:', row)
|
||||
|
||||
detailLoading.value = true
|
||||
detailData.value = row.powerFlagPollutionList
|
||||
detailDialogVisible.value = true
|
||||
|
||||
@@ -111,7 +111,7 @@ const tableStore = new TableStore({
|
||||
map(tableStore.table.data)
|
||||
histogram(tableStore.table.data)
|
||||
EchartMap.value.GetEchar(header.value.areaRef.areaName)
|
||||
console.log("🚀 ~ header.value.areaRef.areaName:", header.value.areaRef.areaName)
|
||||
// console.log("🚀 ~ header.value.areaRef.areaName:", header.value.areaRef.areaName)
|
||||
|
||||
}
|
||||
})
|
||||
@@ -124,7 +124,7 @@ provide('tableStore', tableStore)
|
||||
|
||||
// 地图点击事件
|
||||
const getRegionByRegion = (list: any) => {
|
||||
console.log("🚀 ~ getRegionByRegion ~ list:", list)
|
||||
// console.log("🚀 ~ getRegionByRegion ~ list:", list)
|
||||
tableStore.table.params.deptIndex = list.id
|
||||
tableStore.onTableAction('search', {})
|
||||
}
|
||||
@@ -134,7 +134,7 @@ const getRegionByRegion = (list: any) => {
|
||||
|
||||
// 地图数处理
|
||||
const map = (res: any) => {
|
||||
console.log("🚀 ~ map ~ res:", res)
|
||||
// console.log("🚀 ~ map ~ res:", res)
|
||||
let areaData: any = []
|
||||
let xarr = []
|
||||
let yarr = []
|
||||
|
||||
@@ -136,7 +136,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'frequencyMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -144,7 +144,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'frequencyBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'frequencyDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -165,7 +173,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'voltageMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -173,7 +181,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'voltageBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'voltageDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -194,15 +210,24 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'harmonicVoltageMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
field: 'harmonicVoltageBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'harmonicVoltageDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -223,7 +248,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'harmonicCurrentMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -231,7 +256,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'harmonicCurrentBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'harmonicCurrentDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -252,7 +285,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'threePhaseVoltageMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -260,7 +293,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'threePhaseVoltageBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'threePhaseVoltageDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -281,7 +322,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'flickerMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -289,7 +330,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'flickerBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'flickerDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -310,7 +359,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'negativeMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -318,7 +367,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'negativeBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'negativeDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -339,7 +396,7 @@ const tableStore = new TableStore({
|
||||
children: [
|
||||
{
|
||||
field: 'interHarmonicMonitorNumber',
|
||||
title: '超标点数(天/点)',
|
||||
title: '超标点数(个)',
|
||||
minWidth: '140px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
@@ -347,7 +404,15 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{
|
||||
field: 'interHarmonicBiLi',
|
||||
title: '超标占比(%)',
|
||||
title: '累计占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'interHarmonicDayAvgBiLi',
|
||||
title: '日均占比(%)',
|
||||
minWidth: '100px',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue == -1 ? '/' : row.cellValue
|
||||
|
||||
@@ -249,7 +249,7 @@ const searchEvent = debounce(() => {
|
||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||
options
|
||||
)
|
||||
console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
|
||||
tableStore.table.data = rest
|
||||
|
||||
|
||||
@@ -249,7 +249,7 @@ const searchEvent = debounce(() => {
|
||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||
options
|
||||
)
|
||||
console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
// console.log('🚀 ~ searchEvent ~ rest:', rest)
|
||||
|
||||
tableStore.table.data = rest
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker ref="TableHeaderRef">
|
||||
<TableHeader date-picker area ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="运行状态">
|
||||
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||
@@ -329,7 +329,7 @@ const echart = () => {
|
||||
|
||||
series: [
|
||||
{
|
||||
name: '异常总数',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
data: [100],
|
||||
@@ -346,7 +346,7 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
@@ -355,7 +355,7 @@ const echart = () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '异常占比',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 13,
|
||||
data: [
|
||||
@@ -378,11 +378,11 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FF9100' // 0% 处的颜色
|
||||
color: '#57bc6e' // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
|
||||
@@ -193,7 +193,7 @@ const searchEvent = debounce(() => {
|
||||
(item: any) => searchProps.some(key => String(item[key]).toLowerCase().indexOf(filterVal) > -1),
|
||||
options
|
||||
)
|
||||
console.log("🚀 ~ searchEvent ~ rest:", rest)
|
||||
// console.log("🚀 ~ searchEvent ~ rest:", rest)
|
||||
|
||||
tableStore.table.data = rest
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<TableHeader date-picker ref="TableHeaderRef">
|
||||
<TableHeader date-picker area ref="TableHeaderRef">
|
||||
<template v-slot:select>
|
||||
<el-form-item label="运行状态">
|
||||
<el-select v-model="tableStore.table.params.lineRunFlag" clearable placeholder="请选择运行状态">
|
||||
@@ -271,7 +271,7 @@ const tableStore = new TableStore({
|
||||
return k.citName != '上送国网' && k.citName != '非上送国网'
|
||||
}
|
||||
})
|
||||
console.log(123, tableStore.table.params.statisticalType.name)
|
||||
// console.log(123, tableStore.table.params.statisticalType.name)
|
||||
|
||||
// 合并子集数据 并去重
|
||||
totalData.value = Array.from(
|
||||
@@ -326,7 +326,7 @@ const echart = () => {
|
||||
|
||||
series: [
|
||||
{
|
||||
name: '异常总数',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 12,
|
||||
data: [100],
|
||||
@@ -343,7 +343,7 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 1,
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
@@ -352,7 +352,7 @@ const echart = () => {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: '异常占比',
|
||||
name: '',
|
||||
type: 'bar',
|
||||
barWidth: 13,
|
||||
data: [monitoringPoints.value.totalOnlineRate == 0 ? '' : monitoringPoints.value.totalOnlineRate],
|
||||
@@ -369,11 +369,11 @@ const echart = () => {
|
||||
colorStops: [
|
||||
{
|
||||
offset: 0,
|
||||
color: '#FF9100' // 0% 处的颜色
|
||||
color: '#57bc6e' // 0% 处的颜色
|
||||
},
|
||||
{
|
||||
offset: 1,
|
||||
color: '#FF9100' // 100% 处的颜色
|
||||
color: '#57bc6e' // 100% 处的颜色
|
||||
}
|
||||
],
|
||||
global: false // 缺省为 false
|
||||
|
||||
@@ -194,9 +194,9 @@ const checkChange = () => {
|
||||
}
|
||||
}
|
||||
const close = () => {
|
||||
console.log('====================================')
|
||||
console.log(2123123)
|
||||
console.log('====================================')
|
||||
// console.log('====================================')
|
||||
// console.log(2123123)
|
||||
// console.log('====================================')
|
||||
options.value = null
|
||||
}
|
||||
const showCharts = (row: any, valueType: number, name: string) => {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
></PointTree>
|
||||
</pane>
|
||||
<pane>
|
||||
<div style="position: relative; height: 100%">
|
||||
<div style="position: relative; height: 100%; width: 100%">
|
||||
<el-tabs
|
||||
v-model="activeName"
|
||||
type="border-card"
|
||||
@@ -41,9 +41,9 @@
|
||||
<el-tab-pane label="监测点运行状态" name="6" lazy v-if="!isReload">
|
||||
<Yunxingzhuangtai v-if="activeName == '6'" />
|
||||
</el-tab-pane>
|
||||
<!-- <el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG">
|
||||
<el-tab-pane label="实时数据" name="7" lazy v-if="!isReload && !VITE_FLAG && !VITE_FLAG1">
|
||||
<Shishishuju v-if="activeName == '7'" />
|
||||
</el-tab-pane> -->
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="统计报表" name="8" lazy v-if="!isReload && VITE_FLAG">
|
||||
<StatisticalReport v-if="activeName == '8'" />
|
||||
</el-tab-pane>
|
||||
@@ -76,6 +76,7 @@ import Shishishuju from './shishishuju/index.vue'
|
||||
import { useRoute } from 'vue-router'
|
||||
import StatisticalReport from './statisticalReport/index.vue'
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
const VITE_FLAG1 = import.meta.env.VITE_NAME == 'hainan'
|
||||
import router from '@/router'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
import { id } from 'element-plus/es/locale'
|
||||
@@ -85,7 +86,7 @@ defineOptions({
|
||||
const route = useRoute()
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const pointTree = ref()
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const isReload = ref(false)
|
||||
const height = mainHeight(40)
|
||||
const activeName = ref('2')
|
||||
@@ -175,7 +176,7 @@ const findNodeByTreeId = (treeData: any, id: any) => {
|
||||
const getTargetNode = () => {
|
||||
const targetId = '9b7adecf588b4110acb7018f297592a7'
|
||||
const node = findNodeByTreeId(treeData.value, targetId)
|
||||
console.log('Vue中找到的节点:', node)
|
||||
// console.log('Vue中找到的节点:', node)
|
||||
}
|
||||
const changeTab = (e: string) => {
|
||||
activeName.value = e
|
||||
|
||||
@@ -61,7 +61,7 @@ defineOptions({
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const showTree = ref(false)
|
||||
const height = mainHeight(20)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
@@ -86,7 +86,7 @@ const tableStore = new TableStore({
|
||||
item.data[k.r][k.c].v ? (item.data[k.r][k.c] = k.v) : ''
|
||||
})
|
||||
})
|
||||
console.log(tableStore.table.data)
|
||||
|
||||
setTimeout(() => {
|
||||
luckysheet.create({
|
||||
container: 'luckysheet',
|
||||
@@ -126,7 +126,7 @@ const changetype = (val: any) => {
|
||||
reportForm.value = val.reportForm
|
||||
}
|
||||
const selectChange = () => {
|
||||
console.log('🚀 ~ selectChange ~ tableStore.table.data.lnegth :', tableStore.table.data.length)
|
||||
|
||||
if (tableStore.table.data.length != 0) {
|
||||
setTimeout(() => {
|
||||
luckysheet && luckysheet?.resize()
|
||||
|
||||
@@ -1300,7 +1300,7 @@ const rendering = () => {
|
||||
getEcharts()
|
||||
}
|
||||
const getEcharts = () => {
|
||||
console.log("🚀 ~ list.value.forEach ~ list.value:", list.value)
|
||||
|
||||
|
||||
list.value.forEach((item: any, i: number) => {
|
||||
item.option = {
|
||||
|
||||
@@ -231,7 +231,6 @@ const init = () => {
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
formatter: function (params: any) {
|
||||
console.log(params)
|
||||
let msg = ''
|
||||
msg += params[0].name
|
||||
for (let i in params) {
|
||||
|
||||
117
src/views/pqs/harmonicMonitoring/reportForms/region/index.vue
Normal file
117
src/views/pqs/harmonicMonitoring/reportForms/region/index.vue
Normal file
@@ -0,0 +1,117 @@
|
||||
<template>
|
||||
<div class="default-main" :style="height">
|
||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<PointTree
|
||||
:default-expand-all="false"
|
||||
@node-click="handleNodeClick"
|
||||
@init="handleNodeClick"
|
||||
></PointTree>
|
||||
</pane>
|
||||
<pane style="background: #fff" :style="height">
|
||||
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">
|
||||
生成
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
<div id="luckysheet">
|
||||
<img
|
||||
width="100%"
|
||||
:style="`height: calc(${tableStore.table.height} + 40px)`"
|
||||
src="@/assets/img/region.png"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</pane>
|
||||
</splitpanes>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import PointTree from '@/components/tree/pqs/areaTree.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { areaHarmonicReport } from '@/api/process-boot/reportForms'
|
||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
defineOptions({
|
||||
name: 'harmonic-boot/region/word'
|
||||
})
|
||||
const height = mainHeight(20)
|
||||
const size = ref(19)
|
||||
const loading = ref(false)
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
const Template: any = ref({})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '',
|
||||
method: 'POST',
|
||||
column: [],
|
||||
beforeSearchFun: () => {},
|
||||
loadCallback: () => {}
|
||||
})
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
|
||||
if (dom) {
|
||||
size.value = Math.round((180 / dom.offsetHeight) * 120)
|
||||
}
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
dotList.value = data
|
||||
}
|
||||
|
||||
// 生成
|
||||
const exportEvent = () => {
|
||||
loading.value = true
|
||||
ElMessage('生成报告中...')
|
||||
areaHarmonicReport({
|
||||
deptId: dotList.value.id,
|
||||
areaReportFlag: 1,
|
||||
startTime: TableHeaderRef.value.datePickerRef.timeValue[0],
|
||||
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||
})
|
||||
.then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
// createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name + '区域稳态报告' + dayjs().format('YYYYMMDD') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
loading.value = false
|
||||
})
|
||||
.catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.splitpanes.default-theme .splitpanes__pane {
|
||||
background: #eaeef1;
|
||||
}
|
||||
|
||||
.box {
|
||||
padding: 10px;
|
||||
}
|
||||
</style>
|
||||
@@ -72,7 +72,7 @@ defineOptions({
|
||||
const VITE_FLAG = import.meta.env.VITE_NAME == 'jibei'
|
||||
const showTree = ref(false)
|
||||
const height = mainHeight(20)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<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>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">生成</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
@@ -72,12 +72,13 @@ import { mainHeight } from '@/utils/layout'
|
||||
import { exportModel } from '@/api/process-boot/reportForms'
|
||||
import { genFileId, ElMessage, ElNotification } from 'element-plus'
|
||||
import type { UploadProps, UploadUserFile } from 'element-plus'
|
||||
|
||||
import dayjs from 'dayjs'
|
||||
defineOptions({
|
||||
// name: 'harmonic-boot/report/word'
|
||||
})
|
||||
const loading = ref(false)
|
||||
const height = mainHeight(20)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
@@ -143,6 +144,7 @@ const exportEvent = () => {
|
||||
message: '包含特殊字符,请注意修改!'
|
||||
})
|
||||
} else {
|
||||
loading.value = true
|
||||
ElMessage('生成报告中...')
|
||||
exportModel(form).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
@@ -152,10 +154,13 @@ const exportEvent = () => {
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
link.download = dotList.value.name // 设置下载的文件名
|
||||
link.download = dotList.value.name+ dayjs().format('YYYYMMDD') // 设置下载的文件名
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
loading.value =false
|
||||
}).catch((err: any) => {
|
||||
loading.value =false
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1099,7 +1099,7 @@ const toColTreeData = (treeData: any[]) => {
|
||||
item.keys = parent ? parent.keys.concat([item.id]) : [item.id]
|
||||
if (!item.children || !item.children.length) {
|
||||
const row: any = {}
|
||||
console.log("🚀 ~ item.keys.forEach ~ item:", item)
|
||||
|
||||
|
||||
item.keys.forEach((key: any, index: number) => {
|
||||
const level = index + 1
|
||||
@@ -1114,8 +1114,7 @@ const toColTreeData = (treeData: any[]) => {
|
||||
list.push(row)
|
||||
}
|
||||
}, options)
|
||||
console.log("🚀 ~ toColTreeData ~ list:", list)
|
||||
|
||||
|
||||
tableData.value = list
|
||||
}
|
||||
|
||||
|
||||
@@ -1116,7 +1116,7 @@ const rendering = () => {
|
||||
}
|
||||
opitonserise.push(data)
|
||||
} else if (item.chufa !== undefined && item2 == '暂态触发点') {
|
||||
console.log(123, new URL('@/assets/point.png', import.meta.url).href)
|
||||
// console.log(123, new URL('@/assets/point.png', import.meta.url).href)
|
||||
|
||||
let data = {
|
||||
name: item2,
|
||||
|
||||
@@ -653,7 +653,7 @@ const echart = (row: any) => {
|
||||
data: [item.ratioList]
|
||||
})
|
||||
})
|
||||
console.log("🚀 ~ echart ~ option:", option)
|
||||
// console.log("🚀 ~ echart ~ option:", option)
|
||||
|
||||
chart.setOption(option)
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ const addMarkers= async()=>{
|
||||
|
||||
|
||||
const mouseover = () => {
|
||||
console.log(123);
|
||||
|
||||
|
||||
}
|
||||
onMounted(() => {
|
||||
|
||||
@@ -106,7 +106,7 @@ const loadingTab = ref(false)
|
||||
const PollutionList = dictData.getBasicData('Pollution_Calc').filter(item => item.name == '谐波电压')
|
||||
|
||||
const open = async (row: any, list: any) => {
|
||||
console.log('🚀 ~ open ~ list:', list)
|
||||
|
||||
// getAssessDetail(row).then(res => {
|
||||
tableData.value = list
|
||||
subdata.value = tableData.value[0]?.powerFlagPollutionList || []
|
||||
|
||||
@@ -75,7 +75,7 @@ const picList: any = ref([])
|
||||
const Voltage = dictData.getBasicData('Dev_Voltage_Stand')
|
||||
const tableData: any = ref([])
|
||||
const options = dictData.getBasicData('Statistical_Type', ['Report_Type', 'Power_Network', 'JB_Power_Flag'])
|
||||
console.log("🚀 ~ options:", options)
|
||||
|
||||
const time = ref('1')
|
||||
const statisticalType = ref('Load_Type')
|
||||
const loadTypeArr = dictData.getBasicData('Interference_Source')
|
||||
@@ -239,7 +239,7 @@ const handleClose = () => {
|
||||
dialogVisible.value = false
|
||||
}
|
||||
const echartClick = (params: any) => {
|
||||
console.log('🚀 ~ echartClick ~ params:', params.name.split('(')[0])
|
||||
// console.log('🚀 ~ echartClick ~ params:', params.name.split('(')[0])
|
||||
router.push({
|
||||
name: 'Supervision/Terminaldetection',
|
||||
query: {
|
||||
|
||||
@@ -114,7 +114,7 @@ function filterDataByKeyword(data, keyword) {
|
||||
}
|
||||
const currentChangeEvent = () => {
|
||||
// tableRef.value.getCurrentRecord()
|
||||
console.log('🚀 ~ currentChangeEvent ~ tableRef.value.getCurrentRecord():', tableRef.value.getCurrentRecord())
|
||||
// console.log('🚀 ~ currentChangeEvent ~ tableRef.value.getCurrentRecord():', tableRef.value.getCurrentRecord())
|
||||
let data = tableRef.value.getCurrentRecord()
|
||||
emit('flyTo', { coordinate: [data.lng, data.lat] }, 16)
|
||||
}
|
||||
|
||||
@@ -278,7 +278,7 @@ const contaminateC = () => {
|
||||
num6: item[7]
|
||||
}
|
||||
})
|
||||
console.log(123, tableData.value)
|
||||
|
||||
|
||||
let data = []
|
||||
let a1 = tableData.value.reduce((t, item) => t + (item.num1 - 0 || 0), 0)
|
||||
|
||||
@@ -1116,7 +1116,7 @@ const rendering = () => {
|
||||
}
|
||||
opitonserise.push(data)
|
||||
} else if (item.chufa !== undefined && item2 == '暂态触发点') {
|
||||
console.log(123, new URL('@/assets/point.png', import.meta.url).href)
|
||||
// console.log(123, new URL('@/assets/point.png', import.meta.url).href)
|
||||
|
||||
let data = {
|
||||
name: item2,
|
||||
|
||||
@@ -202,7 +202,7 @@ const change = () => {
|
||||
if (!targetList.value.some(item => item.key == targetKey.value) ) {
|
||||
targetKey.value = ''
|
||||
}
|
||||
console.log('🚀 ~ change ~ targetList.value:', targetList.value)
|
||||
// console.log('🚀 ~ change ~ targetList.value:', targetList.value)
|
||||
}
|
||||
// 核心去重逻辑
|
||||
function deduplicateByKey(data) {
|
||||
|
||||
@@ -73,7 +73,6 @@ import Outcome from './outcome.vue'
|
||||
import { exportResult, downloadAssessTemplate, assessResult, userGetInfo } from '@/api/advance-boot/assess'
|
||||
import { Loading } from '@element-plus/icons-vue'
|
||||
import AssessTemplate from './assessTemplate.vue'
|
||||
import { fa, tr } from 'element-plus/es/locale'
|
||||
|
||||
defineOptions({
|
||||
// name: 'harmonic-boot/report/word'
|
||||
@@ -81,7 +80,7 @@ defineOptions({
|
||||
const collapseName = ref([1, 2])
|
||||
const height = mainHeight(80)
|
||||
const collapseHeight = mainHeight(125)
|
||||
const size = ref(23)
|
||||
const size = ref(19)
|
||||
const dotList: any = ref({})
|
||||
const infoLoading = ref(false)
|
||||
const outcomeLoading = ref(false)
|
||||
|
||||
@@ -17,7 +17,7 @@ import load from './components/load/index.vue'
|
||||
const activeName = ref('1')
|
||||
|
||||
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
||||
console.log(tab, event)
|
||||
// console.log(tab, event)
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@@ -528,7 +528,7 @@ const DeviceQ = () => {
|
||||
|
||||
// 定位
|
||||
const flyTo = (e: any, zoom?: number) => {
|
||||
console.log('🚀 ~ flyTo ~ e:', e)
|
||||
// console.log('🚀 ~ flyTo ~ e:', e)
|
||||
let regex = new RegExp(e.psrName, 'i')
|
||||
center.value.lng = e.coordinate[0]
|
||||
center.value.lat = e.coordinate[1]
|
||||
@@ -548,14 +548,14 @@ const grids = (row: any) => {
|
||||
// 综合评估
|
||||
|
||||
getRunEvaluate({ ...row, deptIndex: props.params.deptIndex }).then((res: any) => {
|
||||
console.log('🚀 ~ getRunEvaluate ~ res:', res)
|
||||
// console.log('🚀 ~ getRunEvaluate ~ res:', res)
|
||||
AreaData.value = res.data
|
||||
GridDiagramArea()
|
||||
})
|
||||
// if (powerManageGridMap.value) powerLoad()
|
||||
}
|
||||
const radiusPop = (k: any) => {
|
||||
console.log('🚀 ~ radiusPop ~ k:', k)
|
||||
// console.log('🚀 ~ radiusPop ~ k:', k)
|
||||
if (k != undefined) PopKey.value = k
|
||||
}
|
||||
const GridDiagramArea = () => {
|
||||
|
||||
@@ -155,7 +155,7 @@ onMounted(() => {
|
||||
}
|
||||
})
|
||||
const submit = (num: number) => {
|
||||
console.log(prop.addData.problemSources)
|
||||
//console.log(prop.addData.problemSources)
|
||||
|
||||
form1Ref.value.validate(async (valid: any) => {
|
||||
if (valid) {
|
||||
|
||||
@@ -403,7 +403,7 @@ const changeAlarm = e => {
|
||||
let flagList = exceeded.filter(item => item.name == '谐波电压' || item.name == '谐波电流').map(item => item.id)
|
||||
// 发起预警单
|
||||
const launch = (title: string) => {
|
||||
console.log('🚀 ~ flagList:', flagList)
|
||||
// console.log('🚀 ~ flagList:', flagList)
|
||||
|
||||
if (tableStore.table.selection.length == 0) {
|
||||
ElMessage.warning('请选择一条数据')
|
||||
@@ -420,7 +420,7 @@ const launch = (title: string) => {
|
||||
return
|
||||
}
|
||||
|
||||
console.log('🚀 ~ launch ~ list.value:', tableStore.table.selection)
|
||||
// console.log('🚀 ~ launch ~ list.value:', tableStore.table.selection)
|
||||
|
||||
alarmListRef.value.open({
|
||||
text: title,
|
||||
|
||||
@@ -432,7 +432,7 @@ const getInfo = async () => {
|
||||
try {
|
||||
userReportGoNetById({ id: props.id }).then(r => {
|
||||
getUserReportById(r.data.userReportId).then(res => {
|
||||
console.log("🚀 ~ getInfo ~ res:", res)
|
||||
// console.log("🚀 ~ getInfo ~ res:", res)
|
||||
detailData.value = res.data
|
||||
detailData.value.otherReport = r.data.otherReport
|
||||
detailData.value.simulationReport = r.data.simulationReport
|
||||
|
||||
@@ -156,10 +156,8 @@ const tableStore = new TableStore({
|
||||
// }
|
||||
// return true;
|
||||
},
|
||||
|
||||
click: row => {
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
|
||||
// window.open(window.location.origin + '/#/previewFile?' + match[1])
|
||||
window.open(window.location.origin + '/#/previewFile?/' + row.absFilePath)
|
||||
}
|
||||
@@ -174,16 +172,10 @@ const tableStore = new TableStore({
|
||||
return row.problemType != 2
|
||||
},
|
||||
click: row => {
|
||||
|
||||
//window.open(row.filePath)
|
||||
// const match = row.filePath.match(/excelreport(\/[^?#]*)/)
|
||||
// const decodedPath = decodeURI(match[1]) // 解码URL中的中文字符
|
||||
download('/' + row.absFilePath)
|
||||
|
||||
//download('/supervision/微服务系统测试页面功能-20251224合并版本.docx')
|
||||
|
||||
//download('/onlineReport/电能[预]2025年18号-张家口地市 电能质量技术监督预警单.docx')
|
||||
|
||||
}
|
||||
},
|
||||
// {
|
||||
@@ -281,7 +273,6 @@ const tableStore = new TableStore({
|
||||
)
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: 'cancel',
|
||||
title: '取消',
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
placeholder="电站名称,终端名称,型号"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
|
||||
@@ -18,6 +18,8 @@
|
||||
placeholder="电站名称,终端编号,监测点名称、电压等级、终端厂家、干扰源类型"
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="电压等级:">
|
||||
|
||||
@@ -191,7 +191,7 @@ const rules = ref({
|
||||
// fileList: [{ required: true, message: '请上传文件', trigger: 'change' }],
|
||||
})
|
||||
const changeSubstationFlag = () => {
|
||||
console.log(form.value.customSubstationFlag)
|
||||
|
||||
//处理所属变电站手都输入1/下拉数据0
|
||||
key.value += 1
|
||||
if (form.value.customSubstationFlag == 0) {
|
||||
@@ -283,7 +283,6 @@ const changeArea = () => {
|
||||
treeList.value.forEach((item: any) => {
|
||||
if (item.id == form.value.deptId) {
|
||||
list.push(item)
|
||||
|
||||
} else {
|
||||
if (item.children.filter((v: any) => v.id == form.value.deptId).length == 0) {
|
||||
item.children.forEach((v: any) => {
|
||||
@@ -295,15 +294,10 @@ const changeArea = () => {
|
||||
// return k
|
||||
// }
|
||||
// }))
|
||||
// }))
|
||||
console.log("🚀 ~ list.push ~ list:", list)
|
||||
|
||||
|
||||
// }))
|
||||
} else {
|
||||
list.push(item.children.filter((v: any) => v.id == form.value.deptId)[0])
|
||||
}
|
||||
|
||||
|
||||
// if (form.value.deptId != treeListCgy.value[0].id) {
|
||||
// list.push(...treeListCgy.value)
|
||||
// }
|
||||
|
||||
@@ -1328,7 +1328,6 @@ const filterUsers = (arr: any) => {
|
||||
userTypeList.value = userTypeList.value.filter(item => !arr.includes(item.value))
|
||||
}
|
||||
const setcontroFlag = () => {
|
||||
console.log(12333)
|
||||
|
||||
controFlag.value = true
|
||||
}
|
||||
|
||||
@@ -603,7 +603,7 @@ const preview = (val: any, url: any) => {
|
||||
}
|
||||
//预测评估报告
|
||||
if (val == 'predictionEvaluationReport') {
|
||||
console.log(url, '9999999')
|
||||
|
||||
predictionEvaluationReportRef?.value.open(url)
|
||||
}
|
||||
//预测评估评审意见报告
|
||||
|
||||
@@ -160,7 +160,7 @@ const { query } = useRoute() // 查询参数
|
||||
const props = defineProps({
|
||||
id: propTypes.string.def(undefined)
|
||||
})
|
||||
console.log(propTypes.string.def(undefined), '999999999999传参')
|
||||
|
||||
const detailLoading = ref(false) // 表单的加载中
|
||||
const detailData = ref<any>({}) // 详情数据
|
||||
const queryId = query.id as unknown as string // 从 URL 传递过来的 id 编号
|
||||
@@ -199,7 +199,7 @@ getEffectUserList()
|
||||
/** 获得数据 */
|
||||
const getInfo = async () => {
|
||||
detailLoading.value = true
|
||||
console.log(props.id, queryId, '流程详情内部的id')
|
||||
|
||||
try {
|
||||
await getPlanDetailsById({ id: props.id || queryId }).then(res => {
|
||||
detailData.value = res.data
|
||||
|
||||
@@ -117,7 +117,7 @@ const tableStore = new TableStore({
|
||||
inactiveValue: '1',
|
||||
render: 'switch',
|
||||
onChangeField: (row: any, value) => {
|
||||
console.log('🚀 ~ row:', 444123, value)
|
||||
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -152,7 +152,7 @@ const open = async (
|
||||
}
|
||||
if (supervisionReport) {
|
||||
let arrPath = supervisionReport.split(',')
|
||||
console.log('🚀 ~ arrPath:', arrPath)
|
||||
|
||||
await getFileNameAndFilePath({ filePath: arrPath[0] }).then(res => {
|
||||
supervisionReportDetail.supervisionReportPath = res.data.url
|
||||
supervisionReportDetail.supervisionReportName = res.data.fileName
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user