From f67945d53b20f6a45ae50b27d74c966eb1355bb4 Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期日, 16 十一月 2025 22:53:54 +0800
Subject: [PATCH] feat: 增加分段GPS计算行程距离
---
ruoyi-ui/src/views/system/vehicle/index.vue | 31 +++++++++++++++++--------------
1 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/ruoyi-ui/src/views/system/vehicle/index.vue b/ruoyi-ui/src/views/system/vehicle/index.vue
index e1fdf89..40e9ca5 100644
--- a/ruoyi-ui/src/views/system/vehicle/index.vue
+++ b/ruoyi-ui/src/views/system/vehicle/index.vue
@@ -14,7 +14,7 @@
<el-select v-model="queryParams.vehicleType" placeholder="璇烽�夋嫨杞﹁締绫诲瀷" clearable size="small">
<el-option
v-for="dict in dict.type.sys_vehicle_type"
- :key="dict.value"
+ :key="'vtype-' + dict.value"
:label="dict.label"
:value="dict.value"
/>
@@ -24,7 +24,7 @@
<el-select v-model="queryParams.status" placeholder="璇烽�夋嫨鐘舵��" clearable size="small">
<el-option
v-for="dict in dict.type.sys_normal_disable"
- :key="dict.value"
+ :key="'status-' + dict.value"
:label="dict.label"
:value="dict.value"
/>
@@ -34,7 +34,7 @@
<el-select v-model="queryParams.platformCode" placeholder="璇烽�夋嫨骞冲彴" clearable size="small">
<el-option
v-for="dict in dict.type.sys_platform"
- :key="dict.value"
+ :key="'platform-' + dict.value"
:label="dict.label"
:value="dict.value"
/>
@@ -174,7 +174,7 @@
<el-select v-model="form.vehicleType" placeholder="璇烽�夋嫨杞﹁締绫诲瀷" clearable style="width: 100%">
<el-option
v-for="dict in dict.type.sys_vehicle_type"
- :key="dict.value"
+ :key="'form-vtype-' + dict.value"
:label="dict.label"
:value="dict.value"
/>
@@ -190,7 +190,7 @@
<el-select v-model="form.platformCode" placeholder="璇烽�夋嫨骞冲彴" clearable>
<el-option
v-for="dict in dict.type.sys_platform"
- :key="dict.value"
+ :key="'form-platform-' + dict.value"
:label="dict.label"
:value="dict.value"
/>
@@ -200,7 +200,7 @@
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
- :key="dict.value"
+ :key="'form-status-' + dict.value"
:label="dict.value"
>{{dict.label}}</el-radio>
</el-radio-group>
@@ -315,9 +315,12 @@
/** 鑾峰彇閮ㄩ棬鍒楄〃锛堝彧鏄剧ず鍒嗗叕鍙革細parent_id=100锛� */
getDeptList() {
listDept({ parentId: 100 }).then(response => {
+
// 杩囨护鍑哄垎鍏徃锛坧arent_id=100鐨勯儴闂級
if (response.data) {
- this.deptList = response.data.filter(dept => dept.parentId === 100);
+
+ this.deptList = response.data.filter(dept => dept.parentId === "100");
+ // console.log("deptList: ",this.deptList,response.data.filter(dept => dept.parentId === "100"));
} else {
this.deptList = [];
}
@@ -372,13 +375,13 @@
const vehicleId = row.vehicleId || this.ids
getVehicle(vehicleId).then(response => {
this.form = response.data;
- // 濡傛灉娌℃湁deptIds锛屽垯浠� deptId 鍜� deptName 涓濉�
- if (!this.form.deptIds || this.form.deptIds.length === 0) {
- if (this.form.deptId) {
- this.form.deptIds = [this.form.deptId];
- } else {
- this.form.deptIds = [];
- }
+ // 纭繚deptIds鏄竴涓暟缁�
+ if (!this.form.deptIds) {
+ this.form.deptIds = [];
+ }
+ // 濡傛灉deptIds涓虹┖鏁扮粍锛屼絾deptId鏈夊�硷紝鍒欐坊鍔燿eptId鍒癲eptIds涓�
+ if (this.form.deptIds.length === 0 && this.form.deptId) {
+ this.form.deptIds = [this.form.deptId];
}
this.open = true;
this.title = "淇敼杞﹁締淇℃伅";
--
Gitblit v1.9.1