Merge branch 'master' of http://192.168.1.22:3000/Web/admin-sjzx
# Conflicts: # src/views/pqs/voltageSags/monitoringPoint/online/navigation/index.vue
This commit is contained in:
@@ -11,7 +11,7 @@
|
|||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div v-loading="tableStore.table.loading" class="pr10">
|
<div v-loading="tableStore.table.loading" class="pr10">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12" class="pd10">
|
<el-col :span="12" class="pd10" v-if="!VITE_FLAG">
|
||||||
<el-tag style="background: #339966" class="tag" size="small">5级</el-tag>
|
<el-tag style="background: #339966" class="tag" size="small">5级</el-tag>
|
||||||
<span style="color: #339966" class="text">:优秀--(4.5,5]</span>
|
<span style="color: #339966" class="text">:优秀--(4.5,5]</span>
|
||||||
<el-tag style="background: #3399ff" class="tag" size="small">4级</el-tag>
|
<el-tag style="background: #3399ff" class="tag" size="small">4级</el-tag>
|
||||||
@@ -135,9 +135,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="VITE_FLAG ? 24 : 12">
|
||||||
<my-echart class="tall" :options="echartList" />
|
<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-table height="auto" auto-resize :data="tableStore.table.data" v-bind="defaultAttribute">
|
||||||
<vxe-column field="name" title="名称"></vxe-column>
|
<vxe-column field="name" title="名称"></vxe-column>
|
||||||
<vxe-column field="zc" title="综合评估值">
|
<vxe-column field="zc" title="综合评估值">
|
||||||
@@ -167,6 +167,7 @@ import TableStore from '@/utils/tableStore'
|
|||||||
import { ref, onMounted, provide } from 'vue'
|
import { ref, onMounted, provide } from 'vue'
|
||||||
import { mainHeight } from '@/utils/layout'
|
import { mainHeight } from '@/utils/layout'
|
||||||
import * as echarts from 'echarts/core'
|
import * as echarts from 'echarts/core'
|
||||||
|
const VITE_FLAG = import.meta.env.VITE_NAME == 'qujing'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'harmonic-boot/area/powerAssessment'
|
name: 'harmonic-boot/area/powerAssessment'
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -11,7 +11,9 @@
|
|||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" :style="height">
|
||||||
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
<TableHeader ref="TableHeaderRef" datePicker :show-search="false">
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -47,6 +49,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(19)
|
const size = ref(19)
|
||||||
|
const loading = ref(false)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const TableHeaderRef = ref()
|
const TableHeaderRef = ref()
|
||||||
const dotList: any = ref({})
|
const dotList: any = ref({})
|
||||||
@@ -75,26 +78,32 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
|
|
||||||
// 生成
|
// 生成
|
||||||
const exportEvent = () => {
|
const exportEvent = () => {
|
||||||
|
loading.value = true
|
||||||
ElMessage('生成报告中...')
|
ElMessage('生成报告中...')
|
||||||
areaHarmonicReport({
|
areaHarmonicReport({
|
||||||
deptId: dotList.value.id,
|
deptId: dotList.value.id,
|
||||||
areaReportFlag: 1,
|
areaReportFlag: 1,
|
||||||
startTime: TableHeaderRef.value.datePickerRef.timeValue[0],
|
startTime: TableHeaderRef.value.datePickerRef.timeValue[0],
|
||||||
endTime: TableHeaderRef.value.datePickerRef.timeValue[1]
|
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)
|
|
||||||
})
|
})
|
||||||
|
.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>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
<el-button icon="el-icon-Upload" type="primary" class="mr10 ml10">上传接线图</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-upload>
|
</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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -76,6 +76,7 @@ import dayjs from 'dayjs'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
// name: 'harmonic-boot/report/word'
|
// name: 'harmonic-boot/report/word'
|
||||||
})
|
})
|
||||||
|
const loading = ref(false)
|
||||||
const height = mainHeight(20)
|
const height = mainHeight(20)
|
||||||
const size = ref(19)
|
const size = ref(19)
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
@@ -143,6 +144,7 @@ const exportEvent = () => {
|
|||||||
message: '包含特殊字符,请注意修改!'
|
message: '包含特殊字符,请注意修改!'
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
loading.value = true
|
||||||
ElMessage('生成报告中...')
|
ElMessage('生成报告中...')
|
||||||
exportModel(form).then((res: any) => {
|
exportModel(form).then((res: any) => {
|
||||||
let blob = new Blob([res], {
|
let blob = new Blob([res], {
|
||||||
@@ -156,6 +158,9 @@ const exportEvent = () => {
|
|||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
|
loading.value =false
|
||||||
|
}).catch((err: any) => {
|
||||||
|
loading.value =false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,39 +9,80 @@
|
|||||||
<el-radio-button :label="1">离线</el-radio-button>
|
<el-radio-button :label="1">离线</el-radio-button>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="筛选数据" >
|
<el-form-item label="筛选数据">
|
||||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入关键字筛选" style="width: 200px"/>
|
<el-input
|
||||||
|
v-model="tableStore.table.params.searchValue"
|
||||||
|
clearable
|
||||||
|
placeholder="输入关键字筛选"
|
||||||
|
style="width: 200px"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="触发类型:">
|
<el-form-item label="触发类型:">
|
||||||
<el-select v-model="tableStore.table.params.waveType" placeholder="请选择触发类型" clearable multiple
|
<el-select
|
||||||
collapse-tags style="width: 100%">
|
v-model="tableStore.table.params.waveType"
|
||||||
<el-option v-for="item in triggeroptions" :key="item.id" :label="item.name"
|
placeholder="请选择触发类型"
|
||||||
:value="item.id"></el-option>
|
clearable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in triggeroptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="是否有波形:">
|
<el-form-item label="是否有波形:">
|
||||||
<el-select v-model="tableStore.table.params.fileFlag" placeholder="请选择是否存在波形" clearable
|
<el-select
|
||||||
style="width: 100%">
|
v-model="tableStore.table.params.fileFlag"
|
||||||
<el-option v-for="item in wareaoptions" :key="item.id" :label="item.label"
|
placeholder="请选择是否存在波形"
|
||||||
:value="item.id"></el-option>
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in wareaoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="暂态持续时间(s):">
|
<el-form-item label="暂态持续时间(s):">
|
||||||
<el-input v-model="tableStore.table.params.persistMin" placeholder="请输入X秒"
|
<el-input
|
||||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable style="width: 94px"></el-input>
|
v-model="tableStore.table.params.persistMin"
|
||||||
|
placeholder="请输入X秒"
|
||||||
|
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||||
|
clearable
|
||||||
|
style="width: 94px"
|
||||||
|
></el-input>
|
||||||
<el-tag style="margin-left: 5px">< 时间数 <</el-tag>
|
<el-tag style="margin-left: 5px">< 时间数 <</el-tag>
|
||||||
<el-input v-model="tableStore.table.params.persistMax" placeholder="请输入X秒"
|
<el-input
|
||||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable
|
v-model="tableStore.table.params.persistMax"
|
||||||
style="margin-left: 5px; width: 94px"></el-input>
|
placeholder="请输入X秒"
|
||||||
|
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 5px; width: 94px"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="事件严重度:">
|
<el-form-item label="事件严重度:">
|
||||||
<el-input v-model="tableStore.table.params.severityMin" placeholder="请输入正负数"
|
<el-input
|
||||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable style="width: 94px"></el-input>
|
v-model="tableStore.table.params.severityMin"
|
||||||
|
placeholder="请输入正负数"
|
||||||
|
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||||
|
clearable
|
||||||
|
style="width: 94px"
|
||||||
|
></el-input>
|
||||||
<el-tag style="margin-left: 5px">< 严重度 <</el-tag>
|
<el-tag style="margin-left: 5px">< 严重度 <</el-tag>
|
||||||
<el-input v-model="tableStore.table.params.severityMax" placeholder="请输入正负数"
|
<el-input
|
||||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable
|
v-model="tableStore.table.params.severityMax"
|
||||||
style="margin-left: 5px; width: 94px"></el-input>
|
placeholder="请输入正负数"
|
||||||
|
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 5px; width: 94px"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-form-item label="暂降类型:">
|
<!-- <el-form-item label="暂降类型:">
|
||||||
@@ -52,23 +93,52 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
<el-form-item label="暂态原因:">
|
<el-form-item label="暂态原因:">
|
||||||
<el-select v-model="tableStore.table.params.eventReason" placeholder="请选择暂态原因" clearable
|
<el-select
|
||||||
multiple collapse-tags style="width: 100%">
|
v-model="tableStore.table.params.eventReason"
|
||||||
<el-option v-for="item in reasonoptions" :key="item.id" :label="item.name"
|
placeholder="请选择暂态原因"
|
||||||
:value="item.id"></el-option>
|
clearable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in reasonoptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="暂态核实原因:">
|
<el-form-item label="暂态核实原因:">
|
||||||
<el-select v-model="tableStore.table.params.verifyReason" placeholder="请选择暂态核实原因" clearable
|
<el-select
|
||||||
multiple collapse-tags collapse-tags-tooltip>
|
v-model="tableStore.table.params.verifyReason"
|
||||||
<el-option v-for="item in verifyReasonList" :key="item.id" :label="item.name"
|
placeholder="请选择暂态核实原因"
|
||||||
:value="item.id"></el-option>
|
clearable
|
||||||
|
multiple
|
||||||
|
collapse-tags
|
||||||
|
collapse-tags-tooltip
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in verifyReasonList"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="变电站(监测点):">
|
<el-form-item label="变电站(监测点):">
|
||||||
<el-cascader v-model="tableStore.table.params.lineIds" :options="options" :props="defaultProps"
|
<el-cascader
|
||||||
collapse-tags-tooltip style="width: 257px;" filterable clearable collapse-tags
|
v-model="tableStore.table.params.lineIds"
|
||||||
placeholder="请选择变电站(监测点)" :show-all-levels="true" />
|
:options="options"
|
||||||
|
:props="defaultProps"
|
||||||
|
collapse-tags-tooltip
|
||||||
|
style="width: 257px"
|
||||||
|
filterable
|
||||||
|
clearable
|
||||||
|
collapse-tags
|
||||||
|
placeholder="请选择变电站(监测点)"
|
||||||
|
:show-all-levels="true"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
@@ -103,7 +173,7 @@ defineOptions({
|
|||||||
})
|
})
|
||||||
const dictData = useDictData()
|
const dictData = useDictData()
|
||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
const waveFormRef=ref()
|
const waveFormRef = ref()
|
||||||
const pageHeight = mainHeight(20)
|
const pageHeight = mainHeight(20)
|
||||||
const view = ref(true)
|
const view = ref(true)
|
||||||
const addFormRef = ref()
|
const addFormRef = ref()
|
||||||
@@ -122,7 +192,7 @@ const wareaoptions = ref([
|
|||||||
label: '否'
|
label: '否'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
const formData = ({
|
const formData = {
|
||||||
deptIndex: adminInfo.$state.deptIndex,
|
deptIndex: adminInfo.$state.deptIndex,
|
||||||
monitorFlag: 2,
|
monitorFlag: 2,
|
||||||
powerFlag: 2,
|
powerFlag: 2,
|
||||||
@@ -131,7 +201,7 @@ const formData = ({
|
|||||||
serverName: 'event-boot',
|
serverName: 'event-boot',
|
||||||
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
|
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
|
||||||
scale: null
|
scale: null
|
||||||
})
|
}
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/event-boot/transient/getTransientValue',
|
url: '/event-boot/transient/getTransientValue',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
@@ -148,12 +218,15 @@ const tableStore = new TableStore({
|
|||||||
{ field: 'startTime', title: '暂降发生时刻', minWidth: '200' },
|
{ field: 'startTime', title: '暂降发生时刻', minWidth: '200' },
|
||||||
{ field: 'gdName', title: '供电公司', minWidth: '100' },
|
{ field: 'gdName', title: '供电公司', minWidth: '100' },
|
||||||
{ field: 'subName', title: '变电站', minWidth: '200' },
|
{ field: 'subName', title: '变电站', minWidth: '200' },
|
||||||
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
{ field: 'ip', title: '网络参数', width: '120px' },
|
||||||
{ field: 'lineName', title: '监测点', minWidth: '100' },
|
{ field: 'lineName', title: '监测点', minWidth: '100' },
|
||||||
{ field: 'scale', title: '电压等级(kV)', minWidth: '120', },
|
{ field: 'scale', title: '电压等级(kV)', minWidth: '120' },
|
||||||
{
|
{
|
||||||
field: 'verifyReason', title: '暂态核实原因', minWidth: '120', formatter: function (row) {
|
field: 'verifyReason',
|
||||||
return verifyReasonList.filter(item => item.id == row.cellValue)[0]?.name || '/' //row.cellValue ? row.cellValue : '/'
|
title: '暂态核实原因',
|
||||||
|
minWidth: '120',
|
||||||
|
formatter: function (row) {
|
||||||
|
return verifyReasonList.filter(item => item.id == row.cellValue)[0]?.name || '/' //row.cellValue ? row.cellValue : '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
@@ -165,7 +238,9 @@ const tableStore = new TableStore({
|
|||||||
field: 'featureAmplitude',
|
field: 'featureAmplitude',
|
||||||
title: '暂降(骤升)幅值(%)',
|
title: '暂降(骤升)幅值(%)',
|
||||||
minWidth: '130',
|
minWidth: '130',
|
||||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
formatter: ({ row }: any) => {
|
||||||
|
return Math.floor(row.cellValue * 10000) / 100
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: 'eventType',
|
field: 'eventType',
|
||||||
@@ -187,7 +262,12 @@ const tableStore = new TableStore({
|
|||||||
},
|
},
|
||||||
|
|
||||||
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
{ field: 'duration', title: '持续时间(s)', minWidth: '100' },
|
||||||
{ field: 'severity', title: '严重度', minWidth: '100', formatter: ({ row }: any) => (row.severity < 0 ? '/' : row.severity) },
|
{
|
||||||
|
field: 'severity',
|
||||||
|
title: '严重度',
|
||||||
|
minWidth: '100',
|
||||||
|
formatter: ({ row }: any) => (row.severity < 0 ? '/' : row.severity)
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
@@ -217,9 +297,9 @@ const tableStore = new TableStore({
|
|||||||
click: async row => {
|
click: async row => {
|
||||||
// row.loading = true
|
// row.loading = true
|
||||||
view.value = false
|
view.value = false
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
waveFormRef.value.open(row)
|
waveFormRef.value.open(row)
|
||||||
},100)
|
}, 100)
|
||||||
// boxoList.value = row
|
// boxoList.value = row
|
||||||
// await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
// await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
||||||
// .then(res => {
|
// .then(res => {
|
||||||
@@ -248,12 +328,9 @@ const tableStore = new TableStore({
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
loadCallback: () => { }
|
loadCallback: () => {}
|
||||||
})
|
})
|
||||||
const options = ref([
|
const options = ref([])
|
||||||
|
|
||||||
|
|
||||||
])
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// checkStrictly: true,
|
// checkStrictly: true,
|
||||||
@@ -290,18 +367,17 @@ onMounted(() => {
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
getTerminalTreeForFive(formData).then(res => {
|
getTerminalTreeForFive(formData).then(res => {
|
||||||
options.value = []
|
options.value = []
|
||||||
let list = (res.data.map((item: any) => {
|
let list = res.data.map((item: any) => {
|
||||||
return item.children.map((vv: any) => {
|
return item.children.map((vv: any) => {
|
||||||
vv.children.map((kk: any) => {
|
vv.children.map((kk: any) => {
|
||||||
kk.name = kk.name.replace(/\(.*?\)/, '')
|
kk.name = kk.name.replace(/\(.*?\)/, '')
|
||||||
})
|
})
|
||||||
return vv.children
|
return vv.children
|
||||||
})
|
})
|
||||||
}))[0]
|
})[0]
|
||||||
list.forEach((item: any) => {
|
list.forEach((item: any) => {
|
||||||
options.value.push(...item)
|
options.value.push(...item)
|
||||||
})
|
})
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const backbxlb = () => {
|
const backbxlb = () => {
|
||||||
@@ -337,7 +413,7 @@ const download = () => {
|
|||||||
ElMessage.warning('暂无可下载的波形文件!')
|
ElMessage.warning('暂无可下载的波形文件!')
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ElMessage.info('下载中......')
|
ElMessage.info('下载中......')
|
||||||
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
||||||
const url = window.URL.createObjectURL(blob)
|
const url = window.URL.createObjectURL(blob)
|
||||||
const link = document.createElement('a') // 创建a标签
|
const link = document.createElement('a') // 创建a标签
|
||||||
@@ -350,7 +426,6 @@ const download = () => {
|
|||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
|
||||||
:deep(.el-tag.is-closable) {
|
:deep(.el-tag.is-closable) {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
|||||||
minWidth: '140',
|
minWidth: '140',
|
||||||
|
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
return (row.cellValue * 100).toFixed(2)
|
return Math.floor(row.cellValue * 10000) / 100
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ title: '持续时间(s)', field: 'duration', minWidth: '100' },
|
{ title: '持续时间(s)', field: 'duration', minWidth: '100' },
|
||||||
@@ -139,9 +139,9 @@ onMounted(() => {
|
|||||||
// 加载数据
|
// 加载数据
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// tableStore.index()
|
// tableStore.index()
|
||||||
if (monitoringPoint.state.lineId) {
|
if (monitoringPoint.state.lineId) {
|
||||||
TableHeaderRef.value.onComSearch()
|
TableHeaderRef.value.onComSearch()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig<any>>({
|
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig<any>>({
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
monitoringPoint.setValue('lineId', data.id)
|
monitoringPoint.setValue('lineId', data.id)
|
||||||
|
monitoringPoint.setValue('lineName', data.alias)
|
||||||
|
|
||||||
}
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
|||||||
@@ -18,7 +18,9 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<!-- <el-button icon="el-icon-Download" type="primary" @click="preview">预览报告</el-button> -->
|
<!-- <el-button icon="el-icon-Download" type="primary" @click="preview">预览报告</el-button> -->
|
||||||
<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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 65px)`">
|
<div class="box" :style="`height: calc(${tableStore.table.height} + 65px)`">
|
||||||
@@ -136,6 +138,7 @@ import { ElMessage } from 'element-plus'
|
|||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'TransientReport/monitoringpointReport'
|
name: 'TransientReport/monitoringpointReport'
|
||||||
})
|
})
|
||||||
|
const loading = ref(false)
|
||||||
const monitoringPoint = useMonitoringPoint()
|
const monitoringPoint = useMonitoringPoint()
|
||||||
const height = mainHeight(82)
|
const height = mainHeight(82)
|
||||||
const size = ref(17)
|
const size = ref(17)
|
||||||
@@ -189,26 +192,31 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
let a = ''
|
let a = ''
|
||||||
|
loading.value = true
|
||||||
formd.value.lineId = monitoringPoint.state.lineId
|
formd.value.lineId = monitoringPoint.state.lineId
|
||||||
formd.value.lineName = monitoringPoint.state.lineName.split('>').at(-1)
|
formd.value.lineName = monitoringPoint.state.lineName.split('>').at(-1)
|
||||||
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||||
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||||
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
||||||
ElMessage('生成报告中,请稍等!')
|
ElMessage('生成报告中,请稍等!')
|
||||||
getLineExport(formd.value).then((res: any) => {
|
getLineExport(formd.value)
|
||||||
let blob = new Blob([res], {
|
.then((res: any) => {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
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 = monitoringPoint.state.lineName.split('>').at(-1) + '_暂态报告' // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
loading.value = false
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
// createObjectURL(blob); //创建下载的链接
|
|
||||||
const url = window.URL.createObjectURL(blob)
|
|
||||||
const link = document.createElement('a') // 创建a标签
|
|
||||||
link.href = url
|
|
||||||
link.download = monitoringPoint.state.lineName.split('>').at(-1) + '_暂态报告' // 设置下载的文件名
|
|
||||||
document.body.appendChild(link)
|
|
||||||
link.click() //执行下载
|
|
||||||
document.body.removeChild(link)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
const preview = () => {
|
const preview = () => {
|
||||||
if (dotList.value.level != 6) {
|
if (dotList.value.level != 6) {
|
||||||
|
|||||||
@@ -103,7 +103,8 @@ const tableStore = new TableStore({
|
|||||||
field: 'featureAmplitude',
|
field: 'featureAmplitude',
|
||||||
title: '暂降(骤升)幅值(%)',
|
title: '暂降(骤升)幅值(%)',
|
||||||
width: '140',formatter: (row: any) => {
|
width: '140',formatter: (row: any) => {
|
||||||
return (row.cellValue * 100).toFixed(0)
|
// return (row.cellValue * 100).toFixed(0)
|
||||||
|
return Math.floor(row.cellValue * 10000) / 100
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -26,7 +26,9 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
||||||
@@ -154,7 +156,7 @@ const dotList: any = ref({
|
|||||||
id: monitoringPoint.state.lineId,
|
id: monitoringPoint.state.lineId,
|
||||||
level: 6
|
level: 6
|
||||||
})
|
})
|
||||||
|
const loading = ref(false)
|
||||||
const formd: any = ref({
|
const formd: any = ref({
|
||||||
xq: false,
|
xq: false,
|
||||||
lb: false,
|
lb: false,
|
||||||
@@ -243,26 +245,31 @@ const exportEvent = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
let a = ''
|
let a = ''
|
||||||
|
loading.value = true
|
||||||
formd.value.lineId = dotList.value.id
|
formd.value.lineId = dotList.value.id
|
||||||
formd.value.lineName = dotList.value.name
|
formd.value.lineName = dotList.value.name
|
||||||
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||||
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||||
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
||||||
ElMessage('生成报告中,请稍等!')
|
ElMessage('生成报告中,请稍等!')
|
||||||
getLineExport(formd.value).then((res: any) => {
|
getLineExport(formd.value)
|
||||||
let blob = new Blob([res], {
|
.then((res: any) => {
|
||||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
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
|
||||||
})
|
})
|
||||||
// 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)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</el-form-item> -->
|
</el-form-item> -->
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<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>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
||||||
@@ -176,7 +176,7 @@ const waveTypeList = ref([
|
|||||||
label: '暂降'
|
label: '暂降'
|
||||||
}
|
}
|
||||||
])
|
])
|
||||||
|
const loading = ref(false)
|
||||||
const templatePolicy: any = ref([])
|
const templatePolicy: any = ref([])
|
||||||
const value = ref<string>('')
|
const value = ref<string>('')
|
||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
@@ -270,6 +270,7 @@ const exportEvent = () => {
|
|||||||
'Voltage_Level',
|
'Voltage_Level',
|
||||||
'Load_Type'
|
'Load_Type'
|
||||||
])[0]
|
])[0]
|
||||||
|
loading.value = true
|
||||||
formInline.value.monitorFlag = 2
|
formInline.value.monitorFlag = 2
|
||||||
formInline.value.powerFlag = 2
|
formInline.value.powerFlag = 2
|
||||||
formInline.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
formInline.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||||
@@ -293,6 +294,9 @@ const exportEvent = () => {
|
|||||||
document.body.appendChild(link)
|
document.body.appendChild(link)
|
||||||
link.click() //执行下载
|
link.click() //执行下载
|
||||||
document.body.removeChild(link)
|
document.body.removeChild(link)
|
||||||
|
loading.value = false
|
||||||
|
}).catch(() => {
|
||||||
|
loading.value = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -102,7 +102,9 @@ const list = ref([
|
|||||||
field: 'featureAmplitude',
|
field: 'featureAmplitude',
|
||||||
title: '暂降(骤升)幅值(%)',
|
title: '暂降(骤升)幅值(%)',
|
||||||
width: '150',
|
width: '150',
|
||||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
formatter: ({ row }: any) => {
|
||||||
|
return Math.floor(row.cellValue * 10000) / 100
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{ field: 'duration', title: '持续时间(s)', width: '120' },
|
{ field: 'duration', title: '持续时间(s)', width: '120' },
|
||||||
{ field: 'advanceType', title: '暂降类型(机器判断)', width: '150' }
|
{ field: 'advanceType', title: '暂降类型(机器判断)', width: '150' }
|
||||||
|
|||||||
Reference in New Issue
Block a user