@ -5,9 +5,6 @@
<el-card shadow="hover" style="margin:24px 0 ">
<h2>车辆信息</h2>
<p>车队名称:<span>{{ cardInfo.name }}</span></p>
<p>出厂编号:<span>{{ cardInfo.No }}</span></p>
<p>车型号:<span>{{ cardInfo.type }}</span></p>
<p>线路:<span>{{ cardInfo.line }}</span></p>
</el-card>
<h2>实时位置</h2>
<div id="container" class="container1"></div>
@ -134,9 +131,6 @@ const tableChange = async (e) => {
const cardInfo = ref({
name: '名称',
No: '123',
type: '2',
line: '3',
carLicense:''
})
@ -41,8 +41,14 @@ const setMarker = async (data, zoom) => {
label: {
direction: 'top',
content: `<div class='info'>${e.carLicense || ''} - <span style="color: ${e.state === 0 ? 'green">在线' : 'red">离线'}</span></div><div class='info' onClick='function a(i){console.log(window.$tab);window.$tab.openPage("carMonitoring"+"?id="+i,"/realTimeMonitoring") }a("${e.id}")'>监控 ${e.three || ''}</div><div class='info'>${parseTime(e.laseRuntime) || ''}</div>`, //设置文本标注内容
},
extData:{
id:'123'
}
});
markers.value[index].on('click',(e)=>{
console.log(e.target._opts.extData)
map.add(markers.value)
map.setFitView()
@ -31,8 +31,8 @@ export default defineConfig(({mode, command}) => {
proxy: {
// https://cn.vitejs.dev/config/#server-proxy
'/dev-api': {
target: 'http://10.11.41.249:8080',
// target: 'http://localhost:8080',
// target: 'http://10.11.41.249:8080',
target: 'http://localhost:8080',
changeOrigin: true,
rewrite: (p) => p.replace(/^\/dev-api/, '')