fix:修改病害类型下拉为级联

This commit is contained in:
SunTao 2024-11-25 14:27:01 +08:00
parent f27c2f7544
commit e9ab4f4e31
24 changed files with 719 additions and 375 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div id="app"> <div id="app">
<router-view/> <router-view />
<theme-picker/> <theme-picker />
</div> </div>
</template> </template>
<script src="https://api.tianditu.gov.cn/api?v=4.0&tk=c691040443c68cda625755c5c3e2acc3" type="text/javascript"> <script src="https://api.tianditu.gov.cn/api?v=4.0&tk=c691040443c68cda625755c5c3e2acc3" type="text/javascript">
@ -12,15 +12,19 @@ import ThemePicker from "@/components/ThemePicker";
export default { export default {
name: "App", name: "App",
components: {ThemePicker}, components: { ThemePicker },
metaInfo() { metaInfo() {
return { return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, title:
titleTemplate: title => { this.$store.state.settings.dynamicTitle &&
return title ? `${title} - ${process.env.VUE_APP_TITLE}` : process.env.VUE_APP_TITLE this.$store.state.settings.title,
} titleTemplate: (title) => {
} return title
} ? `${title} - ${process.env.VUE_APP_TITLE}`
: process.env.VUE_APP_TITLE;
},
};
},
}; };
</script> </script>
<style scoped> <style scoped>
@ -28,3 +32,13 @@ export default {
display: none; display: none;
} }
</style> </style>
<style lang="scss">
input[aria-hidden="true"] {
display: none !important;
}
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
</style>

View File

@ -11,7 +11,8 @@ import request from "@/utils/request";
// 查询列表病害类型 // 查询列表病害类型
export function getDefectList(params) { export function getDefectList(params) {
return request({ return request({
url: "/metadata/defectType", // url: "/metadata/defectType",
url: "/bigscreen/v2/getDefectTypesDrowDown",
method: "get", method: "get",
params, params,
}); });

View File

@ -71,7 +71,9 @@ export function getSegment() {
// 查询列表病害类型 // 查询列表病害类型
export function getDefectList(params) { export function getDefectList(params) {
return request({ return request({
url: "/metadata/defectType", // 病害类型下拉
// url: "/metadata/defectType",
url: "/bigscreen/v2/getDefectTypesDrowDown",
method: "get", method: "get",
params, params,
}); });

View File

@ -64,6 +64,14 @@ export function getRoadCondition(query) {
}); });
} }
// 获取路况评定常数统计数据
export function getRoadConditionLog(query) {
return request({
url: "/xj/home/getRoadConditionAssessmentLog",
method: "get",
params: query,
});
}
// 获取数据栏右上角选择数据接口 // 获取数据栏右上角选择数据接口
export function selectTypeList(query) { export function selectTypeList(query) {
@ -73,3 +81,12 @@ export function selectTypeList(query) {
params: query, params: query,
}); });
} }
// 获取病害类型分布与总数
export function getTotalList(query) {
return request({
url: "/xj/home/getTotal",
method: "get",
params: query,
});
}

View File

