Merge branch 'main' of http://192.168.1.22:3000/zcy/canneng-admin
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: {
|
||||
|
||||
@@ -99,7 +99,7 @@ const info = (list: any) => {
|
||||
shareData.value = [
|
||||
{
|
||||
month: '总计',
|
||||
notAssociated: all
|
||||
notAssociated: all.toFixed(2)
|
||||
},
|
||||
...list.monthlyStatistics.monthCalculation
|
||||
]
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<el-button type="primary" @click="onSubmit">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-tabs v-model="activeName" type="border-card">
|
||||
<el-tabs v-model="activeName" type="border-card" v-loading="loading">
|
||||
<el-tab-pane label="图形" name="1">
|
||||
<Echart :list="list" ref="echarts" />
|
||||
</el-tab-pane>
|
||||
@@ -36,6 +36,7 @@ const list = ref([])
|
||||
const echarts = ref()
|
||||
const table = ref()
|
||||
const dictData = useDictData()
|
||||
const loading = ref(true)
|
||||
const formInline = reactive({
|
||||
deptInd: '',
|
||||
deptIndex: dictData.state.area[0].id,
|
||||
@@ -57,12 +58,14 @@ const formInline = reactive({
|
||||
})
|
||||
// const locale=zhCn
|
||||
const onSubmit = async () => {
|
||||
loading.value = true
|
||||
await getAreaCalculation(formInline).then(res => {
|
||||
list.value = res.data
|
||||
echarts.value.Processing(res.data.areaStatistics)
|
||||
echarts.value.Grade(res.data.voltageStatistics)
|
||||
echarts.value.Relation(res.data.monthlyStatistics)
|
||||
table.value.info(res.data)
|
||||
loading.value = false
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user