fix:大屏打点功能修改
@ -1,3 +1,11 @@
|
|||||||
|
/*
|
||||||
|
* @Author: SunTao 328867980@qq.com
|
||||||
|
* @Date: 2024-10-24 15:03:28
|
||||||
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
|
* @LastEditTime: 2024-10-31 15:36:37
|
||||||
|
* @FilePath: \znxjxt-ui\src\api\xj\screen\index.js
|
||||||
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||||
|
*/
|
||||||
import request from "@/utils/request";
|
import request from "@/utils/request";
|
||||||
|
|
||||||
// 获取数据栏右上角选择数据接口
|
// 获取数据栏右上角选择数据接口
|
||||||
@ -34,3 +42,31 @@ export function comppanyImg() {
|
|||||||
method: "get",
|
method: "get",
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取病害筛选弹窗列表数据
|
||||||
|
export function defeaseList(data) {
|
||||||
|
return request({
|
||||||
|
url: "/bigscreen/getCurrentDefectPage",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 获取病害筛选弹窗路段下拉数据
|
||||||
|
export function getSegment(data) {
|
||||||
|
return request({
|
||||||
|
url: "/bigscreen/selectIdList",
|
||||||
|
method: "post",
|
||||||
|
data,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 根据选择的按钮类型查下级选项框
|
||||||
|
export function getItemTypes(params) {
|
||||||
|
return request({
|
||||||
|
url: "/metadata/getItemTypes",
|
||||||
|
method: "get",
|
||||||
|
params,
|
||||||
|
});
|
||||||
|
}
|
||||||
BIN
src/assets/screen/index/中分带绿植.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/screen/index/交通标线.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/screen/index/信号灯.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/唧浆.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/啃边.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/screen/index/坑槽.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/块状修补(沥青).png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/screen/index/块状修补.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/screen/index/声屏障.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/声屏障缺损.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/screen/index/抛洒物.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/护栏.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/screen/index/护栏缺损.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/指示标志.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/指路标志.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/screen/index/条状修补(沥青).png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
BIN
src/assets/screen/index/松散.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/screen/index/枪机.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/screen/index/标志缺损.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/screen/index/标线缺损.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/横向裂缝.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/screen/index/沥青路面.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/screen/index/球机.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/禁令标志.png
Normal file
|
After Width: | Height: | Size: 3.8 KiB |
BIN
src/assets/screen/index/纵向裂缝.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/screen/index/绿化管护不.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/screen/index/翻浆.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/screen/index/警告标志.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/screen/index/路框差.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
src/assets/screen/index/路缘石.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
src/assets/screen/index/路缘石缺损.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/screen/index/路面不洁.png
Normal file
|
After Width: | Height: | Size: 3.7 KiB |
BIN
src/assets/screen/index/辅助标志.png
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
src/assets/screen/index/锚固区缺损.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
src/assets/screen/index/防眩板.png
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
src/assets/screen/index/防眩板缺损.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
src/assets/screen/index/龟裂.png
Normal file
|
After Width: | Height: | Size: 3.9 KiB |
@ -2,7 +2,7 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2024-10-14 10:46:23
|
* @Date: 2024-10-14 10:46:23
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2024-10-31 13:58:48
|
* @LastEditTime: 2024-10-31 17:35:26
|
||||||
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\fssm-map.vue
|
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\fssm-map.vue
|
||||||
* @Description: 公共地图
|
* @Description: 公共地图
|
||||||
-->
|
-->
|
||||||
@ -204,7 +204,7 @@ export default {
|
|||||||
zoom: this.zoom, //图层缩放大小
|
zoom: this.zoom, //图层缩放大小
|
||||||
projection: "EPSG:4326",
|
projection: "EPSG:4326",
|
||||||
minZoom: 7,
|
minZoom: 7,
|
||||||
maxZoom: 14,
|
maxZoom: 18,
|
||||||
}),
|
}),
|
||||||
layers: [tianditu_vec_c, tianditu_img_c, tianditu_cva_c],
|
layers: [tianditu_vec_c, tianditu_img_c, tianditu_cva_c],
|
||||||
});
|
});
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2024-10-22 15:30:25
|
* @Date: 2024-10-22 15:30:25
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2024-10-30 17:01:57
|
* @LastEditTime: 2024-10-31 16:13:31
|
||||||
* @FilePath: \znxjxt-ui\src\views\big-screen\components\img-dialog.vue
|
* @FilePath: \znxjxt-ui\src\views\big-screen\components\img-dialog.vue
|
||||||
* @Description: 大屏查看图片弹窗
|
* @Description: 大屏查看图片弹窗
|
||||||
-->
|
-->
|
||||||
@ -31,10 +31,10 @@
|
|||||||
label-width="5rem"
|
label-width="5rem"
|
||||||
>
|
>
|
||||||
<el-row :gutter="24">
|
<el-row :gutter="24">
|
||||||
<el-col :span="8">
|
<el-col :span="7">
|
||||||
<el-form-item label="路段名称">
|
<el-form-item label="路段名称">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="imgForm.roadName"
|
v-model="imgForm.segmentId"
|
||||||
placeholder="请选择路段名称"
|
placeholder="请选择路段名称"
|
||||||
:popper-append-to-body="false"
|
:popper-append-to-body="false"
|
||||||
clearable
|
clearable
|
||||||
@ -48,6 +48,23 @@
|
|||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="7">
|
||||||
|
<el-form-item label="病害类型">
|
||||||
|
<el-select
|
||||||
|
v-model="imgForm.defectType"
|
||||||
|
placeholder="请选择路段名称"
|
||||||
|
:popper-append-to-body="false"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in defectTypeList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
<el-col :span="10">
|
<el-col :span="10">
|
||||||
<el-form-item label="公里桩">
|
<el-form-item label="公里桩">
|
||||||
<el-input
|
<el-input
|
||||||
@ -65,6 +82,8 @@
|
|||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
<el-row>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@ -100,7 +119,7 @@
|
|||||||
采集时间: {{ new Date(rectsItem.createdTime).toLocaleString() }}<br />
|
采集时间: {{ new Date(rectsItem.createdTime).toLocaleString() }}<br />
|
||||||
起始桩号: {{ rectsItem.stakeStart || "暂无数据" }} 终止桩号:
|
起始桩号: {{ rectsItem.stakeStart || "暂无数据" }} 终止桩号:
|
||||||
{{ rectsItem.stakeEnd || "暂无数据" }}<br />
|
{{ rectsItem.stakeEnd || "暂无数据" }}<br />
|
||||||
路产状态: {{ filterState(rectsItem.state) }} 融合状态: 未融合
|
路产状态: {{ filterState(rectsItem.state) }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 小图展示 -->
|
<!-- 小图展示 -->
|
||||||
@ -119,7 +138,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { listDefect, getSegment, getDefectStatus } from "@/api/xj/disease";
|
import { getDefectStatus } from "@/api/xj/disease";
|
||||||
|
import { defeaseList, getSegment, getItemTypes } from "@/api/xj/screen/index";
|
||||||
export default {
|
export default {
|
||||||
name: "ImgDialog",
|
name: "ImgDialog",
|
||||||
data() {
|
data() {
|
||||||
@ -135,7 +155,9 @@ export default {
|
|||||||
// 表单绑定
|
// 表单绑定
|
||||||
imgForm: {
|
imgForm: {
|
||||||
// 路段名称
|
// 路段名称
|
||||||
roadName: "",
|
segmentId: "",
|
||||||
|
// 病害类型
|
||||||
|
defectType: "",
|
||||||
// 起始公里桩
|
// 起始公里桩
|
||||||
stakeStart: "",
|
stakeStart: "",
|
||||||
// 终止公里桩
|
// 终止公里桩
|
||||||
@ -143,6 +165,8 @@ export default {
|
|||||||
},
|
},
|
||||||
// 路段下拉数据
|
// 路段下拉数据
|
||||||
roadTypeList: [],
|
roadTypeList: [],
|
||||||
|
// 病害类型下拉数据
|
||||||
|
defectTypeList: [],
|
||||||
// 分页绑定
|
// 分页绑定
|
||||||
params: {
|
params: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -170,6 +194,7 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
this.getSegmentList();
|
this.getSegmentList();
|
||||||
this.getDefectStatusList();
|
this.getDefectStatusList();
|
||||||
|
this.getDefectType();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/* 查询病害状态下拉数据 */
|
/* 查询病害状态下拉数据 */
|
||||||
@ -198,6 +223,14 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
/* 获取病害类型下拉数据 */
|
||||||
|
getDefectType() {
|
||||||
|
getItemTypes({ type: "defect" }).then(({ code, data }) => {
|
||||||
|
if (code === 200) {
|
||||||
|
this.defectTypeList = data;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
/* 获取图片列表/点击搜索事件 */
|
/* 获取图片列表/点击搜索事件 */
|
||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
@ -205,9 +238,9 @@ export default {
|
|||||||
...this.imgForm,
|
...this.imgForm,
|
||||||
...this.params,
|
...this.params,
|
||||||
};
|
};
|
||||||
listDefect(data)
|
defeaseList(data)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
this.defectData.push(...response.rows);
|
this.defectData.push(...response.data);
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@ -255,7 +288,8 @@ export default {
|
|||||||
resetQuery() {
|
resetQuery() {
|
||||||
this.defectData = [];
|
this.defectData = [];
|
||||||
this.imgForm = {
|
this.imgForm = {
|
||||||
roadName: "",
|
segmentId: "",
|
||||||
|
defectType: "",
|
||||||
stakeStart: "",
|
stakeStart: "",
|
||||||
stakeEnd: "",
|
stakeEnd: "",
|
||||||
};
|
};
|
||||||
@ -448,7 +482,7 @@ export default {
|
|||||||
|
|
||||||
.toolbar {
|
.toolbar {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 5rem;
|
height: 6rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
background-color: #333c42;
|
background-color: #333c42;
|
||||||
@ -463,7 +497,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.el-select {
|
.el-select {
|
||||||
width: 12rem;
|
width: 10rem;
|
||||||
|
|
||||||
.el-input--small .el-input__inner {
|
.el-input--small .el-input__inner {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@ -530,7 +564,7 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.image-viewer {
|
.image-viewer {
|
||||||
height: 33rem;
|
height: 32rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
* @Author: SunTao 328867980@qq.com
|
* @Author: SunTao 328867980@qq.com
|
||||||
* @Date: 2024-10-17 11:34:00
|
* @Date: 2024-10-17 11:34:00
|
||||||
* @LastEditors: SunTao 328867980@qq.com
|
* @LastEditors: SunTao 328867980@qq.com
|
||||||
* @LastEditTime: 2024-10-31 13:32:00
|
* @LastEditTime: 2024-11-01 13:02:35
|
||||||
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
|
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
|
||||||
* @Description: 大屏首页
|
* @Description: 大屏首页
|
||||||
-->
|
-->
|
||||||
@ -103,7 +103,7 @@
|
|||||||
v-for="(item, index) in iconTypeList"
|
v-for="(item, index) in iconTypeList"
|
||||||
:label="item.value"
|
:label="item.value"
|
||||||
:key="`check-${index}`"
|
:key="`check-${index}`"
|
||||||
>{{ item.name }}</el-checkbox
|
>{{ item.label }}</el-checkbox
|
||||||
>
|
>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</fssm-scroll>
|
</fssm-scroll>
|
||||||
@ -182,7 +182,6 @@ import FssmMap from "@/components/map/fssm-map.vue";
|
|||||||
import { Feature } from "ol";
|
import { Feature } from "ol";
|
||||||
import { Point } from "ol/geom";
|
import { Point } from "ol/geom";
|
||||||
import { Style, Icon, Fill, Stroke, Circle, Text } from "ol/style";
|
import { Style, Icon, Fill, Stroke, Circle, Text } from "ol/style";
|
||||||
import logo from "@/assets/xc.png";
|
|
||||||
import VectorSource from "ol/source/Vector";
|
import VectorSource from "ol/source/Vector";
|
||||||
import VectorLayer from "ol/layer/Vector";
|
import VectorLayer from "ol/layer/Vector";
|
||||||
import * as geomExports from "ol/geom";
|
import * as geomExports from "ol/geom";
|
||||||
@ -212,6 +211,7 @@ import {
|
|||||||
mapPointList,
|
mapPointList,
|
||||||
mapPciList,
|
mapPciList,
|
||||||
comppanyImg,
|
comppanyImg,
|
||||||
|
getItemTypes,
|
||||||
} from "@/api/xj/screen/index";
|
} from "@/api/xj/screen/index";
|
||||||
export default {
|
export default {
|
||||||
name: "BigScreen",
|
name: "BigScreen",
|
||||||
@ -329,8 +329,12 @@ export default {
|
|||||||
{ name: "道路资产", component: "RoadScreen" },
|
{ name: "道路资产", component: "RoadScreen" },
|
||||||
{ name: "交安事件", component: "TrafficScreen" },
|
{ name: "交安事件", component: "TrafficScreen" },
|
||||||
],
|
],
|
||||||
// 中心点集合
|
// 中心点集合(全部)
|
||||||
centerPiont: [],
|
centerPiont: [],
|
||||||
|
// 中心点集合(当前)
|
||||||
|
drawPointList: [],
|
||||||
|
// 点位图标map
|
||||||
|
mapLogeList: {},
|
||||||
// 线段点集合
|
// 线段点集合
|
||||||
lineString: [],
|
lineString: [],
|
||||||
// 地图放大缩小层级
|
// 地图放大缩小层级
|
||||||
@ -395,7 +399,8 @@ export default {
|
|||||||
getMapCare() {
|
getMapCare() {
|
||||||
comppanyImg().then(({ code, data }) => {
|
comppanyImg().then(({ code, data }) => {
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
console.log(data, "ffff");
|
// this.mapCareList = data.filter((item) => item.lat && item.lon);
|
||||||
|
// console.log(this.mapCareList)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
this.mapCareList = [
|
this.mapCareList = [
|
||||||
@ -501,7 +506,15 @@ export default {
|
|||||||
},
|
},
|
||||||
/* 切换icon类型多选框事件 */
|
/* 切换icon类型多选框事件 */
|
||||||
handleChecked(value) {
|
handleChecked(value) {
|
||||||
console.log(value, "icontype");
|
this.centerPiont = this.drawPointList.filter(
|
||||||
|
(item) => value.indexOf(item.iconType) > -1
|
||||||
|
);
|
||||||
|
this.$nextTick(() => {
|
||||||
|
const map = this.$refs.roadMap.instance.get("map");
|
||||||
|
map.removeLayer(this.clusters);
|
||||||
|
this.clusters = null;
|
||||||
|
this.drawPoint();
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/* 点击图片点位切换地图事件 */
|
/* 点击图片点位切换地图事件 */
|
||||||
changeMap(boolen, value) {
|
changeMap(boolen, value) {
|
||||||
@ -522,9 +535,21 @@ export default {
|
|||||||
if (!this.clusters) {
|
if (!this.clusters) {
|
||||||
mapPointList({ type: this.mapClick }).then(({ code, data }) => {
|
mapPointList({ type: this.mapClick }).then(({ code, data }) => {
|
||||||
if (code === 200) {
|
if (code === 200) {
|
||||||
|
this.drawPointList = data.map((item) => {
|
||||||
|
if (item.geometry) {
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
geometry: [item.geometry[0], item.geometry[1]],
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return [];
|
||||||
|
});
|
||||||
this.centerPiont = data.map((item) => {
|
this.centerPiont = data.map((item) => {
|
||||||
if (item.geometry) {
|
if (item.geometry) {
|
||||||
return [item.geometry[0], item.geometry[1]];
|
return {
|
||||||
|
...item,
|
||||||
|
geometry: [item.geometry[0], item.geometry[1]],
|
||||||
|
};
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
});
|
});
|
||||||
@ -538,10 +563,10 @@ export default {
|
|||||||
const features = [];
|
const features = [];
|
||||||
this.centerPiont.forEach((element) => {
|
this.centerPiont.forEach((element) => {
|
||||||
// 修改坐标样式
|
// 修改坐标样式
|
||||||
const point = new Point(element);
|
const point = new Point(element.geometry);
|
||||||
const feature = new Feature({
|
const feature = new Feature({
|
||||||
geometry: point,
|
geometry: point,
|
||||||
data: { data: "123", type: "icon" },
|
data: { iconType: element.iconType },
|
||||||
// 自己设置一个标识
|
// 自己设置一个标识
|
||||||
type: "icon",
|
type: "icon",
|
||||||
});
|
});
|
||||||
@ -570,28 +595,57 @@ export default {
|
|||||||
source: clusterSource,
|
source: clusterSource,
|
||||||
name: "clusterLayer",
|
name: "clusterLayer",
|
||||||
zIndex: 10,
|
zIndex: 10,
|
||||||
style: function clusterStyle(feature) {
|
style: (feature) => {
|
||||||
const count = feature.get("features").length;
|
const count = feature.get("features").length;
|
||||||
|
if (count > 1) {
|
||||||
return new Style({
|
return new Style({
|
||||||
image: new Icon({
|
image: new Icon({
|
||||||
crossOrigin: "anonymous",
|
crossOrigin: "anonymous",
|
||||||
src: logo,
|
src: require(`@/assets/screen/index/龟裂.png`),
|
||||||
// 图标缩放比例
|
// 图标缩放比例
|
||||||
scale: 0.05,
|
scale: 0.6,
|
||||||
|
displacement: [0, 30],
|
||||||
// 0.3为30度
|
// 0.3为30度
|
||||||
rotation: 0.3,
|
// rotation: 0.3,
|
||||||
}),
|
}),
|
||||||
text: new Text({
|
text: new Text({
|
||||||
textAlign: "center", //位置
|
textAlign: "center", //位置
|
||||||
textBaseline: "middle",
|
textBaseline: "middle",
|
||||||
font: "normal 14px 微软雅黑",
|
font: "normal 14px 微软雅黑",
|
||||||
offsetY: 15,
|
offsetY: -50,
|
||||||
fill: new Fill({
|
fill: new Fill({
|
||||||
color: "#ffffff",
|
color: "#ffffff",
|
||||||
}),
|
}),
|
||||||
text: count > 1 ? count.toString() : "",
|
text: count.toString(),
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
return new Style({
|
||||||
|
image: new Icon({
|
||||||
|
crossOrigin: "anonymous",
|
||||||
|
src: require(`@/assets/screen/index/${
|
||||||
|
this.mapLogeList[
|
||||||
|
feature.getProperties().features[0].get("data").iconType
|
||||||
|
]
|
||||||
|
}.png`),
|
||||||
|
// 图标缩放比例
|
||||||
|
scale: 0.6,
|
||||||
|
displacement: [0, 30],
|
||||||
|
// 0.3为30度
|
||||||
|
// rotation: 0.3,
|
||||||
|
}),
|
||||||
|
text: new Text({
|
||||||
|
textAlign: "center", //位置
|
||||||
|
textBaseline: "middle",
|
||||||
|
font: "normal 14px 微软雅黑",
|
||||||
|
offsetY: -50,
|
||||||
|
fill: new Fill({
|
||||||
|
color: "#ffffff",
|
||||||
|
}),
|
||||||
|
text: "",
|
||||||
|
}),
|
||||||
|
});
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -681,37 +735,18 @@ export default {
|
|||||||
},
|
},
|
||||||
/* 获取icon多选数据 */
|
/* 获取icon多选数据 */
|
||||||
getIconType(value) {
|
getIconType(value) {
|
||||||
if (value === "defect") {
|
this.mapLogeList = {};
|
||||||
this.iconTypeList = [
|
getItemTypes({ type: value }).then(({ code, data }) => {
|
||||||
{ name: "淤泥路面", value: "1" },
|
if (code === 200) {
|
||||||
{ name: "沥青路面", value: "2" },
|
this.iconTypeList = data;
|
||||||
{ name: "面", value: "3" },
|
this.iconType = data.map((item) => {
|
||||||
];
|
|
||||||
this.iconType = this.iconTypeList.map((item) => {
|
|
||||||
return item.value;
|
return item.value;
|
||||||
});
|
});
|
||||||
} else {
|
data.forEach((item) => {
|
||||||
this.iconTypeList = [
|
this.mapLogeList[item.value] = item.label;
|
||||||
{ name: "淤泥路面", value: "1" },
|
|
||||||
{ name: "沥青路面", value: "2" },
|
|
||||||
{ name: "面", value: "3" },
|
|
||||||
{ name: "淤泥", value: "4" },
|
|
||||||
{ name: "淤泥路面阿萨", value: "5" },
|
|
||||||
{ name: "淤泥路面", value: "6" },
|
|
||||||
{ name: "淤泥", value: "4" },
|
|
||||||
{ name: "淤泥路面阿萨", value: "5" },
|
|
||||||
{ name: "淤泥路面", value: "6" },
|
|
||||||
{ name: "淤泥", value: "4" },
|
|
||||||
{ name: "淤泥路面阿萨", value: "5" },
|
|
||||||
{ name: "淤泥路面", value: "6" },
|
|
||||||
{ name: "淤泥", value: "4" },
|
|
||||||
{ name: "淤泥路面阿萨", value: "5" },
|
|
||||||
{ name: "淤泥路面", value: "6" },
|
|
||||||
];
|
|
||||||
this.iconType = this.iconTypeList.map((item) => {
|
|
||||||
return item.value;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
/* 传回来的地图图层 */
|
/* 传回来的地图图层 */
|
||||||
getZoom(zoom) {
|
getZoom(zoom) {
|
||||||
|
|||||||