Merge branch 'master' of http://192.168.1.22:3000/frontend/admin-sjzx
This commit is contained in:
@@ -45,15 +45,28 @@ const formData = ref({
|
||||
loadType: null,
|
||||
manufacturer: null,
|
||||
serverName: 'event-boot',
|
||||
statisticalType: classificationData[0].id,
|
||||
statisticalType: classificationData[2].id,
|
||||
scale: null
|
||||
})
|
||||
const loadData = () => {
|
||||
const loadData = (val: string) => {
|
||||
let obj = classificationData.find(function (i) {
|
||||
return i.id === formData.value.statisticalType
|
||||
})
|
||||
let form = JSON.parse(JSON.stringify(formData.value))
|
||||
form.statisticalType = classificationData.find((item: any) => item.id == form.statisticalType)
|
||||
let nodeKey = ''
|
||||
getTerminalTreeForFive(form).then(res => {
|
||||
console.log(res)
|
||||
if (obj.code == 'Power_Network') {
|
||||
res.data = [
|
||||
{
|
||||
name: '电网拓扑',
|
||||
level: -1,
|
||||
id: 0,
|
||||
children: res.data
|
||||
}
|
||||
]
|
||||
}
|
||||
res.data.forEach((item: any) => {
|
||||
item.icon = 'fa-solid fa-synagogue'
|
||||
item.color = config.getColorVal('elementUiPrimary')
|
||||
|
||||
@@ -1,11 +1,66 @@
|
||||
<template>
|
||||
|
||||
<div> 监测点报告</div>
|
||||
|
||||
<div class="default-main" :style="height">
|
||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<PointTree
|
||||
:default-expand-all="false"
|
||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||
:current-node-key="monitoringPoint.state.lineId"
|
||||
@node-click="handleNodeClick"
|
||||
@init="handleNodeClick"
|
||||
></PointTree>
|
||||
</pane>
|
||||
<pane style="background: #fff" :style="height">
|
||||
<!-- <div :style="height"></div> -->
|
||||
<TableHeader date-picker :show-search="false">
|
||||
<template v-slot:select>
|
||||
<el-form-item label=" 模板策略">
|
||||
<el-select v-model="value" placeholder="请选择" @change="changeFn" clearable>
|
||||
<el-option
|
||||
v-for="item in templatePolicy"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent">生成报告</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
</pane>
|
||||
</splitpanes>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive } from 'vue'
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import PointTree from '@/components/tree/pms/pointTree.vue'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(20)
|
||||
const size = ref(0)
|
||||
const templatePolicy = ref([])
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
size.value = Math.round((280 / dom.offsetHeight) * 100)
|
||||
}
|
||||
})
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
if (data.level === 6) {
|
||||
monitoringPoint.setValue('lineId', data.id)
|
||||
}
|
||||
}
|
||||
const exportEvent = () => {}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.splitpanes.default-theme .splitpanes__pane {
|
||||
background: #eaeef1;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -142,7 +142,7 @@ import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { getAreaReport, getList, selectReleation } from '@/api/event-boot/report.ts'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'TransientReport/regionalreports'
|
||||
})
|
||||
@@ -244,10 +244,13 @@ const exportEvent = () => {
|
||||
formInline.value.powerFlag = 2
|
||||
formInline.value.waveType = tableStore.table.params.waveType
|
||||
formInline.value.interval = tableStore.table.params.timeFlag
|
||||
ElMessage('生成报告中,请稍等!')
|
||||
getAreaReport(formInline.value).then(res => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
})
|
||||
|
||||
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
link.href = url
|
||||
|
||||
Reference in New Issue
Block a user