@ -1,18 +1,18 @@
import request from "@/utils/request"; import request from "@/utils/request";
// 查询作业范围列表 // 查询作业范围列表
export function getScopeList(query) { export function getScopeList(params) {
return request({ return request({
url: "/api/v2/segment/list", url: "/api/fence/list",
method: "post", method: "get",
data: query, params,
}); });
} }
// 删除作业范围 // 删除作业范围
export function deleteScope(query) { export function deleteScope(query) {
return request({ return request({
url: "/api/v2/segment/delete", url: "/api/fence/delete",
method: "delete", method: "delete",
data: query, data: query,
}); });
@ -21,7 +21,7 @@ export function deleteScope(query) {
// 新增作业范围 // 新增作业范围
export function addScope(query) { export function addScope(query) {
return request({ return request({
url: "/api/v2/segment/add", url: "/api/fence/add",
method: "post", method: "post",
data: query, data: query,
}); });
@ -30,7 +30,7 @@ export function addScope(query) {
// 修改作业范围 // 修改作业范围
export function updateScope(query) { export function updateScope(query) {
return request({ return request({
url: "/api/v2/segment/update", url: "/api/fence/update",
method: "put", method: "put",
data: query, data: query,
}); });

View File

@ -12,7 +12,7 @@ export function roadRankList(query) {
// 病害趋势柱状图接口 // 病害趋势柱状图接口
export function roadTrends(query) { export function roadTrends(query) {
return request({ return request({
url: "/bigscreen/getHistoryDefect", url: "/bigscreen/v2/getHistoryDefect",
method: "get", method: "get",
params: query, params: query,
}); });
@ -121,7 +121,7 @@ export function getVideoUrl(params) {
// 关闭设备的上传视频流 // 关闭设备的上传视频流
export function closeVideoUrl(params) { export function closeVideoUrl(params) {
return request({ return request({
url: "/bigscreen/v2/colseAiotVideo", url: "/bigscreen/v2/closeAiotVideo",
method: "get", method: "get",
params, params,
}); });

View File

@ -72,6 +72,15 @@ export function defeaseList(data) {
}); });
} }
// 获取病害筛选病害日志路线下拉数据
export function getDefectDropDown(params) {
return request({
url: "/xj/route/listDropDown",
method: "get",
params,
});
}
// 获取病害筛选弹窗路段下拉数据 // 获取病害筛选弹窗路段下拉数据
// export function getSegment(data) { // export function getSegment(data) {
// return request({ // return request({

View File

@ -17,15 +17,24 @@ export function getSegment() {
}); });
} }
// 病害类型下拉数据 // 病害类型级联下拉数据
export function getDefectList(params) { export function getDefectList(params) {
return request({ return request({
url: "/bigscreen/v2/getAllDefectType", // url: "/bigscreen/v2/getAllDefectType",
url: "/bigscreen/v2/getDefectTypesDrowDown",
method: "get", method: "get",
params, params,
}); });
} }
// 获取病害类型下拉数据
export function getDefectSelectList(params) {
return request({
url: "/bigscreen/v2/getAllDefectType",
method: "get",
params,
});
}
// 获取病害详细数据接口 // 获取病害详细数据接口
export function getCompareList(params) { export function getCompareList(params) {

View File

@ -18,11 +18,28 @@
label-position="left" label-position="left"
label-width="5rem" label-width="5rem"
> >
<el-form-item class="form-item" label="道路名称" prop="segmentId"> <el-form-item class="form-item" label="路线名称" prop="routeId">
<el-select
v-model="trafficForm.routeId"
:popper-append-to-body="false"
placeholder="请选择路线"
filterable
clearable
@change="chengeLine"
>
<el-option
v-for="item in lineList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item class="form-item" label="路段名称" prop="segmentId">
<el-select <el-select
v-model="trafficForm.segmentId" v-model="trafficForm.segmentId"
:popper-append-to-body="false" :popper-append-to-body="false"
placeholder="请选择道路名称" placeholder="请选择路段"
filterable filterable
clearable clearable
> >
@ -163,7 +180,7 @@
<script> <script>
import { emergencyData, DefectType } from "@/api/xj/screen/traffic-screen"; import { emergencyData, DefectType } from "@/api/xj/screen/traffic-screen";
import { getSegment } from "@/api/xj/screen/index"; import { getSegment, getDefectDropDown } from "@/api/xj/screen/index";
export default { export default {
name: "TrafficLog", name: "TrafficLog",
props: { props: {
@ -177,7 +194,9 @@ export default {
return { return {
// //
trafficForm: { trafficForm: {
// // 线
routeId: "",
//
segmentId: "", segmentId: "",
// //
stakeStart: "", stakeStart: "",
@ -191,7 +210,9 @@ export default {
dataTime: [], dataTime: [],
// //
searchForm: {}, searchForm: {},
// // 线
lineList: [],
//
segmentList: [], segmentList: [],
// //
eventType: [], eventType: [],
@ -222,20 +243,54 @@ export default {
}, },
created() { created() {
this.getData(); this.getData();
this.getSegmentList(); this.getLineList();
this.getAllDefectType(); this.getAllDefectType();
}, },
methods: { methods: {
/* 获取路段下拉数据 */ /**
getSegmentList() { * @description: 获取路线下拉数据
getSegment().then(({ code, data }) => { * @param {*}
* @return {*}
*/
getLineList() {
getDefectDropDown().then(({ code, data }) => {
if (code === 200) {
this.lineList = data;
}
});
},
/**
* @description: 路线名称下拉框改变事件
* @param {*}
* @return {*}
*/
chengeLine(val) {
if (val) {
this.getSegmentList(val);
} else {
this.segmentList = [];
}
},
/**
* @description: 获取路段下拉数据
* @param {*}
* @return {*}
*/
getSegmentList(val) {
getSegment({ routeId: val }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.segmentList = data; this.segmentList = data;
} }
}); });
}, },
/* 获取病害类型下拉数据 */ /**
* @description: 获取病害类型下拉数据
* @param {*}
* @return {*}
*/
getAllDefectType() { getAllDefectType() {
DefectType({ classType: this.bottomTipClick }).then(({ code, data }) => { DefectType({ classType: this.bottomTipClick }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
@ -244,13 +299,22 @@ export default {
}); });
}, },
/* 点击搜索事件 */ /**
* @description: 点击搜索事件
* @param {*}
* @return {*}
*/
handleQuery() { handleQuery() {
const phonereg = /^K\d{4}\+\d{3}$/; const phonereg = /^K\d{4}\+\d{3}$/;
if (this.trafficForm.stakeStart) { if (this.trafficForm.stakeStart) {
if (phonereg.test(this.trafficForm.stakeStart)) { if (phonereg.test(this.trafficForm.stakeStart)) {
this.pagination.page = 1; this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.trafficForm)); const data = {
...this.trafficForm,
startTime: this.dateTime ? this.dateTime[0] : "",
endTime: this.dateTime ? this.dateTime[1] : "",
};
this.searchForm = JSON.parse(JSON.stringify(data));
this.getData(); this.getData();
} else { } else {
this.$modal.msgWarning("请按照格式填写公里桩进行修改"); this.$modal.msgWarning("请按照格式填写公里桩进行修改");
@ -258,23 +322,39 @@ export default {
} else if (this.trafficForm.stakeEnd) { } else if (this.trafficForm.stakeEnd) {
if (phonereg.test(this.trafficForm.stakeEnd)) { if (phonereg.test(this.trafficForm.stakeEnd)) {
this.pagination.page = 1; this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.trafficForm)); const data = {
...this.trafficForm,
startTime: this.dateTime ? this.dateTime[0] : "",
endTime: this.dateTime ? this.dateTime[1] : "",
};
this.searchForm = JSON.parse(JSON.stringify(data));
this.getData(); this.getData();
} else { } else {
this.$modal.msgWarning("请按照格式填写公里桩进行修改"); this.$modal.msgWarning("请按照格式填写公里桩进行修改");
} }
} else { } else {
this.pagination.page = 1; this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.trafficForm)); const data = {
...this.trafficForm,
startTime: this.dateTime ? this.dateTime[0] : "",
endTime: this.dateTime ? this.dateTime[1] : "",
};
this.searchForm = JSON.parse(JSON.stringify(data));
this.getData(); this.getData();
} }
}, },
/* 点击重置事件 */ /**
* @description: 点击重置事件
* @param {*}
* @return {*}
*/
resetQuery() { resetQuery() {
this.searchForm = {}; this.searchForm = {};
this.trafficForm = { this.trafficForm = {
// // 线
routeId: "",
//
segmentId: "", segmentId: "",
// //
stakeStart: "", stakeStart: "",
@ -284,10 +364,15 @@ export default {
// //
state: "", state: "",
}; };
this.dataTime = [];
this.getData(); this.getData();
}, },
/* 获取事件列表数据 */ /**
* @description: 获取事件列表数据
* @param {*}
* @return {*}
*/
getData() { getData() {
const data = { const data = {
classType: this.bottomTipClick, classType: this.bottomTipClick,
@ -302,7 +387,11 @@ export default {
}); });
}, },
/* 点击表格详情事件 */ /**
* @description: 点击表格详情事件
* @param {*} item
* @return {*}
*/
detailDefect(item) { detailDefect(item) {
this.$emit("imagePoint", { this.$emit("imagePoint", {
snapshotId: item.snapshotId, snapshotId: item.snapshotId,
@ -311,7 +400,11 @@ export default {
}); });
}, },
/* 页码修改事件 */ /**
* @description: 页码修改事件
* @param {*} age
* @return {*}
*/
handleCurrentChange(age) { handleCurrentChange(age) {
this.pagination.page = age; this.pagination.page = age;
this.getData(); this.getData();
@ -327,7 +420,7 @@ export default {
.traffic-form { .traffic-form {
width: calc(100% - 0.5rem); width: calc(100% - 0.5rem);
height: 16rem; height: 19rem;
padding: 0.5rem; padding: 0.5rem;
.form-item { .form-item {
@ -445,7 +538,7 @@ export default {
::v-deep .traffic-table { ::v-deep .traffic-table {
width: 100%; width: 100%;
height: 57%; height: 50%;
padding: 0.5rem 0; padding: 0.5rem 0;
overflow: hidden; overflow: hidden;

View File

@ -1711,14 +1711,6 @@ export default {
} }
} }
input[aria-hidden="true"] {
display: none !important;
}
.el-radio:focus:not(.is-focus):not(:active):not(.is-disabled) .el-radio__inner {
box-shadow: none;
}
// //
.screen-message-popover { .screen-message-popover {
background-color: rgba(0, 0, 0, 0.8); background-color: rgba(0, 0, 0, 0.8);

View File

@ -42,19 +42,13 @@ export default {
return item.date; return item.date;
}); });
const yData1 = this.echartList.map((item) => { const yData1 = this.echartList.map((item) => {
return item.A1000; return item.hulan;
}); });
// const yData2 = this.echartList.map((item) => { const yData2 = this.echartList.map((item) => {
// return item.A2001; return item.kengcao;
// });
// const yData3 = this.echartList.map((item) => {
// return item.A2000;
// });
const yData4 = this.echartList.map((item) => {
return item.A0;
}); });
const yData5 = this.echartList.map((item) => { const yData3 = this.echartList.map((item) => {
return item.A1; return item.sanluowu;
}); });
const chart = echarts.init(this.$refs.trendsChart); const chart = echarts.init(this.$refs.trendsChart);
chart.setOption({ chart.setOption({
@ -139,7 +133,7 @@ export default {
}, },
series: [ series: [
{ {
name: "坑槽", name: "护栏缺损",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -167,66 +161,8 @@ export default {
}, },
data: yData1, data: yData1,
}, },
// {
// name: "()",
// type: "line",
// smooth: true,
// areaStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: "#08B4A6",
// },
// {
// offset: 1,
// color: "rgba(8,180,166,0)",
// },
// ]),
// },
// lineStyle: {
// width: 1,
// color: "#08B4A6",
// },
// //
// showSymbol: false,
// symbol: "circle", // circle, diamond, pin
// symbolSize: 10, //
// itemStyle: {
// color: "#08B4A6",
// },
// data: yData2,
// },
// {
// name: "()",
// type: "line",
// smooth: true,
// areaStyle: {
// color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
// {
// offset: 0,
// color: "#146fd7",
// },
// {
// offset: 1,
// color: "rgba(20, 111, 215,0)",
// },
// ]),
// },
// lineStyle: {
// width: 1,
// color: "#146fd7",
// },
// //
// showSymbol: false,
// symbol: "circle", // circle, diamond, pin
// symbolSize: 10, //
// itemStyle: {
// color: "#146fd7",
// },
// data: yData3,
// },
{ {
name: "横向裂缝", name: "坑槽",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -252,10 +188,10 @@ export default {
itemStyle: { itemStyle: {
color: "#08B4A6", color: "#08B4A6",
}, },
data: yData4, data: yData2,
}, },
{ {
name: "纵向裂缝", name: "散落物",
type: "line", type: "line",
smooth: true, smooth: true,
areaStyle: { areaStyle: {
@ -281,7 +217,7 @@ export default {
itemStyle: { itemStyle: {
color: "#994EFF", color: "#994EFF",
}, },
data: yData5, data: yData3,
}, },
], ],
dataZoom: [ dataZoom: [

View File

@ -30,7 +30,7 @@
slot="append" slot="append"
icon="el-icon-search" icon="el-icon-search"
clearable clearable
@click="getTableData" @click="getTableDataByCar"
></el-button ></el-button
></template> ></template>
</el-input> </el-input>
@ -193,7 +193,11 @@ export default {
this.getTableData(); this.getTableData();
}, },
methods: { methods: {
/* 获取表格数据 */ /**
* @description: 获取表格数据
* @param {*} val
* @return {*}
*/
getTableData() { getTableData() {
this.timer = setInterval(() => { this.timer = setInterval(() => {
getCarList({ no: this.tableInput }).then(({ code, data }) => { getCarList({ no: this.tableInput }).then(({ code, data }) => {
@ -206,38 +210,58 @@ export default {
}); });
}, 5000); }, 5000);
getCarList({ no: this.tableInput }).then(({ code, data }) => { getCarList({ no: this.tableInput }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.carNum = data.total; this.carNum = data.total;
this.tableTotal = data.total; this.tableTotal = data.total;
this.onlineNum = data.online; this.onlineNum = data.online;
this.inspectionTableData = data.rows; this.inspectionTableData = data.rows;
} }
}); });
}, },
/* 表格详情事件 */ /**
* @description: 根据车牌号获取表格数据
* @param {*}
* @return {*}
*/
getTableDataByCar() {
clearInterval(this.timer);
this.getTableData();
},
/**
* @description: 表格详情事件
* @param {*} val
* @return {*}
*/
detailDefect(val) {}, detailDefect(val) {},
/* 表格跟车事件 */ /**
* @description: 表格跟车事件
* @param {*} val
* @return {*}
*/
followCar(val) { followCar(val) {
this.followTitle = "跟车详情"; this.followTitle = "跟车详情";
this.showCarVisible = true; this.showCarVisible = true;
}, },
/* 表格视频事件 */ /**
* @description: 表格视频事件
* @param {*} val
* @return {*}
*/
videoDelete(val) { videoDelete(val) {
this.dialogItem = val; this.dialogItem = val;
this.viewTitle = "视频查看"; this.viewTitle = "视频查看";
this.showViewVisible = true; this.showViewVisible = true;
}, },
/* 页码修改事件 */ /**
// handleCurrentChange(arg) { * @description: 关闭跟车弹窗事件
// this.pagination.page = arg; * @param {*}
// this.getTableData(); * @return {*}
// }, */
/* 关闭跟车弹窗事件 */
followCancel() { followCancel() {
this.followTitle = ""; this.followTitle = "";
this.showCarVisible = false; this.showCarVisible = false;
@ -245,7 +269,11 @@ export default {
closeWebsocket(); closeWebsocket();
}, },
/* 关闭视频弹窗事件 */ /**
* @description: 关闭视频弹窗事件
* @param {*}
* @return {*}
*/
viewCancel() { viewCancel() {
this.viewTitle = ""; this.viewTitle = "";
this.showViewVisible = false; this.showViewVisible = false;

View File

@ -14,11 +14,17 @@
<div class="left"> <div class="left">
<div> <div>
<div class="name">病害识别总数</div> <div class="name">病害识别总数</div>
<div class="value"><span>57875</span></div> <div class="value">
<span>{{ total }}</span
>
</div>
</div> </div>
<div> <div>
<div class="name">新增病害数</div> <div class="name">新增病害数</div>
<div class="value"><span>57875</span></div> <div class="value">
<span>{{ newTotal }}</span
>
</div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -53,7 +59,7 @@
import FssmScroll from "@/components/scroll/fssm-scroll.vue"; import FssmScroll from "@/components/scroll/fssm-scroll.vue";
import * as echarts from "echarts"; import * as echarts from "echarts";
// //
import { getDefectLog } from "@/api/xj/index/index"; import { getDefectLog, getTotalList } from "@/api/xj/index/index";
export default { export default {
name: "DiseaseIndex", name: "DiseaseIndex",
components: { components: {
@ -65,6 +71,10 @@ export default {
diseaseType: "", diseaseType: "",
// //
diseaseOptions: [], diseaseOptions: [],
//
total: 0,
//
newTotal: 0,
// //
statisticsData: [], statisticsData: [],
// //
@ -79,6 +89,21 @@ export default {
"#62CFFF", "#62CFFF",
"#6A9BFF", "#6A9BFF",
"#B38EFF", "#B38EFF",
"#3678FF",
"#F8A74E",
"#04DAD7",
"#00D669",
"#8448FF",
"#F6D566",
"#00B1FF",
"#62CFFF",
"#6A9BFF",
"#B38EFF",
"#3678FF",
"#F8A74E",
"#04DAD7",
"#00D669",
"#8448FF",
], ],
// //
distributionList: [], distributionList: [],
@ -86,53 +111,57 @@ export default {
}, },
created() { created() {
this.getChartData(); this.getChartData();
this.getBottomData();
}, },
methods: { methods: {
/* 获取echart图数据 */ /**
* @description: 获取上部分echart图数据
* @param {*} val
* @return {*}
*/
getChartData() { getChartData() {
getDefectLog().then(({ code, data }) => { getDefectLog().then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.statisticsData = data; this.statisticsData = data;
this.$nextTick(() => { this.$nextTick(() => {
this.drawStatisticsChart(); this.drawStatisticsChart();
// this.drawDistributionChart();
});
}
});
},
/**
* @description: 获取底部echart图数据
* @param {*}
* @return {*}
*/
getBottomData() {
getTotalList().then(({ code, data }) => {
if (code === 200) {
this.total = data.total;
this.newTotal = data.today;
let all = 0;
this.distributionList = data.data.map((item) => {
all += item.value;
return {
value: item.value,
name: item.label,
rate: `${((item.value / data.total) * 100).toFixed(0)}%`,
};
});
this.$nextTick(() => {
this.drawDistributionChart(); this.drawDistributionChart();
}); });
} }
}); });
this.distributionList = [
{
value: 15461,
name: "纵向裂缝",
rate: "10%",
},
{
value: 1,
name: "块状裂缝",
rate: "10%",
},
{
value: 6546,
name: "龟裂",
rate: "10%",
},
{
value: 2718,
name: "坑槽",
rate: "10%",
},
{
value: 1704,
name: "车辙",
rate: "10%",
},
{
value: 1,
name: "沉陷",
rate: "10%",
},
];
}, },
/* 绘制新增病害统计echart图 */
/**
* @description: 绘制新增病害统计echart图
* @param {*}
* @return {*}
*/
drawStatisticsChart() { drawStatisticsChart() {
if (this.$refs.statisticsChart) { if (this.$refs.statisticsChart) {
const xData = this.statisticsData.map((item) => { const xData = this.statisticsData.map((item) => {
@ -265,7 +294,12 @@ export default {
}); });
} }
}, },
/* 绘制病害类型分布图 */
/**
* @description: 绘制病害类型分布图
* @param {*}
* @return {*}
*/
drawDistributionChart() { drawDistributionChart() {
if (this.$refs.distributionChart) { if (this.$refs.distributionChart) {
const chart = echarts.init(this.$refs.distributionChart); const chart = echarts.init(this.$refs.distributionChart);
@ -445,7 +479,7 @@ export default {
.distribution-legnd { .distribution-legnd {
width: 70%; width: 70%;
height: 100%; height: 100%;
padding: 2.6rem 2rem 2rem 2rem; padding: 2.5rem 0;
.scroll-box { .scroll-box {
display: flex; display: flex;

View File

@ -87,6 +87,9 @@ export default {
return item.label; return item.label;
}); });
const y1Data = this.roadChartData.map((item) => { const y1Data = this.roadChartData.map((item) => {
return item.total;
});
const y2Data = this.roadChartData.map((item) => {
return item.value; return item.value;
}); });
const chart = echarts.init(this.$refs.roadChart); const chart = echarts.init(this.$refs.roadChart);
@ -174,7 +177,7 @@ export default {
borderRadius: [3, 3, 0, 0], borderRadius: [3, 3, 0, 0],
color: "#38C8D8", color: "#38C8D8",
}, },
data: [20, 30, 35, 45, 55, 65, 75, 85, 95], data: y2Data,
}, },
], ],
dataZoom: [ dataZoom: [

View File

@ -33,7 +33,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="bridgePerKm" label="桥隧病害数(个/km)"> <el-table-column prop="bridgePerKm" label="桥隧病害数(个/km)">
</el-table-column> </el-table-column>
<el-table-column prop="greenPerKm" label="绿化病害数(个/km)"> <el-table-column prop="greenPerKm" label="绿化问题数(个/km)">
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
@ -44,7 +44,11 @@
<script> <script>
import * as echarts from "echarts"; import * as echarts from "echarts";
// //
import { getRoadCondition, selectTypeList } from "@/api/xj/index/index"; import {
getRoadCondition,
getRoadConditionLog,
selectTypeList,
} from "@/api/xj/index/index";
export default { export default {
name: "TrafficIndex", name: "TrafficIndex",
data() { data() {
@ -55,14 +59,21 @@ export default {
itemSelect: "", itemSelect: "",
// //
trafficTableData: [], trafficTableData: [],
// echart
trafficEchartData: [],
}; };
}, },
created() { created() {
this.getTableData(); this.getTableData();
this.getSelect(); this.getSelect();
this.getLogData();
}, },
methods: { methods: {
/* 获取数据栏右上角选项数据 */ /**
* @description: 获取数据栏右上角选项数据
* @param {*}
* @return {*}
*/
getSelect() { getSelect() {
selectTypeList().then(({ code, data }) => { selectTypeList().then(({ code, data }) => {
if (code === 200) { if (code === 200) {
@ -71,16 +82,24 @@ export default {
}); });
}, },
/* 右上角单选改变事件 */ /**
changeRadio(){ * @description: 右上角单选改变事件
this.getTableData() * @param {*}
* @return {*}
*/
changeRadio() {
this.getTableData();
this.getLogData();
}, },
/* 获取表格数据 */ /**
* @description: 获取表格数据
* @param {*}
* @return {*}
*/
getTableData() { getTableData() {
getRoadCondition({ type: this.itemSelect }).then(({ code, data }) => { getRoadCondition({ type: this.itemSelect }).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
console.log(data, "ggg");
this.trafficTableData = data; this.trafficTableData = data;
this.$nextTick(() => { this.$nextTick(() => {
this.drawTrafficChart(); this.drawTrafficChart();
@ -88,19 +107,48 @@ export default {
} }
}); });
}, },
/* 绘制柱状图 */
/**
* @description: 获取echart数据
* @param {*}
* @return {*}
*/
getLogData() {
getRoadConditionLog({ type: this.itemSelect }).then(({ code, data }) => {
if (code === 200) {
this.trafficEchartData = data;
this.$nextTick(() => {
this.drawTrafficChart();
});
}
});
},
/**
* @description: 绘制柱状图
* @param {*}
* @return {*}
*/
drawTrafficChart() { drawTrafficChart() {
if (this.$refs.trafficChart) { if (this.$refs.trafficChart) {
const xData = this.trafficEchartData.map((item) => {
return item.name;
});
const y1Data = this.trafficEchartData.map((item) => {
return item.road;
});
const y2Data = this.trafficEchartData.map((item) => {
return item.event;
});
const y3Data = this.trafficEchartData.map((item) => {
return item.bridge;
});
const y4Data = this.trafficEchartData.map((item) => {
return item.green;
});
const chart = echarts.init(this.$refs.trafficChart); const chart = echarts.init(this.$refs.trafficChart);
chart.setOption({ chart.setOption({
color: ["#388BD8", "#04DAD7"], color: ["#388BD8", "#04DAD7", "#F8A74E", "#8448FF"],
dataZoom: [
{
type: "inside",
start: 0,
end: 100,
},
],
title: [ title: [
// //
{ {
@ -128,18 +176,7 @@ export default {
}, },
xAxis: [ xAxis: [
{ {
data: [ data: xData,
"1月",
"2月",
"3月",
"4月",
"5月",
"6月",
"7月",
"8月",
"9月",
"10月",
],
type: "category", type: "category",
axisTick: { axisTick: {
show: false, //X show: false, //X
@ -175,7 +212,7 @@ export default {
], ],
series: [ series: [
{ {
name: "病害修补", name: "路面病害数",
type: "line", type: "line",
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
@ -191,10 +228,10 @@ export default {
}, },
]), ]),
}, },
data: [400, 600, 1400, 1700, 400, 600, 400, 600, 1400, 1700], data: y1Data,
}, },
{ {
name: "病害数", name: "交安病害数",
type: "line", type: "line",
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
@ -210,7 +247,90 @@ export default {
}, },
]), ]),
}, },
data: [40, 500, 1500, 700, 40, 500, 40, 500, 1500, 700], data: y3Data,
},
{
name: "桥隧病害数",
type: "line",
showSymbol: false,
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#F8A74E",
},
{
offset: 1,
color: "#ffffff",
},
]),
},
data: y4Data,
},
{
name: "绿化问题数",
type: "line",
showSymbol: false,
smooth: true,
areaStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
{
offset: 0,
color: "#8448FF",
},
{
offset: 1,
color: "#ffffff",
},
]),
},
data: y2Data,
},
],
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

@ -47,19 +47,16 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label-width="3rem" label="类型"> <el-form-item label-width="3rem" label="类型">
<el-select <el-cascader
v-model="imgForm.defectType" v-model="imgForm.defectType"
placeholder="请选择路段名称" :options="tableDefect"
:style="{ width: '8rem' }" :props="{
checkStrictly: false,
emitPath: false,
children: 'subTypes',
}"
clearable clearable
> ></el-cascader>
<el-option
v-for="item in defectTypeList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="公里桩"> <el-form-item label="公里桩">
<el-input <el-input
@ -159,10 +156,14 @@ import {
mergeDefect, mergeDefect,
listDefect, listDefect,
} from "@/api/xj/confirmation"; } from "@/api/xj/confirmation";
import { getItemTypes } from "@/api/xj/screen/index";
export default { export default {
name: "ImageDialog", name: "ImageDialog",
props: {}, props: {
tableDefect: {
type: Array,
default: () => [],
},
},
data() { data() {
return { return {
// //
@ -179,8 +180,6 @@ export default {
}, },
// //
roadTypeList: [], roadTypeList: [],
//
defectTypeList: [],
// //
defectStatus: [], defectStatus: [],
// //
@ -211,7 +210,6 @@ export default {
}, },
created() { created() {
this.getSegmentList(); this.getSegmentList();
this.getDefectType();
this.getDefectStatusList(); this.getDefectStatusList();
}, },
mounted() { mounted() {
@ -230,15 +228,6 @@ export default {
}); });
}, },
/* 获取病害类型下拉数据 */
getDefectType() {
getItemTypes({ type: "defect" }).then(({ code, data }) => {
if (code === 200) {
this.defectTypeList = data;
}
});
},
/* 查询病害状态下拉数据 */ /* 查询病害状态下拉数据 */
getDefectStatusList() { getDefectStatusList() {
getDefectStatus().then(({ data, code }) => { getDefectStatus().then(({ data, code }) => {
@ -261,15 +250,13 @@ export default {
/* 获取左侧图片列表 */ /* 获取左侧图片列表 */
getList() { getList() {
console.log(11);
this.loading = true; this.loading = true;
const data = { const data = {
...this.imgForm, ...this.imgForm,
...this.params, ...this.params,
}; };
listDefect(data) listDefect(data)
.then(({ code,rows }) => { .then(({ code, rows }) => {
if (code === 200) { if (code === 200) {
this.defectData = rows; this.defectData = rows;
this.loading = false; this.loading = false;
@ -414,7 +401,7 @@ export default {
// + // +
const sidebar = this.$refs.sidebar; const sidebar = this.$refs.sidebar;
if ( if (
sidebar.scrollTop + sidebar.clientHeight >= sidebar.scrollHeight - 18 && sidebar.scrollTop + sidebar.clientHeight >= sidebar.scrollHeight - 15 &&
!this.loading !this.loading
) { ) {
this.loadMoreImages(); this.loadMoreImages();
@ -449,6 +436,7 @@ export default {
/* 键盘事件 */ /* 键盘事件 */
handleKeydown(event) { handleKeydown(event) {
if (event.key === "ArrowUp") { if (event.key === "ArrowUp") {
event.preventDefault();
if (this.currentIndex > 0) { if (this.currentIndex > 0) {
this.currentIndex--; this.currentIndex--;
this.selectedThumbnail = 0; // Reset when changing main images via keyboard this.selectedThumbnail = 0; // Reset when changing main images via keyboard
@ -456,6 +444,7 @@ export default {
this.updateRects(); this.updateRects();
} }
} else if (event.key === "ArrowDown") { } else if (event.key === "ArrowDown") {
event.preventDefault();
if (this.currentIndex <= this.defectData.length - 1) { if (this.currentIndex <= this.defectData.length - 1) {
this.currentIndex === this.defectData.length - 1 this.currentIndex === this.defectData.length - 1
? this.currentIndex ? this.currentIndex

View File

@ -42,19 +42,17 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="病害类型" prop="defectType"> <el-form-item label="病害类型" prop="paramsDefectType">
<el-select <el-cascader
v-model="queryParams.defectType" v-model="paramsDefectType"
placeholder="请选择病害类型" :options="tableDefect"
:props="{
checkStrictly: true,
emitPath: true,
children: 'subTypes',
}"
clearable clearable
> ></el-cascader>
<el-option
v-for="item in tableDefect"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="病害状态" prop="state"> <el-form-item label="病害状态" prop="state">
<el-select <el-select
@ -224,10 +222,7 @@
<span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span> <span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="病害类型" align="center" prop="defectType"> <el-table-column label="病害类型" align="center" prop="defectTypeName">
<template slot-scope="scope">
<span>{{ filterDefect(scope.row.defectType) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="病害状态" align="center" prop="state"> <el-table-column label="病害状态" align="center" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
@ -315,7 +310,10 @@
destroy-on-close destroy-on-close
@close="checkCancel" @close="checkCancel"
> >
<image-dialog></image-dialog> <image-dialog
v-if="showCheckImg"
:tableDefect="tableDefect"
></image-dialog>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
@ -337,6 +335,7 @@ export default {
// //
queryParams: { queryParams: {
segmentName: "", segmentName: "",
classType: "",
defectType: "", defectType: "",
state: "", state: "",
inspectDirection: "", inspectDirection: "",
@ -352,6 +351,8 @@ export default {
}, },
// //
searchForm: {}, searchForm: {},
//
paramsDefectType: [],
// //
dateTime: [], dateTime: [],
// //
@ -420,17 +421,6 @@ export default {
}); });
}, },
/* 过滤列表病害类型 */
filterDefect(value) {
let a = null;
[a] = this.tableDefect.filter((item) => {
return item.value === value;
});
if (a) {
return a.label;
}
},
/* 过滤列表病害状态 */ /* 过滤列表病害状态 */
filterState(value) { filterState(value) {
let a = null; let a = null;
@ -469,6 +459,14 @@ export default {
const phonereg = /^K\d{4}\+\d{3}$/; const phonereg = /^K\d{4}\+\d{3}$/;
if (this.queryParams.stakeStart) { if (this.queryParams.stakeStart) {
if (phonereg.test(this.queryParams.stakeStart)) { if (phonereg.test(this.queryParams.stakeStart)) {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
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.getTableList(); this.getTableList();
@ -477,6 +475,14 @@ export default {
} }
} else if (this.queryParams.stakeEnd) { } else if (this.queryParams.stakeEnd) {
if (phonereg.test(this.queryParams.stakeEnd)) { if (phonereg.test(this.queryParams.stakeEnd)) {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
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.getTableList(); this.getTableList();
@ -484,6 +490,14 @@ export default {
this.$modal.msgWarning("请按照格式填写公里桩进行修改"); this.$modal.msgWarning("请按照格式填写公里桩进行修改");
} }
} else { } else {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
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.getTableList(); this.getTableList();
@ -507,6 +521,7 @@ export default {
id: "", id: "",
snapshotId: "", snapshotId: "",
}; };
this.paramsDefectType = [];
this.searchForm = {}; this.searchForm = {};
this.dateTime = []; this.dateTime = [];
this.getTableList(); this.getTableList();

View File

@ -50,18 +50,16 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="病害类型" prop="defectType"> <el-form-item label="病害类型" prop="defectType">
<el-select <el-cascader
v-model="mergeForm.defectType" v-model="paramsDefectType"
placeholder="请选择病害类型" :options="tableDefect"
:props="{
checkStrictly: true,
emitPath: true,
children: 'subTypes',
}"
clearable clearable
> ></el-cascader>
<el-option
v-for="item in tableDefect"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -145,10 +143,7 @@
<span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span> <span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="病害类型" align="center" prop="defectType"> <el-table-column label="病害类型" align="center" prop="defectTypeName">
<template slot-scope="scope">
<span>{{ filterDefect(scope.row.defectType) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="病害状态" align="center" prop="state"> <el-table-column label="病害状态" align="center" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
@ -263,6 +258,7 @@ export default {
// //
segmentName: "", segmentName: "",
// //
classType: "",
defectType: "", defectType: "",
// //
stakeStart: "", stakeStart: "",
@ -274,6 +270,8 @@ export default {
}, },
// //
searchForm: {}, searchForm: {},
//
paramsDefectType: [],
// //
dateTime: [], dateTime: [],
// //
@ -327,7 +325,16 @@ export default {
/* 搜索事件 */ /* 搜索事件 */
handleQuery() { handleQuery() {
this.searchForm = JSON.parse(JSON.stringify(this.mergeForm)); const data = {
...this.mergeForm,
classType: this.paramsDefectType ? this.paramsDefectType[0] : "",
defectType: this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "",
};
this.searchForm = JSON.parse(JSON.stringify(data));
this.getList(); this.getList();
}, },
@ -339,6 +346,8 @@ export default {
segmentName: "", segmentName: "",
// //
defectType: "", defectType: "",
classType: "",
type: "",
// //
stakeStart: "", stakeStart: "",
stakeEnd: "", stakeEnd: "",

View File

@ -42,19 +42,17 @@
clearable clearable
/> />
</el-form-item> </el-form-item>
<el-form-item label="病害类型" prop="defectType"> <el-form-item label="病害类型" prop="paramsDefectType">
<el-select <el-cascader
v-model="queryParams.defectType" v-model="paramsDefectType"
placeholder="请选择病害类型" :options="tableDefect"
:props="{
checkStrictly: true,
emitPath: true,
children: 'subTypes',
}"
clearable clearable
> ></el-cascader>
<el-option
v-for="item in tableDefect"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="病害状态" prop="state"> <el-form-item label="病害状态" prop="state">
<el-select <el-select
@ -259,10 +257,7 @@
<span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span> <span>{{ new Date(scope.row.createdTime).toLocaleString() }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="病害类型" align="center" prop="defectType"> <el-table-column label="病害类型" align="center" prop="defectTypeName">
<template slot-scope="scope">
<span>{{ filterDefect(scope.row.defectType) }}</span>
</template>
</el-table-column> </el-table-column>
<el-table-column label="病害状态" align="center" prop="state"> <el-table-column label="病害状态" align="center" prop="state">
<template slot-scope="scope"> <template slot-scope="scope">
@ -395,18 +390,16 @@
</el-col> </el-col>
<el-col :span="12" v-if="dialogTitle === '添加缺陷'"> <el-col :span="12" v-if="dialogTitle === '添加缺陷'">
<el-form-item label="病害类型" prop="defectType"> <el-form-item label="病害类型" prop="defectType">
<el-select <el-cascader
v-model="form.defectType" v-model="form.defectType"
placeholder="请选择病害类型" :options="tableDefect"
:props="{
checkStrictly: false,
emitPath: false,
children: 'subTypes',
}"
clearable clearable
> ></el-cascader>
<el-option
v-for="item in tableDefect"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -580,7 +573,7 @@
</p> </p>
<p>路段名称{{ viewForm.segmentName }}</p> <p>路段名称{{ viewForm.segmentName }}</p>
<!-- <p>病害坐标{{ viewForm.geometry.coordinates }}</p> --> <!-- <p>病害坐标{{ viewForm.geometry.coordinates }}</p> -->
<p>病害类型{{ filterDefect(viewForm.defectType) }}</p> <p>病害类型{{ viewForm.defectTypeName }}</p>
<p>病害长度{{ viewForm.targetLen }} </p> <p>病害长度{{ viewForm.targetLen }} </p>
<p>病害id{{ viewForm.id }}</p> <p>病害id{{ viewForm.id }}</p>
<p>快照id{{ viewForm.snapshotId }}</p> <p>快照id{{ viewForm.snapshotId }}</p>
@ -720,6 +713,7 @@ export default {
size: 10, size: 10,
segmentName: "", segmentName: "",
defectType: "", defectType: "",
classType: "",
taskId: "", taskId: "",
state: "", state: "",
inspectDirection: "", inspectDirection: "",
@ -733,7 +727,10 @@ export default {
id: "", id: "",
snapshotId: "", snapshotId: "",
}, },
//
dateTime: [], dateTime: [],
//
paramsDefectType: [],
// / // /
form: { form: {
id: null, id: null,
@ -875,21 +872,6 @@ export default {
}); });
}, },
/**
* @description: 过滤列表病害类型
* @param {*} value
* @return {*}
*/
filterDefect(value) {
let a = null;
[a] = this.tableDefect.filter((item) => {
return item.value === value;
});
if (a) {
return a.label;
}
},
/** /**
* @description: 过滤列表病害状态 * @description: 过滤列表病害状态
* @param {*} value * @param {*} value
@ -1017,7 +999,8 @@ export default {
page: 1, page: 1,
size: 10, size: 10,
segmentName: "", segmentName: "",
defectType: [], defectType: "",
classType: "",
taskId: "", taskId: "",
state: "", state: "",
inspectDirection: "", inspectDirection: "",
@ -1031,6 +1014,7 @@ export default {
id: "", id: "",
snapshotId: "", snapshotId: "",
}; };
this.paramsDefectType = [];
this.dateTime = []; this.dateTime = [];
this.getList(); this.getList();
}, },
@ -1044,6 +1028,14 @@ export default {
const phonereg = /^K\d{4}\+\d{3}$/; const phonereg = /^K\d{4}\+\d{3}$/;
if (this.queryParams.stakeStart) { if (this.queryParams.stakeStart) {
if (phonereg.test(this.queryParams.stakeStart)) { if (phonereg.test(this.queryParams.stakeStart)) {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
} else { } else {
@ -1051,12 +1043,28 @@ export default {
} }
} else if (this.queryParams.stakeEnd) { } else if (this.queryParams.stakeEnd) {
if (phonereg.test(this.queryParams.stakeEnd)) { if (phonereg.test(this.queryParams.stakeEnd)) {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
} else { } else {
this.$modal.msgWarning("请按照格式填写公里桩进行修改"); this.$modal.msgWarning("请按照格式填写公里桩进行修改");
} }
} else { } else {
this.queryParams.classType = this.paramsDefectType
? this.paramsDefectType[0]
: "";
this.queryParams.defectType = this.paramsDefectType
? this.paramsDefectType.length > 1
? this.paramsDefectType[1]
: ""
: "";
this.queryParams.page = 1; this.queryParams.page = 1;
this.getList(); this.getList();
} }
@ -1410,6 +1418,7 @@ export default {
changeView(val) { changeView(val) {
getDetailsBySnapShotId(val).then(({ code, data }) => { getDetailsBySnapShotId(val).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.viewForm = data;
console.log(data, "查看弹窗选择改变触发事件"); console.log(data, "查看弹窗选择改变触发事件");
} }
}); });

View File

@ -98,7 +98,7 @@ export default {
image: new Icon({ image: new Icon({
crossOrigin: "anonymous", crossOrigin: "anonymous",
src: require(`@/assets/screen/index/${ src: require(`@/assets/screen/index/${
this.mapLogeList[element.defectType] this.mapLogeList[element.iconType]
}.png`), }.png`),
// size: [40, 40], // size: [40, 40],
scale: 0.5, // scale: 0.5, //
@ -186,6 +186,7 @@ export default {
}, },
// //
axisLabel: { axisLabel: {
interval: 0,
show: true, show: true,
color: "#616367", color: "#616367",
}, },

View File

@ -41,19 +41,18 @@
> >
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item label="病害类型"> <el-form-item label="病害类型"
<el-select
v-model="surfaceForm.defectType"
placeholder="请选择病害类型"
clearable
> >
<el-option <el-cascader
v-for="item in defectTypeList" v-model="surfaceForm.defectType"
:key="item.value" :options="defectTypeList"
:label="item.label" :props="{
:value="item.value" checkStrictly: false,
/> emitPath: false,
</el-select> children: 'subTypes',
}"
clearable
></el-cascader>
</el-form-item> </el-form-item>
<el-form-item label=""> <el-form-item label="">
<el-button <el-button
@ -133,7 +132,12 @@
</template> </template>
<script> <script>
import { getSegment, getDefectList, getCompareList } from "@/api/xj/surface"; import {
getSegment,
getDefectList,
getDefectSelectList,
getCompareList,
} from "@/api/xj/surface";
import SurfaceMap from "./components/surface-map.vue"; import SurfaceMap from "./components/surface-map.vue";
export default { export default {
name: "Surface", name: "Surface",
@ -181,6 +185,7 @@ export default {
created() { created() {
this.getSegmentList(); this.getSegmentList();
this.getDefectTypeList(); this.getDefectTypeList();
this.getDefectTypeSelect();
}, },
mounted() {}, mounted() {},
methods: { methods: {
@ -193,11 +198,19 @@ export default {
}); });
}, },
/* 获取病害类型下拉数据 */ /* 获取病害类型级联下拉数据 */
getDefectTypeList() { getDefectTypeList() {
getDefectList().then(({ code, data }) => { getDefectList().then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.defectTypeList = data; this.defectTypeList = data;
}
});
},
/* 获取病害类型下拉数据 */
getDefectTypeSelect() {
getDefectSelectList().then(({ code, data }) => {
if (code === 200) {
data.forEach((item) => { data.forEach((item) => {
this.mapLogeList[item.value] = item.label; this.mapLogeList[item.value] = item.label;
}); });
@ -252,10 +265,7 @@ export default {
this.dialogImgLeft = item.data; this.dialogImgLeft = item.data;
if (Object.keys(this.surfaceListRight).length > 0) { if (Object.keys(this.surfaceListRight).length > 0) {
const rightImg = this.surfaceListRight.data.filter((it) => { const rightImg = this.surfaceListRight.data.filter((it) => {
if (it.snapshotId === item.data.snapshotId) { return it.snapshotId === item.data.snapshotId && it;
return it;
}
return [];
}); });
this.dialogImgRight = rightImg[0]; this.dialogImgRight = rightImg[0];
} }
@ -267,10 +277,7 @@ export default {
this.dialogImgRight = item.data; this.dialogImgRight = item.data;
if (Object.keys(this.surfaceListLeft).length > 0) { if (Object.keys(this.surfaceListLeft).length > 0) {
const leftImg = this.surfaceListLeft.data.filter((it) => { const leftImg = this.surfaceListLeft.data.filter((it) => {
if (it.snapshotId === item.data.snapshotId) { return it.snapshotId === item.data.snapshotId && it;
return it;
}
return [];
}); });
this.dialogImgLeft = leftImg[0]; this.dialogImgLeft = leftImg[0];
} }

View File

@ -203,6 +203,7 @@ export default {
getScopeList(params).then(({ code, data }) => { getScopeList(params).then(({ code, data }) => {
if (code === 200) { if (code === 200) {
this.sectionList = data.rows; this.sectionList = data.rows;
this.tableTotal = data.total;
} }
}); });
}, },

View File

@ -4,7 +4,7 @@
* @LastEditors: SunTao 328867980@qq.com * @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-10-17 11:24:08 * @LastEditTime: 2024-10-17 11:24:08
* @FilePath: \znxjxt-ui\src\views\xj\route\route-terminal\components\terminal-add.vue * @FilePath: \znxjxt-ui\src\views\xj\route\route-terminal\components\terminal-add.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 路线管理-终端管理新增弹窗
--> -->
<template> <template>
<div class="add-content"> <div class="add-content">
@ -36,8 +36,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="24"> <el-row :gutter="24">
<el-col :span="12"> <!-- <el-col :span="12">
<el-form-item label="作业范围" prop="areas"> <el-form-item label="作业范围" >
<el-select <el-select
v-model="dialogForm.areas" v-model="dialogForm.areas"
placeholder="请选择作业范围" placeholder="请选择作业范围"
@ -52,8 +52,8 @@
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="12"> <el-col :span="24">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input <el-input
type="textarea" type="textarea"
@ -66,7 +66,7 @@
</el-row> </el-row>
</el-form> </el-form>
</div> </div>
<div class="bottom-map"> <!-- <div class="bottom-map">
<fssm-map <fssm-map
@endEoordinate="geteoordinate" @endEoordinate="geteoordinate"
:editCoordinates="editCoordinates" :editCoordinates="editCoordinates"
@ -74,7 +74,7 @@
:showZoom="false" :showZoom="false"
:showDraw="false" :showDraw="false"
></fssm-map> ></fssm-map>
</div> </div> -->
<div class="dialog-footer"> <div class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>

View File

@ -120,6 +120,7 @@
@close="addCancel" @close="addCancel"
> >
<terminal-add <terminal-add
v-if="addVisible"
:dialogItem="dialogItem" :dialogItem="dialogItem"
@addCancel="addCancel" @addCancel="addCancel"
></terminal-add> ></terminal-add>
@ -171,12 +172,21 @@ export default {
this.getTableList(); this.getTableList();
}, },
methods: { methods: {
/* 点击搜索事件 */ /**
* @description: 点击搜索事件
* @param {*} val
* @return {*}
*/
handleQuery() { handleQuery() {
this.searchForm = JSON.parse(JSON.stringify(this.sectionForm)); this.searchForm = JSON.parse(JSON.stringify(this.sectionForm));
this.getTableList(); this.getTableList();
}, },
/* 点击重置事件 */
/**
* @description: 点击重置事件
* @param {*} val
* @return {*}
*/
resetQuery() { resetQuery() {
this.sectionForm = { this.sectionForm = {
// segmentCode: "", // segmentCode: "",
@ -185,7 +195,12 @@ export default {
this.searchForm = {}; this.searchForm = {};
this.getTableList(); this.getTableList();
}, },
/* 获取列表数据 */
/**
* @description: 获取列表数据
* @param {*} val
* @return {*}
*/
getTableList() { getTableList() {
const params = { const params = {
...this.searchForm, ...this.searchForm,
@ -197,7 +212,12 @@ export default {
} }
}); });
}, },
/* 点击新增 */
/**
* @description: 点击新增
* @param {*} val
* @return {*}
*/
handleAdd() { handleAdd() {
this.addTitle = "新增设备"; this.addTitle = "新增设备";
this.dialogItem = { this.dialogItem = {
@ -205,15 +225,30 @@ export default {
}; };
this.addVisible = true; this.addVisible = true;
}, },
/* 列表选择改变事件 */
/**
* @description: 列表选择改变事件
* @param {*} selection
* @return {*}
*/
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.checkIds = selection.map((item) => item.id); this.checkIds = selection.map((item) => item.id);
this.single = selection.length !== 1; this.single = selection.length !== 1;
this.multiple = !selection.length; this.multiple = !selection.length;
}, },
/* 列表查看事件 */
/**
* @description: 列表查看事件
* @param {*} val
* @return {*}
*/
viewTable() {}, viewTable() {},
/* 列表修改事件 */
/**
* @description: 列表修改事件
* @param {*} val
* @return {*}
*/
editTable() { editTable() {
this.addTitle = "修改设备"; this.addTitle = "修改设备";
this.dialogItem = { this.dialogItem = {
@ -221,7 +256,12 @@ export default {
}; };
this.addVisible = true; this.addVisible = true;
}, },
/* 列表删除/批量删除事件 */
/**
* @description: 列表删除/批量删除事件
* @param {*} row
* @return {*}
*/
deleteTable(row) { deleteTable(row) {
const checkIds = row ? [row.id] : this.checkIds; const checkIds = row ? [row.id] : this.checkIds;
if (!checkIds.length) { if (!checkIds.length) {
@ -240,17 +280,32 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}, },
/* 切换分页 */
/**
* @description: 切换分页
* @param {*} arg
* @return {*}
*/
handleCurrentChange(arg) { handleCurrentChange(arg) {
this.pagination.page = arg; this.pagination.page = arg;
this.getTableList(); this.getTableList();
}, },
/* 切换每条/页 */
/**
* @description: 切换每条/
* @param {*} arg
* @return {*}
*/
handleSizeChange(arg) { handleSizeChange(arg) {
this.pagination.size = arg; this.pagination.size = arg;
this.getTableList(); this.getTableList();
}, },
/* 关闭弹窗事件 */
/**
* @description: 关闭弹窗事件
* @param {*} val
* @return {*}
*/
addCancel() { addCancel() {
this.addTitle = ""; this.addTitle = "";
this.dialogItem = {}; this.dialogItem = {};