feat:完善舆情监测功能
This commit is contained in:
@@ -24,18 +24,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="flex mt-20 gap-8 ml-8 mr-8">
|
||||
<div v-for="(item, index) in stateList" class="border flex-1">
|
||||
<Title3 :title="index" />
|
||||
<pie-row :width="500" :height="330" :dataList="item" />
|
||||
<div v-for="(item, index) in stateList" :key="index" class="border flex-1">
|
||||
<Title3 :title="item.name" />
|
||||
<pie-row :width="500" :height="330" :dataList="item.data" :total="item.total" />
|
||||
</div>
|
||||
<!-- <div class="border flex-1">
|
||||
<Title3 title="山峡之巅" />
|
||||
<pie-row :width="500" :height="330" />
|
||||
</div>
|
||||
<div class="border flex-1">
|
||||
<Title3 title="山峡之巅" />
|
||||
<pie-row :width="500" :height="330" />
|
||||
</div> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-1">
|
||||
@@ -46,6 +38,7 @@
|
||||
<div class="flex mt-10">
|
||||
<div class="box-2 mr-10">
|
||||
<Title1 title="舆情指数" />
|
||||
<Dropdown :options="options" @on-change="onChange" />
|
||||
<Line
|
||||
:width="1560"
|
||||
:height="400"
|
||||
@@ -71,7 +64,13 @@
|
||||
import Area from './components/area.vue'
|
||||
import wordCloud from './components/wordCloud.vue'
|
||||
import dataSource from './components/dataSource.vue'
|
||||
import { getHotNewApi, getLineChartApi, getStateApi, getTotalApi } from '@/api/sentiment.js'
|
||||
import {
|
||||
getHotNewApi,
|
||||
getLineChartApi,
|
||||
getStateApi,
|
||||
getTotalApi,
|
||||
getSpotApi
|
||||
} from '@/api/sentiment.js'
|
||||
|
||||
let seriesData = ref([])
|
||||
let xAxisData = ref([])
|
||||
@@ -80,7 +79,15 @@
|
||||
let sensitive = ref(0)
|
||||
let unsensitive = ref(0)
|
||||
let stateList = ref([])
|
||||
|
||||
let options = ref([])
|
||||
const onChange = (e) => {
|
||||
console.log(e, '===')
|
||||
getLineChart(e.id)
|
||||
}
|
||||
const getStop = async () => {
|
||||
let res = await getSpotApi()
|
||||
options.value = res.data
|
||||
}
|
||||
const getTotal = async () => {
|
||||
let res = await getTotalApi()
|
||||
total.value = res.data.total
|
||||
@@ -92,8 +99,8 @@
|
||||
stateList.value = res.data
|
||||
console.log(stateList.value, '------')
|
||||
}
|
||||
const getLineChart = async () => {
|
||||
let res = await getLineChartApi()
|
||||
const getLineChart = async (id) => {
|
||||
let res = await getLineChartApi({ id })
|
||||
xAxisData.value = res.data.data
|
||||
seriesData.value = res.data.series
|
||||
}
|
||||
@@ -102,6 +109,7 @@
|
||||
hotNewList.value = res.data
|
||||
}
|
||||
onMounted(() => {
|
||||
getStop()
|
||||
getHotNew()
|
||||
getTotal()
|
||||
getState()
|
||||
|
||||
Reference in New Issue
Block a user