优化页面
This commit is contained in:
@@ -100,7 +100,10 @@ const tableStore: any = new TableStore({
|
||||
{
|
||||
title: '监测对象类型',
|
||||
field: 'objType',
|
||||
minWidth: '90'
|
||||
minWidth: '90',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '是否治理',
|
||||
|
||||
@@ -81,6 +81,7 @@
|
||||
height: `calc(${prop.height} - ${headerHeight}px + ${fullscreen ? 0 : 56}px)`
|
||||
}"
|
||||
/>
|
||||
<!-- <el-empty description="暂无数据" /> -->
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -127,14 +128,16 @@ const echartList = ref()
|
||||
const headerHeight = ref(57)
|
||||
|
||||
// 监测对象
|
||||
const idList = ref()
|
||||
const idList = ref([])
|
||||
|
||||
// 监测对象
|
||||
const initListByIds = () => {
|
||||
getListByIds({}).then((res: any) => {
|
||||
if (res.data.length > 0) {
|
||||
if (res.data?.length > 0) {
|
||||
idList.value = res.data
|
||||
initCode()
|
||||
} else {
|
||||
tableStore.index()
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -179,7 +182,7 @@ const setEchart = () => {
|
||||
if (!beforeGroupedByPhase[phase]) {
|
||||
beforeGroupedByPhase[phase] = []
|
||||
}
|
||||
beforeGroupedByPhase[phase].push([item.time, item.statisticalData])
|
||||
beforeGroupedByPhase[phase].push([item.time, item.statisticalData, item.unit, 'solid'])
|
||||
})
|
||||
|
||||
// 处理治理后数据
|
||||
@@ -188,7 +191,7 @@ const setEchart = () => {
|
||||
if (!afterGroupedByPhase[phase]) {
|
||||
afterGroupedByPhase[phase] = []
|
||||
}
|
||||
afterGroupedByPhase[phase].push([item.time, item.statisticalData])
|
||||
afterGroupedByPhase[phase].push([item.time, item.statisticalData, item.unit, 'dotted'])
|
||||
})
|
||||
|
||||
// 构建系列数据
|
||||
@@ -293,6 +296,37 @@ const setEchart = () => {
|
||||
title: {
|
||||
text: titleText
|
||||
},
|
||||
tooltip: {
|
||||
axisPointer: {
|
||||
type: 'cross',
|
||||
label: {
|
||||
color: '#fff',
|
||||
fontSize: 16
|
||||
}
|
||||
},
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontStyle: 'normal',
|
||||
opacity: 0.35,
|
||||
fontSize: 14
|
||||
},
|
||||
backgroundColor: 'rgba(0,0,0,0.55)',
|
||||
borderWidth: 0,
|
||||
formatter(params: any) {
|
||||
const xname = params[0].value[0]
|
||||
let str = `${xname}<br>`
|
||||
params.forEach((el: any, index: any) => {
|
||||
let marker = ''
|
||||
|
||||
marker = `<span style="display:inline-block;border: 2px ${el.color} ${el.value[3]};margin-right:5px;width:40px;height:0px;background-color:#ffffff00;"></span>`
|
||||
|
||||
str += `${marker}${el.seriesName.split('(')[0]}:${
|
||||
el.value[1] != null ? el.value[1] + ' ' + (el.value[2] == 'null' ? '' : el.value[2]) : '-'
|
||||
}<br>`
|
||||
})
|
||||
return str
|
||||
}
|
||||
},
|
||||
legend: {
|
||||
data: legendData,
|
||||
icon: 'rect',
|
||||
@@ -368,8 +402,8 @@ const tableStore: any = new TableStore({
|
||||
}
|
||||
})
|
||||
|
||||
tableStore.table.params.indicator = '1'
|
||||
tableStore.table.params.exceedingTheLimit = '1'
|
||||
tableStore.table.params.indicator = ''
|
||||
tableStore.table.params.exceedingTheLimit = ''
|
||||
tableStore.table.params.dataLevel = 'Primary'
|
||||
tableStore.table.params.valueType = 'avg'
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
Reference in New Issue
Block a user