Commit 83672c70 authored by xinzhedeai's avatar xinzhedeai

new from liqilin

parent bba8ce47
......@@ -2,7 +2,7 @@
# if use a sub directory, it must be end with "/", like "/admin/" but not "/admin"
VITE_BASE_URL=/
VITE_APP_TITLE=SoybeanAdmin
VITE_APP_TITLE=金润四化综合管理系统
VITE_APP_DESC=SoybeanAdmin is a fresh and elegant admin template
......@@ -63,12 +63,42 @@ VITE_DEVTOOLS_LAUNCH_EDITOR=code
# VITE_VIDEO_URL=ws://192.168.3.248:9999
# 开发环境 - 所有服务接口地址
VITE_SERVICE_URL=http://192.168.2.53:9995
VITE_SERVICE_URL=http://192.168.2.67:9995
# 模型地址环境
VITE_MODEL_URL=http://192.168.2.53:9995/model
VITE_MODEL_URL=http://192.168.2.67:9995/model
# 开发环境 - WebSocket 全局地址
# VITE_WEBSOCKET_URL=ws://192.168.3.248:9996
\ No newline at end of file
# VITE_WEBSOCKET_URL=ws://192.168.3.248:9996
# 人员定位 -- 前后端
VITE_PERSON_URL=http://192.168.2.67:8083
# 后 http://192.168.2.37:8082
# 定位卡 http://192.168.2.53:9997
# 边坡监测 -- 前后端
VITE_SIDE_URL=http://192.168.2.67:9087
# 后 http://192.168.2.37:9082
# 全方位监测 -- 前后端
VITE_POINT_URL=http://192.168.2.67:9088
# 后 http://192.168.2.37:9081
# 排土场 -- 前后端
VITE_CASTING_URL=http://192.168.2.67:9086
# 后 http://192.168.2.37:9080
# 卡车调度 -- 前后端
VITE_TRUCK_URL=http://192.168.2.67:8040
VITE_TRUCKS_URL=http://192.168.2.67:9089
# 后 http://192.168.2.53:9996
# AI系统 -- 前后端
VITE_AI_URL=http://192.168.2.67:9528
# 后 http://192.168.2.53:9528
# 综合系统 -- 前后端
# 前 http://192.168.2.54:9527
# 后 http://192.168.2.53:9995
......@@ -10,9 +10,9 @@
<script src="./public/js/proj4.js"></script>
<script src="./public/js/turf.min.js"></script>
<link rel="stylesheet" type="text/css" href="./Cesium/Widgets/widgets.css" />
<script type="text/javascript" src="/public/webrtcstreamer.js"></script>
<script type="text/javascript" src="./public/webrtcstreamer.js"></script>
<script type="text/javascript" src="./Cesium/Cesium.js"></script>
<script src="/public/jquery-1.7.1.min.js"></script>
<script src="./public/jquery-1.7.1.min.js"></script>
<title>%VITE_APP_TITLE%</title>
</head>
......
......@@ -51,7 +51,7 @@ export const getCarLogList = async (): Promise<any> => await axios.get('home/car
// 修改报警状态
export const setAlarmStatusApi = async (command: string): Promise<any> => await axios.post(`/home/sound/${command}`);
export const setAlarmStatusApi = async (command: any): Promise<any> => await axios.post(`/home/sound/${command}`);
// 获取报警状态
export const getAlarmStatusApi = async (): Promise<any> => await axios.get('/home/alarm/status');
......
......@@ -34,6 +34,9 @@ export const api_tokenGet = async (): Promise<any> => await axios.get(`/api/toke
export const api_menuPageGet = async (data: any): Promise<any> =>
await axios.get(`/menu/page?pageNum=${data.pageNum}&pageSize=${data.pageSize}`);
export const api_menuListGet = async (): Promise<any> =>
await axios.get(`/menu/list`);
// ------------------- 用户管理接口 ------------------
export const api_userPageGet = async (data: any): Promise<any> =>
await axios.get(`/user/page?pageNum=${data.pageNum}&pageSize=${data.pageSize}&startTime=${data.startTime}&endTime=${data.endTime}&username=${data.username}&depName=${data.depname}`);
......@@ -56,6 +59,8 @@ export const api_getDepList = async (): Promise<any> => await axios.get('/dep/li
export const api_putPassword = async (data:any): Promise<any> => await axios.put(`/user/password/${data.id}/${data.password}`);
export const api_getRoleId = async (id:any): Promise<any> => await axios.get(`/role/${id}`);
// ------------------- 角色管理接口 ------------------
export const api_rolePage = async (data: any): Promise<any> =>
await axios.get(`/role/page?pageNum=${data.pageNum}&pageSize=${data.pageSize}&roleName=${data.rolename}&startTime=${data.startTime}&endTime=${data.endTime}`);
......
interface DetectionRecord {
type: string;
cardId: any;
id: number;
videoName: string;
cameraName: string;
......
......@@ -32,4 +32,25 @@ export const create3D = async (viewer: any, url: any, height = 0) => {
tiles.modelMatrix = Cesium.Matrix4.fromTranslation(translate);
create3D.id = viewer.scene.primitives.add(tiles);
viewer.zoomTo(tiles);
}
export function pointLine(viewer) {
let polygonCoordList = [
122.04454563914409,37.489284875763744,
122.04561831986973,37.487027958982864,
122.05006039343479,37.48821693911029,
122.04881042851096,37.49135388724233,
]
// 创建红色线圈
viewer.entities.add({
id: 'allTotalArea',
name: 'allTotalArea',
polyline: {
positions: Cesium.Cartesian3.fromDegreesArray(polygonCoordList),
width: 4,
material: Cesium.Color.RED,
clampToGround: true, // 禁用贴地
},
})
}
\ No newline at end of file
......@@ -182,17 +182,19 @@ function densifyPoints(positions: any[], stepSize: number = 2.0) {
}
export async function createNewPositionHeight(position: any, viewer: any) {
const denseCoordinates = densifyPoints(position, 10.0); // 每隔2米插入一个点
const denseCoordinates = densifyPoints(position, 20.0); // 每隔20米插入一个点
let clampedPositions: any[] = [];
try {
const updatedPositions = await viewer.scene.clampToHeightMostDetailed(denseCoordinates);
clampedPositions = updatedPositions.map((pos: any) => {
const cartographic = Cesium.Cartographic.fromCartesian(pos);
return Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height + 0.8);
});
for(let item of updatedPositions) {
if(item) {
const cartographic = Cesium.Cartographic.fromCartesian(item);
let dataPoints = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height + 6);
clampedPositions.push(dataPoints);
}
}
} catch (error) {
console.warn('高度贴合计算失败或部分失败:', error);
clampedPositions = denseCoordinates;
......
......@@ -2,7 +2,7 @@ import { loadEnv } from "vite";
import { getModelNewApi } from "../index";
export async function getModel() {
const url = 'http://192.168.2.53:9995/model/'
const url = 'http://192.168.2.67:9995/model/'
let res = await getModelNewApi();
......
......@@ -188,11 +188,13 @@ export async function createNewPositionHeight(position: any, viewer: any) {
try {
const updatedPositions = await viewer.scene.clampToHeightMostDetailed(denseCoordinates);
clampedPositions = updatedPositions.map((pos: any) => {
const cartographic = Cesium.Cartographic.fromCartesian(pos);
return Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height + 6);
});
for(let item of updatedPositions) {
if(item) {
const cartographic = Cesium.Cartographic.fromCartesian(item);
let dataPoints = Cesium.Cartesian3.fromRadians(cartographic.longitude, cartographic.latitude, cartographic.height + 6);
clampedPositions.push(dataPoints);
}
}
} catch (error) {
console.warn('高度贴合计算失败或部分失败:', error);
clampedPositions = denseCoordinates;
......@@ -224,7 +226,6 @@ export async function startVehicleMovement(viewer: any, totalDuration: number) {
for (let i = 0; i < rawCoordinates.length - 1; i++) {
totalDistance += Cesium.Cartesian3.distance(rawCoordinates[i], rawCoordinates[i + 1]);
}
let accumulatedTime = 0;
positionProperty.addSample(viewer.clock.currentTime, rawCoordinates[0]);
......
......@@ -89,12 +89,16 @@
<template v-if="boundaryData.length > 0">
<template v-for="(item, index) in boundaryData" :key="index">
<dd class="list-item" :class="getItemClass(item)">
<span>{{ item.driver }}</span>
<span>{{ item.licensePlate }}</span>
<span class="time-cell">
<span>{{ item.driver || item.carName }}</span>
<span>{{ item.licensePlate || item.id }}</span>
<span class="time-cell" v-if="item.boundaryTime">
<div class="date-part">{{ item.boundaryTime?.split(' ')[0] }}</div>
<div class="time-part">{{ item.boundaryTime?.split(' ')[1] }}</div>
</span>
<span class="time-cell" v-if="item.createTime">
<div class="date-part">{{ item.createTime?.split(' ')[0] }}</div>
<div class="time-part">{{ item.createTime?.split(' ')[1] }}</div>
</span>
</dd>
</template>
</template>
......
......@@ -55,10 +55,10 @@ function goToCesium() {
<img src="@/assets/daping.png" alt="" style="width: 16px; height: 16px; margin-right: 4px" />
大屏
</NButton>
<NButton quaternary circle style="width: 60px">
<!-- <NButton quaternary circle style="width: 60px">
<img src="@/assets/qiehuan.png" alt="" style="width: 16px; height: 16px; margin-right: 4px" />
切换
</NButton>
</NButton> -->
<!--
<NButton quaternary circle style="width: 60px" >
<img src="@/assets/yonghu.png" alt="" style="width: 16px; height: 16px; margin-right: 4px" />
......
......@@ -8,6 +8,7 @@ import { useThemeStore } from '@/store/modules/theme';
import { useRouteStore } from '@/store/modules/route';
import { useRouterPush } from '@/hooks/common/router';
import { useMenu } from '../context';
import { localStg } from '@/utils/storage';
defineOptions({
name: 'VerticalMenu'
......@@ -51,11 +52,12 @@ watch(
:collapsed="appStore.siderCollapse"
:collapsed-width="themeStore.sider.collapsedWidth"
:collapsed-icon-size="22"
:options="routeStore.menus"
:options="localStg.get('routerList')"
:inverted="inverted"
:indent="18"
@update:value="routerPushByKeyWithMetaQuery"
/>
<!-- :options="localStg.get('routerList')" -->
</SimpleScrollbar>
</Teleport>
</template>
......
......@@ -222,7 +222,7 @@ const local: App.I18n.Schema = {
404: '页面不存在',
500: '服务器错误',
'iframe-page': '外链页面',
cesiumdeom: 'Cesium大屏',
cesiumdeom: '综合大屏',
home: '越界开采系统',
home_police: '报警列表',
home_rail: '电子围栏管理',
......
......@@ -38,9 +38,9 @@ export function createRouteGuard(router: Router) {
const hasRole = authStore.userInfo.roles.some(role => routeRoles.includes(role));
const hasAuth = authStore.isStaticSuper || !routeRoles.length || hasRole;
// if it is login route when logged in, then switch to the root page
// if it is login route when logged in, then switch to the home page
if (to.name === loginRoute && isLogin) {
next({ name: rootRoute });
next({ path: '/home' });
return;
}
......
......@@ -30,6 +30,7 @@ export const router = createRouter({
routes
});
/** Setup Vue Router */
export async function setupRouter(app: App) {
app.use(router);
......@@ -38,6 +39,6 @@ export async function setupRouter(app: App) {
}
router.beforeEach((to, from, next) => {
connect();
connect('home');
next();
});
......@@ -5,7 +5,7 @@ import { getRoutePath, transformElegantRoutesToVueRoutes } from '../elegant/tran
export const ROOT_ROUTE: CustomRoute = {
name: 'root',
path: '/',
redirect: getRoutePath(import.meta.env.VITE_ROUTE_HOME) || '/home',
redirect: '/login',
meta: {
title: 'root',
constant: true
......
This diff is collapsed.
......@@ -4,7 +4,7 @@ let webRtcServrce = ref();
export function webVideo(rtsp: any) {
console.log('111',rtsp);
webRtcServrce.value = new WebRtcStreamer('video', location.protocol + '//' + "192.168.2.53:8000")
webRtcServrce.value = new WebRtcStreamer('video', location.protocol + '//' + "192.168.2.67:8000")
webRtcServrce.value.connect('rtsp://admin:Gemho120611@192.168.0.17:554/h264/ch1/main/av_stream');
};
......@@ -4,16 +4,16 @@ import { router } from '@/router';
import { localStg } from './storage';
import { AudioPlayer } from './common';
let ws: any = null;
const severName = 'home';
let severName = 'home';
// 定义WebSocket连接的URL
const webSocketUrl = `ws://192.168.2.53:8080/ws/${severName}`;
const webSocketUrl = `ws://192.168.2.67:9995/ws/${severName}`;
// 存储活动通知实例的数组,用于限制通知数量
const activeNotifications: any[] = [];
const MAX_NOTIFICATIONS = 3;
const htmlStr = ref('');
// JSON字符串转对象函数
function parseDetectionRecord(jsonString: string): DetectionRecord {
export function parseDetectionRecord(jsonString: string): DetectionRecord {
try {
// 注意:需要先清理字符串中的额外反引号
const cleanedString = jsonString.replace(/^\s*`|`\s*$/g, '');
......@@ -53,11 +53,12 @@ function createLimitedNotification(options: any) {
return notification;
}
const playAudio = async (id: any) => {
const player = new AudioPlayer(`http://192.168.2.53:9995/v1/play/${id}`);
const player = new AudioPlayer(`http://192.168.2.67:9995/v1/play/${id}`);
player.play().catch(err => console.error('播放失败',err));
player.play().catch(err => console.error('播放失败', err));
};
export function connect() {
export function connect(name:any) {
severName = name;
if ('WebSocket' in window) {
ws = new WebSocket(webSocketUrl);
// 连接成功时触发
......@@ -69,12 +70,17 @@ export function connect() {
// 接收到消息时触发
ws.onmessage = function (event) {
const recordObject: DetectionRecord = parseDetectionRecord(event.data);
if (event.data == 401) {
localStorage.removeItem('token');
router.push('/login');
// 处理接收到的数据
const data = recordObject;
console.log('111', data);
if (data.type == 'router') {
router.push({
path: '/personnel/track',
query: {
cardId: data.cardId
}
});
} else {
// 处理接收到的数据
const data = recordObject;
if (true) {
playAudio(data.algorithmId);
}
......@@ -102,7 +108,7 @@ export function connect() {
])
]),
h(NRow, { gutter: 10, style: { marginTop: '10px' } }, [
h(NCol, { span: 7 },[
h(NCol, { span: 7 }, [
h('div', { style: { fontSize: '14px', textAlign: 'center' } }, [
h('span', '报警图片:')
])
......@@ -110,59 +116,14 @@ export function connect() {
h(NCol, { span: 15 }, [
h('img', {
style: { height: '100px', width: '200px' },
src: 'http://192.168.2.53:9995/image/979fc62b9f3a4097933e6e0a0aed489d.jpg'
src: 'http://192.168.2.67:9995/image/979fc62b9f3a4097933e6e0a0aed489d.jpg'
})
]),
// h(NCol, { span: 12 }, [
// h(NSpace, { vertical: true, justify: 'space-between' }, [
// // h('div', [
// // h(NButton, { quaternary: true, round: true }, () => data.cameraName || ''),
// // h('div', { style: { fontSize: '14px' } }, [
// // h(
// // NButton,
// // {
// // quaternary: true,
// // round: true,
// // type: 'info',
// // onClick: () => toLogPage(data)
// // },
// // () => '查看详情'
// // )
// // ])
// // ]),
// // h('div', { style: { display: 'flex', justifyContent: 'space-between', marginTop: '20px' } }, [
// // h(
// // NButton,
// // {
// // strong: true,
// // secondary: true,
// // size: 'small',
// // // onClick: () => modifyAlramStatus(data.id, '1')
// // style: {
// // color: 'white',
// // backgroundColor: '#2196f3'
// // }
// // },
// // () => '正确报警'
// // ),
// // h(
// // NButton,
// // {
// // strong: true,
// // secondary: true,
// // size: 'small',
// // style: { marginLeft: '20px', color: 'white', backgroundColor: '#f57b70' }
// // // onClick: () => modifyAlramStatus(data.id, '2')
// // },
// // () => '错误报警'
// // )
// // ])
// ])
// ])
])
])
});
}
// 处理收到的消息
};
......
......@@ -3,6 +3,7 @@ import { nextTick, onBeforeMount, onMounted, onUnmounted, ref, watch } from 'vue
import '../../../../Cesium/Widgets/widgets.css';
import { useMessage } from 'naive-ui';
import {
api_getRoleId,
getCameraIdApi,
getCarPointAllCarApi,
getCemeraPointApi,
......@@ -13,7 +14,7 @@ import {
getPointAllPersonApi,
getPointListApi
} from '@/api';
import { create3D } from '@/api/utils/cesium';
import { create3D, pointLine } from '@/api/utils/cesium';
import { getElevationFromRay, getElevationFromRays } from '@/api/utils/cesiumUtil';
import { cesiumToLongitudeAndLatitude } from '@/api/utils/coordinateUtil';
import { getModel } from '@/api/utils/cesiumModel';
......@@ -32,6 +33,10 @@ import blueVideoIcon from '@/assets/icon16.png';
import blueBianIcon from '@/assets/icon17.png';
import redPersonIcon from '../../../assets/redperson.png';
import MultiSelect from './appselect.vue';
import { useRouteStore } from '@/store/modules/route';
import { router } from '@/router';
import { localStg } from '@/utils/storage';
import { getAlarmStatusApi, setAlarmStatusApi } from '@/api/index-dp';
let viewer: any = null;
const message = useMessage();
......@@ -39,17 +44,10 @@ let personEntity: any;
const pins: any = [];
const full = ref(false);
let entityId: any;
const routeStore = useRouteStore();
let link: any;
let speed = 0;
let text = '';
const personList = ref([]);
const modelData = ref([
[122.04736846370741, 37.48958083145254],
[122.04760069379522, 37.489226301608184],
[122.04823299200363, 37.489451482540346],
[122.04802271634016, 37.48983410372907],
[122.04748237248322, 37.49016152294277]
]);
const options = [
{
......@@ -78,7 +76,6 @@ const options = [
}
];
const value = ref(options.map(opt => opt.value));
const data = ref([]);
const datasouce = ref();
const fence = ref<any>();
......@@ -99,6 +96,50 @@ const labelData = ref<any>();
const formData = ref([]);
// zhaojunbao 开始
const activeAlarm = ref(false);
const alarmStatus = ref(0); // 新增:控制声光报警开关状态 0 关 1 开
const isRequesting = ref(false); // 新增:防止重复点击
// 新增:获取声光报警状态
const getAlarmStatus = async () => {
try {
const res = await getAlarmStatusApi();
// console.log('获取声光报警状态成功:', res);
if (res.data.code === 200) {
alarmStatus.value = res.data.data;
}
} catch (error) {
console.error('获取声光报警状态失败:', error);
}
};
// 新增:切换声光报警状态
const toggleAlarmStatus = async () => {
// 防止重复点击
if (isRequesting.value) {
return;
}
isRequesting.value = true;
try {
let newStatus = alarmStatus.value === 0 ? 1 : 0;
const res = await setAlarmStatusApi(newStatus);
if (res.data.code === 200) {
alarmStatus.value = newStatus;
} else {
// console.error('设置声光报警状态失败:', res.data.message);
message.error(res.data.data);
}
} catch (error) {
console.error('设置声光报警状态异常:', error);
} finally {
// 请求完成后重置标志
isRequesting.value = false;
}
};
/** 新增:修改报警状态结束 */
// REM自适应配置
const active = ref(false);
const REM_CONFIG = {
......@@ -108,8 +149,25 @@ const REM_CONFIG = {
// 基准值:1rem = 100px
baseSize: 100
};
// 跳转首页
const navTo = () => {
// 动态路由
const navTo = async () => {
let result = routeStore.menus;
let getStorage = localStorage.getItem('loginId');
if(!getStorage) {
window.location.href = '/login';
}
let res = await api_getRoleId(getStorage);
let menus = res.data.data.permissionIds;
const routeList: any = []
for (let item of result) {
let res = menus.find(data => data.menuPath == item.key);
if (res) {
routeList.push(item);
}
}
localStg.set('routerList', routeList)
window.location.href = '/home';
};
......@@ -559,46 +617,79 @@ async function setTimePerson() {
}
iconPoint(viewer, pins);
}
setInterval(setTimePerson, 2 * 60 * 1000);
setInterval(setTimePerson, 20 * 1000);
// setInterval(setTimePerson, 2 * 60 * 1000);
onMounted(async () => {
await getAlarmStatus(); // 获取报警状态
add3dtiles();
pointLine(viewer);
setTimeout(async () => {
fenceListGet();
const res = await getPointAllPersonApi();
const personData = res.data.data;
console.log('--1--', personData);
personData.map(item => {
pins.push({
id: item.cardId,
name: item.realName,
type: 1,
image: bluePersonIcon,
position: {
lon: item.lon,
lat: item.lat
},
data: item,
entity: null
});
const createTime = new Date(item.createTime);
const now = new Date();
// 计算两个时间的差值(毫秒)
const diffInMs = now - createTime;
// 转换为分钟
const diffInMinutes = diffInMs / (1000 * 60);
// 判断是否超过3分钟
if (diffInMinutes > 3) {
} else {
pins.push({
id: item.cardId,
name: item.realName,
type: 1,
image: bluePersonIcon,
createTime: item.createTime,
position: {
lon: item.lon,
lat: item.lat
},
data: item,
entity: null
});
}
});
// 获取并显示车辆数据,使用不同的前缀
const resCar = await getCarPointAllCarApi();
const carData = resCar.data.data;
carData.map(item => {
pins.push({
id: item.carNumber,
name: item.carNumber,
type: 2,
image: blueCarIcon,
position: {
lon: item.lon,
lat: item.lat
},
data: item,
entity: null
});
const createTime = new Date(item.createTime);
const now = new Date();
// 计算两个时间的差值(毫秒)
const diffInMs = now - createTime;
// 转换为天数
const diffInDays = diffInMs / (1000 * 60);
// 判断是否超过20分钟
if (diffInDays > 20) {
} else {
pins.push({
id: item.carNumber,
name: item.carNumber,
type: 2,
image: blueCarIcon,
position: {
lon: item.lon,
lat: item.lat
},
data: item,
entity: null
});
}
});
// 获取在线监测
......@@ -639,7 +730,7 @@ onMounted(async () => {
});
iconPoint(viewer, pins).then(result => {
console.log(result);
console.log('--2--',result);
});
}, 2000);
// setTimePerson();
......@@ -647,7 +738,6 @@ onMounted(async () => {
setRemUnit();
// 监听窗口大小变化
window.addEventListener('resize', setRemUnit);
// zhaojunbao 结束
const handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas);
......@@ -724,7 +814,7 @@ onMounted(async () => {
console.log(labelData.value);
const webRtcServrce = ref();
nextTick(() => {
webRtcServrce.value = new WebRtcStreamer('video', `${location.protocol}//` + `192.168.2.53:8000`);
webRtcServrce.value = new WebRtcStreamer('video', `${location.protocol}//` + `192.168.2.67:8000`);
webRtcServrce.value.connect(res.data.data.videoStream);
});
}
......@@ -749,7 +839,7 @@ onUnmounted(() => {
viewer.destroy();
viewer = null;
}
// 移除窗口大小变化监听
window.removeEventListener('resize', setRemUnit);
......@@ -761,9 +851,11 @@ onUnmounted(() => {
<template>
<div class="wrapper">
<div class="top-toolbar">
<div class="baojing">
<div class="baojing" @click="toggleAlarmStatus">
声光报警
<NSwitch v-model:value="active" />
<!-- <NSwitch v-model:value="active" /> -->
<img src="@/assets/jinrun/open.png" alt="" srcset="" v-show="alarmStatus == 1">
<img src="@/assets/jinrun/close.png" alt="" srcset="" v-show="alarmStatus == 0">
</div>
<!-- <i class="split-line"></i> -->
......@@ -874,7 +966,6 @@ onUnmounted(() => {
allowfullscreen="true"
allowtransparency="true"
allow="autoplay"
scrolling="no"
:src="link"
width="100%"
height="100%"
......@@ -1037,7 +1128,7 @@ onUnmounted(() => {
<!-- 非cesium相关 结束 -->
</template>
<style scoped>
<style scoped lang="scss">
html,
body {
width: 100%;
......@@ -1241,9 +1332,9 @@ span {
/* zhaojunbao */
.top-toolbar {
position: absolute;
top: 0.5rem;
top: 0.44rem;
right: 0.5rem;
width: 240px;
width: 300px;
height: 0.4rem;
color: #11e0ff;
z-index: 99999;
......@@ -1258,9 +1349,24 @@ span {
}
.baojing {
.alarmTxt{
font-size: 0.18rem;
display: inline-block;
width: 100px;
}
position: relative;
padding-left: 25px;
display: block;
display: flex;
justify-content: start;
align-items: center;
height: 20px;
img{
width: 0.5rem;
height: 0.22rem;
cursor: pointer;
margin-left: 10px;
}
&::before {
content: '';
......
......@@ -41,13 +41,17 @@ async function handleSubmit() {
const res = await api_loginPost(model);
if (res.data.code == 200) {
// 模拟loginByToken的逻辑
localStorage.setItem('loginId', res.data.data.roleId);
localStorage.setItem('token', res.data.data.token);
window.$notification?.success({
title: '登录成功',
content: '欢迎回来,登录已完成',
duration: 3000
duration: 3000,
style: {
zIndex: 9999
}
});
router.push('/home');
router.push('/cesiumDeom');
} else {
window.$notification?.error({
title: '登录失败',
......
......@@ -3,6 +3,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......@@ -13,7 +15,7 @@ onMounted(async () => {
</script>
<template>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" scrolling="no" src="http://192.168.2.54:9528/large" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/large`" frameborder="0"></iframe>
</template>
<style scoped></style>
\ No newline at end of file
......@@ -3,6 +3,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......@@ -13,7 +15,7 @@ onMounted(async () => {
</script>
<template>
<iframe src="http://192.168.2.54:9528/result" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/result`" frameborder="0"></iframe>
</template>
<style scoped></style>
......@@ -3,6 +3,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......@@ -13,7 +15,7 @@ onMounted(async () => {
</script>
<template>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" scrolling="no" src="http://192.168.2.54:9528/camera" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/camera`" frameborder="0"></iframe>
</template>
<style scoped></style>
<template>
<iframe src="http://192.168.2.54:9528/videos" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/videos`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.54:9528/arithmetic" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/arithmetic`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.54:9528/remind" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/remind`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.54:9528/pushmessage" frameborder="0"></iframe>
<iframe allowfullscreen="true" allowtransparency="true" allow="autoplay" :src="`${baseUrl}/pushmessage`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_AI_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.15:81/dataMonitor/bmwy/history" frameborder="0"></iframe>
<iframe :src="`${baseUrl}/dataMonitor/bmwy/history`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_CASTING_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.15:81/dataMonitor/jyl/history" frameborder="0"></iframe>
<iframe :src="`${baseUrl}/dataMonitor/jyl/history`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_CASTING_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe style="width: 100%; height: 100%;" src="http://192.168.2.15:81/index" frameborder="0"></iframe>
<iframe style="width: 100%; height: 100%;" :src="`${baseUrl}/index`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_CASTING_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
<template>
<iframe src="http://192.168.2.15:81/personMonitor/valueInput" frameborder="0"></iframe>
<iframe :src="`${baseUrl}/personMonitor/valueInput`" frameborder="0"></iframe>
</template>
<script lang="ts" setup>
......@@ -7,6 +7,8 @@ import { api_tokenGet } from '@/api';
import { useMessage } from 'naive-ui';
import { onMounted } from 'vue';
const baseUrl = import.meta.env.VITE_CASTING_URL;
onMounted(async () => {
const message = useMessage();
let res = await api_tokenGet()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment