fix:联调接口,差交安事件

This commit is contained in:
SunTao 2024-10-25 17:29:08 +08:00
parent e52a22edb7
commit 0bf0db3ff8
31 changed files with 1202 additions and 949 deletions

153
src/api/xj/map.js Normal file
View File

@ -0,0 +1,153 @@
// 02转84坐标
export function gcj02ToWgs84([lng, lat]) {
const a = 6378245.0;
const ee = 0.00669342162296594323;
const pi = Math.PI;
if (outOfChina02(lng, lat)) {
return [lng, lat];
} else {
let dlat = transformLat02(lng - 105.0, lat - 35.0);
let dlng = transformLng02(lng - 105.0, lat - 35.0);
const radLat = (lat / 180.0) * pi;
let magic = Math.sin(radLat);
magic = 1 - ee * magic * magic;
const sqrtMagic = Math.sqrt(magic);
dlat = (dlat * 180.0) / (((a * (1 - ee)) / (magic * sqrtMagic)) * pi);
dlng = (dlng * 180.0) / ((a / sqrtMagic) * Math.cos(radLat) * pi);
const mgLat = lat + dlat;
const mgLng = lng + dlng;
return [lng * 2 - mgLng, lat * 2 - mgLat];
}
}
function outOfChina02(lng, lat) {
return lng < 72.004 || lng > 137.8347 || lat < 0.8293 || lat > 55.8271;
}
// 经纬度转换
function transformLat02(lng, lat) {
let ret =
-100.0 +
2.0 * lng +
3.0 * lat +
0.2 * lat * lat +
0.1 * lng * lat +
0.2 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * Math.PI) +
20.0 * Math.sin(2.0 * lng * Math.PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lat * Math.PI) + 40.0 * Math.sin((lat / 3.0) * Math.PI)) *
2.0) /
3.0;
ret +=
((160.0 * Math.sin((lat / 12.0) * Math.PI) +
320 * Math.sin((lat * Math.PI) / 30.0)) *
2.0) /
3.0;
return ret;
}
function transformLng02(lng, lat) {
let ret =
300.0 +
lng +
2.0 * lat +
0.1 * lng * lng +
0.1 * lng * lat +
0.1 * Math.sqrt(Math.abs(lng));
ret +=
((20.0 * Math.sin(6.0 * lng * Math.PI) +
20.0 * Math.sin(2.0 * lng * Math.PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(lng * Math.PI) + 40.0 * Math.sin((lng / 3.0) * Math.PI)) *
2.0) /
3.0;
ret +=
((150.0 * Math.sin((lng / 12.0) * Math.PI) +
300.0 * Math.sin((lng / 30.0) * Math.PI)) *
2.0) /
3.0;
return ret;
}
// 84转02坐标
export function wgs84ToGcj02([lng, lat]) {
if (outOfChina84(lng, lat)) {
return { lng, lat };
}
let dlat = transformLat84(lng - 105.0, lat - 35.0);
let dlng = transformLng84(lng - 105.0, lat - 35.0);
const radLat = (lat / 180.0) * Math.PI;
let magic = Math.sin(radLat);
magic = 1 - 0.00669342162296594323 * magic * magic;
const sqrtMagic = Math.sqrt(magic);
dlat =
(dlat * 180.0) /
(((6378245.0 * (1 - 0.00669342162296594323)) / (magic * sqrtMagic)) *
Math.PI);
dlng =
(dlng * 180.0) / ((6378245.0 / sqrtMagic) * Math.cos(radLat) * Math.PI);
const gcjLng = lng + dlng;
const gcjLat = lat + dlat;
return [gcjLng, gcjLat];
}
// 判断是否在中国境内
function outOfChina84(lng, lat) {
return !(lng > 73.66 && lng < 135.05 && lat > 3.86 && lat < 53.55);
}
// 转换公式所需的常量
function transformLat84(x, y) {
let ret =
-100.0 +
2.0 * x +
3.0 * y +
0.2 * y * y +
0.1 * x * y +
0.2 * Math.sqrt(Math.abs(x));
ret +=
((20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(y * Math.PI) + 40.0 * Math.sin((y / 3.0) * Math.PI)) *
2.0) /
3.0;
ret +=
((160.0 * Math.sin((y / 12.0) * Math.PI) +
320 * Math.sin((y * Math.PI) / 30.0)) *
2.0) /
3.0;
return ret;
}
function transformLng84(x, y) {
let ret =
300.0 +
x +
2.0 * y +
0.1 * x * x +
0.1 * x * y +
0.1 * Math.sqrt(Math.abs(x));
ret +=
((20.0 * Math.sin(6.0 * x * Math.PI) + 20.0 * Math.sin(2.0 * x * Math.PI)) *
2.0) /
3.0;
ret +=
((20.0 * Math.sin(x * Math.PI) + 40.0 * Math.sin((x / 3.0) * Math.PI)) *
2.0) /
3.0;
ret +=
((150.0 * Math.sin((x / 12.0) * Math.PI) +
300.0 * Math.sin((x / 30.0) * Math.PI)) *
2.0) /
3.0;
return ret;
}

View File

@ -0,0 +1,59 @@
import request from "@/utils/request";
// 路面状况排名接口
export function roadRankList(query) {
return request({
url: "/bigscreen/getDefectCountRanking",
method: "get",
params: query,
});
}
// 病害趋势柱状图接口
export function roadTrends(query) {
return request({
url: "/bigscreen/getHistoryDefect",
method: "get",
params: query,
});
}
// 今日巡查数据
export function roadToday(query) {
return request({
url: "/bigscreen/getInspectionInfo",
method: "get",
params: query,
});
}
// pci排名数据
export function roadPic(query) {
return request({
url: "/bigscreen/pciRanking",
method: "get",
params: query,
});
}
// 病害趋势3维饼图
export function roadCurrent(query) {
return request({
url: "/bigscreen/roadStatus",
method: "get",
params: query,
});
}
// 数据栏内右上角下拉框
export function getDropList(query) {
return request({
url: "/bigscreen/getDropdownList",
method: "get",
params: query,
});
}

View File

@ -0,0 +1,12 @@
import request from "@/utils/request";
// 获取数据栏右上角选择数据接口
export function selectTypeList(query) {
return request({
url: "/bigscreen/getSwitch",
method: "get",
params: query,
});
}

View File

@ -0,0 +1,56 @@
/*
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-25 14:44:22
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-25 16:25:39
* @FilePath: \znxjxt-ui\src\api\xj\screen\road-screen.js
* @Description: 道路资产大屏接口
*/
import request from "@/utils/request";
// 路面状况排名接口
export function roadRankStatistics(query) {
return request({
url: "/bigscreen/getRoadStatistics",
method: "get",
params: query,
});
}
// 附属设施分布接口
export function ancillaryList(query) {
return request({
url: "/bigscreen/getEquipmentScale",
method: "get",
params: query,
});
}
// 附属设施分布累计路产数
export function ancillaryCount(query) {
return request({
url: "/bigscreen/getEquipmentCount",
method: "get",
params: query,
});
}
// 附属设施异常统计接口
export function anomalyList(query) {
return request({
url: "/bigscreen/getEquipmentAnomalyLog",
method: "get",
params: query,
});
}
// 路产统计信息接口
export function roadStatisticList(query) {
return request({
url: "/bigscreen/getEquipmentStatistics",
method: "get",
params: query,
});
}

View File

@ -9,6 +9,14 @@ export function getSectionList(query) {
}); });
} }
// 查询路线下拉列表
export function getSegmentList() {
return request({
url: "/xj/route/listDropDown",
method: "get",
});
}
// 新增路段 // 新增路段
export function addSection(query) { export function addSection(query) {
return request({ return request({

View File

@ -2,9 +2,9 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:04:12 * @Date: 2024-10-14 10:04:12
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-14 10:27:49 * @LastEditTime: 2024-10-25 13:55:51
* @FilePath: \znxjxt-ui\src\api\xj\task.js * @FilePath: \znxjxt-ui\src\api\xj\task.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 巡检任务管理接口
*/ */
import request from "@/utils/request"; import request from "@/utils/request";
@ -17,6 +17,15 @@ export function getTaskTable(params) {
}); });
} }
// 任务id模糊查询接口
export function getTaskIdList(params) {
return request({
url: "/xj/xjtask/taskDropDown",
method: "get",
params,
});
}
// 巡检路段下拉数据 // 巡检路段下拉数据
export function getSegment() { export function getSegment() {
return request({ return request({

View File

@ -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-23 15:33:10 * @LastEditTime: 2024-10-24 17:17:45
* @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: 公共地图
--> -->
@ -164,6 +164,7 @@ export default {
/* 初始化openlayer地图 */ /* 初始化openlayer地图 */
initMap() { initMap() {
const tianditu_vec_c = new TileLayer({ const tianditu_vec_c = new TileLayer({
className: "baseLayerClass",
title: "矢量底图", title: "矢量底图",
id: "vec_c", id: "vec_c",
source: new XYZ({ source: new XYZ({
@ -173,6 +174,7 @@ export default {
visible: true, visible: true,
}); });
const tianditu_cva_c = new TileLayer({ const tianditu_cva_c = new TileLayer({
className: "baseLayerClass",
title: "矢量地图", title: "矢量地图",
id: "cva_c", id: "cva_c",
source: new XYZ({ source: new XYZ({

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:19:56 * @Date: 2024-10-18 10:19:56
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-23 14:32:47 * @LastEditTime: 2024-10-24 16:37:52
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-current.vue * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-current.vue
* @Description: 病害巡检-病害三维饼图 * @Description: 病害巡检-病害三维饼图
--> -->
@ -31,8 +31,8 @@
:key="`chart-${index}`" :key="`chart-${index}`"
> >
<div class="index" :style="{ backgroundColor: colorList[index] }"></div> <div class="index" :style="{ backgroundColor: colorList[index] }"></div>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.typeName }}</div>
<div class="rate">{{ item.value }}</div> <div class="rate">{{ item.rate }}%</div>
<div class="value">{{ item.value }}</div> <div class="value">{{ item.value }}</div>
</div> </div>
</div> </div>
@ -42,35 +42,21 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import "echarts-gl"; import "echarts-gl";
import { roadCurrent, getDropList } from "@/api/xj/screen/disease-screen";
export default { export default {
name: "DiseaseCurrent", name: "DiseaseCurrent",
props: {
select: {
type: String,
default: "",
},
},
data() { data() {
return { return {
// //
itemSelect: "1", itemSelect: "",
// //
currentList: [ currentList: [],
{
label: "分公司",
value: "1",
},
{
label: "分公司2",
value: "2",
},
{
label: "分公3",
value: "3",
},
{
label: "分公司4",
value: "4",
},
{
label: "分公司5",
value: "5",
},
],
// //
options: {}, options: {},
// //
@ -89,25 +75,58 @@ export default {
dataList: [], dataList: [],
}; };
}, },
watch: {
select: {
handler(val) {
if (val) {
this.getCurrentList();
this.getChartList();
}
},
immediate: true,
},
itemSelect: {
handler() {
this.getChartList();
},
},
},
created() { created() {
this.getChartList(); this.getChartList();
}, },
methods: { methods: {
/* 获取右上角下拉框数据 */
getCurrentList() {
getDropList({ type: this.select }).then(({ data, code }) => {
if (code === 200) {
this.currentList = data;
}
});
},
/* 获取echart数据 */ /* 获取echart数据 */
getChartList() { getChartList() {
this.dataList = [ const data = {
{ value: 500, name: "1111" }, type: this.select,
{ value: 600, name: "456" }, itemName: this.itemSelect,
{ value: 400, name: "撒大大大" }, };
{ value: 550, name: "的风格" }, roadCurrent(data).then(({ code, data }) => {
{ value: 200, name: "规范化" }, if (code === 200) {
{ value: 900, name: "规划" }, let allSum = 0;
{ value: 100, name: "回家" }, data?.forEach((element) => {
]; allSum += element.value;
});
this.dataList = data.map((item) => {
return {
...item,
rate: ((item.value / allSum) * 100).toFixed(1),
};
});
}
this.$nextTick(() => { this.$nextTick(() => {
//echartoptions //echartoptions
this.drawChart(); this.drawChart();
}); });
});
}, },
/* 绘制echart图 */ /* 绘制echart图 */
drawChart() { drawChart() {
@ -131,7 +150,7 @@ export default {
formatter: (params) => { formatter: (params) => {
return `${params.marker}${params.seriesName}${ return `${params.marker}${params.seriesName}${
data[params.seriesIndex].value data[params.seriesIndex].value
}`; }`;
}, },
}, },
labelLine: { labelLine: {
@ -152,28 +171,6 @@ export default {
min: -1, min: -1,
max: 1, max: 1,
}, },
// title: [
// {
// x: "center",
// top: "20%",
// text: 50,
// textStyle: {
// color: "#fff",
// fontSize: 42,
// fontWeight: "bold",
// },
// },
// {
// x: "center",
// top: "50%",
// text: "",
// textStyle: {
// color: "#fff",
// fontSize: 12,
// fontWeight: 400,
// },
// },
// ],
grid3D: { grid3D: {
show: false, show: false,
width: "250%", width: "250%",
@ -195,7 +192,9 @@ export default {
//series //series
series: this.getPie3D(this.dataList, 0.8), series: this.getPie3D(this.dataList, 0.8),
}); });
window.addEventListener("resize", chart.resize()); window.addEventListener("resize", () => {
chart.resize();
});
} }
}, },
/* 绘制3d饼图配置项 */ /* 绘制3d饼图配置项 */
@ -216,9 +215,9 @@ export default {
const seriesItem = { const seriesItem = {
name: name:
typeof pieData[i].name === "undefined" typeof pieData[i].typeName === "undefined"
? `series${i}` ? `series${i}`
: pieData[i].name, : pieData[i].typeName,
type: "surface", type: "surface",
parametric: true, parametric: true,
wireframe: { wireframe: {
@ -251,12 +250,13 @@ export default {
false, false,
false, false,
k, k,
series[i].pieData.value / 100 //
series[i].pieData.value / 1000
); );
startValue = endValue; startValue = endValue;
legendData.push(series[i].name); legendData.push(series[i].typeName);
} }
return series; return series;
}, },
@ -355,6 +355,7 @@ export default {
.content { .content {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
position: relative; position: relative;
.content-select { .content-select {
@ -429,14 +430,14 @@ export default {
} }
.name { .name {
width: 3.5rem; width: 4.5rem;
padding-left: 0.3rem; padding-left: 0.3rem;
color: #aac6c7; color: #aac6c7;
font-size: 0.7rem; font-size: 0.7rem;
} }
.rate { .rate {
width: 1.5rem; width: 2rem;
color: #808c9f; color: #808c9f;
font-size: 0.65rem; font-size: 0.65rem;
} }

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:16:30 * @Date: 2024-10-18 10:16:30
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-18 11:32:35 * @LastEditTime: 2024-10-24 17:09:27
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-trends.vue * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\disease-trends.vue
* @Description: 病害巡检-病害趋势 * @Description: 病害巡检-病害趋势
--> -->
@ -12,10 +12,14 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { roadTrends } from "@/api/xj/screen/disease-screen";
export default { export default {
name: "DiseaseTrends", name: "DiseaseTrends",
data() { data() {
return {}; return {
// echart
echartList: [],
};
}, },
created() { created() {
this.geteEhartList(); this.geteEhartList();
@ -23,12 +27,35 @@ export default {
methods: { methods: {
/* 获取折线图数据 */ /* 获取折线图数据 */
geteEhartList() { geteEhartList() {
roadTrends().then(({ data, code }) => {
if (code === 200) {
this.echartList = data;
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart(); this.drawChart();
}); });
}
});
}, },
/* 绘制折线图 */ /* 绘制折线图 */
drawChart() { drawChart() {
const xData = this.echartList.map((item) => {
return item.date;
});
const yData1 = this.echartList.map((item) => {
return item.A1000;
});
const yData2 = this.echartList.map((item) => {
return item.A2001;
});
const yData3 = this.echartList.map((item) => {
return item.A2000;
});
const yData4 = this.echartList.map((item) => {
return item.A0;
});
const yData5 = this.echartList.map((item) => {
return item.A1;
});
const chart = echarts.init(this.$refs.trendsChart); const chart = echarts.init(this.$refs.trendsChart);
chart.setOption({ chart.setOption({
// //
@ -49,8 +76,8 @@ export default {
}, },
}, },
grid: { grid: {
top: "15%", top: "25%",
left: 0, left: "0%",
right: "10%", right: "10%",
bottom: "10%", bottom: "10%",
containLabel: true, containLabel: true,
@ -85,6 +112,7 @@ export default {
fontSize: 12, fontSize: 12,
}, },
boundaryGap: false, // true线x false线线 boundaryGap: false, // true线x false线线
data: xData,
}, },
yAxis: { yAxis: {
type: "value", type: "value",
@ -111,7 +139,7 @@ export default {
}, },
series: [ series: [
{ {
name: "龟裂", name: "坑槽",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -137,10 +165,10 @@ export default {
itemStyle: { itemStyle: {
color: "#FFC100", // color: "#FFC100", //
}, },
data: [15, 29, 32, 5, 14, 42], data: yData1,
}, },
{ {
name: "车辙", name: "块状修补(沥青)",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -166,10 +194,10 @@ export default {
itemStyle: { itemStyle: {
color: "#08B4A6", color: "#08B4A6",
}, },
data: [30, 35, 32, 35, 18, 72], data: yData2,
}, },
{ {
name: "坑槽", name: "条状修补(沥青)",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -195,7 +223,7 @@ export default {
itemStyle: { itemStyle: {
color: "#146fd7", color: "#146fd7",
}, },
data: [20, 25, 12, 25, 8, 62], data: yData3,
}, },
{ {
name: "横向裂缝", name: "横向裂缝",
@ -224,7 +252,81 @@ export default {
itemStyle: { itemStyle: {
color: "#994EFF", color: "#994EFF",
}, },
data: [40, 45, 32, 45, 38, 82], data: yData4,
},
{
name: "纵向裂缝",
type: "line",
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#994EFF",
},
{
offset: 1,
color: "rgba(153,78,255,0)",
},
]),
},
lineStyle: {
width: 1,
color: "#994EFF",
},
//
showSymbol: false,
symbol: "circle", // circle, diamond, pin
symbolSize: 10, //
itemStyle: {
color: "#994EFF",
},
data: yData5,
},
],
dataZoom: [
{
//
show: false,
//
type: "slider",
//
backgroundColor: "rgba(225,225,225,0.2)",
//
fillerColor: "#ccc",
//
borderColor: "rgba(225,225,225,0.2)",
// detail
showDetail: false,
//
startValue: 0,
//
endValue: 6,
// empty
//
filterMode: "empty",
//
width: "80%",
//
height: 5,
//
left: "center",
//
zoomLoxk: true,
//
handleSize: 10,
// dataZoom-slider
bottom: 0,
},
{
//
//
type: "inside",
//
zoomOnMouseWheel: false,
//
moveOnMouseMove: true,
moveOnMouseWheel: true,
}, },
], ],
}); });

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:31:31 * @Date: 2024-10-18 10:31:31
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-18 14:22:33 * @LastEditTime: 2024-10-24 15:35:02
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\pic-rank.vue * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\pic-rank.vue
* @Description: 病害巡检-pic排名 * @Description: 病害巡检-pic排名
--> -->
@ -13,6 +13,7 @@
class="vue-scroll" class="vue-scroll"
:class-option="defaultOption" :class-option="defaultOption"
:data="picList" :data="picList"
v-if="picList.length > 4"
> >
<div <div
class="pic-div" class="pic-div"
@ -22,24 +23,48 @@
<div class="pic-top"> <div class="pic-top">
<div class="pic-top-name"> <div class="pic-top-name">
<a>{{ index + 1 }}</a <a>{{ index + 1 }}</a
>{{ item.name }} >{{ item.roadName }}
</div> </div>
<div class="pic-top-value"> <div class="pic-top-value">
<span>{{ item.value }}</span> <span>{{ item.pci }}</span>
</div> </div>
</div> </div>
<div class="pic-bottom"> <div class="pic-bottom">
<div <div
:style="{ width: `${(item.value / 300) * 100}%` }" :style="{ width: `${item.pci}%` }"
:class="`pic-bottom-${index}`" :class="`pic-bottom-${index}`"
></div> ></div>
</div> </div>
</div> </div>
</vue-seamless-scroll> </vue-seamless-scroll>
<template v-else>
<div
class="pic-div"
v-for="(item, index) in picList"
:key="`pic-${index}`"
>
<div class="pic-top">
<div class="pic-top-name">
<a>{{ index + 1 }}</a
>{{ item.roadName }}
</div>
<div class="pic-top-value">
<span>{{ item.pci }}</span>
</div>
</div>
<div class="pic-bottom">
<div
:style="{ width: `${item.pci}%` }"
:class="`pic-bottom-${index}`"
></div>
</div>
</div>
</template>
</div> </div>
</template> </template>
<script> <script>
import { roadPic } from "@/api/xj/screen/disease-screen";
import vueSeamlessScroll from "vue-seamless-scroll"; import vueSeamlessScroll from "vue-seamless-scroll";
export default { export default {
name: "PicRank", name: "PicRank",
@ -58,15 +83,22 @@ export default {
waitTime: 2000, // (1000ms) waitTime: 2000, // (1000ms)
}, },
// //
picList: [ picList: [],
{ name: "沈阳绕城高速G1501", value: 95 },
{ name: "沈阳绕城高速G1501", value: 75 },
{ name: "沈阳绕城高速G1501", value: 70 },
{ name: "沈阳绕城高速G1501", value: 65 },
{ name: "沈阳绕城高速G1501", value: 55 },
],
}; };
}, },
created() {
this.getPicData();
},
methods: {
/* 获取数据 */
getPicData() {
roadPic().then(({ data, code }) => {
if (code === 200) {
this.picList = data;
}
});
},
},
}; };
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 10:33:24 * @Date: 2024-10-18 10:33:24
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-18 15:05:44 * @LastEditTime: 2024-10-25 16:19:23
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\road-rank.vue * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\road-rank.vue
* @Description: 病害巡检-路面状况排名 * @Description: 病害巡检-路面状况排名
--> -->
@ -13,6 +13,7 @@
class="vue-scroll" class="vue-scroll"
:class-option="defaultOption" :class-option="defaultOption"
:data="roadList" :data="roadList"
v-if="roadList.length > 4"
> >
<div <div
class="road-div" class="road-div"
@ -22,19 +23,66 @@
<div class="index" :class="`road-index-${index}`">TOP</div> <div class="index" :class="`road-index-${index}`">TOP</div>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
<div class="value">病害数{{ item.value }}</div> <div class="value">病害数{{ item.value }}</div>
<div :class="`rate-${item.tip}`" class="rate"> <div
环比<span>{{ item.rate }}</span> :class="`rate-${
item.huanbi > 0 ? 'up' : item.huanbi === 0 ? '' : 'down'
}`"
class="rate"
>
环比<span>{{ item.huanbi }}</span>
</div>
<div
:class="`rate-${
item.tongbi > 0 ? 'up' : item.tongbi === 0 ? '' : 'down'
}`"
class="rate"
>
同比<span>{{ item.tongbi }}</span>
</div> </div>
</div> </div>
</vue-seamless-scroll> </vue-seamless-scroll>
<template v-else>
<div
class="road-div"
v-for="(item, index) in roadList"
:key="`road-${index}`"
>
<div class="index" :class="`road-index-${index}`">TOP</div>
<div class="name">{{ item.name }}</div>
<div class="value">病害数{{ item.value }}</div>
<div
:class="`rate-${
item.huanbi > 0 ? 'up' : item.huanbi === 0 ? '' : 'down'
}`"
class="rate"
>
环比<span>{{ item.huanbi }}</span>
</div>
<div
:class="`rate-${
item.tongbi > 0 ? 'up' : item.tongbi === 0 ? '' : 'down'
}`"
class="rate"
>
同比<span>{{ item.tongbi }}</span>
</div>
</div>
</template>
</div> </div>
</template> </template>
<script> <script>
import vueSeamlessScroll from "vue-seamless-scroll"; import vueSeamlessScroll from "vue-seamless-scroll";
import { roadRankList } from "@/api/xj/screen/disease-screen";
export default { export default {
name: "RoadRank", name: "RoadRank",
components: { vueSeamlessScroll }, components: { vueSeamlessScroll },
props: {
select: {
type: String,
default: "",
},
},
data() { data() {
return { return {
// //
@ -49,15 +97,34 @@ export default {
waitTime: 2000, // (1000ms) waitTime: 2000, // (1000ms)
}, },
// //
roadList: [ roadList: [],
{ name: "G10152", value: 523, rate: 0.23, tip: "up" },
{ name: "G10152", value: 523, rate: 0.23, tip: "up" },
{ name: "G10152", value: 523, rate: 0.23, tip: "down" },
{ name: "G10152", value: 523, rate: 0.23, tip: "down" },
{ name: "G10152", value: 523, rate: 0.23, tip: "up" },
],
}; };
}, },
watch: {
select: {
handler() {
this.getRoadList();
},
immediate: true,
},
},
created() {},
methods: {
/* 获取路面状况排名数据 */
getRoadList() {
roadRankList({ type: this.select }).then(({ data, code }) => {
if (code === 200) {
this.roadList = data.map((item) => {
return {
...item,
tongbi: item.tongbi.slice(0, 3),
huanbi: item.huanbi.slice(0, 3),
};
});
}
});
},
},
}; };
</script> </script>
@ -70,9 +137,8 @@ export default {
overflow: hidden; overflow: hidden;
.road-div { .road-div {
height: 2rem; min-height: 2rem;
width: 100%; width: 100%;
padding: 0 1.5rem;
display: flex; display: flex;
> div { > div {

View File

@ -2,26 +2,57 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 09:42:49 * @Date: 2024-10-18 09:42:49
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-22 09:30:05 * @LastEditTime: 2024-10-24 14:10:06
* @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\today-inspection.vue * @FilePath: \znxjxt-ui\src\views\big-screen\disease-components\today-inspection.vue
* @Description: 病害巡检-今日巡查 * @Description: 病害巡检-今日巡查
--> -->
<template> <template>
<div class="content"> <div class="content">
<div class="today-left"><span>86</span></div> <div class="today-left">
<span>{{ today }}</span>
</div>
<div class="today-right"> <div class="today-right">
<div class="right-sum"><span>261</span></div> <div class="right-sum">
<div class="right-rate"><span> 37 </span>%</div> <span>{{ all }}</span
>
</div>
<div class="right-rate">
<span> {{ scale }}</span
>%
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { roadToday } from "@/api/xj/screen/disease-screen";
export default { export default {
name: "TodayInspection", name: "TodayInspection",
data() { data() {
return {}; return {
//
today: "0",
//
all: "0",
//
scale: "0",
};
},
created() {
this.getData();
},
methods: {
/* 获取数据 */
getData() {
roadToday().then(({ data, code }) => {
if (code === 200) {
this.today = data.today;
this.all = data.all;
this.scale = (data.scale * 1).toFixed(2);
}
});
},
}, },
}; };
</script> </script>
@ -117,7 +148,7 @@ export default {
background: linear-gradient( background: linear-gradient(
to bottom, to bottom,
#ffffff, #ffffff,
#E9BC5C #e9bc5c
); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/ ); /*设置渐变的方向从左到右 颜色从ff0000到ffff00*/
background-clip: text; /*将设置的背景颜色限制在文字中*/ background-clip: text; /*将设置的背景颜色限制在文字中*/
-webkit-text-fill-color: transparent; /*给文字设置成透明*/ -webkit-text-fill-color: transparent; /*给文字设置成透明*/

View File

@ -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-23 16:12:45 * @LastEditTime: 2024-10-25 16:40:29
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue * @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
* @Description: 大屏首页 * @Description: 大屏首页
--> -->
@ -16,7 +16,6 @@
height="45" height="45"
frameborder="0" frameborder="0"
allowtransparency="true" allowtransparency="true"
@load="loadFrame"
src="https://i.tianqi.com?c=code&id=12&icon=1&color=%2389C5E8&py=shenyang&num=1&site=12" src="https://i.tianqi.com?c=code&id=12&icon=1&color=%2389C5E8&py=shenyang&num=1&site=12"
></iframe> ></iframe>
</div> </div>
@ -46,8 +45,12 @@
></template> ></template>
<template slot="operation" v-if="item.selectIsShow"> <template slot="operation" v-if="item.selectIsShow">
<el-radio-group class="screen-checkBox" v-model="item.select"> <el-radio-group class="screen-checkBox" v-model="item.select">
<el-radio-button label="1">公司</el-radio-button> <el-radio-button
<el-radio-button label="2">线路</el-radio-button> v-for="(item, index) in selectTypeArr"
:label="item.value"
:key="`left-screen-${index}`"
>{{ item.label }}</el-radio-button
>
</el-radio-group> </el-radio-group>
</template> </template>
</module-block> </module-block>
@ -61,11 +64,17 @@
:title="item.title" :title="item.title"
:class="item.class" :class="item.class"
> >
<template><component :is="item.component"></component></template> <template
><component :select="item.select" :is="item.component"></component
></template>
<template slot="operation" v-if="item.selectIsShow"> <template slot="operation" v-if="item.selectIsShow">
<el-radio-group class="screen-checkBox" v-model="item.select"> <el-radio-group class="screen-checkBox" v-model="item.select">
<el-radio-button label="1">公司</el-radio-button> <el-radio-button
<el-radio-button label="2">线路</el-radio-button> v-for="(item, index) in selectTypeArr"
:label="item.value"
:key="`right-screen-${index}`"
>{{ item.label }}</el-radio-button
>
</el-radio-group> </el-radio-group>
</template> </template>
</module-block> </module-block>
@ -98,6 +107,10 @@
<!-- 图片背景 --> <!-- 图片背景 -->
<div class="disease-content" v-if="showImgBk"> <div class="disease-content" v-if="showImgBk">
<div class="disease-title" @click="changeMap(false)"></div> <div class="disease-title" @click="changeMap(false)"></div>
<div class="map-legend"></div>
<div class="map-care">
<div class="map-care-div"></div>
</div>
</div> </div>
<!-- 地图 --> <!-- 地图 -->
<fssm-map <fssm-map
@ -180,6 +193,8 @@ import TrafficRank from "./traffic-components/traffic-rank.vue";
import TrafficEmergency from "./traffic-components/traffic-emergency.vue"; import TrafficEmergency from "./traffic-components/traffic-emergency.vue";
import ImgDialog from "./components/img-dialog.vue"; import ImgDialog from "./components/img-dialog.vue";
import FssmScroll from "@/components/scroll/fssm-scroll.vue"; import FssmScroll from "@/components/scroll/fssm-scroll.vue";
//
import { selectTypeList } from "@/api/xj/screen/index";
export default { export default {
name: "BigScreen", name: "BigScreen",
components: { components: {
@ -213,6 +228,8 @@ export default {
weekTime: "", weekTime: "",
// //
yearTime: "", yearTime: "",
//
selectTypeArr: [],
// //
leftModuleList: [ leftModuleList: [
{ {
@ -237,7 +254,7 @@ export default {
title: "病害趋势", title: "病害趋势",
component: DiseaseCurrent, component: DiseaseCurrent,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
], ],
@ -265,7 +282,7 @@ export default {
title: "路面状况排名", title: "路面状况排名",
component: RoadRank, component: RoadRank,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
], ],
@ -276,7 +293,7 @@ export default {
{ name: "巡查车", click: "1" }, { name: "巡查车", click: "1" },
{ name: "病害", click: "2" }, { name: "病害", click: "2" },
{ name: "路产", click: "3" }, { name: "路产", click: "3" },
{ name: "PCL", click: "4" }, { name: "事件", click: "4" },
], ],
/* 具体icon类别 */ /* 具体icon类别 */
iconTypeList: [], iconTypeList: [],
@ -310,12 +327,9 @@ export default {
}, },
created() { created() {
this.setTime(); this.setTime();
this.getSelect();
}, },
methods: { methods: {
/* iframe加载完成回调方法 */
loadFrame() {
const iframe = document.getElementById("iframeId");
},
/* 获取当前时间 */ /* 获取当前时间 */
setTime() { setTime() {
this.timeFlag = setInterval(() => { this.timeFlag = setInterval(() => {
@ -348,6 +362,14 @@ export default {
this.dataTime = `${hours}:${minutes}:${seconds}`; this.dataTime = `${hours}:${minutes}:${seconds}`;
}, 1000); }, 1000);
}, },
/* 获取数据栏右上角选项数据 */
getSelect() {
selectTypeList().then(({ code, data }) => {
if (code === 200) {
this.selectTypeArr = data;
}
});
},
/* 点击病害筛查 */ /* 点击病害筛查 */
clickImg() { clickImg() {
this.imgVisible = true; this.imgVisible = true;
@ -632,7 +654,7 @@ export default {
title: "病害趋势", title: "病害趋势",
component: DiseaseCurrent, component: DiseaseCurrent,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
]; ];
@ -659,7 +681,7 @@ export default {
title: "路面状况排名", title: "路面状况排名",
component: RoadRank, component: RoadRank,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
]; ];
@ -689,7 +711,7 @@ export default {
title: "附属设施异常统计", title: "附属设施异常统计",
component: AnomalyFacilities, component: AnomalyFacilities,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "one", class: "one",
}, },
{ {
@ -698,7 +720,7 @@ export default {
title: "路产统计", title: "路产统计",
component: RoadStatistic, component: RoadStatistic,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
]; ];
@ -717,7 +739,7 @@ export default {
height: "14rem", height: "14rem",
title: "交安事件趋势", title: "交安事件趋势",
component: TrafficTrend, component: TrafficTrend,
selectIsShow: false, selectIsShow: true,
class: "twe", class: "twe",
}, },
{ {
@ -726,7 +748,7 @@ export default {
title: "交安事件统计", title: "交安事件统计",
component: TrafficStatistic, component: TrafficStatistic,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "twe", class: "twe",
}, },
]; ];
@ -737,7 +759,7 @@ export default {
title: "交安事件排名", title: "交安事件排名",
component: TrafficRank, component: TrafficRank,
selectIsShow: true, selectIsShow: true,
select: "1", select: "",
class: "one", class: "one",
}, },
{ {
@ -853,8 +875,8 @@ export default {
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
position: absolute; position: absolute;
left: 29rem; left: 27%;
top: 6rem; top: 10%;
.road-div { .road-div {
width: 100%; width: 100%;
@ -924,9 +946,6 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
// position: absolute;
// left: 30rem;
// top: 12rem;
font-size: 0.8rem; font-size: 0.8rem;
color: #ffffff; color: #ffffff;
background-color: #395569; background-color: #395569;
@ -945,8 +964,8 @@ export default {
width: 8rem; width: 8rem;
height: 10rem; height: 10rem;
position: absolute; position: absolute;
right: 28rem; right: 26%;
top: 6rem; top: 10%;
padding: 0.4rem; padding: 0.4rem;
border-radius: 0.4rem; border-radius: 0.4rem;
border: 1px solid #193dae; border: 1px solid #193dae;
@ -971,6 +990,7 @@ export default {
background-size: 100% 100%; background-size: 100% 100%;
position: relative; position: relative;
//
.disease-title { .disease-title {
width: 20rem; width: 20rem;
height: 2.8rem; height: 2.8rem;
@ -982,9 +1002,29 @@ export default {
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100%; background-size: 100%;
} }
//
.map-legend {
height: 9rem;
width: 2rem;
position: absolute;
top: 13%;
left: 26%;
background-color: #1cb6ff;
z-index: 1;
} }
::v-deep .ol-layer:nth-child(1) { //
.map-care {
width: 48%;
height: 73%;
position: absolute;
left: 26%;
top: 13%;
}
}
::v-deep .baseLayerClass {
filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg) filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg)
brightness(80%) saturate(550%); brightness(80%) saturate(550%);
} }
@ -1071,7 +1111,7 @@ export default {
.change-map-div { .change-map-div {
cursor: pointer; cursor: pointer;
margin: 0 1.2rem; margin: 0 2rem;
} }
.change-map-click { .change-map-click {

View File

@ -2,24 +2,24 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 15:18:03 * @Date: 2024-10-18 15:18:03
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-22 09:05:30 * @LastEditTime: 2024-10-25 16:27:10
* @FilePath: \znxjxt-ui\src\views\big-screen\road-components\ancillary-facilities.vue * @FilePath: \znxjxt-ui\src\views\big-screen\road-components\ancillary-facilities.vue
* @Description: 道路资产大屏-附属设施分布 * @Description: 道路资产大屏-附属设施分布
--> -->
<template> <template>
<div class="content"> <div class="content">
<div class="ancillary-top"><span>21465</span></div> <div class="ancillary-top"><span>{{sum}}</span></div>
<div class="ancillary-bottom"> <div class="ancillary-bottom">
<div <div
:class="`ancillary-bottom-${index}`" :class="`ancillary-bottom-${index}`"
v-for="(item, index) in ancillaryList" v-for="(item, index) in ancillaryList"
:key="`ancillary-${index}`" :key="`ancillary-${index}`"
> >
<div>{{ item.name }}</div> <div>{{ item.label }}</div>
<div> <div>
<span>{{ item.value }}</span <span>{{ item.value }}</span
><a>{{ item.unit }}</a> ><a></a>
</div> </div>
</div> </div>
</div> </div>
@ -27,24 +27,40 @@
</template> </template>
<script> <script>
import { ancillaryList, ancillaryCount } from "@/api/xj/screen/road-screen";
export default { export default {
name: "AncillaryFacilities", name: "AncillaryFacilities",
data() { data() {
return { return {
//
sum: 0,
// //
ancillaryList: [ ancillaryList: [],
{ name: "里程桩", value: 123, unit: "个" },
{ name: "禁令标志", value: 123, unit: "个" },
{ name: "指示标志", value: 123, unit: "个" },
{ name: "警告标志", value: 123, unit: "个" },
{ name: "指路标志", value: 123, unit: "个" },
{ name: "辅助标志", value: 123, unit: "个" },
{ name: "球机", value: 123, unit: "个" },
{ name: "枪机", value: 123, unit: "个" },
],
}; };
}, },
methods: {}, created() {
this.getAncillaryList();
this.getSum();
},
methods: {
/* 获取附属设施分总数 */
getSum() {
ancillaryCount().then(({ code, data }) => {
if (code === 200) {
this.sum = data.count;
}
});
},
/* 获取附属设施分布数据 */
getAncillaryList() {
ancillaryList().then(({ code, data }) => {
if (code === 200) {
this.ancillaryList = data;
}
});
},
},
}; };
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 15:21:24 * @Date: 2024-10-18 15:21:24
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-21 16:03:14 * @LastEditTime: 2024-10-25 15:37:00
* @FilePath: \znxjxt-ui\src\views\big-screen\road-components\anomaly-facilities.vue * @FilePath: \znxjxt-ui\src\views\big-screen\road-components\anomaly-facilities.vue
* @Description: 附属设施异常统计 * @Description: 附属设施异常统计
--> -->
@ -29,49 +29,137 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
import { getDropList } from "@/api/xj/screen/disease-screen";
import { anomalyList } from "@/api/xj/screen/road-screen";
export default { export default {
name: "AnomalyFacilities", name: "AnomalyFacilities",
props: {
select: {
type: String,
default: "",
},
},
data() { data() {
return { return {
// //
itemSelect: "1", itemSelect: "",
// //
currentList: [ currentList: [],
{ // echart
label: "分公司", anomalyData: [],
value: "1",
},
{
label: "分公司2",
value: "2",
},
{
label: "分公3",
value: "3",
},
{
label: "分公司4",
value: "4",
},
{
label: "分公司5",
value: "5",
},
],
}; };
}, },
watch: {
select: {
handler(val) {
if (val) {
this.getCurrentList();
this.getChartData();
}
},
immediate: true,
},
itemSelect: {
handler() {
this.getChartData();
},
},
},
created() { created() {
this.getChartData(); this.getChartData();
}, },
methods: { methods: {
/* 获取右上角下拉框数据 */
getCurrentList() {
getDropList({ type: this.select }).then(({ data, code }) => {
if (code === 200) {
this.currentList = data;
}
});
},
/* 获取柱状图数据 */ /* 获取柱状图数据 */
getChartData() { getChartData() {
const data = {
id: this.itemSelect,
type: this.select,
};
anomalyList(data).then(({ code, data }) => {
if (code === 200) {
// this.anomalyData = data;
this.anomalyData = [
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
{ label: "sss", value: 52 },
];
this.$nextTick(() => { this.$nextTick(() => {
this.drawChart(); this.drawChart();
}); });
}
});
}, },
/* 绘制echart */ /* 绘制echart */
drawChart() { drawChart() {
const xData = this.anomalyData.map((item) => {
return item.label;
});
const yData = this.anomalyData.map((item, index) => {
if (index % 2 == 0) {
return {
...item,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#033E43",
},
{
offset: 1,
color: "#00FFEA",
},
],
},
},
};
} else {
return {
...item,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#034299",
},
{
offset: 1,
color: "#35F0FF",
},
],
},
},
};
}
});
const chart = echarts.init(this.$refs.anomalyChart); const chart = echarts.init(this.$refs.anomalyChart);
chart.setOption({ chart.setOption({
// backgroundColor: "#041139", // backgroundColor: "#041139",
@ -95,12 +183,10 @@ export default {
}, },
xAxis: [ xAxis: [
{ {
data: ["fdfs", "frffs", "wdwe", "10-1", "asdasd", "asd", "fdfs"], data: xData,
axisLabel: { axisLabel: {
textStyle: {
color: "#808C9F", color: "#808C9F",
fontSize: 12, fontSize: 12,
},
interval: 0, interval: 0,
}, },
axisLine: { axisLine: {
@ -138,12 +224,10 @@ export default {
}, },
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: {
color: "#808C9F", color: "#808C9F",
fontSize: 12, fontSize: 12,
}, },
}, },
},
], ],
series: [ series: [
// //
@ -169,176 +253,7 @@ export default {
color: "#fff", color: "#fff",
fontSize: 14, fontSize: 14,
}, },
data: [ data: yData,
{
value: 15,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#034299",
},
{
offset: 1,
color: "#35F0FF",
},
],
},
},
},
{
value: 25,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#033E43",
},
{
offset: 1,
color: "#00FFEA",
},
],
},
},
},
{
value: 35,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#034299",
},
{
offset: 1,
color: "#35F0FF",
},
],
},
},
},
{
value: 45,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#033E43",
},
{
offset: 1,
color: "#00FFEA",
},
],
},
},
},
{
value: 55,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#034299",
},
{
offset: 1,
color: "#35F0FF",
},
],
},
},
},
{
value: 65,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#033E43",
},
{
offset: 1,
color: "#00FFEA",
},
],
},
},
},
{
value: 75,
itemStyle: {
color: {
x: 0,
y: 0,
x2: 0,
y2: 1,
type: "linear",
global: false,
colorStops: [
{
//
offset: 0,
color: "#034299",
},
{
offset: 1,
color: "#35F0FF",
},
],
},
},
},
],
}, },
], ],
}); });

View File

@ -9,18 +9,42 @@
<template> <template>
<div class="content"> <div class="content">
<div class="maintain-left"><span>286</span>km</div> <div class="maintain-left">
<div class="maintain-right"><span>86</span></div> <span>{{ mileage }}</span
>km
</div>
<div class="maintain-right">
<span>{{ count }}</span
>
</div>
</div> </div>
</template> </template>
<script> <script>
import { roadRankStatistics } from "@/api/xj/screen/road-screen";
export default { export default {
name: "ManageMaintain", name: "ManageMaintain",
data() { data() {
return {}; return {
//
mileage: "0",
//
count: "0",
};
},
created() {
this.getRoadList();
},
methods: {
getRoadList() {
roadRankStatistics().then(({ code, data }) => {
if (code === 200) {
this.mileage = data.mileage;
this.count = data.count;
}
});
},
}, },
methods: {},
}; };
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-18 15:22:31 * @Date: 2024-10-18 15:22:31
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-22 09:13:22 * @LastEditTime: 2024-10-25 16:11:56
* @FilePath: \znxjxt-ui\src\views\big-screen\road-components\road-statistic.vue * @FilePath: \znxjxt-ui\src\views\big-screen\road-components\road-statistic.vue
* @Description: 道路资产大屏-路产统计 * @Description: 道路资产大屏-路产统计
--> -->
@ -17,7 +17,7 @@
<div class="road-top"> <div class="road-top">
<div class="road-top-name"> <div class="road-top-name">
<a>{{ index + 1 < 10 ? "0" + (index + 1) : index + 1 }}</a <a>{{ index + 1 < 10 ? "0" + (index + 1) : index + 1 }}</a
>{{ item.name }} >{{ item.label }}
</div> </div>
<div class="road-top-value"> <div class="road-top-value">
<span>{{ item.value }}</span <span>{{ item.value }}</span
@ -27,40 +27,57 @@
<div class="road-bottom"> <div class="road-bottom">
<div <div
class="road-bottom-div" class="road-bottom-div"
:style="{ width: `${item.value * 10}%` }" :style="{ width: `${item.rate * 100}%` }"
:class="`bottom-${index}`" :class="`bottom-${index}`"
>
<div
v-for="(it, ind) in item.value"
:key="`info-${ind}`"
class="road-info"
></div> ></div>
</div> </div>
</div> </div>
</div> </div>
</div>
</template> </template>
<script> <script>
import { roadStatisticList } from "@/api/xj/screen/road-screen";
export default { export default {
name: "RoadStatistic", name: "RoadStatistic",
props: {
select: {
type: String,
default: "",
},
},
data() { data() {
return { return {
roadList: [ roadList: [],
{ name: "G10152", value: 7 },
{ name: "G10152", value: 6 },
{ name: "G10152", value: 5 },
{ name: "G10152", value: 5 },
{ name: "G10152", value: 1 },
{ name: "G10152", value: 5 },
{ name: "G10152", value: 3 },
{ name: "G10152", value: 8 },
{ name: "G10152", value: 3 },
{ name: "G10152", value: 6 },
],
}; };
}, },
methods: {}, watch: {
select: {
handler() {
this.getRoadList();
},
immediate: true,
},
},
created() {},
methods: {
/* 获取路产统计信息 */
getRoadList() {
roadStatisticList({ type: this.select }).then(({ code, data }) => {
if (code === 200) {
let sum = 0;
data.forEach((element) => {
sum += element.value;
});
this.roadList = data.map((item) => {
return {
...item,
rate: item.value / sum,
};
});
}
});
},
},
}; };
</script> </script>
@ -146,13 +163,6 @@ export default {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: flex; display: flex;
.road-info {
height: 100%;
width: 40px;
border-left: 2px black solid;
margin: 0 0.1rem;
}
} }
.bottom-0 { .bottom-0 {

View File

@ -1,372 +0,0 @@
<!--
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-17 16:23:48
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-23 11:26:47
* @FilePath: \znxjxt-ui\src\views\big-screen\road-screen.vue
* @Description: 大屏-其他切换
-->
<template>
<div class="road-content">
<!-- 下拉框 -->
<div class="road-select" @click="clickImg">
<span>病害筛查</span>
</div>
<div class="disease-content" v-if="showImgBk">
<div class="disease-title" @click="changeMap"></div>
</div>
<fssm-map
v-if="!showImgBk"
ref="roadMap"
@feature-select="FeatureSelect"
></fssm-map>
<!-- 图片弹窗 -->
<el-dialog
:title="imgTitle"
:visible.sync="imgVisible"
width="80rem"
append-to-body
:close-on-click-modal="false"
destroy-on-close
@close="imgCancel"
>
<img-dialog></img-dialog>
</el-dialog>
</div>
</template>
<script>
import FssmMap from "@/components/map/fssm-map.vue";
import { Feature } from "ol";
import { Point } from "ol/geom";
import { Style, Icon, Fill, Stroke, Circle, Text } from "ol/style";
import logo from "@/assets/xc.png";
import VectorSource from "ol/source/Vector";
import VectorLayer from "ol/layer/Vector";
import * as geomExports from "ol/geom";
import Cluster from "ol/source/Cluster";
import ImgDialog from "./components/img-dialog.vue";
export default {
name: "RoadScreen",
components: { FssmMap, ImgDialog },
props: {},
watch: {},
data() {
return {
//
showImgBk: true,
//
centerPiont: [],
// 线
lineString: [],
//
imgTitle: "查看",
//
imgVisible: false,
};
},
mounted() {},
methods: {
/* 点击病害筛查事件 */
clickImg() {
this.imgVisible = true;
},
/* 点击图片点位信息 */
changeMap() {
this.showImgBk = false;
this.getCenterPiont();
this.getLinePoint();
},
/* 获取地图点位信息 */
getCenterPiont() {
this.centerPiont = [
[123.30297096718999, 41.87942945541742],
[123.08770760049077, 41.99409925522211],
[123.6210023341045, 41.94237193236056],
];
this.drawPoint();
},
/* 绘制地图点位 */
drawPoint() {
const features = [];
this.centerPiont.forEach((element) => {
//
const point = new Point(element);
const feature = new Feature({
geometry: point,
data: { data: "123", type: "icon" },
//
type: "icon",
});
//
// feature.setStyle([
// new Style({
// image: new Icon({
// crossOrigin: "anonymous",
// src: logo,
// //
// scale: 0.05,
// }),
// }),
// ]);
features.push(feature);
});
const clusterSource = new Cluster({
distance: 200,
minDistance: 20,
source: new VectorSource({
features,
}),
});
const clusters = new VectorLayer({
source: clusterSource,
name: "clusterLayer",
zIndex: 10,
style: function clusterStyle(feature) {
const count = feature.get("features").length;
return new Style({
image: new Icon({
crossOrigin: "anonymous",
src: logo,
//
scale: 0.05,
// 0.330
rotation: 0.3,
}),
text: new Text({
textAlign: "center", //
textBaseline: "middle",
font: "normal 14px 微软雅黑",
offsetY: 15,
fill: new Fill({
color: "#ffffff",
}),
text: count > 1 ? count.toString() : "",
}),
});
},
});
this.$nextTick(() => {
const map = this.$refs.roadMap.instance.get("map");
map.addLayer(clusters);
});
},
/* 选中地图图标/线段事件 */
FeatureSelect(e) {
const map = this.$refs.roadMap.instance.get("map");
let selectedFeatures = e.selected;
if (selectedFeatures.length > 0) {
let feature = selectedFeatures[0];
let features = feature.get("features");
// 线
if (feature.getProperties().type === "line") {
console.log(feature, "线段参数");
} else {
if (features.length === 1) {
//
//
//
const selectFeature = feature.getProperties().features[0];
console.log(selectFeature, "点位");
//
console.log(selectFeature.get("data"));
} else {
//
//
map.getView().animate({
center: feature.getGeometry().getCoordinates(),
zoom: map.getView().getZoom() + 1,
});
}
}
}
},
/* 获取地图线段点位信息 */
getLinePoint() {
this.lineString = [
[
[123.32282646995006, 41.97498761493642],
[123.35200891450947, 41.973156567233836],
[123.37958916875502, 41.97956525514763],
[123.39286432222431, 42.0021101177337],
[123.40184182160729, 42.02952420024438],
[123.4845914544503, 42.03583748930991],
],
[
[122.5518798295274, 42.19039770874923],
[123.7871925821671, 42.236903621119346],
],
];
this.drawLine();
},
/* 绘制地图线段 */
drawLine() {
const features = [];
this.lineString.forEach((element) => {
const line = new Feature({
geometry: new geomExports.LineString(element),
type: "line",
});
line.setStyle([
new Style({
//
fill: new Fill({
color: "red",
}),
// 线
stroke: new Stroke({
color: "blue",
width: 5,
}),
//
image: new Circle({
radius: 17,
fill: new Fill({
color: "#ffffff",
}),
}),
}),
]);
features.push(line);
});
const lineSource = new VectorSource({
features,
});
let markLayerLines = new VectorLayer({
source: lineSource,
properties: {
type: "line",
},
});
this.$nextTick(() => {
const map = this.$refs.roadMap.instance.get("map");
map.addLayer(markLayerLines);
});
},
/* 清空地图图层的方法 */
clearMapPoint() {
this.$nextTick(() => {
this.$refs.roadMap.clearMapFeature();
});
},
/* 关闭图片查看弹窗 */
imgCancel() {
this.imgVisible = false;
},
},
};
</script>
<style lang="scss" scoped>
.road-content {
width: 100%;
height: 100%;
position: relative;
//
.road-select {
cursor: pointer;
width: 4rem;
height: 5rem;
display: flex;
justify-content: center;
align-items: flex-end;
position: absolute;
left: 30rem;
top: 6rem;
color: #8deeff;
background-image: url("../../assets/screen/road/road-select.png");
background-repeat: no-repeat;
background-size: 80%;
background-position: 50% 0;
z-index: 1;
span {
font-size: 0.8rem;
}
::v-deep .el-select {
width: 8rem;
.el-input .el-select__caret {
line-height: 1.5rem;
}
.el-input--medium .el-input__inner {
height: 1.5rem;
background-color: transparent;
color: #89c5e8;
border-color: #6991cd;
}
.el-select-dropdown {
background-color: #102649;
border-color: #08204f;
.el-scrollbar {
.el-select-dropdown__wrap {
.el-scrollbar__view {
.el-select-dropdown__item:hover {
background-color: #2b4c7e;
}
.el-select-dropdown__item.selected {
background-color: #2b4c7e;
}
.el-select-dropdown__item.hover {
background-color: #2b4c7e;
}
}
.el-select-dropdown__list {
background-color: #102649;
}
}
}
}
}
}
//
.disease-content {
width: 100%;
height: 100%;
background-image: url("../../assets/screen/index/map-liaoning.jpg");
background-repeat: no-repeat;
background-size: 100% 100%;
position: relative;
.disease-title {
width: 20rem;
height: 2.8rem;
position: absolute;
// top: 5rem;
left: 50%;
transform: translate(-50%, 5rem);
background-image: url("../../assets/screen/index/disease-title.png");
background-repeat: no-repeat;
background-size: 100%;
}
}
}
::v-deep .ol-layer:nth-child(1) {
filter: grayscale(200%) invert(200%) sepia(50%) hue-rotate(175deg)
brightness(80%) saturate(550%);
}
/* 修改弹窗样式 */
::v-deep .el-dialog__header {
background-color: #113463;
span,
i {
color: #ffffff;
}
}
::v-deep .el-dialog__body {
background-color: #113463;
}
</style>

View File

@ -97,10 +97,8 @@ export default {
{ {
data: ["fdfs", "frffs", "wdwe", "10-1", "asdasd", "asd", "fdfs"], data: ["fdfs", "frffs", "wdwe", "10-1", "asdasd", "asd", "fdfs"],
axisLabel: { axisLabel: {
textStyle: {
color: "#808C9F", color: "#808C9F",
fontSize: 12, fontSize: 12,
},
interval: 0, interval: 0,
}, },
axisLine: { axisLine: {
@ -138,12 +136,10 @@ export default {
}, },
axisLabel: { axisLabel: {
show: true, show: true,
textStyle: {
color: "#808C9F", color: "#808C9F",
fontSize: 12, fontSize: 12,
}, },
}, },
},
], ],
series: [ series: [
// //

View File

@ -2,7 +2,7 @@
* @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git * @Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
* @Date: 2024-10-08 10:58:25 * @Date: 2024-10-08 10:58:25
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-12 15:22:08 * @LastEditTime: 2024-10-25 11:29:20
* @FilePath: \znxjxt-ui\src\views\xj\inspection\disease-management .vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\disease-management .vue
* @Description: 巡检信息管理-病害管理 * @Description: 巡检信息管理-病害管理
--> -->
@ -40,7 +40,6 @@
format="yyyy-MM-dd" format="yyyy-MM-dd"
value-format="yyyy-MM-dd" value-format="yyyy-MM-dd"
clearable clearable
@change="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="病害类型" prop="defectType"> <el-form-item label="病害类型" prop="defectType">
@ -178,7 +177,7 @@
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
:disabled="multiple" :disabled="multiple"
@click="handleDelete" @click="handleDelete('')"
v-hasPermi="['system:defect:remove']" v-hasPermi="['system:defect:remove']"
>删除 >删除
</el-button> </el-button>
@ -194,18 +193,18 @@
>导出 >导出
</el-button> </el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
size="mini" size="mini"
:disabled="single" :disabled="multiple"
@click="handleUpdateBatch" @click="handleUpdateBatch"
v-hasPermi="['system:defect:edit']" v-hasPermi="['system:defect:edit']"
>批量确认 >批量确认
</el-button> </el-button>
</el-col> </el-col> -->
</el-row> </el-row>
<!-- 数据表格 --> <!-- 数据表格 -->
@ -248,7 +247,11 @@
<el-table-column label="结束桩号" align="center" prop="stakeEnd" /> <el-table-column label="结束桩号" align="center" prop="stakeEnd" />
<el-table-column label="病害图片" align="center" prop="media"> <el-table-column label="病害图片" align="center" prop="media">
<template slot-scope="scope"> <template slot-scope="scope">
<img style="height: 3rem" :src="scope.row.media[0].img" /> <el-image
style="height: 3rem"
:src="scope.row.media[0].img"
:preview-src-list="[scope.row.media[0].img]"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="病害长度" align="center" prop="targetLen" /> <el-table-column label="病害长度" align="center" prop="targetLen" />
@ -354,7 +357,7 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <el-col :span="12" v-if="dialogTitle != '添加缺陷'">
<el-form-item label="校验状态" prop="dataStatus"> <el-form-item label="校验状态" prop="dataStatus">
<el-select <el-select
v-model="form.dataStatus" v-model="form.dataStatus"
@ -370,7 +373,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="dialogTitle === '添加缺陷' ? 24 : 12">
<el-form-item label="病害状态" prop="state"> <el-form-item label="病害状态" prop="state">
<el-select <el-select
v-model="form.state" v-model="form.state"
@ -537,6 +540,7 @@ import {
changeDefectStatus, changeDefectStatus,
} from "@/api/xj/disease"; } from "@/api/xj/disease";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default { export default {
name: "Defect", name: "Defect",
@ -597,8 +601,6 @@ export default {
inspectDirection: "", inspectDirection: "",
media: [], media: [],
}, },
//
fileList: [],
// //
upload: { upload: {
// //
@ -826,7 +828,9 @@ export default {
inspectDirection: "", inspectDirection: "",
media: [], media: [],
}; };
if (this.$refs.addForm) {
this.$refs["addForm"].resetFields(); this.$refs["addForm"].resetFields();
}
// this.resetFormData(); // this.resetFormData();
}, },
/* 重置表单方法 */ /* 重置表单方法 */
@ -894,21 +898,27 @@ export default {
handleUpdate(row) { handleUpdate(row) {
this.dialogVisible = true; this.dialogVisible = true;
this.dialogTitle = "修改缺陷"; this.dialogTitle = "修改缺陷";
this.centerPoint = [ this.centerPoint = gcj02ToWgs84([
row.geometry.coordinates[0], row.geometry.coordinates[0],
row.geometry.coordinates[1], row.geometry.coordinates[1],
]; ]);
this.$nextTick(() => { this.$nextTick(() => {
this.initMap("addMap"); this.initMap("addMap");
const e = { const e = {
lnglat: { lnglat: {
lat: row.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: row.geometry.coordinates[0], row.geometry.coordinates[0],
row.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
row.geometry.coordinates[0],
row.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
}); });
this.form = row; this.form = { ...row, dataStatus: row.dataStatus.toString() };
this.upload.fileList = row.media.map((item) => { this.upload.fileList = row.media.map((item) => {
return { return {
...item, ...item,
@ -940,9 +950,9 @@ export default {
}, },
/* 文件上传成功处理 */ /* 文件上传成功处理 */
handleFileSuccess(response, file, fileList) { handleFileSuccess(response, file, fileList) {
this.fileList = fileList.map((item) => { this.upload.fileList = fileList.map((item) => {
if (item.response) { if (item.response) {
return { img: item.response.url }; return { ...item, img: item.response.url };
} }
return item; return item;
}); });
@ -958,16 +968,22 @@ export default {
return false; return false;
} }
// //
if (this.fileList.length < 1) { if (this.upload.fileList.length < 1) {
this.$modal.msgWarning("请上传图片"); this.$modal.msgWarning("请上传图片");
return false; return false;
} }
const data = { const data = {
...this.form, ...this.form,
media: this.fileList, media: this.upload.fileList.map((item) => {
return { ...item, img: item.img };
}),
geometry: { geometry: {
type: "Point", type: "Point",
coordinates: [this.markers[0].lng, this.markers[0].lat], coordinates: wgs84ToGcj02([
this.markers[0].lng,
this.markers[0].lat,
]),
id: this.form?.geometry?.id,
}, },
}; };
if (this.form.id) { if (this.form.id) {
@ -1053,11 +1069,27 @@ export default {
this.openViewDialog = true; this.openViewDialog = true;
this.viewForm = defect; this.viewForm = defect;
this.$nextTick(() => { this.$nextTick(() => {
this.centerPoint = [
gcj02ToWgs84([
defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[0],
gcj02ToWgs84([
defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[1],
];
this.initMap("viewMap"); this.initMap("viewMap");
const e = { const e = {
lnglat: { lnglat: {
lat: defect.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: defect.geometry.coordinates[0], defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
@ -1095,6 +1127,7 @@ export default {
}, },
/* 关闭查看对话框 */ /* 关闭查看对话框 */
closeDialog() { closeDialog() {
this.centerPoint = [123.30297096718999, 41.87942945541742];
this.openViewDialog = false; this.openViewDialog = false;
}, },
}, },

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 16:52:24 * @Date: 2024-10-11 16:52:24
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-12 14:13:23 * @LastEditTime: 2024-10-25 11:17:56
* @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-add.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-add.vue
* @Description: 路产管理-新增/编辑弹窗 * @Description: 路产管理-新增/编辑弹窗
--> -->
@ -156,15 +156,10 @@
<script> <script>
import { addRoad, uploadRoad } from "@/api/xj/road"; import { addRoad, uploadRoad } from "@/api/xj/road";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default { export default {
name: "RoadAdd", name: "RoadAdd",
// props: [
// "dialogItem",
// "segmentList",
// "defectStatus",
// "roadType",
// ],
props: { props: {
dialogItem: { dialogItem: {
type: Object, type: Object,
@ -283,8 +278,14 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
const e = { const e = {
lnglat: { lnglat: {
lat: val.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: val.geometry.coordinates[0], val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
@ -339,7 +340,11 @@ export default {
}), }),
geometry: { geometry: {
type: "Point", type: "Point",
coordinates: [this.markers[0].lng, this.markers[0].lat], coordinates: wgs84ToGcj02([
this.markers[0].lng,
this.markers[0].lat,
]),
id: this.roadForm?.geometry?.id,
}, },
}; };
if (this.roadForm.id) { if (this.roadForm.id) {

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-12 13:11:05 * @Date: 2024-10-12 13:11:05
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-14 09:11:45 * @LastEditTime: 2024-10-25 11:24:51
* @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-view.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-view.vue
* @Description: 交安事件-查看弹窗 * @Description: 交安事件-查看弹窗
--> -->
@ -43,6 +43,7 @@
</template> </template>
<script> <script>
import { gcj02ToWgs84 } from "@/api/xj/map";
export default { export default {
name: "RoadView", name: "RoadView",
props: { props: {
@ -68,25 +69,44 @@ export default {
watch: { watch: {
dialogItem: { dialogItem: {
handler(val) { handler(val) {
if (val.title === "查看路产") {
this.viewForm = JSON.parse(JSON.stringify(val)); this.viewForm = JSON.parse(JSON.stringify(val));
this.$nextTick(() => { this.$nextTick(() => {
this.centerPoint = [
gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
];
this.initMap("viewMap");
const e = { const e = {
lnglat: { lnglat: {
lat: val.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: val.geometry.coordinates[0], val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
// //
this.map.removeEventListener("click", this.onMapClick); this.map.removeEventListener("click", this.onMapClick);
}); });
}
}, },
immediate: true, immediate: true,
deep: true, deep: true,
}, },
}, },
mounted() { mounted() {
this.initMap("viewMap"); // this.initMap("viewMap");
}, },
methods: { methods: {
/* 过滤列表路产类型 */ /* 过滤列表路产类型 */
@ -108,7 +128,6 @@ export default {
// if (this.map) { // if (this.map) {
// this.map.remove(); // // this.map.remove(); //
// } // }
// //
this.map = new T.Map(ele); this.map = new T.Map(ele);
this.map.centerAndZoom( this.map.centerAndZoom(

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 15:14:16 * @Date: 2024-10-11 15:14:16
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-12 16:08:23 * @LastEditTime: 2024-10-25 09:28:22
* @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\index.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\index.vue
* @Description: 巡检信息-路产管理 * @Description: 巡检信息-路产管理
--> -->
@ -187,18 +187,18 @@
>导出 >导出
</el-button> </el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
icon="el-icon-edit-outline" icon="el-icon-edit-outline"
size="mini" size="mini"
:disabled="single" :disabled="multiple"
@click="handleUpdateBatch" @click="handleUpdateBatch"
v-hasPermi="['system:defect:edit']" v-hasPermi="['system:defect:edit']"
>批量确认 >批量确认
</el-button> </el-button>
</el-col> </el-col> -->
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table <el-table
@ -240,7 +240,11 @@
<el-table-column label="结束桩号" align="center" prop="stakeEnd" /> <el-table-column label="结束桩号" align="center" prop="stakeEnd" />
<el-table-column label="路产图片" align="center" prop="media"> <el-table-column label="路产图片" align="center" prop="media">
<template slot-scope="scope"> <template slot-scope="scope">
<img style="height: 3rem" :src="scope.row.media[0].img" /> <el-image
style="height: 3rem"
:src="scope.row.media[0].img"
:preview-src-list="[scope.row.media[0].img]"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="巡检任务" align="center" prop="stakeEnd" /> <el-table-column label="巡检任务" align="center" prop="stakeEnd" />
@ -532,7 +536,7 @@ export default {
/* 点击新增事件 */ /* 点击新增事件 */
handleAdd() { handleAdd() {
this.addVisible = true; this.addVisible = true;
this.addTitle = "修改路产"; this.addTitle = "添加路产";
this.dialogItem = { this.dialogItem = {
title: "添加路产", title: "添加路产",
}; };
@ -608,14 +612,14 @@ export default {
/* 关闭新增/编辑弹窗 */ /* 关闭新增/编辑弹窗 */
addCancel() { addCancel() {
this.addVisible = false; this.addVisible = false;
this.dialogItem = {}; this.dialogItem = { title: "添加路产" };
this.addTitle = ""; this.addTitle = "";
this.getRoadList(); this.getRoadList();
}, },
/* 关闭查看弹窗 */ /* 关闭查看弹窗 */
viewCancel() { viewCancel() {
this.viewVisible = false; this.viewVisible = false;
this.dialogItem = {}; this.dialogItem = { title: "添加路产" };
}, },
}, },
}; };

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:36:09 * @Date: 2024-10-14 10:36:09
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-14 11:10:42 * @LastEditTime: 2024-10-25 14:25:31
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\task-view.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\components\task-view.vue
* @Description: 巡检任务-查看路径 * @Description: 巡检任务-查看路径
--> -->
@ -16,7 +16,9 @@
@feature-dblclick="mapDbclick" @feature-dblclick="mapDbclick"
></fssm-map> ></fssm-map>
</div> </div>
<div class="footer"></div> <div class="footer">
<el-slider v-model="timeTip" :show-tooltip="false"></el-slider>
</div>
</div> </div>
</template> </template>
@ -33,7 +35,10 @@ export default {
}, },
}, },
data() { data() {
return {}; return {
//
timeTip: 26,
};
}, },
mounted() {}, mounted() {},
methods: { methods: {

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 09:48:43 * @Date: 2024-10-14 09:48:43
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-14 10:54:23 * @LastEditTime: 2024-10-25 13:59:25
* @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\index.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\task-management\index.vue
* @Description: 巡检管理-巡检任务 * @Description: 巡检管理-巡检任务
--> -->
@ -17,31 +17,24 @@
:inline="true" :inline="true"
label-width="100px" label-width="100px"
> >
<el-form-item label="任务id" prop="id"> <el-form-item label="任务id" prop="taskId">
<el-autocomplete <el-autocomplete
v-model="queryParams.id" v-model="queryParams.taskId"
:fetch-suggestions="querySearchAsync" :fetch-suggestions="querySearchAsync"
placeholder="请输入任务id" placeholder="请输入任务id"
@select="handleSelect" @select="handleSelect"
></el-autocomplete> ></el-autocomplete>
</el-form-item> </el-form-item>
<el-form-item label="车牌号码" prop="carName"> <el-form-item label="车牌号码" prop="plateNo">
<el-select <el-input
v-model="queryParams.carName" v-model="queryParams.plateNo"
placeholder="请选择车牌号码" placeholder="请输入车牌号码"
clearable clearable=""
> ></el-input>
<el-option
v-for="item in carNameList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="巡检路段" prop="segmentName"> <el-form-item label="巡检路段" prop="segmentId">
<el-select <el-select
v-model="queryParams.segmentName" v-model="queryParams.segmentId"
placeholder="请选择巡检路段" placeholder="请选择巡检路段"
clearable clearable
> >
@ -87,7 +80,7 @@
> >
<el-table-column type="selection" width="55" align="center" /> <el-table-column type="selection" width="55" align="center" />
<el-table-column label="巡检路段" align="center" prop="segmentName" /> <el-table-column label="巡检路段" align="center" prop="segmentName" />
<el-table-column label="巡检路段编码" align="center" prop="segmentId"> <el-table-column label="巡检路段编码" align="center" prop="segmentCode">
</el-table-column> </el-table-column>
<el-table-column label="巡检开始时间" align="center" prop="startTime"> <el-table-column label="巡检开始时间" align="center" prop="startTime">
<template slot-scope="scope"> <template slot-scope="scope">
@ -100,10 +93,9 @@
</el-table-column> </el-table-column>
<el-table-column label="巡检起点" align="center" prop="stakeStart" /> <el-table-column label="巡检起点" align="center" prop="stakeStart" />
<el-table-column label="巡检终点" align="center" prop="stakeEnd" /> <el-table-column label="巡检终点" align="center" prop="stakeEnd" />
<el-table-column label="车牌号码" align="center" prop="media"> <el-table-column label="车牌号码" align="center" prop="plateNo">
</el-table-column> </el-table-column>
<el-table-column label="任务id" align="center" prop="id" /> <el-table-column label="任务id" align="center" prop="extId" />
<el-table-column <el-table-column
label="操作" label="操作"
align="center" align="center"
@ -151,7 +143,12 @@
<script> <script>
import TaskView from "./components/task-view.vue"; import TaskView from "./components/task-view.vue";
import { getTaskTable, getSegment, getRoadType } from "@/api/xj/task"; import {
getTaskTable,
getSegment,
getRoadType,
getTaskIdList,
} from "@/api/xj/task";
export default { export default {
components: { TaskView }, components: { TaskView },
@ -160,11 +157,11 @@ export default {
// //
queryParams: { queryParams: {
// id // id
id: "", taskId: "",
// //
carName: "", plateNo: "",
// //
segmentName: "", segmentId: "",
}, },
// //
dateTime: [], dateTime: [],
@ -172,8 +169,6 @@ export default {
searchForm: {}, searchForm: {},
// //
segmentList: [], segmentList: [],
//
carNameList: [],
// //
roadType: [], roadType: [],
// //
@ -206,7 +201,20 @@ export default {
}, },
methods: { methods: {
/* 任务id远程搜索 结果 */ /* 任务id远程搜索 结果 */
querySearchAsync(item, cb) {}, querySearchAsync(item, cb) {
getTaskIdList({ name: item }).then(({ data, code }) => {
if (code === 200) {
let list = [];
data.map((item) => {
list.push({
value: item.label,
id: item.value,
});
});
cb(list);
}
});
},
/* 任务id选择事件 */ /* 任务id选择事件 */
handleSelect() {}, handleSelect() {},
/* 获取巡检路段下拉数据 */ /* 获取巡检路段下拉数据 */
@ -227,44 +235,17 @@ export default {
}, },
/* 点击搜索事件 */ /* 点击搜索事件 */
handleQuery() { handleQuery() {
const phonereg = /^K\d{4}\+\d{3}$/;
if (this.queryParams.stakeStart) {
if (phonereg.test(this.queryParams.stakeStart)) {
this.pagination.page = 1; this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.queryParams)); this.searchForm = JSON.parse(JSON.stringify(this.queryParams));
this.getTaskList(); this.getTaskList();
} else {
this.$modal.msgWarning("请按照格式填写公里桩进行修改");
}
} else if (this.queryParams.stakeEnd) {
if (phonereg.test(this.queryParams.stakeEnd)) {
this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.queryParams));
this.getTaskList();
} else {
this.$modal.msgWarning("请按照格式填写公里桩进行修改");
}
} else {
this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.queryParams));
this.getTaskList();
}
}, },
/* 点击重置事件 */ /* 点击重置事件 */
resetQuery() { resetQuery() {
this.searchForm = {}; this.searchForm = {};
this.queryParams = { this.queryParams = {
segmentName: "", taskId: "",
defectType: "", plateNo: "",
dataStatus: "", segmentId: "",
inspectDirection: "",
defectType3: "",
stakeStart: "",
stakeEnd: "",
state: "",
id: "",
}; };
this.dateTime = []; this.dateTime = [];
this.getTaskList(); this.getTaskList();
@ -286,7 +267,7 @@ export default {
}, },
/* 列表选择改变事件 */ /* 列表选择改变事件 */
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.checkIds = selection.map((item) => item.id); this.checkIds = selection.map((item) => item.taskId);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 16:52:24 * @Date: 2024-10-11 16:52:24
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-12 17:15:38 * @LastEditTime: 2024-10-25 11:57:40
* @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-add.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\road-management\components\road-add.vue
* @Description: 交安事件-新增/编辑弹窗 * @Description: 交安事件-新增/编辑弹窗
--> -->
@ -183,6 +183,7 @@
<script> <script>
import { addEvent, uploadEvent } from "@/api/xj/traffic"; import { addEvent, uploadEvent } from "@/api/xj/traffic";
import { getToken } from "@/utils/auth"; import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default { export default {
name: "EventAdd", name: "EventAdd",
@ -220,7 +221,7 @@ export default {
equipmentType: "", equipmentType: "",
stakeStart: "", stakeStart: "",
stakeEnd: "", stakeEnd: "",
equipmentId:"" equipmentId: "",
}, },
// //
states: [ states: [
@ -321,8 +322,14 @@ export default {
this.$nextTick(() => { this.$nextTick(() => {
const e = { const e = {
lnglat: { lnglat: {
lat: val.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: val.geometry.coordinates[0], val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
@ -377,7 +384,11 @@ export default {
}), }),
geometry: { geometry: {
type: "Point", type: "Point",
coordinates: [this.markers[0].lng, this.markers[0].lat], coordinates: wgs84ToGcj02([
this.markers[0].lng,
this.markers[0].lat,
]),
id: this.roadForm?.geometry?.id,
}, },
}; };
if (this.roadForm.id) { if (this.roadForm.id) {

View File

@ -1,3 +1,12 @@
<!--
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-12 15:49:46
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-25 11:44:59
* @FilePath: \znxjxt-ui\src\views\xj\inspection\traffic-management\components\event-view.vue
* @Description: 交安事件-查看弹窗
-->
<template> <template>
<div class="view-content"> <div class="view-content">
<div> <div>
@ -10,7 +19,6 @@
<!-- <p>病害坐标{{ viewForm.geometry.coordinates }}</p> --> <!-- <p>病害坐标{{ viewForm.geometry.coordinates }}</p> -->
<p>事件类型{{ filterDefect(viewForm.defectType) }}</p> <p>事件类型{{ filterDefect(viewForm.defectType) }}</p>
</div> </div>
<!-- 右侧图片展示 --> <!-- 右侧图片展示 -->
<div style="width: 27rem; padding: 10px"> <div style="width: 27rem; padding: 10px">
<el-carousel class="view-carousel" height="15rem"> <el-carousel class="view-carousel" height="15rem">
@ -34,6 +42,7 @@
</template> </template>
<script> <script>
import { gcj02ToWgs84 } from "@/api/xj/map";
export default { export default {
name: "EventView", name: "EventView",
props: { props: {
@ -59,25 +68,46 @@ export default {
watch: { watch: {
dialogItem: { dialogItem: {
handler(val) { handler(val) {
console.log(val, "dddd");
if (val.title === "查看事件") {
this.viewForm = JSON.parse(JSON.stringify(val)); this.viewForm = JSON.parse(JSON.stringify(val));
this.$nextTick(() => { this.$nextTick(() => {
this.centerPoint = [
gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
];
this.initMap("viewMap");
const e = { const e = {
lnglat: { lnglat: {
lat: val.geometry.coordinates[1], lng: gcj02ToWgs84([
lng: val.geometry.coordinates[0], val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
}, },
}; };
this.onMapClick(e); this.onMapClick(e);
// //
this.map.removeEventListener("click", this.onMapClick); this.map.removeEventListener("click", this.onMapClick);
}); });
}
}, },
immediate: true, immediate: true,
deep: true, deep: true,
}, },
}, },
mounted() { mounted() {
this.initMap("viewMap"); // this.initMap("viewMap");
}, },
methods: { methods: {
/* 过滤列表事件类型 */ /* 过滤列表事件类型 */

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-12 14:52:23 * @Date: 2024-10-12 14:52:23
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-23 10:24:00 * @LastEditTime: 2024-10-25 13:02:28
* @FilePath: \znxjxt-ui\src\views\xj\inspection\traffic-management\index.vue * @FilePath: \znxjxt-ui\src\views\xj\inspection\traffic-management\index.vue
* @Description: 巡检管理-交安事件 * @Description: 巡检管理-交安事件
--> -->
@ -187,7 +187,7 @@
>导出 >导出
</el-button> </el-button>
</el-col> --> </el-col> -->
<el-col :span="1.5"> <!-- <el-col :span="1.5">
<el-button <el-button
type="success" type="success"
plain plain
@ -198,7 +198,7 @@
v-hasPermi="['system:defect:edit']" v-hasPermi="['system:defect:edit']"
>批量确认 >批量确认
</el-button> </el-button>
</el-col> </el-col> -->
</el-row> </el-row>
<!-- 列表 --> <!-- 列表 -->
<el-table <el-table
@ -225,30 +225,18 @@
<span>{{ filterState(scope.row.state) }}</span> <span>{{ filterState(scope.row.state) }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="校验状态" align="center" prop="dataStatus">
<template slot-scope="scope">
<span>{{
scope.row.dataStatus
? scope.row.dataStatus === 1
? "未校验"
: "已校验"
: ""
}}</span>
</template>
</el-table-column> -->
<el-table-column label="开始桩号" align="center" prop="stakeStart" /> <el-table-column label="开始桩号" align="center" prop="stakeStart" />
<el-table-column label="结束桩号" align="center" prop="stakeEnd" /> <el-table-column label="结束桩号" align="center" prop="stakeEnd" />
<el-table-column label="事件图片" align="center" prop="media"> <el-table-column label="事件图片" align="center" prop="media">
<template slot-scope="scope"> <template slot-scope="scope">
<img style="height: 3rem" :src="scope.row.media[0].img" /> <el-image
style="height: 3rem"
:src="scope.row.media[0].img"
:preview-src-list="[scope.row.media[0].img]"
/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="巡检任务" align="center" prop="stakeEnd" /> <el-table-column label="巡检任务" align="center" prop="stakeEnd" />
<!-- <el-table-column label="校验状态" align="center" prop="datastatus">
<template slot-scope="scope">
<span>{{ scope.row.datastatus === "1" ? "未校验" : "已校验" }}</span>
</template>
</el-table-column> -->
<el-table-column label="道路方向" align="center" prop="inspectDirection"> <el-table-column label="道路方向" align="center" prop="inspectDirection">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{
@ -545,7 +533,7 @@ export default {
/* 点击新增事件 */ /* 点击新增事件 */
handleAdd() { handleAdd() {
this.addVisible = true; this.addVisible = true;
this.addTitle = "修改事件"; this.addTitle = "添加事件";
this.dialogItem = { this.dialogItem = {
title: "添加事件", title: "添加事件",
}; };
@ -621,14 +609,14 @@ export default {
/* 关闭新增/编辑弹窗 */ /* 关闭新增/编辑弹窗 */
addCancel() { addCancel() {
this.addVisible = false; this.addVisible = false;
this.dialogItem = {}; this.dialogItem = { title: "添加事件" };
this.addTitle = ""; this.addTitle = "";
this.getRoadList(); this.getRoadList();
}, },
/* 关闭查看弹窗 */ /* 关闭查看弹窗 */
viewCancel() { viewCancel() {
this.viewVisible = false; this.viewVisible = false;
this.dialogItem = {}; this.dialogItem = { title: "添加事件" };
}, },
}, },
}; };

View File

@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com * @Author: SunTao 328867980@qq.com
* @Date: 2024-10-09 13:11:56 * @Date: 2024-10-09 13:11:56
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-22 16:38:50 * @LastEditTime: 2024-10-24 09:16:47
* @FilePath: \znxjxt-ui\src\views\xj\parameter\index.vue * @FilePath: \znxjxt-ui\src\views\xj\parameter\index.vue
* @Description: 系统工具-系统参数 * @Description: 系统工具-系统参数
--> -->
@ -141,7 +141,6 @@ export default {
/* 地图打点 */ /* 地图打点 */
drawPoint(value) { drawPoint(value) {
const features = []; const features = [];
const point = new Point(value); // const point = new Point(value); //
const feature = new Feature({ const feature = new Feature({
geometry: point, geometry: point,

View File

@ -155,7 +155,7 @@
clearable clearable
> >
<el-option <el-option
v-for="item in dict.type.bas_road_type" v-for="item in routeList"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
@ -207,6 +207,10 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
routeList: {
type: Array,
default: () => [],
},
}, },
data() { data() {
return { return {
@ -273,8 +277,6 @@ export default {
}, },
// //
deptOptions: [], deptOptions: [],
// 线
routeList: [],
// //
previousPoint: null, previousPoint: null,
// 线 // 线

View File

@ -144,6 +144,7 @@
> >
<section-add <section-add
:dialogItem="dialogItem" :dialogItem="dialogItem"
:routeList="routeList"
@addCancel="addCancel" @addCancel="addCancel"
></section-add> ></section-add>
</el-dialog> </el-dialog>
@ -151,7 +152,11 @@
</template> </template>
<script> <script>
import { getSectionList, deleteSection } from "@/api/xj/section"; import {
getSectionList,
deleteSection,
getSegmentList,
} from "@/api/xj/section";
import SectionAdd from "./components/section-add.vue"; import SectionAdd from "./components/section-add.vue";
export default { export default {
@ -187,13 +192,24 @@ export default {
addVisible: false, addVisible: false,
// //
dialogItem: {}, dialogItem: {},
// 线
routeList: [],
}; };
}, },
mounted() {}, mounted() {},
created() { created() {
this.getTableList(); this.getTableList();
this.getRoadList();
}, },
methods: { methods: {
/* 获取路线下拉数据 */
getRoadList() {
getSegmentList().then(({ code, data }) => {
if (code === 200) {
this.routeList = data;
}
});
},
/* 点击搜索事件 */ /* 点击搜索事件 */
handleQuery() { handleQuery() {
this.searchForm = JSON.parse(JSON.stringify(this.sectionForm)); this.searchForm = JSON.parse(JSON.stringify(this.sectionForm));