|
@@ -9,7 +9,7 @@
|
|
|
<div class="card1">
|
|
|
<div class="text1">隐患点总数</div>
|
|
|
<div class="text-box">
|
|
|
- <div class="text2">34,221</div>
|
|
|
+ <div class="text2">{{ total }}</div>
|
|
|
处
|
|
|
</div>
|
|
|
</div>
|
|
@@ -21,7 +21,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="card-header" style="justify-content: space-between">
|
|
|
+ <div class="card-header mg10" style="justify-content: space-between">
|
|
|
<div class="flex">
|
|
|
<i class="icon-line" />
|
|
|
<div class="text">威胁人员规模</div>
|
|
@@ -143,22 +143,32 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="镇街" prop="area" align="center">
|
|
|
- <template #header>
|
|
|
- <div class="table-line" @click="showPicker2 = true">
|
|
|
- <div>{{ labelData.country ? labelData.country : "镇街" }}</div>
|
|
|
- <i class="icon-down" />
|
|
|
- </div>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+<!-- <el-table-column label="镇街" prop="area" align="center">-->
|
|
|
+<!-- <template #header>-->
|
|
|
+<!-- <div class="table-line" @click="showPicker2 = true">-->
|
|
|
+<!-- <div>{{ labelData.country ? labelData.country : "镇街" }}</div>-->
|
|
|
+<!-- <i class="icon-down" />-->
|
|
|
+<!-- </div>-->
|
|
|
+<!-- </template>-->
|
|
|
+<!-- </el-table-column>-->
|
|
|
<el-table-column
|
|
|
label="隐患点名称"
|
|
|
prop="address"
|
|
|
align="center"
|
|
|
width="160px"
|
|
|
/>
|
|
|
- <el-table-column label="隐患类型" prop="speed" align="center" />
|
|
|
+ <el-table-column label="隐患类型" prop="type" align="center" />
|
|
|
</el-table>
|
|
|
+ <pagination
|
|
|
+ v-show="total > 0"
|
|
|
+ v-model:page="queryParams.page"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ :total="total"
|
|
|
+ :pager-count="3"
|
|
|
+ size="small"
|
|
|
+ layout="prev, pager, next"
|
|
|
+ @pagination="getList"
|
|
|
+ />
|
|
|
<van-popup v-model:show="showPicker" round position="bottom">
|
|
|
<van-picker
|
|
|
:columns="columns"
|
|
@@ -166,13 +176,13 @@
|
|
|
@confirm="onSelectLevelConfirm"
|
|
|
/>
|
|
|
</van-popup>
|
|
|
- <van-popup v-model:show="showPicker2" round position="bottom">
|
|
|
- <van-picker
|
|
|
- :columns="columns2"
|
|
|
- @cancel="showPicker2 = false"
|
|
|
- @confirm="onSelectLevelConfirm2"
|
|
|
- />
|
|
|
- </van-popup>
|
|
|
+<!-- <van-popup v-model:show="showPicker2" round position="bottom">-->
|
|
|
+<!-- <van-picker-->
|
|
|
+<!-- :columns="columns2"-->
|
|
|
+<!-- @cancel="showPicker2 = false"-->
|
|
|
+<!-- @confirm="onSelectLevelConfirm2"-->
|
|
|
+<!-- />-->
|
|
|
+<!-- </van-popup>-->
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -181,8 +191,9 @@
|
|
|
<script lang="ts" setup name="geologicalDisaster">
|
|
|
import Map from '@/components/Map/index2.vue';
|
|
|
import searchImg from "@/assets/images/search.png";
|
|
|
-import { onMounted, reactive, ref } from "vue";
|
|
|
import { ElTable, ElTableColumn } from "element-plus";
|
|
|
+import {getRainfallDzzhList} from "@/api/disasterRiskMonitor/geologicalDisaster";
|
|
|
+import {getDicts} from "@/api/system/dict/data";
|
|
|
const getImageUrl = name => {
|
|
|
return new URL(
|
|
|
`../../assets/images/disasterRiskMonitor/geologicalDisaster/${name}`,
|
|
@@ -191,9 +202,11 @@ const getImageUrl = name => {
|
|
|
};
|
|
|
const queryParams = reactive({
|
|
|
keyword: "",
|
|
|
- page: 0,
|
|
|
+ area_name: "",
|
|
|
+ page: 1,
|
|
|
pageSize: 10
|
|
|
});
|
|
|
+let total = ref(0);
|
|
|
let mapRef = ref();
|
|
|
let menu1 = ref([
|
|
|
{ name: "特大型", icon: getImageUrl("icon1.png"), num: 0, checked: true },
|
|
@@ -211,44 +224,34 @@ let menu2 = ref([
|
|
|
{ name: "崩塌", icon: getImageUrl("icon11.png"), num: 3, checked: true },
|
|
|
{ name: "滑坡", icon: getImageUrl("icon12.png"), num: 3, checked: true }
|
|
|
]);
|
|
|
-let pointData = ref([]);
|
|
|
let eventDetails = ref({});
|
|
|
const labelData = reactive({
|
|
|
area: "",
|
|
|
country: ""
|
|
|
});
|
|
|
-const columns = ref([
|
|
|
- { text: "全部", value: "" },
|
|
|
- { text: "滨海新区", value: "0" },
|
|
|
- { text: "信宜", value: "1" },
|
|
|
- { text: "电白", value: "2" },
|
|
|
- { text: "高州", value: "3" }
|
|
|
-]);
|
|
|
-const columns2 = ref([
|
|
|
- { text: "全部", value: "" },
|
|
|
- { text: "滨海新区2", value: "0" },
|
|
|
- { text: "信宜2", value: "1" },
|
|
|
- { text: "电白2", value: "2" },
|
|
|
- { text: "高州2", value: "3" }
|
|
|
-]);
|
|
|
+const columns = ref([]);
|
|
|
+// const columns2 = ref([
|
|
|
+// { text: "全部", value: "" },
|
|
|
+// ]);
|
|
|
let showPicker = ref(false);
|
|
|
let showPicker2 = ref(false);
|
|
|
-const queryParams2 = reactive({
|
|
|
- area: "",
|
|
|
- country: ""
|
|
|
-});
|
|
|
let detailsData = ref({
|
|
|
dataList: []
|
|
|
});
|
|
|
const handleClick = item => {
|
|
|
item.checked = !item.checked;
|
|
|
};
|
|
|
-const getList = () => {};
|
|
|
+const getList = () => {
|
|
|
+ getRainfallDzzhList(queryParams).then((res) => {
|
|
|
+ detailsData.value.dataList = res.data;
|
|
|
+ total.value = res.total;
|
|
|
+ })
|
|
|
+};
|
|
|
// 搜索关键字变化时触发的方法
|
|
|
function onSearchKeyword(keyword) {
|
|
|
// 根据搜索关键字更新查询参数
|
|
|
queryParams.keyword = keyword;
|
|
|
- queryParams.page = 0;
|
|
|
+ queryParams.page = 1;
|
|
|
// 刷新列表数据
|
|
|
getList();
|
|
|
}
|
|
@@ -263,17 +266,15 @@ const onSearchCancel = () => {
|
|
|
};
|
|
|
const onSelectLevelConfirm = ({ selectedOptions }) => {
|
|
|
showPicker.value = false;
|
|
|
- labelData.area =
|
|
|
- selectedOptions[0].text === "全部" ? "县区" : selectedOptions[0].text;
|
|
|
- queryParams2.area = selectedOptions[0].value;
|
|
|
- initData();
|
|
|
+ labelData.area = selectedOptions[0].text === "全部" ? "县区" : selectedOptions[0].text;
|
|
|
+ queryParams.page = 1;
|
|
|
+ queryParams.area_name = selectedOptions[0].value;
|
|
|
+ getList()
|
|
|
};
|
|
|
const onSelectLevelConfirm2 = ({ selectedOptions }) => {
|
|
|
showPicker2.value = false;
|
|
|
labelData.country =
|
|
|
selectedOptions[0].text === "全部" ? "镇街" : selectedOptions[0].text;
|
|
|
- queryParams2.country = selectedOptions[0].value;
|
|
|
- initData();
|
|
|
};
|
|
|
let iconList = reactive({
|
|
|
"1": {
|
|
@@ -457,113 +458,20 @@ const initData = () => {
|
|
|
});
|
|
|
dom.addMarker(data);
|
|
|
};
|
|
|
-const getTableData = () => {
|
|
|
- detailsData.value.dataList = [
|
|
|
- {
|
|
|
- area: "电白",
|
|
|
- type: "滨海新区",
|
|
|
- address: "海滨街道办",
|
|
|
- speed: "滑坡"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "电白",
|
|
|
- type: "林头镇",
|
|
|
- address: "林头村",
|
|
|
- speed: "崩塌"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "电白",
|
|
|
- type: "观珠镇",
|
|
|
- address: "观珠市场",
|
|
|
- speed: "地面沉降"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "高州",
|
|
|
- type: "石鼓镇",
|
|
|
- address: "石鼓村",
|
|
|
- speed: "不稳定斜坡"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "高州",
|
|
|
- type: "沙田镇",
|
|
|
- address: "沙田中学",
|
|
|
- speed: "地裂缝"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "化州",
|
|
|
- type: "鉴江街道",
|
|
|
- address: "鉴江社区",
|
|
|
- speed: "地面塌陷"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "化州",
|
|
|
- type: "平定镇",
|
|
|
- address: "平定村",
|
|
|
- speed: "泥石流"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "茂南",
|
|
|
- type: "袂花镇",
|
|
|
- address: "袂花新村",
|
|
|
- speed: "滑坡"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "茂南",
|
|
|
- type: "公馆镇",
|
|
|
- address: "公馆市场",
|
|
|
- speed: "崩塌"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "信宜",
|
|
|
- type: "镇隆镇",
|
|
|
- address: "镇隆村",
|
|
|
- speed: "地面沉降"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "信宜",
|
|
|
- type: "池洞镇",
|
|
|
- address: "池洞小学",
|
|
|
- speed: "不稳定斜坡"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "电白",
|
|
|
- type: "树仔镇",
|
|
|
- address: "树仔村",
|
|
|
- speed: "地裂缝"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "高州",
|
|
|
- type: "荷塘镇",
|
|
|
- address: "荷塘市场",
|
|
|
- speed: "地面塌陷"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "化州",
|
|
|
- type: "官桥镇",
|
|
|
- address: "官桥村",
|
|
|
- speed: "泥石流"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "茂南",
|
|
|
- type: "金塘镇",
|
|
|
- address: "金塘社区",
|
|
|
- speed: "滑坡"
|
|
|
- },
|
|
|
- {
|
|
|
- area: "信宜",
|
|
|
- type: "丁堡镇",
|
|
|
- address: "丁堡村",
|
|
|
- speed: "崩塌"
|
|
|
- }
|
|
|
- ];
|
|
|
-};
|
|
|
// table样式
|
|
|
const getTableRowClass = ({ rowIndex }) => {
|
|
|
return rowIndex % 2 === 0 ? "" : "common-table-tr";
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
- getTableData();
|
|
|
-});
|
|
|
+ getList();
|
|
|
+ getDicts("district_type").then(res => {
|
|
|
+ const data = [{ text: "全部", value: "" }]
|
|
|
+ res.data.forEach(item => {
|
|
|
+ data.push({ text: item.dictLabel, value: item.dictLabel });
|
|
|
+ });
|
|
|
+ columns.value = data;
|
|
|
+ });
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -780,7 +688,7 @@ onMounted(() => {
|
|
|
align-items: center;
|
|
|
font-size: 12px;
|
|
|
color: #7f8b9f;
|
|
|
- margin-right: 14px;
|
|
|
+ margin-right: 12px;
|
|
|
&:nth-child(1n) {
|
|
|
width: 48px;
|
|
|
}
|
|
@@ -830,6 +738,7 @@ onMounted(() => {
|
|
|
}
|
|
|
.table-line {
|
|
|
display: flex;
|
|
|
+ justify-content: center;
|
|
|
align-items: center;
|
|
|
font-size: 14px;
|
|
|
.icon-down {
|
|
@@ -854,6 +763,7 @@ onMounted(() => {
|
|
|
}
|
|
|
:deep(.van-search__content) {
|
|
|
background-color: #ffffff;
|
|
|
+ border: none !important;
|
|
|
}
|
|
|
:deep(.van-field__left-icon) {
|
|
|
.van-icon__image {
|
|
@@ -875,4 +785,7 @@ onMounted(() => {
|
|
|
color: #2c81ff;
|
|
|
}
|
|
|
}
|
|
|
+.mg10 {
|
|
|
+ margin-top: 10px;
|
|
|
+}
|
|
|
</style>
|