提交
This commit is contained in:
@@ -20,13 +20,14 @@
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<div v-loading="loading">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<MyEchartMap
|
||||
ref="EchartMap"
|
||||
:options="echartMapList"
|
||||
class="map"
|
||||
@eliminate="eliminate"
|
||||
@getRegionByRegion="getRegionByRegion"
|
||||
/>
|
||||
</el-col>
|
||||
@@ -77,6 +78,7 @@ const echartList = ref({})
|
||||
const titleA = ref('')
|
||||
const distributionData = ref([])
|
||||
const area = ref()
|
||||
const loading = ref(true)
|
||||
|
||||
const formInline = reactive({
|
||||
deptIndex: dictData.state.area[0].id,
|
||||
@@ -87,15 +89,17 @@ const formInline = reactive({
|
||||
})
|
||||
|
||||
const onSubmit = () => {
|
||||
loading.value = true
|
||||
titleA.value = formInline.statisticalType.name
|
||||
getAreaLineDetail(formInline).then(res => {
|
||||
area.value.change()
|
||||
// 处理地图数据
|
||||
map(res)
|
||||
tabulation(res)
|
||||
histogram(res)
|
||||
|
||||
|
||||
EchartMap.value.GetEchar(area.value.areaName)
|
||||
console.log("🚀 ~ file: distribution.vue:98 ~ getAreaLineDetail ~ area.value.areaName:", area.value.areaName)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
@@ -104,6 +108,11 @@ const getRegionByRegion = (list: any) => {
|
||||
formInline.deptIndex = list.id
|
||||
onSubmit()
|
||||
}
|
||||
// 消除点
|
||||
const eliminate = (name: string) => {
|
||||
echartMapList.value.options.series = []
|
||||
EchartMap.value.GetEchar(name)
|
||||
}
|
||||
// 地图数处理
|
||||
const map = (res: any) => {
|
||||
echartMapList.value = {
|
||||
@@ -233,7 +242,7 @@ const histogram = (res: any) => {
|
||||
: titleA.value == '干扰源类型'
|
||||
? '干扰源类型'
|
||||
: titleA.value == '电网拓扑'
|
||||
? '区域'
|
||||
? area.value.areaName
|
||||
: '' // 给X轴加单位
|
||||
},
|
||||
tooltip: {
|
||||
|
||||
Reference in New Issue
Block a user