Merge branch 'main' of http://10.0.0.99:4000/Ren/airport-qingdao-vue3
This commit is contained in:
commit
6ba3282ab7
@ -5,7 +5,7 @@ VITE_APP_TITLE = 青岛机场无人驾驶车辆协同云平台
|
||||
VITE_APP_ENV = 'production'
|
||||
|
||||
# 青岛机场无人驾驶车辆协同云平台/生产环境
|
||||
VITE_APP_BASE_API = '/prod-api'
|
||||
VITE_APP_BASE_API = 'http://10.0.0.126:8080'
|
||||
|
||||
VITE_APP_WEBSOCKET_URL='ws://10.0.0.124:8080/collision'
|
||||
|
||||
|
||||
1
public/.htaccess
Normal file
1
public/.htaccess
Normal file
@ -0,0 +1 @@
|
||||
|
||||
@ -27,11 +27,16 @@ import { ref, onMounted, onUnmounted, watch } from "vue";
|
||||
import LayerSwitcher from "./LayerSwitcher.vue";
|
||||
|
||||
// 导入图片资源
|
||||
import znzBgImg from "../../../assets/images/znzBg.png";
|
||||
import needleImg from "../../../assets/images/znz.png";
|
||||
import leftArrowImg from "../../../assets/images/left_arrow.png";
|
||||
import rightArrowImg from "../../../assets/images/right_arrow.png";
|
||||
import leftArrowActiveImg from "../../../assets/images/left_arrow_active.png";
|
||||
import rightArrowActiveImg from "../../../assets/images/right_arrow_active.png";
|
||||
import zoomInActiveImg from "../../../assets/images/zoomInActive.png";
|
||||
import zoomOutActiveImg from "../../../assets/images/zoomOutActive.png";
|
||||
import layerActiveImg from "../../../assets/images/layerActive.png";
|
||||
|
||||
[leftArrowActiveImg, rightArrowActiveImg, zoomInActiveImg, zoomOutActiveImg, layerActiveImg].forEach(src => {
|
||||
const img = new window.Image();
|
||||
img.src = src;
|
||||
});
|
||||
// 定义props接受地图实例
|
||||
const props = defineProps({
|
||||
map: Object, // 地图实例
|
||||
@ -111,18 +116,6 @@ function rotateRight() {
|
||||
}
|
||||
}
|
||||
|
||||
// 指南针/重置视图
|
||||
function onCompass() {
|
||||
emit("compass");
|
||||
if (props.resetView) {
|
||||
props.resetView();
|
||||
} else if (props.map) {
|
||||
// 如果没有提供重置函数,尝试使用地图的初始视图
|
||||
const initialCenter = props.map.options.center;
|
||||
const initialZoom = props.map.options.zoom || 7;
|
||||
props.map.setView(initialCenter, initialZoom, { animate: true });
|
||||
}
|
||||
}
|
||||
|
||||
// 放大地图
|
||||
function onZoomIn() {
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
<div class="alarm-icon" :class="item.level">
|
||||
<img v-if="item.type === 'car'" src="@/assets/images/clarm_conflict.png" class="alarm-img" alt="车辆冲突" />
|
||||
<img v-else-if="item.type === 'report'" src="@/assets/images/clarm_over.png" class="alarm-img" alt="超界告警" />
|
||||
<img v-else-if="item.type === 'speed'" src="@/assets/images/clarm_speed.png" class="alarm-img" alt="超速告警" />
|
||||
<img v-else-if="item.type === 'speed'" src="@/assets/images/clarm_over.png" class="alarm-img" alt="超速告警" />
|
||||
<i v-else class="alarm-dot"></i>
|
||||
</div>
|
||||
<div class="alarm-content">
|
||||
|
||||
@ -163,7 +163,7 @@ function getBatteryTempClass(temp) {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style lang="scss" scoped>
|
||||
.car-detail-container {
|
||||
width: 391px;
|
||||
height: 85vh;
|
||||
@ -268,11 +268,12 @@ function getBatteryTempClass(temp) {
|
||||
border-left: 4px solid #303236;
|
||||
padding:5px 10px;
|
||||
|
||||
p{
|
||||
margin:0 !important;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
.info-row1 p{
|
||||
margin:0 !important;
|
||||
}
|
||||
.battery-left{
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@ -260,12 +260,13 @@ onMounted(() => {
|
||||
background-size:100% 100%;
|
||||
padding:5px 10px;
|
||||
color: #fff;
|
||||
img{
|
||||
|
||||
}
|
||||
.header-title img{
|
||||
width: 31px;
|
||||
height: 15px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
.header-actions {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
import { createWebHistory, createRouter } from 'vue-router'
|
||||
import { createWebHashHistory, createRouter } from 'vue-router'
|
||||
/* Layout */
|
||||
import Layout from '@/layout'
|
||||
|
||||
@ -246,17 +246,21 @@ export const dynamicRoutes = [
|
||||
]
|
||||
}
|
||||
]
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHistory(),
|
||||
routes: constantRoutes,
|
||||
scrollBehavior(to, from, savedPosition) {
|
||||
if (savedPosition) {
|
||||
return savedPosition
|
||||
} else {
|
||||
return { top: 0 }
|
||||
}
|
||||
},
|
||||
history: createWebHashHistory('/airport'),
|
||||
scrollBehavior: () => ({ top: 0 }), // 滚动行为,将 y 改为 top
|
||||
routes: constantRoutes // 使用 constantRoutes
|
||||
});
|
||||
// const router = createRouter({
|
||||
// history: createWebHistory(),
|
||||
// routes: constantRoutes,
|
||||
// scrollBehavior(to, from, savedPosition) {
|
||||
// if (savedPosition) {
|
||||
// return savedPosition
|
||||
// } else {
|
||||
// return { top: 0 }
|
||||
// }
|
||||
// },
|
||||
// });
|
||||
|
||||
export default router;
|
||||
|
||||
@ -81,7 +81,7 @@ service.interceptors.response.use(res => {
|
||||
ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||
isRelogin.show = false;
|
||||
useUserStore().logOut().then(() => {
|
||||
location.href = '/index';
|
||||
location.href = '/airport/index';
|
||||
})
|
||||
}).catch(() => {
|
||||
isRelogin.show = false;
|
||||
|
||||
@ -621,14 +621,15 @@ onMounted(() => {
|
||||
height: 50px;
|
||||
border-radius: 6px;
|
||||
|
||||
img{
|
||||
|
||||
}
|
||||
.avatar-box img{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: cover;
|
||||
border-radius: 6px;
|
||||
|
||||
}
|
||||
}
|
||||
:deep(.el-table__inner-wrapper::before) {
|
||||
display: none; /* 隐藏表格顶部的边框线 */
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ export default defineConfig(({ mode, command }) => {
|
||||
// 部署生产环境和开发环境下的URL。
|
||||
// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
|
||||
// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
|
||||
base: VITE_APP_ENV === 'production' ? '/' : '/',
|
||||
base: VITE_APP_ENV === 'production' ? '/airport/' : '/',
|
||||
plugins: createVitePlugins(env, command === 'build'),
|
||||
resolve: {
|
||||
// https://cn.vitejs.dev/config/#resolve-alias
|
||||
|
||||
Loading…
Reference in New Issue
Block a user