监测点评估添加字段
This commit is contained in:
@@ -11,7 +11,7 @@ export const defaultAttribute: VxeTableProps = {
|
|||||||
scrollX: { scrollToLeftOnChange: true },
|
scrollX: { scrollToLeftOnChange: true },
|
||||||
scrollY: { enabled: false },
|
scrollY: { enabled: false },
|
||||||
// 注意:全局不要默认开启 treeConfig,会与 stripe 冲突;树表在页面自行配置
|
// 注意:全局不要默认开启 treeConfig,会与 stripe 冲突;树表在页面自行配置
|
||||||
customConfig: { enabled: true, allowFixed: true, storage: true, showFooter: false, immediate: true ,mode:'default'},
|
customConfig: { enabled: true, allowFixed: true, storage: false, showFooter: false, immediate: true ,mode:'default'},
|
||||||
showOverflow: 'tooltip',
|
showOverflow: 'tooltip',
|
||||||
showHeaderOverflow: false
|
showHeaderOverflow: false
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,10 +9,10 @@
|
|||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
height="auto"
|
height="auto"
|
||||||
:key="key"
|
:key="key"
|
||||||
:id="getTableId()"
|
|
||||||
:data="tableStore.table.data"
|
:data="tableStore.table.data"
|
||||||
v-loading="tableStore.table.loading"
|
v-loading="tableStore.table.loading"
|
||||||
v-bind="tableBindProps"
|
v-bind="tableBindProps"
|
||||||
|
:id="getTableId()"
|
||||||
@checkbox-all="selectChangeEvent"
|
@checkbox-all="selectChangeEvent"
|
||||||
@checkbox-change="selectChangeEvent"
|
@checkbox-change="selectChangeEvent"
|
||||||
@cell-click="onCellClick"
|
@cell-click="onCellClick"
|
||||||
@@ -105,9 +105,17 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
})
|
})
|
||||||
const attrs = useAttrs()
|
const attrs = useAttrs()
|
||||||
const tableBindProps = computed(() => {
|
const tableBindProps = computed(() => {
|
||||||
|
const enableStorage = props.showCustomColumn || !!tableStore?.table?.customColumnInHeader
|
||||||
|
const baseCustomConfig = (defaultAttribute.customConfig || {}) as Record<string, any>
|
||||||
|
const attrsCustomConfig = ((attrs.customConfig as Record<string, any>) || {}) as Record<string, any>
|
||||||
return Object.assign({}, defaultAttribute, attrs, {
|
return Object.assign({}, defaultAttribute, attrs, {
|
||||||
showOverflow: props.showOverflow,
|
showOverflow: props.showOverflow,
|
||||||
showHeaderOverflow: false
|
showHeaderOverflow: false,
|
||||||
|
customConfig: {
|
||||||
|
...baseCustomConfig,
|
||||||
|
...attrsCustomConfig,
|
||||||
|
storage: enableStorage ? true : !!attrsCustomConfig.storage
|
||||||
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
const onCellClick: VxeTableEvents.CellClick<any> = params => {
|
const onCellClick: VxeTableEvents.CellClick<any> = params => {
|
||||||
|
|||||||
@@ -47,6 +47,14 @@
|
|||||||
</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">导出</el-button>
|
||||||
|
<el-button
|
||||||
|
class="ml10"
|
||||||
|
icon="el-icon-Setting"
|
||||||
|
@mousedown="onCustomColumnMousedown"
|
||||||
|
@click="openCustomColumn"
|
||||||
|
>
|
||||||
|
列设置
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
|
|
||||||
@@ -57,6 +65,7 @@
|
|||||||
auto-resize
|
auto-resize
|
||||||
:data="tableStore.table.data"
|
:data="tableStore.table.data"
|
||||||
v-bind="defaultAttribute"
|
v-bind="defaultAttribute"
|
||||||
|
:id="tableId"
|
||||||
:height="tableHeight"
|
:height="tableHeight"
|
||||||
resizable
|
resizable
|
||||||
show-overflow
|
show-overflow
|
||||||
@@ -71,8 +80,7 @@
|
|||||||
min-width="150"
|
min-width="150"
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
<vxe-column field="devName" title="终端名称" align="center" min-width="120"></vxe-column>
|
||||||
<!-- <vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column> -->
|
<vxe-column field="devType" title="终端型号" align="center" min-width="150"></vxe-column>
|
||||||
<!-- <vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column> -->
|
|
||||||
<vxe-column
|
<vxe-column
|
||||||
field="lineName"
|
field="lineName"
|
||||||
title="监测点名称"
|
title="监测点名称"
|
||||||
@@ -80,19 +88,51 @@
|
|||||||
min-width="150"
|
min-width="150"
|
||||||
:formatter="formatMonitorId"
|
:formatter="formatMonitorId"
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
<!-- <vxe-column field="powerFlag" title="监测位置" align="center" min-width="100"></vxe-column> -->
|
<vxe-column
|
||||||
<!-- <vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column> -->
|
field="objName"
|
||||||
<!-- <vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column> -->
|
title="监测对象名称"
|
||||||
<!-- <vxe-column field="objName" title="监测对象名称" align="center" min-width="150" :formatter="formatMonitorId"></vxe-column> -->
|
align="center"
|
||||||
<!-- <vxe-column field="interval" title="统计间隔" align="center" min-width="100" :formatter="formatMonitorId"></vxe-column> -->
|
min-width="150"
|
||||||
<!-- <vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column> -->
|
:formatter="formatMonitorId"
|
||||||
<!-- <vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column> -->
|
></vxe-column>
|
||||||
|
<vxe-column field="subVoltage" title="变电站电压等级" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="lineVoltage" title="监测点电压等级" align="center" min-width="120"></vxe-column>
|
||||||
|
<vxe-column field="powerFlag" title="用户性质" align="center" min-width="100"></vxe-column>
|
||||||
|
|
||||||
|
<vxe-column field="loadType" title="干扰源类型" align="center" min-width="120"></vxe-column>
|
||||||
|
|
||||||
|
<vxe-column field="loginTime" title="投运时间" align="center" min-width="120"></vxe-column>
|
||||||
|
|
||||||
|
<vxe-column field="runFlag" title="运行状态" align="center" min-width="100">
|
||||||
|
<template #default="{ row }">
|
||||||
|
<el-tag v-if="row.runFlag === '投运'" type="success" :disable-transitions="true" size="small">
|
||||||
|
投运
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-if="row.runFlag === '检修'" type="warning" :disable-transitions="true" size="small">
|
||||||
|
检修
|
||||||
|
</el-tag>
|
||||||
|
<el-tag v-if="row.runFlag === '停运'" type="danger" :disable-transitions="true" size="small">
|
||||||
|
停运
|
||||||
|
</el-tag>
|
||||||
|
</template>
|
||||||
|
</vxe-column>
|
||||||
|
|
||||||
|
<vxe-column
|
||||||
|
field="interval"
|
||||||
|
title="统计间隔"
|
||||||
|
align="center"
|
||||||
|
min-width="100"
|
||||||
|
:formatter="formatMonitorId"
|
||||||
|
></vxe-column>
|
||||||
<vxe-column
|
<vxe-column
|
||||||
field="harmonicValue"
|
field="harmonicValue"
|
||||||
:title="harmonicValueTitle"
|
:title="harmonicValueTitle"
|
||||||
align="center"
|
align="center"
|
||||||
min-width="120"
|
min-width="120"
|
||||||
></vxe-column>
|
></vxe-column>
|
||||||
|
<vxe-column field="onlineRate" title="在线率(%)" align="center" min-width="100"></vxe-column>
|
||||||
|
<vxe-column field="integrity" title="完整率(%)" align="center" min-width="100"></vxe-column>
|
||||||
|
|
||||||
<!-- <vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
|
<!-- <vxe-column field="upCounts" title="暂升次数(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
<!-- <vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column> -->
|
<!-- <vxe-column field="downCounts" title="电压暂降(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
<!-- <vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
|
<!-- <vxe-column field="breakCounts" title="短时中断(次)" align="center" min-width="100"></vxe-column> -->
|
||||||
@@ -138,6 +178,7 @@ const options = dictData.getBasicData('Pollution_Calc')
|
|||||||
const tableHeight = ref(500)
|
const tableHeight = ref(500)
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const tableHeaderRef = ref()
|
const tableHeaderRef = ref()
|
||||||
|
const tableId = 'pollution-monitoring-point-report'
|
||||||
|
|
||||||
const selectedArea = ref()
|
const selectedArea = ref()
|
||||||
const areOptions: any = dictData.state.area
|
const areOptions: any = dictData.state.area
|
||||||
@@ -145,6 +186,28 @@ const allData = ref<PollutionItem[]>([])
|
|||||||
const searchKeyword = ref('')
|
const searchKeyword = ref('')
|
||||||
const harmonicValueTitle = ref('谐波电压污染值')
|
const harmonicValueTitle = ref('谐波电压污染值')
|
||||||
|
|
||||||
|
let customColumnVisibleOnPress = false
|
||||||
|
const onCustomColumnMousedown = () => {
|
||||||
|
const table = tableRef.value as any
|
||||||
|
if (!table) return
|
||||||
|
customColumnVisibleOnPress = table.getCustomVisible?.() ?? !!table.reactData?.customStore?.visible
|
||||||
|
if (table.reactData?.customStore) {
|
||||||
|
table.reactData.customStore.activeBtn = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const openCustomColumn = () => {
|
||||||
|
const table = tableRef.value as any
|
||||||
|
if (!table) return
|
||||||
|
if (table.reactData?.customStore) {
|
||||||
|
table.reactData.customStore.activeBtn = false
|
||||||
|
}
|
||||||
|
if (customColumnVisibleOnPress) {
|
||||||
|
table.closeCustom?.()
|
||||||
|
} else {
|
||||||
|
table.openCustom?.()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const cascaderProps = {
|
const cascaderProps = {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
value: 'id',
|
value: 'id',
|
||||||
@@ -244,6 +307,7 @@ const updateTotal = computed(() => {
|
|||||||
const tableStore = new TableStore({
|
const tableStore = new TableStore({
|
||||||
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
|
url: '/harmonic-boot/PollutionSubstation/downPollutionLineCalc',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
|
filename: '监测点评估',
|
||||||
column: [],
|
column: [],
|
||||||
beforeSearchFun: () => {
|
beforeSearchFun: () => {
|
||||||
delete tableStore.table.params.deptIndex
|
delete tableStore.table.params.deptIndex
|
||||||
@@ -293,7 +357,6 @@ tableStore.table.params.isUpToGrid = 0
|
|||||||
tableStore.table.params.type = 1
|
tableStore.table.params.type = 1
|
||||||
|
|
||||||
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
const handleStatisticalTypeChange = (newVal: { id: any }) => {
|
||||||
|
|
||||||
if (newVal) {
|
if (newVal) {
|
||||||
tableStore.table.params.statisticalType = newVal
|
tableStore.table.params.statisticalType = newVal
|
||||||
tableStore.table.params.ids = [newVal.id]
|
tableStore.table.params.ids = [newVal.id]
|
||||||
|
|||||||
Reference in New Issue
Block a user