Compare commits
No commits in common. "c75308b390b9e86921b033c73591eb97f9ddcd76" and "74be13b5346f9605a7d833fa3e287929d799080f" have entirely different histories.
c75308b390
...
74be13b534
|
@ -6,7 +6,7 @@ ENV = 'development'
|
||||||
|
|
||||||
# 共享电动车管理系统/开发环境
|
# 共享电动车管理系统/开发环境
|
||||||
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
# VUE_APP_BASE_API = 'https://dche.ccttiot.com/prod-api'
|
||||||
VUE_APP_BASE_API = 'http://192.168.2.189:8080'
|
VUE_APP_BASE_API = 'http://localhost:8080'
|
||||||
|
|
||||||
# 路由懒加载
|
# 路由懒加载
|
||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||||
|
|
14
src/App.vue
14
src/App.vue
|
@ -25,18 +25,4 @@ export default {
|
||||||
#app .theme-picker {
|
#app .theme-picker {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
|
||||||
<style lang="scss" >
|
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
|
@ -54,14 +54,6 @@ export function updateArea(data) {
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
// 修改导览
|
|
||||||
export function putguide(data) {
|
|
||||||
return request({
|
|
||||||
url: '/system/area/guide',
|
|
||||||
method: 'put',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
// 修改运营区
|
// 修改运营区
|
||||||
export function updateArea2(data) {
|
export function updateArea2(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -100,39 +100,6 @@ export default {
|
||||||
trajectory() {
|
trajectory() {
|
||||||
this.line = JSON.parse(this.tripRouteStr)
|
this.line = JSON.parse(this.tripRouteStr)
|
||||||
console.log("this.line================"+this.line)
|
console.log("this.line================"+this.line)
|
||||||
let abb;
|
|
||||||
try {
|
|
||||||
abb = JSON.parse(this.tripRouteStr);
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Error parsing tripRouteStr:", error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
let latitude = parseFloat(abb[0][1]);
|
|
||||||
let longitude = parseFloat(abb[0][0]);
|
|
||||||
let latitude1 = parseFloat(abb[abb.length - 1][1]);
|
|
||||||
let longitude1 = parseFloat( abb[abb.length - 1][0]);
|
|
||||||
|
|
||||||
this.marker = new AMap.Marker({
|
|
||||||
map: this.map,
|
|
||||||
position: [longitude, latitude],
|
|
||||||
icon: new AMap.Icon({
|
|
||||||
size: new AMap.Size(25, 38), // 图标大小
|
|
||||||
image: "https://lxnapi.ccttiot.com/bike/img/static/u06paUGiHLvL08Pw7BGr",
|
|
||||||
imageSize: new AMap.Size(25, 38) // 图标图片大小
|
|
||||||
}),
|
|
||||||
offset: new AMap.Pixel(-12.5, -19.5),
|
|
||||||
});
|
|
||||||
this.marker = new AMap.Marker({
|
|
||||||
map: this.map,
|
|
||||||
position: [longitude1, latitude1],
|
|
||||||
icon: new AMap.Icon({
|
|
||||||
size: new AMap.Size(25, 38), // 图标大小
|
|
||||||
image: "https://lxnapi.ccttiot.com/bike/img/static/uwpAj9vYtPRmhtTOtflx",
|
|
||||||
imageSize: new AMap.Size(25, 38) // 图标图片大小
|
|
||||||
}),
|
|
||||||
offset: new AMap.Pixel(-12.5, -19.5),
|
|
||||||
});
|
|
||||||
// console.log(latitude,longitude,'longitudelongitudelongitude');
|
|
||||||
let line = this.line;
|
let line = this.line;
|
||||||
this.marker = new AMap.Marker({
|
this.marker = new AMap.Marker({
|
||||||
map: this.map,
|
map: this.map,
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="input-card-right">
|
<div class="input-card-right">
|
||||||
<div class="img">
|
<div class="img">
|
||||||
<image-upload :limit="1" :isShowTip="false" v-model="picture" />
|
<image-upload v-model="picture" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<el-button :style="topRightCoord ? buttonStyleActive : buttonStyleInactive" @click="setClickType('topRight')">
|
<el-button :style="topRightCoord ? buttonStyleActive : buttonStyleInactive" @click="setClickType('topRight')">
|
||||||
|
@ -16,10 +16,6 @@
|
||||||
<el-button @click="generateMap" :disabled="!canGenerateMap">
|
<el-button @click="generateMap" :disabled="!canGenerateMap">
|
||||||
生成导览地图
|
生成导览地图
|
||||||
</el-button>
|
</el-button>
|
||||||
|
|
||||||
<el-button @click="saveMap" :disabled="!canSaveMap">
|
|
||||||
保存
|
|
||||||
</el-button>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amap-container" class="map-container"></div>
|
<div id="amap-container" class="map-container"></div>
|
||||||
|
@ -29,16 +25,15 @@
|
||||||
<div v-if="bottomLeftCoord">左下角: {{ bottomLeftCoord }}</div>
|
<div v-if="bottomLeftCoord">左下角: {{ bottomLeftCoord }}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AMapLoader from "@amap/amap-jsapi-loader";
|
import AMapLoader from "@amap/amap-jsapi-loader";
|
||||||
import globalConfig from '@/utils/config/globalConfig';
|
import globalConfig from '@/utils/config/globalConfig';
|
||||||
import { getArea, putguide } from "@/api/system/area";
|
import {getArea, optionselect as getAreaOptionselect} from "@/api/system/area";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "NewPage",
|
name: "NewPage",
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
map: null,
|
map: null,
|
||||||
|
@ -49,31 +44,17 @@ export default {
|
||||||
picture: '',
|
picture: '',
|
||||||
buttonStyleActive: 'background-color: #409EFF; color: white;',
|
buttonStyleActive: 'background-color: #409EFF; color: white;',
|
||||||
buttonStyleInactive: 'background-color: #fff; color: #409EFF;',
|
buttonStyleInactive: 'background-color: #fff; color: #409EFF;',
|
||||||
areaLon: null,
|
|
||||||
areaLat: null,
|
|
||||||
queryParams: {
|
|
||||||
pageNum: 1,
|
|
||||||
pageSize: 10,
|
|
||||||
parkingName: null,
|
|
||||||
areaId: null,
|
|
||||||
type: "2"
|
|
||||||
},
|
|
||||||
// 默认区域id
|
|
||||||
defaultAreaId: "",
|
|
||||||
isMapGenerated: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
canGenerateMap() {
|
canGenerateMap() {
|
||||||
return this.picture && this.topRightCoord && this.bottomLeftCoord;
|
return this.picture && this.topRightCoord && this.bottomLeftCoord;
|
||||||
},
|
|
||||||
canSaveMap() {
|
|
||||||
return this.isMapGenerated;
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
const areaId = this.$route.params && this.$route.params.areaId;
|
const areaId = this.$route.params && this.$route.params.areaId;
|
||||||
this.getArea(areaId);
|
this.getArea(areaId);
|
||||||
|
// this.getAreaList();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initMap();
|
this.initMap();
|
||||||
|
@ -86,6 +67,7 @@ export default {
|
||||||
this.areaLon = response.data.longitude;
|
this.areaLon = response.data.longitude;
|
||||||
this.areaLat = response.data.latitude;
|
this.areaLat = response.data.latitude;
|
||||||
this.defaultAreaId = response.data.areaId;
|
this.defaultAreaId = response.data.areaId;
|
||||||
|
this.getList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
initMap() {
|
initMap() {
|
||||||
|
@ -102,7 +84,6 @@ export default {
|
||||||
this.map = new AMap.Map("amap-container", {
|
this.map = new AMap.Map("amap-container", {
|
||||||
viewMode: "3D",
|
viewMode: "3D",
|
||||||
zoom: 13,
|
zoom: 13,
|
||||||
center: [this.areaLon, this.areaLat], // 初始化地图中心点位置
|
|
||||||
});
|
});
|
||||||
this.map.setFitView();
|
this.map.setFitView();
|
||||||
this.map.on('click', this.handleMapClick);
|
this.map.on('click', this.handleMapClick);
|
||||||
|
@ -112,49 +93,33 @@ export default {
|
||||||
},
|
},
|
||||||
setClickType(type) {
|
setClickType(type) {
|
||||||
this.clickType = type;
|
this.clickType = type;
|
||||||
// 清除相应的坐标和标记
|
|
||||||
if (type === 'topRight' && this.topRightCoord) {
|
|
||||||
this.clearMarker('topRight');
|
|
||||||
this.topRightCoord = null;
|
|
||||||
} else if (type === 'bottomLeft' && this.bottomLeftCoord) {
|
|
||||||
this.clearMarker('bottomLeft');
|
|
||||||
this.bottomLeftCoord = null;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
handleMapClick(event) {
|
handleMapClick(event) {
|
||||||
const lnglat = event.lnglat;
|
const lnglat = event.lnglat;
|
||||||
|
|
||||||
// 只有在点击了“右上角坐标”或“左下角坐标”按钮后才能添加标记
|
|
||||||
if (this.clickType === 'topRight') {
|
if (this.clickType === 'topRight') {
|
||||||
this.topRightCoord = lnglat;
|
this.topRightCoord = lnglat;
|
||||||
this.addMarker(lnglat, 'topRight');
|
|
||||||
} else if (this.clickType === 'bottomLeft') {
|
} else if (this.clickType === 'bottomLeft') {
|
||||||
this.bottomLeftCoord = lnglat;
|
this.bottomLeftCoord = lnglat;
|
||||||
this.addMarker(lnglat, 'bottomLeft');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// 清除点击类型
|
// 创建标记
|
||||||
this.clickType = null;
|
|
||||||
},
|
|
||||||
addMarker(lnglat, type) {
|
|
||||||
// 清除之前的标记
|
|
||||||
this.clearMarker(type);
|
|
||||||
|
|
||||||
// 创建新标记
|
|
||||||
const marker = new AMap.Marker({
|
const marker = new AMap.Marker({
|
||||||
position: lnglat,
|
position: lnglat,
|
||||||
});
|
});
|
||||||
this.map.add(marker);
|
this.map.add(marker);
|
||||||
this.markers.push({ marker, type });
|
this.markers.push(marker);
|
||||||
|
|
||||||
|
// 清除点击类型
|
||||||
|
this.clickType = null;
|
||||||
},
|
},
|
||||||
clearMarker(type) {
|
clearMarkers() {
|
||||||
this.markers = this.markers.filter(({ marker, type: markerType }) => {
|
this.markers.forEach(marker => {
|
||||||
if (markerType === type) {
|
|
||||||
this.map.remove(marker);
|
this.map.remove(marker);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
this.markers = [];
|
||||||
|
this.topRightCoord = null;
|
||||||
|
this.bottomLeftCoord = null;
|
||||||
},
|
},
|
||||||
generateMap() {
|
generateMap() {
|
||||||
if (!this.canGenerateMap) {
|
if (!this.canGenerateMap) {
|
||||||
|
@ -171,20 +136,14 @@ export default {
|
||||||
const topRight = lnglatToFixed(this.topRightCoord);
|
const topRight = lnglatToFixed(this.topRightCoord);
|
||||||
const bottomLeft = lnglatToFixed(this.bottomLeftCoord);
|
const bottomLeft = lnglatToFixed(this.bottomLeftCoord);
|
||||||
|
|
||||||
console.log('Top Right:', topRight);
|
|
||||||
console.log('Bottom Left:', bottomLeft);
|
|
||||||
|
|
||||||
// 计算边界
|
// 计算边界
|
||||||
const bounds = new AMap.Bounds([bottomLeft.lng, bottomLeft.lat], [topRight.lng, topRight.lat]);
|
const bounds = new AMap.Bounds([bottomLeft.lng, bottomLeft.lat], [topRight.lng, topRight.lat]);
|
||||||
|
|
||||||
console.log('Bounds:', bounds);
|
|
||||||
|
|
||||||
// 创建图片图层
|
// 创建图片图层
|
||||||
const imageLayer = new AMap.ImageLayer({
|
const imageLayer = new AMap.ImageLayer({
|
||||||
url: this.picture,
|
url: this.picture,
|
||||||
bounds: bounds,
|
bounds: bounds,
|
||||||
zooms: [15, 20],
|
zooms: [15, 20]
|
||||||
zIndex: 999 // 设置zIndex确保图层在其他图层之上
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// 清除现有图层
|
// 清除现有图层
|
||||||
|
@ -196,34 +155,6 @@ export default {
|
||||||
|
|
||||||
// 添加图片图层
|
// 添加图片图层
|
||||||
this.map.add(imageLayer);
|
this.map.add(imageLayer);
|
||||||
|
|
||||||
// 设置地图已生成的标志
|
|
||||||
this.isMapGenerated = true;
|
|
||||||
},
|
|
||||||
saveMap() {
|
|
||||||
if (!this.canSaveMap) {
|
|
||||||
this.$message.error('请先生成导览地图');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 格式化坐标为字符串格式,不包含方括号
|
|
||||||
const formatLngLat = (lnglat) => `${lnglat.lng},${lnglat.lat}`;
|
|
||||||
|
|
||||||
// 保存逻辑
|
|
||||||
const mapData = {
|
|
||||||
guideMap: this.picture,
|
|
||||||
upperRight: formatLngLat(this.topRightCoord),
|
|
||||||
lowerLeft: formatLngLat(this.bottomLeftCoord),
|
|
||||||
areaId: this.defaultAreaId
|
|
||||||
};
|
|
||||||
|
|
||||||
putguide(mapData).then(response => {
|
|
||||||
// 处理更新后的响应
|
|
||||||
});
|
|
||||||
|
|
||||||
// 例如,将 mapData 发送到后端保存
|
|
||||||
console.log('保存地图数据:', mapData);
|
|
||||||
this.$message.success('地图数据已保存');
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -241,14 +172,11 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-card-right {
|
.input-card-right {
|
||||||
position: fixed;
|
|
||||||
top: 100px;
|
|
||||||
left: 230px;
|
|
||||||
z-index: 100;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: nowrap;
|
flex-wrap: nowrap;
|
||||||
align-items: flex-end;
|
align-items: flex-end;
|
||||||
|
// justify-content: center;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
|
||||||
|
|
||||||
|
|
||||||
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
|
<el-form-item label="运营商" prop="deptId" v-if="userName == 'admin'">
|
||||||
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable :popper-append-to-body="false">
|
<el-select v-model="queryParams.deptId" placeholder="请选择运营商" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in deptOptions"
|
v-for="item in deptOptions"
|
||||||
:key="item.deptId"
|
:key="item.deptId"
|
||||||
:label="item.deptName"
|
:label="item.deptName"
|
||||||
:value="item.deptId"
|
:value="item.deptId"
|
||||||
|
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -1074,18 +1071,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style>
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.nav-container {
|
.nav-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -368,16 +368,3 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" >
|
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -38,8 +38,12 @@
|
||||||
<div class="area-options" v-if="userName == 'admin'">
|
<div class="area-options" v-if="userName == 'admin'">
|
||||||
<span >切换运营区</span>
|
<span >切换运营区</span>
|
||||||
<el-select v-model="areaId" placeholder="请选择运营区" clearable @change="handleAreaChange">
|
<el-select v-model="areaId" placeholder="请选择运营区" clearable @change="handleAreaChange">
|
||||||
<el-option v-for="item in areaOptions" :key="item.areaId" :label="item.areaName"
|
<el-option
|
||||||
:value="item.areaId"></el-option>
|
v-for="item in areaOptions"
|
||||||
|
:key="item.areaId"
|
||||||
|
:label="item.areaName"
|
||||||
|
:value="item.areaId"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="input-card">
|
<div class="input-card">
|
||||||
|
@ -63,7 +67,10 @@
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<el-form-item label="二维码:">
|
<el-form-item label="二维码:">
|
||||||
<template>
|
<template>
|
||||||
<el-popover placement="top" width="180" trigger="hover">
|
<el-popover
|
||||||
|
placement="top"
|
||||||
|
width="180"
|
||||||
|
trigger="hover">
|
||||||
<div class="qr-code-box">
|
<div class="qr-code-box">
|
||||||
<qr-code :text="form.qrText" :width="150" :height="150" />
|
<qr-code :text="form.qrText" :width="150" :height="150" />
|
||||||
</div>
|
</div>
|
||||||
|
@ -71,14 +78,12 @@
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="网络状态:" style="color: #ffcc00;font-weight: 700">{{ form.onlineStatus == 1 ? '在线' : '离线'
|
<el-form-item label="网络状态:" style="color: #ffcc00;font-weight: 700">{{ form.onlineStatus == 1 ? '在线' : '离线' }}</el-form-item>
|
||||||
}}</el-form-item>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row>
|
<el-row>
|
||||||
<div class="nav-container">
|
<div class="nav-container">
|
||||||
<el-menu :default-active="activeIndex" class="el-menu-demo nav-menu" mode="horizontal"
|
<el-menu :default-active="activeIndex" class="el-menu-demo nav-menu" mode="horizontal" @select="handleSelect">
|
||||||
@select="handleSelect">
|
|
||||||
<el-menu-item index="1" >使用记录</el-menu-item>
|
<el-menu-item index="1" >使用记录</el-menu-item>
|
||||||
<el-menu-item index="2" >维修记录</el-menu-item>
|
<el-menu-item index="2" >维修记录</el-menu-item>
|
||||||
<el-menu-item index="3" >换电记录</el-menu-item>
|
<el-menu-item index="3" >换电记录</el-menu-item>
|
||||||
|
@ -405,43 +410,26 @@ export default {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
generateInfoContent(data) {
|
generateInfoContent(data) {
|
||||||
let content = `<div style="max-hight: 500px; overflow-y: auto;">
|
let content = `<div><table class="info-table">
|
||||||
<table class="info-table">
|
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th>SN</th>
|
<th>SN</th>
|
||||||
<th>车牌号</th>
|
<th>车牌号</th>
|
||||||
<th>状态</th>
|
<th>状态</th>
|
||||||
<th>操作</th>
|
<th>操作</th>
|
||||||
<th>SN</th>
|
|
||||||
<th>车牌号</th>
|
|
||||||
<th>状态</th>
|
|
||||||
<th>操作</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>`;
|
<tbody>`;
|
||||||
|
data.forEach(item => {
|
||||||
for (let i = 0; i < data.length; i += 2) {
|
content += `<tr>
|
||||||
content += `<tr>`;
|
<td>${item.sn}</td>
|
||||||
content += generateRowContent(data[i]);
|
|
||||||
if (i + 1 < data.length) {
|
|
||||||
content += generateRowContent(data[i + 1]);
|
|
||||||
} else {
|
|
||||||
content += `<td colspan="4"></td>`;
|
|
||||||
}
|
|
||||||
content += `</tr>`;
|
|
||||||
}
|
|
||||||
|
|
||||||
content += `</tbody>
|
|
||||||
</table></div>`;
|
|
||||||
|
|
||||||
function generateRowContent(item) {
|
|
||||||
return `<td>${item.sn}</td>
|
|
||||||
<td>${item.vehicleNum}</td>
|
<td>${item.vehicleNum}</td>
|
||||||
<td>${formatVehicleStatus(item.status)}</td>
|
<td>${formatVehicleStatus(item.status)}</td>
|
||||||
<td><button class="detail-btn" data-device-id="${item.deviceId}">详情</button></td>`;
|
<td><button class="detail-btn" data-device-id="${item.deviceId}">详情</button></td>
|
||||||
}
|
</tr>`;
|
||||||
|
});
|
||||||
|
content += `</tbody>
|
||||||
|
</table></div>`;
|
||||||
function formatVehicleStatus(status) {
|
function formatVehicleStatus(status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case '7':
|
case '7':
|
||||||
|
@ -464,12 +452,10 @@ export default {
|
||||||
return '未知状态';
|
return '未知状态';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return content;
|
return content;
|
||||||
},
|
},
|
||||||
handleInfoWindowClick(event) {
|
handleInfoWindowClick(event) {
|
||||||
console.log("点击详情按钮====",event)
|
console.log("点击详情按钮====",event)
|
||||||
|
|
||||||
const button = event.target.closest('.detail-btn');
|
const button = event.target.closest('.detail-btn');
|
||||||
if (button) {
|
if (button) {
|
||||||
const deviceId = button.getAttribute('data-device-id');
|
const deviceId = button.getAttribute('data-device-id');
|
||||||
|
@ -723,42 +709,6 @@ export default {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 850px;
|
height: 850px;
|
||||||
}
|
}
|
||||||
.info-table {
|
|
||||||
width: 100%;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table th,
|
|
||||||
.info-table td {
|
|
||||||
border: 1px solid #ddd;
|
|
||||||
padding: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table thead {
|
|
||||||
background-color: #f4f4f4;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table tbody tr:nth-child(even) {
|
|
||||||
background-color: #f9f9f9;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table tbody tr:hover {
|
|
||||||
background-color: #f1f1f1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Scrollbar styles for WebKit browsers (Chrome, Safari) */
|
|
||||||
.info-table::-webkit-scrollbar {
|
|
||||||
width: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table::-webkit-scrollbar-thumb {
|
|
||||||
background-color: #888;
|
|
||||||
border-radius: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.info-table::-webkit-scrollbar-thumb:hover {
|
|
||||||
background-color: #555;
|
|
||||||
}
|
|
||||||
.container {
|
.container {
|
||||||
position: relative;
|
position: relative;
|
||||||
border: 1px solid rgb(204, 204, 204);
|
border: 1px solid rgb(204, 204, 204);
|
||||||
|
@ -769,22 +719,17 @@ export default {
|
||||||
right: 15px;
|
right: 15px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.tips{
|
.tips{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
left: 15px;
|
left: 15px;
|
||||||
|
|
||||||
.tip-item {
|
.tip-item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center; /* 垂直居中 */
|
||||||
/* 垂直居中 */
|
margin-bottom: 10px; /* 可以根据需要调整间距 */
|
||||||
margin-bottom: 10px;
|
|
||||||
/* 可以根据需要调整间距 */
|
|
||||||
color: #38383b;
|
color: #38383b;
|
||||||
|
|
||||||
.span-class{
|
.span-class{
|
||||||
background-color: rgba(255, 255, 255, 0.5);
|
background-color: rgba(255, 255, 255, 0.5);
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
|
@ -793,24 +738,19 @@ export default {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
img{
|
img{
|
||||||
width: 25px;
|
width: 25px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
height: auto;
|
height: auto; /* 保持图片高度自适应 */
|
||||||
/* 保持图片高度自适应 */
|
margin-right: 10px; /* 图片与文字间距,根据需要调整 */
|
||||||
margin-right: 10px;
|
|
||||||
/* 图片与文字间距,根据需要调整 */
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.area-options{
|
.area-options{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 15px;
|
top: 15px;
|
||||||
right: 15px;
|
right: 15px;
|
||||||
|
|
||||||
span{
|
span{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@ -828,11 +768,9 @@ export default {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.apiary-marker-img{
|
.apiary-marker-img{
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.apiary-marker-name{
|
.apiary-marker-name{
|
||||||
background-color: #1890ff;
|
background-color: #1890ff;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -842,7 +780,6 @@ export default {
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.detail-btn {
|
.detail-btn {
|
||||||
background: none;
|
background: none;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -882,4 +819,5 @@ export default {
|
||||||
.el-dialog:not(.is-fullscreen) {
|
.el-dialog:not(.is-fullscreen) {
|
||||||
margin-top: 6vh !important;
|
margin-top: 6vh !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -313,16 +313,3 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" >
|
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -518,19 +518,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
<style lang="scss">
|
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.amoun-tips{
|
.amoun-tips{
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
|
@ -490,18 +490,7 @@ export default {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style>
|
||||||
.el-select {
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-input{
|
|
||||||
.el-input__inner{
|
|
||||||
color: red;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.amoun-tips{
|
.amoun-tips{
|
||||||
color: red;
|
color: red;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user