|
@@ -43,7 +43,35 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<Map ref="mapRef" class="map" active-map="vectorgraph" :point-type="pointType" :event-details="eventDetails" />
|
|
|
- <Chart :option="option1" style="height: 200px" />
|
|
|
+ <div class="box">
|
|
|
+ <div class="box-title">趋势统计</div>
|
|
|
+ <Chart :option="option1" style="height: 200px;" />
|
|
|
+ </div>
|
|
|
+ <div class="box">
|
|
|
+ <div class="box-title">事件列表</div>
|
|
|
+ <van-field
|
|
|
+ v-model="yearLabel"
|
|
|
+ is-link
|
|
|
+ readonly
|
|
|
+ label="年度"
|
|
|
+ placeholder="请选择"
|
|
|
+ @click="showPicker = true"
|
|
|
+ />
|
|
|
+ <el-table :data="detailsData.dataList" border table-layout='auto'>
|
|
|
+ <el-table-column label="类别" prop="data1" align="center" />
|
|
|
+ <el-table-column label="位置" prop="data2" align="center" />
|
|
|
+ <el-table-column label="发生时间" prop="data3" align="center" />
|
|
|
+ <el-table-column label="受伤人数" prop="data4" align="center" />
|
|
|
+ <el-table-column label="死亡人数" prop="data5" align="center" />
|
|
|
+ </el-table>
|
|
|
+ </div>
|
|
|
+ <van-popup v-model:show="showPicker" round position="bottom">
|
|
|
+ <van-picker
|
|
|
+ :columns="columns"
|
|
|
+ @cancel="showPicker = false"
|
|
|
+ @confirm="onPickerConfirm"
|
|
|
+ />
|
|
|
+ </van-popup>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -57,6 +85,7 @@ import closeImg from "@/assets/images/close.png";
|
|
|
import {getPointInfoComprehensiveSearch} from "@/api/globalMap";
|
|
|
import {onClickOutside} from "@vueuse/core";
|
|
|
import {chartOption1} from "@/views/disasterRiskMonitor/chartOptions";
|
|
|
+import {ElTable, ElTableColumn} from "element-plus";
|
|
|
|
|
|
const router = useRouter();
|
|
|
const noticeBarState = reactive({
|
|
@@ -77,8 +106,10 @@ let finished = ref(false);
|
|
|
const queryParams = reactive({
|
|
|
page: 0,
|
|
|
page_size: 10,
|
|
|
+ year: '',
|
|
|
keywords: ''
|
|
|
});
|
|
|
+let yearLabel = ref('');
|
|
|
const searchList = ref([]);
|
|
|
onClickOutside(searchBoxRef, event => {
|
|
|
showSearch.value = false;
|
|
@@ -134,6 +165,23 @@ const handleClickItem = item => {
|
|
|
};
|
|
|
let pointType = ref([]);
|
|
|
let eventDetails = ref({});
|
|
|
+let detailsData = ref({
|
|
|
+ dataList: []
|
|
|
+})
|
|
|
+const option1 = ref(chartOption1);
|
|
|
+let showPicker = ref(false);
|
|
|
+let columns = reactive([
|
|
|
+ { text: '2024年', value: '2024' },
|
|
|
+ { text: '2023年', value: '2023' },
|
|
|
+ { text: '2022年', value: '2022' },
|
|
|
+ { text: '2021年', value: '2021' }
|
|
|
+])
|
|
|
+
|
|
|
+const onPickerConfirm = ({selectedOptions}) => {
|
|
|
+ showPicker.value = false;
|
|
|
+ yearLabel.value = selectedOptions[0].text;
|
|
|
+ queryParams.year = selectedOptions[0].value;
|
|
|
+}
|
|
|
const initData = () => {
|
|
|
// 通知栏数据
|
|
|
getActiveEventList().then(res => {
|
|
@@ -143,11 +191,16 @@ const initData = () => {
|
|
|
noticeBarState.event_title = res.data.event_title;
|
|
|
}
|
|
|
});
|
|
|
- // 菜单数据
|
|
|
+ // 趋势统计
|
|
|
+ option1.value.xAxis[0].data = ['2019-01', '2019-02', '2019-03', '2019-04', '2019-05', '2019-06'];
|
|
|
+ option1.value.series[0].data = [502.84, 205.97, 332.79, 281.55, 398.35, 214.02];
|
|
|
+ option1.value.series[1].data = [281.55, 398.35, 214.02, 179.55, 289.57, 356.14];
|
|
|
+ // 事件列表
|
|
|
+ detailsData.value.dataList = [
|
|
|
+ { data1: '自然灾害', data2: '茂名市电白区黄岭镇石头村', data3: '2024-12-14 12:12:13', data4: 1, data5: 0 }
|
|
|
+ ]
|
|
|
};
|
|
|
|
|
|
-const option1 = ref(chartOption1);
|
|
|
-
|
|
|
onMounted(() => {
|
|
|
initData();
|
|
|
});
|
|
@@ -196,4 +249,12 @@ onMounted(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.box {
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 10px;
|
|
|
+ .box-title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+}
|
|
|
</style>
|