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

This commit is contained in:
2024-10-25 17:29:08 +08:00
parent e52a22edb7
commit 0bf0db3ff8
31 changed files with 1202 additions and 949 deletions
@@ -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
* @Date: 2024-10-08 10:58:25
* @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
* @Description: 巡检信息管理-病害管理
-->
@@ -40,7 +40,6 @@
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
@change="handleQuery"
/>
</el-form-item>
<el-form-item label="病害类型" prop="defectType">
@@ -178,7 +177,7 @@
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
@click="handleDelete('')"
v-hasPermi="['system:defect:remove']"
>删除
</el-button>
@@ -194,18 +193,18 @@
>导出
</el-button>
</el-col> -->
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit-outline"
size="mini"
:disabled="single"
:disabled="multiple"
@click="handleUpdateBatch"
v-hasPermi="['system:defect:edit']"
>批量确认
</el-button>
</el-col>
</el-col> -->
</el-row>
<!-- 数据表格 -->
@@ -248,7 +247,11 @@
<el-table-column label="结束桩号" align="center" prop="stakeEnd" />
<el-table-column label="病害图片" align="center" prop="media">
<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>
</el-table-column>
<el-table-column label="病害长度" align="center" prop="targetLen" />
@@ -354,7 +357,7 @@
</el-col>
</el-row>
<el-row :gutter="24">
<el-col :span="12">
<el-col :span="12" v-if="dialogTitle != '添加缺陷'">
<el-form-item label="校验状态" prop="dataStatus">
<el-select
v-model="form.dataStatus"
@@ -370,7 +373,7 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-col :span="dialogTitle === '添加缺陷' ? 24 : 12">
<el-form-item label="病害状态" prop="state">
<el-select
v-model="form.state"
@@ -537,6 +540,7 @@ import {
changeDefectStatus,
} from "@/api/xj/disease";
import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default {
name: "Defect",
@@ -597,8 +601,6 @@ export default {
inspectDirection: "",
media: [],
},
// 上传图片数组
fileList: [],
// 上传参数设置
upload: {
// 是否禁用上传
@@ -826,7 +828,9 @@ export default {
inspectDirection: "",
media: [],
};
this.$refs["addForm"].resetFields();
if (this.$refs.addForm) {
this.$refs["addForm"].resetFields();
}
// this.resetFormData();
},
/* 重置表单方法 */
@@ -894,21 +898,27 @@ export default {
handleUpdate(row) {
this.dialogVisible = true;
this.dialogTitle = "修改缺陷";
this.centerPoint = [
this.centerPoint = gcj02ToWgs84([
row.geometry.coordinates[0],
row.geometry.coordinates[1],
];
]);
this.$nextTick(() => {
this.initMap("addMap");
const e = {
lnglat: {
lat: row.geometry.coordinates[1],
lng: row.geometry.coordinates[0],
lng: gcj02ToWgs84([
row.geometry.coordinates[0],
row.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
row.geometry.coordinates[0],
row.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
});
this.form = row;
this.form = { ...row, dataStatus: row.dataStatus.toString() };
this.upload.fileList = row.media.map((item) => {
return {
...item,
@@ -940,9 +950,9 @@ export default {
},
/* 文件上传成功处理 */
handleFileSuccess(response, file, fileList) {
this.fileList = fileList.map((item) => {
this.upload.fileList = fileList.map((item) => {
if (item.response) {
return { img: item.response.url };
return { ...item, img: item.response.url };
}
return item;
});
@@ -958,16 +968,22 @@ export default {
return false;
}
// 验证文件上传列表
if (this.fileList.length < 1) {
if (this.upload.fileList.length < 1) {
this.$modal.msgWarning("请上传图片");
return false;
}
const data = {
...this.form,
media: this.fileList,
media: this.upload.fileList.map((item) => {
return { ...item, img: item.img };
}),
geometry: {
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) {
@@ -1053,11 +1069,27 @@ export default {
this.openViewDialog = true;
this.viewForm = defect;
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");
const e = {
lnglat: {
lat: defect.geometry.coordinates[1],
lng: defect.geometry.coordinates[0],
lng: gcj02ToWgs84([
defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
defect.geometry.coordinates[0],
defect.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
@@ -1095,6 +1127,7 @@ export default {
},
/* 关闭查看对话框 */
closeDialog() {
this.centerPoint = [123.30297096718999, 41.87942945541742];
this.openViewDialog = false;
},
},
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 16:52:24
* @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
* @Description: 路产管理-新增/编辑弹窗
-->
@@ -156,15 +156,10 @@
<script>
import { addRoad, uploadRoad } from "@/api/xj/road";
import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default {
name: "RoadAdd",
// props: [
// "dialogItem",
// "segmentList",
// "defectStatus",
// "roadType",
// ],
props: {
dialogItem: {
type: Object,
@@ -283,8 +278,14 @@ export default {
this.$nextTick(() => {
const e = {
lnglat: {
lat: val.geometry.coordinates[1],
lng: val.geometry.coordinates[0],
lng: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
@@ -339,7 +340,11 @@ export default {
}),
geometry: {
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) {
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-12 13:11:05
* @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
* @Description: 交安事件-查看弹窗
-->
@@ -43,6 +43,7 @@
</template>
<script>
import { gcj02ToWgs84 } from "@/api/xj/map";
export default {
name: "RoadView",
props: {
@@ -68,25 +69,44 @@ export default {
watch: {
dialogItem: {
handler(val) {
this.viewForm = JSON.parse(JSON.stringify(val));
this.$nextTick(() => {
const e = {
lnglat: {
lat: val.geometry.coordinates[1],
lng: val.geometry.coordinates[0],
},
};
this.onMapClick(e);
// 移除点击事件
this.map.removeEventListener("click", this.onMapClick);
});
if (val.title === "查看路产") {
this.viewForm = JSON.parse(JSON.stringify(val));
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 = {
lnglat: {
lng: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
// 移除点击事件
this.map.removeEventListener("click", this.onMapClick);
});
}
},
immediate: true,
deep: true,
},
},
mounted() {
this.initMap("viewMap");
// this.initMap("viewMap");
},
methods: {
/* 过滤列表路产类型 */
@@ -108,7 +128,6 @@ export default {
// if (this.map) {
// this.map.remove(); // 如果已经有地图实例,先移除再重新加载
// }
// 初始化天地图
this.map = new T.Map(ele);
this.map.centerAndZoom(
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 15:14:16
* @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
* @Description: 巡检信息-路产管理
-->
@@ -187,18 +187,18 @@
>导出
</el-button>
</el-col> -->
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit-outline"
size="mini"
:disabled="single"
:disabled="multiple"
@click="handleUpdateBatch"
v-hasPermi="['system:defect:edit']"
>批量确认
</el-button>
</el-col>
</el-col> -->
</el-row>
<!-- 列表 -->
<el-table
@@ -240,7 +240,11 @@
<el-table-column label="结束桩号" align="center" prop="stakeEnd" />
<el-table-column label="路产图片" align="center" prop="media">
<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>
</el-table-column>
<el-table-column label="巡检任务" align="center" prop="stakeEnd" />
@@ -532,7 +536,7 @@ export default {
/* 点击新增事件 */
handleAdd() {
this.addVisible = true;
this.addTitle = "修改路产";
this.addTitle = "添加路产";
this.dialogItem = {
title: "添加路产",
};
@@ -608,14 +612,14 @@ export default {
/* 关闭新增/编辑弹窗 */
addCancel() {
this.addVisible = false;
this.dialogItem = {};
this.dialogItem = { title: "添加路产" };
this.addTitle = "";
this.getRoadList();
},
/* 关闭查看弹窗 */
viewCancel() {
this.viewVisible = false;
this.dialogItem = {};
this.dialogItem = { title: "添加路产" };
},
},
};
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:36:09
* @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
* @Description: 巡检任务-查看路径
-->
@@ -16,7 +16,9 @@
@feature-dblclick="mapDbclick"
></fssm-map>
</div>
<div class="footer"></div>
<div class="footer">
<el-slider v-model="timeTip" :show-tooltip="false"></el-slider>
</div>
</div>
</template>
@@ -33,7 +35,10 @@ export default {
},
},
data() {
return {};
return {
// 进度条位置绑定值
timeTip: 26,
};
},
mounted() {},
methods: {
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 09:48:43
* @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
* @Description: 巡检管理-巡检任务
-->
@@ -17,31 +17,24 @@
:inline="true"
label-width="100px"
>
<el-form-item label="任务id" prop="id">
<el-form-item label="任务id" prop="taskId">
<el-autocomplete
v-model="queryParams.id"
v-model="queryParams.taskId"
:fetch-suggestions="querySearchAsync"
placeholder="请输入任务id"
@select="handleSelect"
></el-autocomplete>
</el-form-item>
<el-form-item label="车牌号码" prop="carName">
<el-select
v-model="queryParams.carName"
placeholder="请选择车牌号码"
clearable
>
<el-option
v-for="item in carNameList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
<el-form-item label="车牌号码" prop="plateNo">
<el-input
v-model="queryParams.plateNo"
placeholder="请输入车牌号码"
clearable=""
></el-input>
</el-form-item>
<el-form-item label="巡检路段" prop="segmentName">
<el-form-item label="巡检路段" prop="segmentId">
<el-select
v-model="queryParams.segmentName"
v-model="queryParams.segmentId"
placeholder="请选择巡检路段"
clearable
>
@@ -87,7 +80,7 @@
>
<el-table-column type="selection" width="55" align="center" />
<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 label="巡检开始时间" align="center" prop="startTime">
<template slot-scope="scope">
@@ -100,10 +93,9 @@
</el-table-column>
<el-table-column label="巡检起点" align="center" prop="stakeStart" />
<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 label="任务id" align="center" prop="id" />
<el-table-column label="任务id" align="center" prop="extId" />
<el-table-column
label="操作"
align="center"
@@ -151,7 +143,12 @@
<script>
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 {
components: { TaskView },
@@ -160,11 +157,11 @@ export default {
// 查询表单
queryParams: {
// 任务id
id: "",
taskId: "",
// 车牌号码
carName: "",
plateNo: "",
// 巡检路段
segmentName: "",
segmentId: "",
},
// 巡检时间
dateTime: [],
@@ -172,8 +169,6 @@ export default {
searchForm: {},
// 巡检路段下拉
segmentList: [],
// 车牌号码下拉
carNameList: [],
// 路产类型下拉
roadType: [],
// 列表数据绑定
@@ -206,7 +201,20 @@ export default {
},
methods: {
/* 任务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选择事件 */
handleSelect() {},
/* 获取巡检路段下拉数据 */
@@ -227,44 +235,17 @@ export default {
},
/* 点击搜索事件 */
handleQuery() {
const phonereg = /^K\d{4}\+\d{3}$/;
if (this.queryParams.stakeStart) {
if (phonereg.test(this.queryParams.stakeStart)) {
this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.queryParams));
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();
}
this.pagination.page = 1;
this.searchForm = JSON.parse(JSON.stringify(this.queryParams));
this.getTaskList();
},
/* 点击重置事件 */
resetQuery() {
this.searchForm = {};
this.queryParams = {
segmentName: "",
defectType: "",
dataStatus: "",
inspectDirection: "",
defectType3: "",
stakeStart: "",
stakeEnd: "",
state: "",
id: "",
taskId: "",
plateNo: "",
segmentId: "",
};
this.dateTime = [];
this.getTaskList();
@@ -286,7 +267,7 @@ export default {
},
/* 列表选择改变事件 */
handleSelectionChange(selection) {
this.checkIds = selection.map((item) => item.id);
this.checkIds = selection.map((item) => item.taskId);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-11 16:52:24
* @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
* @Description: 交安事件-新增/编辑弹窗
-->
@@ -183,6 +183,7 @@
<script>
import { addEvent, uploadEvent } from "@/api/xj/traffic";
import { getToken } from "@/utils/auth";
import { gcj02ToWgs84, wgs84ToGcj02 } from "@/api/xj/map";
export default {
name: "EventAdd",
@@ -220,7 +221,7 @@ export default {
equipmentType: "",
stakeStart: "",
stakeEnd: "",
equipmentId:""
equipmentId: "",
},
// 校验状态下拉数据
states: [
@@ -321,8 +322,14 @@ export default {
this.$nextTick(() => {
const e = {
lnglat: {
lat: val.geometry.coordinates[1],
lng: val.geometry.coordinates[0],
lng: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
@@ -377,7 +384,11 @@ export default {
}),
geometry: {
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) {
@@ -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>
<div class="view-content">
<div>
@@ -10,7 +19,6 @@
<!-- <p>病害坐标{{ viewForm.geometry.coordinates }}</p> -->
<p>事件类型{{ filterDefect(viewForm.defectType) }}</p>
</div>
<!-- 右侧图片展示 -->
<div style="width: 27rem; padding: 10px">
<el-carousel class="view-carousel" height="15rem">
@@ -34,6 +42,7 @@
</template>
<script>
import { gcj02ToWgs84 } from "@/api/xj/map";
export default {
name: "EventView",
props: {
@@ -59,25 +68,46 @@ export default {
watch: {
dialogItem: {
handler(val) {
this.viewForm = JSON.parse(JSON.stringify(val));
this.$nextTick(() => {
const e = {
lnglat: {
lat: val.geometry.coordinates[1],
lng: val.geometry.coordinates[0],
},
};
this.onMapClick(e);
// 移除点击事件
this.map.removeEventListener("click", this.onMapClick);
});
console.log(val, "dddd");
if (val.title === "查看事件") {
this.viewForm = JSON.parse(JSON.stringify(val));
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 = {
lnglat: {
lng: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[0],
lat: gcj02ToWgs84([
val.geometry.coordinates[0],
val.geometry.coordinates[1],
])[1],
},
};
this.onMapClick(e);
// 移除点击事件
this.map.removeEventListener("click", this.onMapClick);
});
}
},
immediate: true,
deep: true,
},
},
mounted() {
this.initMap("viewMap");
// this.initMap("viewMap");
},
methods: {
/* 过滤列表事件类型 */
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-12 14:52:23
* @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
* @Description: 巡检管理-交安事件
-->
@@ -187,7 +187,7 @@
>导出
</el-button>
</el-col> -->
<el-col :span="1.5">
<!-- <el-col :span="1.5">
<el-button
type="success"
plain
@@ -198,7 +198,7 @@
v-hasPermi="['system:defect:edit']"
>批量确认
</el-button>
</el-col>
</el-col> -->
</el-row>
<!-- 列表 -->
<el-table
@@ -225,30 +225,18 @@
<span>{{ filterState(scope.row.state) }}</span>
</template>
</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="stakeEnd" />
<el-table-column label="事件图片" align="center" prop="media">
<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>
</el-table-column>
<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">
<template slot-scope="scope">
<span>{{
@@ -545,7 +533,7 @@ export default {
/* 点击新增事件 */
handleAdd() {
this.addVisible = true;
this.addTitle = "修改事件";
this.addTitle = "添加事件";
this.dialogItem = {
title: "添加事件",
};
@@ -621,14 +609,14 @@ export default {
/* 关闭新增/编辑弹窗 */
addCancel() {
this.addVisible = false;
this.dialogItem = {};
this.dialogItem = { title: "添加事件" };
this.addTitle = "";
this.getRoadList();
},
/* 关闭查看弹窗 */
viewCancel() {
this.viewVisible = false;
this.dialogItem = {};
this.dialogItem = { title: "添加事件" };
},
},
};
+1 -2
View File
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-09 13:11:56
* @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
* @Description: 系统工具-系统参数
-->
@@ -141,7 +141,6 @@ export default {
/* 地图打点 */
drawPoint(value) {
const features = [];
const point = new Point(value); // 修改坐标格式
const feature = new Feature({
geometry: point,
@@ -155,7 +155,7 @@
clearable
>
<el-option
v-for="item in dict.type.bas_road_type"
v-for="item in routeList"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -207,6 +207,10 @@ export default {
type: Object,
default: () => {},
},
routeList: {
type: Array,
default: () => [],
},
},
data() {
return {
@@ -273,8 +277,6 @@ export default {
},
// 养护单位下拉数据
deptOptions: [],
// 路线下拉
routeList: [],
// 上一点位
previousPoint: null,
// 保存所有添加的连线
+17 -1
View File
@@ -144,6 +144,7 @@
>
<section-add
:dialogItem="dialogItem"
:routeList="routeList"
@addCancel="addCancel"
></section-add>
</el-dialog>
@@ -151,7 +152,11 @@
</template>
<script>
import { getSectionList, deleteSection } from "@/api/xj/section";
import {
getSectionList,
deleteSection,
getSegmentList,
} from "@/api/xj/section";
import SectionAdd from "./components/section-add.vue";
export default {
@@ -187,13 +192,24 @@ export default {
addVisible: false,
// 传弹窗数据
dialogItem: {},
// 路线下拉数据
routeList: [],
};
},
mounted() {},
created() {
this.getTableList();
this.getRoadList();
},
methods: {
/* 获取路线下拉数据 */
getRoadList() {
getSegmentList().then(({ code, data }) => {
if (code === 200) {
this.routeList = data;
}
});
},
/* 点击搜索事件 */
handleQuery() {
this.searchForm = JSON.parse(JSON.stringify(this.sectionForm));