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>
|
||||
<div v-loading="tableStore.table.loading" class="pr10">
|
||||
<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>
|
||||
<span style="color: #339966" class="text">:优秀--(4.5,5]</span>
|
||||
<el-tag style="background: #3399ff" class="tag" size="small">4级</el-tag>
|
||||
@@ -135,9 +135,9 @@
|
||||
</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="综合评估值">
|
||||
@@ -167,6 +167,7 @@ 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/area/powerAssessment'
|
||||
})
|
||||
|
||||
@@ -11,7 +11,9 @@
|
||||
<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">生成</el-button>
|
||||
<el-button icon="el-icon-Download" type="primary" @click="exportEvent" :loading="loading">
|
||||
生成
|
||||
</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<div class="box">
|
||||
@@ -47,6 +49,7 @@ defineOptions({
|
||||
})
|
||||
const height = mainHeight(20)
|
||||
const size = ref(19)
|
||||
const loading = ref(false)
|
||||
const dictData = useDictData()
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({})
|
||||
@@ -75,26 +78,32 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
|
||||
// 生成
|
||||
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)
|
||||
})
|
||||
.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">
|
||||
|
||||
@@ -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">
|
||||
@@ -76,6 +76,7 @@ import dayjs from 'dayjs'
|
||||
defineOptions({
|
||||
// name: 'harmonic-boot/report/word'
|
||||
})
|
||||
const loading = ref(false)
|
||||
const height = mainHeight(20)
|
||||
const size = ref(19)
|
||||
const dictData = useDictData()
|
||||
@@ -143,6 +144,7 @@ const exportEvent = () => {
|
||||
message: '包含特殊字符,请注意修改!'
|
||||
})
|
||||
} else {
|
||||
loading.value = true
|
||||
ElMessage('生成报告中...')
|
||||
exportModel(form).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
@@ -156,6 +158,9 @@ const exportEvent = () => {
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
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-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="筛选数据" >
|
||||
<el-input v-model="tableStore.table.params.searchValue" clearable placeholder="输入关键字筛选" style="width: 200px"/>
|
||||
<el-form-item label="筛选数据">
|
||||
<el-input
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="输入关键字筛选"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="触发类型:">
|
||||
<el-select v-model="tableStore.table.params.waveType" placeholder="请选择触发类型" 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
|
||||
v-model="tableStore.table.params.waveType"
|
||||
placeholder="请选择触发类型"
|
||||
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-form-item>
|
||||
<el-form-item label="是否有波形:">
|
||||
<el-select v-model="tableStore.table.params.fileFlag" placeholder="请选择是否存在波形" clearable
|
||||
style="width: 100%">
|
||||
<el-option v-for="item in wareaoptions" :key="item.id" :label="item.label"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model="tableStore.table.params.fileFlag"
|
||||
placeholder="请选择是否存在波形"
|
||||
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-form-item>
|
||||
<el-form-item label="暂态持续时间(s):">
|
||||
<el-input v-model="tableStore.table.params.persistMin" placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable style="width: 94px"></el-input>
|
||||
<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-input v-model="tableStore.table.params.persistMax" placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')" clearable
|
||||
style="margin-left: 5px; width: 94px"></el-input>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.persistMax"
|
||||
placeholder="请输入X秒"
|
||||
onkeyup="value=value.replace(/[^\d.]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件严重度:">
|
||||
<el-input v-model="tableStore.table.params.severityMin" placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable style="width: 94px"></el-input>
|
||||
<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-input v-model="tableStore.table.params.severityMax" placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')" clearable
|
||||
style="margin-left: 5px; width: 94px"></el-input>
|
||||
<el-input
|
||||
v-model="tableStore.table.params.severityMax"
|
||||
placeholder="请输入正负数"
|
||||
onkeyup="value=value.replace(/[^\d\.-]/g,'')"
|
||||
clearable
|
||||
style="margin-left: 5px; width: 94px"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="暂降类型:">
|
||||
@@ -52,23 +93,52 @@
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="暂态原因:">
|
||||
<el-select v-model="tableStore.table.params.eventReason" placeholder="请选择暂态原因" 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
|
||||
v-model="tableStore.table.params.eventReason"
|
||||
placeholder="请选择暂态原因"
|
||||
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-form-item>
|
||||
<el-form-item label="暂态核实原因:">
|
||||
<el-select v-model="tableStore.table.params.verifyReason" placeholder="请选择暂态核实原因" 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
|
||||
v-model="tableStore.table.params.verifyReason"
|
||||
placeholder="请选择暂态核实原因"
|
||||
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-form-item>
|
||||
<el-form-item label="变电站(监测点):">
|
||||
<el-cascader v-model="tableStore.table.params.lineIds" :options="options" :props="defaultProps"
|
||||
collapse-tags-tooltip style="width: 257px;" filterable clearable collapse-tags
|
||||
placeholder="请选择变电站(监测点)" :show-all-levels="true" />
|
||||
<el-cascader
|
||||
v-model="tableStore.table.params.lineIds"
|
||||
:options="options"
|
||||
:props="defaultProps"
|
||||
collapse-tags-tooltip
|
||||
style="width: 257px"
|
||||
filterable
|
||||
clearable
|
||||
collapse-tags
|
||||
placeholder="请选择变电站(监测点)"
|
||||
:show-all-levels="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
@@ -103,7 +173,7 @@ defineOptions({
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const adminInfo = useAdminInfo()
|
||||
const waveFormRef=ref()
|
||||
const waveFormRef = ref()
|
||||
const pageHeight = mainHeight(20)
|
||||
const view = ref(true)
|
||||
const addFormRef = ref()
|
||||
@@ -122,7 +192,7 @@ const wareaoptions = ref([
|
||||
label: '否'
|
||||
}
|
||||
])
|
||||
const formData = ({
|
||||
const formData = {
|
||||
deptIndex: adminInfo.$state.deptIndex,
|
||||
monitorFlag: 2,
|
||||
powerFlag: 2,
|
||||
@@ -131,7 +201,7 @@ const formData = ({
|
||||
serverName: 'event-boot',
|
||||
statisticalType: dictData.getBasicData('Statistical_Type', ['Report_Type'])[0],
|
||||
scale: null
|
||||
})
|
||||
}
|
||||
const tableStore = new TableStore({
|
||||
url: '/event-boot/transient/getTransientValue',
|
||||
method: 'POST',
|
||||
@@ -148,12 +218,15 @@ const tableStore = new TableStore({
|
||||
{ field: 'startTime', title: '暂降发生时刻', minWidth: '200' },
|
||||
{ field: 'gdName', title: '供电公司', minWidth: '100' },
|
||||
{ field: 'subName', title: '变电站', minWidth: '200' },
|
||||
{ field: 'ip', title: '网络参数' ,width:'120px' },
|
||||
{ field: 'ip', title: '网络参数', width: '120px' },
|
||||
{ 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) {
|
||||
return verifyReasonList.filter(item => item.id == row.cellValue)[0]?.name || '/' //row.cellValue ? row.cellValue : '/'
|
||||
field: 'verifyReason',
|
||||
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',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
minWidth: '130',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
formatter: ({ row }: any) => {
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
{
|
||||
field: 'eventType',
|
||||
@@ -187,7 +262,12 @@ const tableStore = new TableStore({
|
||||
},
|
||||
|
||||
{ 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: '操作',
|
||||
@@ -217,9 +297,9 @@ const tableStore = new TableStore({
|
||||
click: async row => {
|
||||
// row.loading = true
|
||||
view.value = false
|
||||
setTimeout(() => {
|
||||
waveFormRef.value.open(row)
|
||||
},100)
|
||||
setTimeout(() => {
|
||||
waveFormRef.value.open(row)
|
||||
}, 100)
|
||||
// boxoList.value = row
|
||||
// await getMonitorEventAnalyseWave({ id: row.eventId, systemType: 0 })
|
||||
// .then(res => {
|
||||
@@ -248,12 +328,9 @@ const tableStore = new TableStore({
|
||||
}
|
||||
],
|
||||
|
||||
loadCallback: () => { }
|
||||
loadCallback: () => {}
|
||||
})
|
||||
const options = ref([
|
||||
|
||||
|
||||
])
|
||||
const options = ref([])
|
||||
const defaultProps = {
|
||||
multiple: true,
|
||||
// checkStrictly: true,
|
||||
@@ -290,18 +367,17 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
getTerminalTreeForFive(formData).then(res => {
|
||||
options.value = []
|
||||
let list = (res.data.map((item: any) => {
|
||||
let list = res.data.map((item: any) => {
|
||||
return item.children.map((vv: any) => {
|
||||
vv.children.map((kk: any) => {
|
||||
kk.name = kk.name.replace(/\(.*?\)/, '')
|
||||
})
|
||||
return vv.children
|
||||
})
|
||||
}))[0]
|
||||
})[0]
|
||||
list.forEach((item: any) => {
|
||||
options.value.push(...item)
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
const backbxlb = () => {
|
||||
@@ -337,7 +413,7 @@ const download = () => {
|
||||
ElMessage.warning('暂无可下载的波形文件!')
|
||||
return
|
||||
}
|
||||
ElMessage.info('下载中......')
|
||||
ElMessage.info('下载中......')
|
||||
let blob = new Blob([res], { type: 'application/zip' }) // console.log(blob) // var href = window.URL.createObjectURL(blob); //创建下载的链接
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a') // 创建a标签
|
||||
@@ -350,7 +426,6 @@ const download = () => {
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
|
||||
:deep(.el-tag.is-closable) {
|
||||
width: 100px;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ const tableStore = new TableStore({
|
||||
minWidth: '140',
|
||||
|
||||
formatter: (row: any) => {
|
||||
return (row.cellValue * 100).toFixed(2)
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
{ title: '持续时间(s)', field: 'duration', minWidth: '100' },
|
||||
@@ -139,9 +139,9 @@ onMounted(() => {
|
||||
// 加载数据
|
||||
nextTick(() => {
|
||||
// tableStore.index()
|
||||
if (monitoringPoint.state.lineId) {
|
||||
if (monitoringPoint.state.lineId) {
|
||||
TableHeaderRef.value.onComSearch()
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
const checkboxConfig = reactive<VxeTablePropTypes.CheckboxConfig<any>>({
|
||||
|
||||
@@ -73,7 +73,8 @@ const handleNodeClick = (data: any, node: any) => {
|
||||
}
|
||||
|
||||
monitoringPoint.setValue('lineId', data.id)
|
||||
|
||||
monitoringPoint.setValue('lineName', data.alias)
|
||||
|
||||
}
|
||||
setTimeout(() => {
|
||||
flag.value = true
|
||||
|
||||
@@ -18,7 +18,9 @@
|
||||
</template>
|
||||
<template #operation>
|
||||
<!-- <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>
|
||||
</TableHeader>
|
||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 65px)`">
|
||||
@@ -136,6 +138,7 @@ import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'TransientReport/monitoringpointReport'
|
||||
})
|
||||
const loading = ref(false)
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(82)
|
||||
const size = ref(17)
|
||||
@@ -189,26 +192,31 @@ const exportEvent = () => {
|
||||
})
|
||||
}
|
||||
let a = ''
|
||||
|
||||
loading.value = true
|
||||
formd.value.lineId = monitoringPoint.state.lineId
|
||||
formd.value.lineName = monitoringPoint.state.lineName.split('>').at(-1)
|
||||
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
||||
ElMessage('生成报告中,请稍等!')
|
||||
getLineExport(formd.value).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
getLineExport(formd.value)
|
||||
.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 = 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 = () => {
|
||||
if (dotList.value.level != 6) {
|
||||
|
||||
@@ -103,7 +103,8 @@ const tableStore = new TableStore({
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
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>
|
||||
</template>
|
||||
<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>
|
||||
</TableHeader>
|
||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
||||
@@ -154,7 +156,7 @@ const dotList: any = ref({
|
||||
id: monitoringPoint.state.lineId,
|
||||
level: 6
|
||||
})
|
||||
|
||||
const loading = ref(false)
|
||||
const formd: any = ref({
|
||||
xq: false,
|
||||
lb: false,
|
||||
@@ -243,26 +245,31 @@ const exportEvent = () => {
|
||||
})
|
||||
}
|
||||
let a = ''
|
||||
|
||||
loading.value = true
|
||||
formd.value.lineId = dotList.value.id
|
||||
formd.value.lineName = dotList.value.name
|
||||
formd.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||
formd.value.searchEndTime = TableHeaderRef.value.datePickerRef.timeValue[1]
|
||||
formd.value.flag = TableHeaderRef.value.datePickerRef.interval
|
||||
ElMessage('生成报告中,请稍等!')
|
||||
getLineExport(formd.value).then((res: any) => {
|
||||
let blob = new Blob([res], {
|
||||
type: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document;charset=UTF-8'
|
||||
getLineExport(formd.value)
|
||||
.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
|
||||
})
|
||||
// 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>
|
||||
<style lang="scss">
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
</el-form-item> -->
|
||||
</template>
|
||||
<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>
|
||||
</TableHeader>
|
||||
<div class="box" :style="`height: calc(${tableStore.table.height} + 45px)`">
|
||||
@@ -176,7 +176,7 @@ const waveTypeList = ref([
|
||||
label: '暂降'
|
||||
}
|
||||
])
|
||||
|
||||
const loading = ref(false)
|
||||
const templatePolicy: any = ref([])
|
||||
const value = ref<string>('')
|
||||
const tableStore = new TableStore({
|
||||
@@ -270,6 +270,7 @@ const exportEvent = () => {
|
||||
'Voltage_Level',
|
||||
'Load_Type'
|
||||
])[0]
|
||||
loading.value = true
|
||||
formInline.value.monitorFlag = 2
|
||||
formInline.value.powerFlag = 2
|
||||
formInline.value.searchBeginTime = TableHeaderRef.value.datePickerRef.timeValue[0]
|
||||
@@ -293,6 +294,9 @@ const exportEvent = () => {
|
||||
document.body.appendChild(link)
|
||||
link.click() //执行下载
|
||||
document.body.removeChild(link)
|
||||
loading.value = false
|
||||
}).catch(() => {
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -1,214 +1,216 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="暂态总体概况" name="1">
|
||||
<el-tabs v-model="activeName1" tab-position="left" :style="{ height: height }" type="border-card">
|
||||
<el-tab-pane label="表格" name="1">
|
||||
<OverviewTab v-if="activeName1 == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="图形" name="2">
|
||||
<OverviewTabEch v-if="activeName1 == '2'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂降原因统计" name="2"><CauseStatistics /></el-tab-pane>
|
||||
<el-tab-pane v-for="item in list" :label="item.name" :name="item.id" :key="item.id">
|
||||
<Table :info="item"></Table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="tsx">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from './components/table.vue'
|
||||
import OverviewTab from './components/overviewTab.vue'
|
||||
import OverviewTabEch from './components/overviewTabEch.vue'
|
||||
import CauseStatistics from './components/causeStatistics.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'TransientReport/weekly'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const height = mainHeight(80).height
|
||||
const activeName = ref('1')
|
||||
const activeName1 = ref('1')
|
||||
const list = ref([
|
||||
// {
|
||||
// name: '暂态严重度统计',
|
||||
// id: '3',
|
||||
// isGroup: true,
|
||||
// url: '/event-boot/report/getSeverity',
|
||||
// column: [
|
||||
// {
|
||||
// title: '暂态事件严重度(前二十)',
|
||||
// children: [
|
||||
// {
|
||||
// field: 'index',
|
||||
// title: '序号',
|
||||
// width: '80',
|
||||
// formatter: (row: any) => {
|
||||
// return (
|
||||
// (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
// row.rowIndex +
|
||||
// 1
|
||||
// )
|
||||
// }
|
||||
// },
|
||||
// { field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
// { field: 'gdName', title: '供电公司' },
|
||||
// { field: 'subName', title: '变电站' },
|
||||
// { field: 'lineName', title: '监测点' },
|
||||
// { field: 'voltageScale', title: '监测点电压等级' },
|
||||
// { field: 'loadType', title: '干扰源类型' },
|
||||
// {
|
||||
// field: 'featureAmplitude',
|
||||
// title: '暂降(骤升)幅值(%)',
|
||||
// formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
// },
|
||||
// { field: 'duration', title: '持续时间(s)' },
|
||||
// { field: 'severity', title: '暂态事件严重度' }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: '暂降事件列表',
|
||||
id: '4',
|
||||
url: '/event-boot/report/getContinueTime',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂降事件发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '电压等级', width: '150' },
|
||||
{ field: 'loadType', title: '干扰源类型', width: '150' },
|
||||
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
width: '150',
|
||||
formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
},
|
||||
{ field: 'duration', title: '持续时间(s)', width: '120' },
|
||||
{ field: 'advanceType', title: '暂降类型(机器判断)', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂降次数统计',
|
||||
id: '5',
|
||||
url: '/event-boot/report/getSagTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'times', title: '暂降次数', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂升次数统计',
|
||||
id: '6',
|
||||
url: '/event-boot/report/getUpTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'subScale', title: '变电站电压等级' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'times', title: '暂升次数', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '短时中断次数统计',
|
||||
id: '7',
|
||||
url: '/event-boot/report/getBreakTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'subScale', title: '变电站电压等级' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'times', title: '短时中断次数' }
|
||||
]
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '',
|
||||
method: 'POST',
|
||||
column: []
|
||||
})
|
||||
|
||||
tableStore.table.params.waveType = 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
// tableStore.index()
|
||||
})
|
||||
|
||||
const handleClick = () => {}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.el-tabs__content {
|
||||
height: 100%;
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
|
||||
<el-tab-pane label="暂态总体概况" name="1">
|
||||
<el-tabs v-model="activeName1" tab-position="left" :style="{ height: height }" type="border-card">
|
||||
<el-tab-pane label="表格" name="1">
|
||||
<OverviewTab v-if="activeName1 == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="图形" name="2">
|
||||
<OverviewTabEch v-if="activeName1 == '2'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="暂降原因统计" name="2"><CauseStatistics /></el-tab-pane>
|
||||
<el-tab-pane v-for="item in list" :label="item.name" :name="item.id" :key="item.id">
|
||||
<Table :info="item"></Table>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="tsx">
|
||||
import { ref, onMounted, provide } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import Table from './components/table.vue'
|
||||
import OverviewTab from './components/overviewTab.vue'
|
||||
import OverviewTabEch from './components/overviewTabEch.vue'
|
||||
import CauseStatistics from './components/causeStatistics.vue'
|
||||
import { useDictData } from '@/stores/dictData'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'TransientReport/weekly'
|
||||
})
|
||||
const dictData = useDictData()
|
||||
const height = mainHeight(80).height
|
||||
const activeName = ref('1')
|
||||
const activeName1 = ref('1')
|
||||
const list = ref([
|
||||
// {
|
||||
// name: '暂态严重度统计',
|
||||
// id: '3',
|
||||
// isGroup: true,
|
||||
// url: '/event-boot/report/getSeverity',
|
||||
// column: [
|
||||
// {
|
||||
// title: '暂态事件严重度(前二十)',
|
||||
// children: [
|
||||
// {
|
||||
// field: 'index',
|
||||
// title: '序号',
|
||||
// width: '80',
|
||||
// formatter: (row: any) => {
|
||||
// return (
|
||||
// (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize +
|
||||
// row.rowIndex +
|
||||
// 1
|
||||
// )
|
||||
// }
|
||||
// },
|
||||
// { field: 'startTime', title: '暂态事件发生时刻', width: '200' },
|
||||
// { field: 'gdName', title: '供电公司' },
|
||||
// { field: 'subName', title: '变电站' },
|
||||
// { field: 'lineName', title: '监测点' },
|
||||
// { field: 'voltageScale', title: '监测点电压等级' },
|
||||
// { field: 'loadType', title: '干扰源类型' },
|
||||
// {
|
||||
// field: 'featureAmplitude',
|
||||
// title: '暂降(骤升)幅值(%)',
|
||||
// formatter: ({ row }: any) => (row.featureAmplitude * 100).toFixed(2)
|
||||
// },
|
||||
// { field: 'duration', title: '持续时间(s)' },
|
||||
// { field: 'severity', title: '暂态事件严重度' }
|
||||
// ]
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
name: '暂降事件列表',
|
||||
id: '4',
|
||||
url: '/event-boot/report/getContinueTime',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'startTime', title: '暂降事件发生时刻', width: '200' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '电压等级', width: '150' },
|
||||
{ field: 'loadType', title: '干扰源类型', width: '150' },
|
||||
|
||||
{
|
||||
field: 'featureAmplitude',
|
||||
title: '暂降(骤升)幅值(%)',
|
||||
width: '150',
|
||||
formatter: ({ row }: any) => {
|
||||
return Math.floor(row.cellValue * 10000) / 100
|
||||
}
|
||||
},
|
||||
{ field: 'duration', title: '持续时间(s)', width: '120' },
|
||||
{ field: 'advanceType', title: '暂降类型(机器判断)', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂降次数统计',
|
||||
id: '5',
|
||||
url: '/event-boot/report/getSagTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'times', title: '暂降次数', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '暂升次数统计',
|
||||
id: '6',
|
||||
url: '/event-boot/report/getUpTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'subScale', title: '变电站电压等级' },
|
||||
{ field: 'gdName', title: '供电公司', width: '150' },
|
||||
{ field: 'times', title: '暂升次数', width: '150' }
|
||||
]
|
||||
},
|
||||
{
|
||||
name: '短时中断次数统计',
|
||||
id: '7',
|
||||
url: '/event-boot/report/getBreakTimes',
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
title: '序号',
|
||||
width: '80',
|
||||
formatter: (row: any) => {
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
{ field: 'lineName', title: '监测点' },
|
||||
{ field: 'loadType', title: '干扰源类型' },
|
||||
{
|
||||
field: 'objName',
|
||||
title: '监测点对象名称',
|
||||
formatter: ({ row }: any) => (row.objName ? row.objName : '/')
|
||||
},
|
||||
{ field: 'voltageScale', title: '监测点电压等级' },
|
||||
{ field: 'subName', title: '变电站' },
|
||||
{ field: 'subScale', title: '变电站电压等级' },
|
||||
{ field: 'gdName', title: '供电公司' },
|
||||
{ field: 'times', title: '短时中断次数' }
|
||||
]
|
||||
}
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '',
|
||||
method: 'POST',
|
||||
column: []
|
||||
})
|
||||
|
||||
tableStore.table.params.waveType = 0
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
onMounted(() => {
|
||||
// tableStore.index()
|
||||
})
|
||||
|
||||
const handleClick = () => {}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.el-tabs__content {
|
||||
height: 100%;
|
||||
.el-tab-pane {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user