2025-03-25 13:44:47 +08:00
|
|
|
<!--
|
|
|
|
|
* @Author: SunTao 328867980@qq.com
|
|
|
|
|
* @Date: 2025-03-25 11:10:16
|
|
|
|
|
* @LastEditors: SunTao 328867980@qq.com
|
2025-03-28 14:15:03 +08:00
|
|
|
* @LastEditTime: 2025-03-28 14:14:07
|
2025-03-25 13:44:47 +08:00
|
|
|
* @FilePath: \znxjxt-ui\src\views\xj\inspection\map-diease\index.vue
|
|
|
|
|
* @Description: 地图展示病害-首页
|
|
|
|
|
-->
|
|
|
|
|
<template>
|
|
|
|
|
<div class="map-diease-content">
|
2025-03-25 16:46:10 +08:00
|
|
|
<div class="diease-form">
|
2025-03-28 14:15:03 +08:00
|
|
|
<el-form
|
|
|
|
|
:model="queryParams"
|
|
|
|
|
:rules="rules"
|
|
|
|
|
ref="queryForm"
|
|
|
|
|
size="small"
|
|
|
|
|
:inline="true"
|
|
|
|
|
label-width="100px"
|
|
|
|
|
>
|
2025-03-25 16:46:10 +08:00
|
|
|
<el-form-item label="道路名称" prop="segmentId">
|
2025-03-28 14:15:03 +08:00
|
|
|
<el-select
|
|
|
|
|
v-model="queryParams.segmentId"
|
|
|
|
|
placeholder="请选择路段"
|
|
|
|
|
filterable
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<el-option
|
|
|
|
|
v-for="item in segmentList"
|
|
|
|
|
:key="item.value"
|
|
|
|
|
:label="item.label"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
/>
|
2025-03-25 16:46:10 +08:00
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
2025-03-28 14:15:03 +08:00
|
|
|
<el-button
|
|
|
|
|
type="primary"
|
|
|
|
|
icon="el-icon-search"
|
|
|
|
|
size="mini"
|
|
|
|
|
@click="handleQuery"
|
|
|
|
|
>筛选</el-button
|
|
|
|
|
>
|
2025-03-25 16:46:10 +08:00
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
2025-03-28 14:15:03 +08:00
|
|
|
<fssm-map class="map-diease-map" :maxZoom="22"></fssm-map>
|
2025-03-25 13:44:47 +08:00
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-03-28 14:15:03 +08:00
|
|
|
import { getSegment } from "@/api/xj/mapDisease";
|
|
|
|
|
import fssmMap from "@/components/map/fssm-map.vue";
|
2025-03-25 13:44:47 +08:00
|
|
|
export default {
|
|
|
|
|
components: { fssmMap },
|
2025-03-28 14:15:03 +08:00
|
|
|
name: "MapDiease",
|
2025-03-25 13:44:47 +08:00
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 搜索表单
|
|
|
|
|
queryParams: {
|
|
|
|
|
// 道路名称
|
2025-03-25 16:46:10 +08:00
|
|
|
segmentId: "",
|
|
|
|
|
// 距离小于
|
|
|
|
|
maxLength: "",
|
|
|
|
|
},
|
|
|
|
|
// 表单规则
|
|
|
|
|
rules: {
|
|
|
|
|
maxLength: [
|
2025-03-28 14:15:03 +08:00
|
|
|
{ required: false, message: "请选择路段", trigger: "blur" },
|
2025-03-25 16:46:10 +08:00
|
|
|
{
|
|
|
|
|
pattern: /^\d+$/,
|
|
|
|
|
message: "请输入非负整数",
|
2025-03-28 14:15:03 +08:00
|
|
|
},
|
|
|
|
|
],
|
2025-03-25 13:44:47 +08:00
|
|
|
},
|
|
|
|
|
// 道路名称下拉数据
|
2025-03-28 14:15:03 +08:00
|
|
|
segmentList: [],
|
|
|
|
|
};
|
2025-03-25 14:20:01 +08:00
|
|
|
},
|
|
|
|
|
created() {
|
2025-03-28 14:15:03 +08:00
|
|
|
this.getSegmentList();
|
2025-03-25 14:20:01 +08:00
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/**
|
2025-03-28 14:15:03 +08:00
|
|
|
* @description: 获取路段下拉数据
|
|
|
|
|
* @param {*} val
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
2025-03-25 14:20:01 +08:00
|
|
|
getSegmentList() {
|
|
|
|
|
getSegment().then(({ code, data }) => {
|
|
|
|
|
if (code === 200) {
|
|
|
|
|
this.segmentList = data;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
2025-03-25 16:46:10 +08:00
|
|
|
|
|
|
|
|
/**
|
2025-03-28 14:15:03 +08:00
|
|
|
* @description: 筛选事件
|
|
|
|
|
* @param {*}
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
2025-03-25 16:46:10 +08:00
|
|
|
handleQuery() {
|
2025-03-28 14:15:03 +08:00
|
|
|
this.$refs.queryForm.validate((valid) => {
|
2025-03-25 16:46:10 +08:00
|
|
|
if (valid) {
|
|
|
|
|
this.drawMapPoint();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
2025-03-28 14:15:03 +08:00
|
|
|
* @description: 绘制点位
|
|
|
|
|
* @param {*}
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
|
|
|
|
drawMapPoint() {},
|
|
|
|
|
},
|
|
|
|
|
};
|
2025-03-25 13:44:47 +08:00
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.map-diease-content {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100vh - 5.3rem);
|
2025-03-25 16:46:10 +08:00
|
|
|
padding: 0.5rem;
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
|
|
|
|
.diease-form {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 6%;
|
|
|
|
|
}
|
2025-03-25 13:44:47 +08:00
|
|
|
|
|
|
|
|
.map-diease-map {
|
|
|
|
|
width: 100%;
|
2025-03-25 16:46:10 +08:00
|
|
|
height: 94%;
|
2025-03-25 13:44:47 +08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|