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-25 16:46:10 +08:00
|
|
|
* @LastEditTime: 2025-03-25 16:25:50
|
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">
|
|
|
|
|
<el-form :model="queryParams" :rules="rules" ref="queryForm" size="small" :inline="true" label-width="100px">
|
|
|
|
|
<el-form-item label="道路名称" prop="segmentId">
|
|
|
|
|
<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" />
|
|
|
|
|
</el-select>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="距离" prop="maxLength">
|
|
|
|
|
<el-input placeholder="请输入内容" v-model="queryParams.maxLength">
|
2025-03-27 10:07:16 +08:00
|
|
|
<template slot="prepend">大于:</template>
|
2025-03-25 16:46:10 +08:00
|
|
|
</el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item label="">
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">筛选</el-button>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
</div>
|
2025-03-25 13:44:47 +08:00
|
|
|
<fssm-map class="map-diease-map"></fssm-map>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2025-03-25 16:46:10 +08:00
|
|
|
import { getSegment } from '@/api/xj/mapDisease'
|
2025-03-25 13:44:47 +08:00
|
|
|
import fssmMap from '@/components/map/fssm-map.vue'
|
|
|
|
|
export default {
|
|
|
|
|
components: { fssmMap },
|
|
|
|
|
name: 'MapDiease',
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
// 搜索表单
|
|
|
|
|
queryParams: {
|
|
|
|
|
// 道路名称
|
2025-03-25 16:46:10 +08:00
|
|
|
segmentId: "",
|
|
|
|
|
// 距离小于
|
|
|
|
|
maxLength: "",
|
|
|
|
|
},
|
|
|
|
|
// 表单规则
|
|
|
|
|
rules: {
|
|
|
|
|
maxLength: [
|
|
|
|
|
{ required: false, message: '请选择路段', trigger: 'blur' },
|
|
|
|
|
{
|
|
|
|
|
pattern: /^\d+$/,
|
|
|
|
|
message: "请输入非负整数",
|
|
|
|
|
}
|
|
|
|
|
]
|
2025-03-25 13:44:47 +08:00
|
|
|
},
|
|
|
|
|
// 道路名称下拉数据
|
|
|
|
|
segmentList: []
|
|
|
|
|
}
|
2025-03-25 14:20:01 +08:00
|
|
|
},
|
|
|
|
|
created() {
|
|
|
|
|
this.getSegmentList()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
/**
|
2025-03-25 16:46:10 +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
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description: 筛选事件
|
|
|
|
|
* @param {*}
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
|
|
|
|
handleQuery() {
|
|
|
|
|
this.$refs.queryForm.validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.drawMapPoint();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @description: 绘制点位
|
|
|
|
|
* @param {*}
|
|
|
|
|
* @return {*}
|
|
|
|
|
*/
|
|
|
|
|
drawMapPoint() {
|
2025-03-27 10:07:16 +08:00
|
|
|
|
2025-03-25 16:46:10 +08:00
|
|
|
}
|
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>
|