|
@@ -77,13 +77,27 @@
|
|
|
<i class="icon-down" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <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
|
|
|
+ :data="detailsData.dataList"
|
|
|
+ border
|
|
|
+ table-layout="auto"
|
|
|
+ @row-click="handleRowClick"
|
|
|
+ >
|
|
|
+ <el-table-column label="类别" prop="event_type" align="center">
|
|
|
+ <template #default="scope">
|
|
|
+ <dict-tag :options="mm_event_type" :value="scope.row.event_type" />
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="位置" prop="address" align="center" />
|
|
|
+ <el-table-column label="发生时间" prop="create_time" align="center" />
|
|
|
<el-table-column label="受伤人数" prop="data4" align="center" />
|
|
|
<el-table-column label="死亡人数" prop="data5" align="center" />
|
|
|
- <!-- <el-table-column label="操作" align="center" width="50px">-->
|
|
|
+ <!-- <el-table-column-->
|
|
|
+ <!-- label="操作"-->
|
|
|
+ <!-- align="center"-->
|
|
|
+ <!-- width="50px"-->
|
|
|
+ <!-- fixed="right"-->
|
|
|
+ <!-- >-->
|
|
|
<!-- <template #default="scope">-->
|
|
|
<!-- <div-->
|
|
|
<!-- class="btn"-->
|
|
@@ -105,6 +119,18 @@
|
|
|
/>
|
|
|
</van-popup>
|
|
|
</div>
|
|
|
+ <van-popup v-model:show="showDetailPop" position="bottom">
|
|
|
+ <div class="title">事件详情</div>
|
|
|
+ <van-form disabled>
|
|
|
+ <van-cell-group inset>
|
|
|
+ <van-field v-model="rowDetail.address" label="位置" />
|
|
|
+ <van-field v-model="rowDetail.event_type" label="灾害类型" />
|
|
|
+ <van-field v-model="rowDetail.create_time" label="发生时间" />
|
|
|
+ <van-field v-model="rowDetail.data4" label="受伤人数" />
|
|
|
+ <van-field v-model="rowDetail.data5" label="死亡人数" />
|
|
|
+ </van-cell-group>
|
|
|
+ </van-form>
|
|
|
+ </van-popup>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="cityEmergencyEvent">
|
|
@@ -118,6 +144,7 @@ import { getPointInfoComprehensiveSearch } from "@/api/globalMap";
|
|
|
import { onClickOutside } from "@vueuse/core";
|
|
|
import { chartOption1 } from "@/views/disasterRiskMonitor/chartOptions";
|
|
|
import { ElTable, ElTableColumn } from "element-plus";
|
|
|
+import { getEvent } from "@/api/duty/eventing";
|
|
|
let mapRef = ref();
|
|
|
const router = useRouter();
|
|
|
const noticeBarState = reactive({
|
|
@@ -136,11 +163,15 @@ let loading = ref(false);
|
|
|
let error = ref(false);
|
|
|
let finished = ref(false);
|
|
|
const queryParams = reactive({
|
|
|
- page: 0,
|
|
|
+ page: 1,
|
|
|
page_size: 10,
|
|
|
year: "",
|
|
|
keywords: ""
|
|
|
});
|
|
|
+const proxy = getCurrentInstance()?.proxy;
|
|
|
+const { mm_event_type } = toRefs<any>(
|
|
|
+ proxy?.useDict('mm_event_type')
|
|
|
+);
|
|
|
let yearLabel = ref("");
|
|
|
const searchList = ref([]);
|
|
|
onClickOutside(searchBoxRef, event => {
|
|
@@ -202,6 +233,7 @@ let detailsData = ref({
|
|
|
});
|
|
|
const option1 = ref(chartOption1);
|
|
|
let showPicker = ref(false);
|
|
|
+const showDetailPop = ref(false);
|
|
|
let columns = reactive([
|
|
|
{ text: "2024年", value: "2024" },
|
|
|
{ text: "2023年", value: "2023" },
|
|
@@ -232,6 +264,34 @@ const onPickerConfirm = ({ selectedOptions }) => {
|
|
|
const showDetails = row => {
|
|
|
router.push({ name: "CityEmergencyDetails", query: { id: row.id } });
|
|
|
};
|
|
|
+const getList = () => {
|
|
|
+ loading.value = true;
|
|
|
+ getEvent(queryParams)
|
|
|
+ .then(res => {
|
|
|
+ // let data = res.data;
|
|
|
+ // // 确保 data 是数组
|
|
|
+ // if (!Array.isArray(data)) {
|
|
|
+ // data = [data];
|
|
|
+ // }
|
|
|
+ // // 转换 event_type
|
|
|
+ // data = data.map(item => ({
|
|
|
+ // ...item,
|
|
|
+ // event_type: eventType[item.event_type] || item.event_type
|
|
|
+ // }));
|
|
|
+ detailsData.value.dataList = res.data;
|
|
|
+ // total.value = res.total;
|
|
|
+ })
|
|
|
+ .finally(() => {
|
|
|
+ loading.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+getList();
|
|
|
+const rowDetail = ref();
|
|
|
+const handleRowClick = row => {
|
|
|
+ // showDetails(row);
|
|
|
+ showDetailPop.value = true;
|
|
|
+ rowDetail.value = row;
|
|
|
+};
|
|
|
const initData = () => {
|
|
|
const dom = mapRef.value;
|
|
|
// getActiveEventList().then(res => {
|
|
@@ -257,131 +317,131 @@ const initData = () => {
|
|
|
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,
|
|
|
- longitude: "110.719914",
|
|
|
- latitude: "21.609269",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市茂南区羊角镇",
|
|
|
- data3: "2024-10-07 08:00:00",
|
|
|
- data4: 2,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.984948",
|
|
|
- latitude: "21.669318",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市高州市根子镇",
|
|
|
- data3: "2024-06-15 17:30:00",
|
|
|
- data4: 5,
|
|
|
- data5: 0,
|
|
|
- longitude: "111.049042",
|
|
|
- latitude: "21.798487",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- // 2023年的数据
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市信宜市池洞镇",
|
|
|
- data3: "2023-11-22 21:45:00",
|
|
|
- data4: 3,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.94942",
|
|
|
- latitude: "22.429006",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市化州市同庆镇",
|
|
|
- data3: "2023-08-03 14:20:00",
|
|
|
- data4: 4,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.694616",
|
|
|
- latitude: "21.591756",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "事故灾害",
|
|
|
- data2: "茂名市电白区观珠镇",
|
|
|
- data3: "2023-05-12 10:10:00",
|
|
|
- data4: 2,
|
|
|
- data5: 0,
|
|
|
- longitude: "111.181376",
|
|
|
- latitude: "21.694578",
|
|
|
- dataType: "2"
|
|
|
- },
|
|
|
- // 新增2021年的数据
|
|
|
- {
|
|
|
- data1: "事故灾害",
|
|
|
- data2: "茂名市茂南区公馆镇",
|
|
|
- data3: "2021-11-05 11:00:00",
|
|
|
- data4: 2,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.841795",
|
|
|
- latitude: "21.679494",
|
|
|
- dataType: "2"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市电白区麻岗镇",
|
|
|
- data3: "2021-09-15 15:00:00",
|
|
|
- data4: 1,
|
|
|
- data5: 0,
|
|
|
- longitude: "111.183698",
|
|
|
- latitude: "21.534101",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "事故灾害",
|
|
|
- data2: "茂名市高州市石鼓镇",
|
|
|
- data3: "2021-07-25 17:00:00",
|
|
|
- data4: 3,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.772332",
|
|
|
- latitude: "21.822757",
|
|
|
- dataType: "2"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "事故灾害",
|
|
|
- data2: "茂名市化州市林尘镇",
|
|
|
- data3: "2021-05-20 09:00:00",
|
|
|
- data4: 0,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.569997",
|
|
|
- latitude: "21.831692",
|
|
|
- dataType: "2"
|
|
|
- },
|
|
|
- {
|
|
|
- data1: "自然灾害",
|
|
|
- data2: "茂名市电白区树仔镇",
|
|
|
- data3: "2021-03-10 14:00:00",
|
|
|
- data4: 1,
|
|
|
- data5: 0,
|
|
|
- longitude: "111.234894",
|
|
|
- latitude: "21.535935",
|
|
|
- dataType: "1"
|
|
|
- },
|
|
|
- // 原来的2021年数据
|
|
|
- {
|
|
|
- data1: "事故灾害",
|
|
|
- data2: "茂名市茂南区袂花镇",
|
|
|
- data3: "2021-09-28 19:30:00",
|
|
|
- data4: 3,
|
|
|
- data5: 0,
|
|
|
- longitude: "110.937624",
|
|
|
- latitude: "21.58241",
|
|
|
- dataType: "2"
|
|
|
- }
|
|
|
- ];
|
|
|
+ // detailsData.value.dataList = [
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市电白区黄岭镇石头村",
|
|
|
+ // data3: "2024-12-14 12:12:13",
|
|
|
+ // data4: 1,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.719914",
|
|
|
+ // latitude: "21.609269",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市茂南区羊角镇",
|
|
|
+ // data3: "2024-10-07 08:00:00",
|
|
|
+ // data4: 2,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.984948",
|
|
|
+ // latitude: "21.669318",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市高州市根子镇",
|
|
|
+ // data3: "2024-06-15 17:30:00",
|
|
|
+ // data4: 5,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "111.049042",
|
|
|
+ // latitude: "21.798487",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // // 2023年的数据
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市信宜市池洞镇",
|
|
|
+ // data3: "2023-11-22 21:45:00",
|
|
|
+ // data4: 3,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.94942",
|
|
|
+ // latitude: "22.429006",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市化州市同庆镇",
|
|
|
+ // data3: "2023-08-03 14:20:00",
|
|
|
+ // data4: 4,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.694616",
|
|
|
+ // latitude: "21.591756",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "事故灾害",
|
|
|
+ // data2: "茂名市电白区观珠镇",
|
|
|
+ // data3: "2023-05-12 10:10:00",
|
|
|
+ // data4: 2,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "111.181376",
|
|
|
+ // latitude: "21.694578",
|
|
|
+ // dataType: "2"
|
|
|
+ // },
|
|
|
+ // // 新增2021年的数据
|
|
|
+ // {
|
|
|
+ // data1: "事故灾害",
|
|
|
+ // data2: "茂名市茂南区公馆镇",
|
|
|
+ // data3: "2021-11-05 11:00:00",
|
|
|
+ // data4: 2,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.841795",
|
|
|
+ // latitude: "21.679494",
|
|
|
+ // dataType: "2"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市电白区麻岗镇",
|
|
|
+ // data3: "2021-09-15 15:00:00",
|
|
|
+ // data4: 1,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "111.183698",
|
|
|
+ // latitude: "21.534101",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "事故灾害",
|
|
|
+ // data2: "茂名市高州市石鼓镇",
|
|
|
+ // data3: "2021-07-25 17:00:00",
|
|
|
+ // data4: 3,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.772332",
|
|
|
+ // latitude: "21.822757",
|
|
|
+ // dataType: "2"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "事故灾害",
|
|
|
+ // data2: "茂名市化州市林尘镇",
|
|
|
+ // data3: "2021-05-20 09:00:00",
|
|
|
+ // data4: 0,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.569997",
|
|
|
+ // latitude: "21.831692",
|
|
|
+ // dataType: "2"
|
|
|
+ // },
|
|
|
+ // {
|
|
|
+ // data1: "自然灾害",
|
|
|
+ // data2: "茂名市电白区树仔镇",
|
|
|
+ // data3: "2021-03-10 14:00:00",
|
|
|
+ // data4: 1,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "111.234894",
|
|
|
+ // latitude: "21.535935",
|
|
|
+ // dataType: "1"
|
|
|
+ // },
|
|
|
+ // // 原来的2021年数据
|
|
|
+ // {
|
|
|
+ // data1: "事故灾害",
|
|
|
+ // data2: "茂名市茂南区袂花镇",
|
|
|
+ // data3: "2021-09-28 19:30:00",
|
|
|
+ // data4: 3,
|
|
|
+ // data5: 0,
|
|
|
+ // longitude: "110.937624",
|
|
|
+ // latitude: "21.58241",
|
|
|
+ // dataType: "2"
|
|
|
+ // }
|
|
|
+ // ];
|
|
|
detailsData.value.dataList.forEach(item => {
|
|
|
const icon =
|
|
|
item.dataType && !!iconList[item.dataType].image
|
|
@@ -598,4 +658,43 @@ const initData = () => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+/* 移除表单容器背景 */
|
|
|
+:deep(.van-cell-group) {
|
|
|
+ background: transparent !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 移除每个表单项的背景 */
|
|
|
+:deep(.van-cell) {
|
|
|
+ background: transparent !important;
|
|
|
+}
|
|
|
+
|
|
|
+/* 移除内嵌容器的边距和阴影 */
|
|
|
+:deep(.van-cell-group--inset) {
|
|
|
+ margin: 0;
|
|
|
+ box-shadow: none;
|
|
|
+ &::after {
|
|
|
+ border: none !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+:deep(.van-field--disabled) {
|
|
|
+ .van-field__label,
|
|
|
+ .van-field__control {
|
|
|
+ color: rgba(12, 12, 12, 0.93) !important;
|
|
|
+ -webkit-text-fill-color: #4a4848 !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 移除禁用蒙层 */
|
|
|
+ .van-field__disabled-mask {
|
|
|
+ display: none !important;
|
|
|
+ }
|
|
|
+}
|
|
|
+.title {
|
|
|
+ font-size: 18px;
|
|
|
+ font-weight: bold;
|
|
|
+ line-height: 32px;
|
|
|
+ width: 100%;
|
|
|
+ text-align: center;
|
|
|
+ margin-bottom: 8px;
|
|
|
+ margin-top: 8px;
|
|
|
+}
|
|
|
</style>
|