This commit is contained in:
fyy
2025-08-29 12:26:43 +08:00
11 changed files with 48 additions and 32 deletions

View File

@@ -21,7 +21,9 @@ jobs:
run: npm i pnpm -g
- name: 安装依赖
run: pnpm install
run: |
git config --global url."https://".insteadOf git://
pnpm install
continue-on-error: false # 依赖安装失败则终止工作流
- name: 构建项目

View File

@@ -248,7 +248,9 @@ onMounted(() => {
});
});
const trendData = ref<any>({});
const hourTotal = ref<number>();
const dayTotal = ref<number>();
const monthTotal = ref<number>();
async function handleSelectFloor(selectedKeys, info) {
let data = {
day: currentDay.value.format('YYYY-MM-DD'),
@@ -269,6 +271,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新日数据图表
if (chartInstances.value.day && trend.hour) {
hourTotal.value = trend.hour.total;
chartInstances.value.day.setOption({
xAxis: {
data: trend.hour.categories || [],
@@ -284,6 +287,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新月数据图表
if (chartInstances.value.month && trend.day) {
dayTotal.value = trend.day.total;
chartInstances.value.month.setOption({
xAxis: {
data: trend.day.categories || [],
@@ -299,6 +303,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新年数据图表
if (chartInstances.value.year && trend.month) {
monthTotal.value = trend.month.total;
chartInstances.value.year.setOption({
xAxis: {
data: trend.month.categories || [],
@@ -332,7 +337,8 @@ async function handleSelectFloor(selectedKeys, info) {
<DatePicker
v-model:value="currentDay"
:disabled-date="disabledDay"
/>当日能耗总值125.04KW.h
/>
<span>当日能耗总值{{ hourTotal }}KW.h</span>
</div>
</div>
<div id="day" style="height: 100%; width: 100%"></div>
@@ -352,7 +358,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentMonth"
:disabled-date="disabledMonth"
picker="month"
/>当月能耗总值125.04KW.h
/>
<span>当日能耗总值{{ dayTotal }}KW.h</span>
</div>
</div>
<div id="month" style="height: 100%; width: 100%"></div>
@@ -372,7 +379,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentYear"
:disabled-date="disabledYear"
picker="year"
/>当年能耗总值125.04KW.h
/>
<span>当日能耗总值{{ monthTotal }}KW.h</span>
</div>
</div>
<div id="year" style="height: 100%; width: 100%"></div>

View File

@@ -37,8 +37,8 @@ const gridOptions: VxeGridProps = {
return await getVisitorList({
pageNum: page.currentPage,
pageSize: page.pageSize,
begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0],
endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1],
begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0].format('YYYY-MM-DD'),
endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1].format('YYYY-MM-DD'),
personName: typeof formValues.personName === 'undefined' ? '' : formValues.personName,
recordType: typeof formValues.recordType === 'undefined' ? '' : formValues.recordType,
});

View File

@@ -11,10 +11,7 @@ import { deviceManageList } from '#/api/sis/deviceManage/index.js';
import { deviceChannelList } from '#/api/sis/deviceChannel/index.js';
import mpegts from 'mpegts.js';
import { message } from 'ant-design-vue';
import {
addFFmpegMediaStreamProxy,
addMediaStreamProxy,
} from '#/api/sis/stream/index.js';
import { addMediaStreamProxy } from '#/api/sis/stream/index.js';
import { checkHEVCSupport } from '#/utils/video.js';
// 地图全局对象
@@ -114,7 +111,8 @@ function loadCameraData() {
function doPlayer(nodeData) {
if (mpegts.isSupported()) {
streamProxy(nodeData, (res) => {
const url = res.flv;
const host = window.location.host;
const url = `http://${host}/${res.app}/${res.streamId}.live.flv`;
// 将url 绑定到 nodeData
nodeData.url = url;
closeVideo(currentPlayer);
@@ -152,8 +150,8 @@ function streamProxy(params, cb) {
if (isSupportH265) {
addMediaStreamProxy(params).then((res) => cb(res));
} else {
// addMediaStreamProxy(params).then((res) => cb(res));
addFFmpegMediaStreamProxy(params).then((res) => cb(res));
addMediaStreamProxy(params).then((res) => cb(res));
// addFFmpegMediaStreamProxy(params).then((res) => cb(res));
}
}

View File

@@ -1,7 +1,7 @@
<template>
<Page :auto-content-height="true">
<div class="flex h-full gap-[8px]">
<div class="h-full tree-box">
<div class="tree-box h-full">
<DpTree class="h-full w-[300px]" @checked="onNodeChecked" />
</div>
<div class="bg-background flex-1">
@@ -180,7 +180,8 @@ function doPlayer(nodeData: any, index: number = 0) {
console.log('index=', index);
if (mpegts.isSupported()) {
streamProxy(nodeData, (res: AddStreamProxyResult) => {
const url = res.flv;
const host = window.location.host;
const url = `http://${host}/${res.app}/${res.streamId}.live.flv`;
// 将url 绑定到 nodeData
nodeData.url = url;
closePlayer(index);
@@ -253,7 +254,7 @@ let isSupportH265 = false;
onMounted(() => {
// 检测浏览器是否支持h265
isSupportH265 = checkHEVCSupport();
setInterval(catchUp, 10000);
setInterval(catchUp, 120000);
});
onUnmounted(() => {

View File

@@ -144,12 +144,14 @@ async function setupCommunitySelect() {
{
componentProps: () => ({
options: arr,
allowClear: true,
}),
fieldName: 'bindDeviceId',
},
{
componentProps: () => ({
options: arr,
allowClear: true,
mode: 'multiple', // 关键属性,启用多选模式
}),
fieldName: 'devicePoint',

View File

@@ -103,6 +103,15 @@ test.forEach((item) => {
});
export const modalSchema: FormSchemaGetter = () => [
{
label: '主键',
fieldName: 'id',
component: 'Input',
dependencies: {
show: () => false,
triggerFields: [''],
},
},
{
label: '人员标签',
fieldName: 'rosterType',

View File

@@ -337,7 +337,6 @@ function doPlayer(nodeData: any, index: number = 0) {
player,
key: nodeData.id,
data: nodeData,
el: videoElement,
};
} else {
console.log('视频播放元素获取异常');
@@ -381,13 +380,10 @@ function catchUp() {
if (playerData) {
const { player, el } = playerData;
const end = player.buffered.end(player.buffered.length - 1);
const { currentTime } = el;
if (end && currentTime) {
const diff = end - el.currentTime;
if (diff > 2) {
// 如果延迟超过2秒
el.currentTime = end - 0.5; // 跳转到接近直播点
}
const diff = end - el.currentTime;
if (diff > 2) {
// 如果延迟超过2秒
el.currentTime = end - 0.5; // 跳转到接近直播点
}
}
});
@@ -397,7 +393,7 @@ let isSupportH265 = false;
onMounted(() => {
// 检测浏览器是否支持h265
isSupportH265 = checkHEVCSupport();
setInterval(catchUp, 10000);
setInterval(catchUp, 120000);
});
onUnmounted(() => {

View File

@@ -58,9 +58,9 @@ export const columns: VxeGridProps['columns'] = [
slots: {
default: ({ row }: any) => {
const levelColors: Record<string, string> = {
1: 'red',
1: 'blue',
2: 'orange',
3: 'blue',
3: 'red',
};
return h(
'span',

View File

@@ -58,9 +58,9 @@ export const columns: VxeGridProps['columns'] = [
slots: {
default: ({ row }: any) => {
const levelColors: Record<string, string> = {
1: 'red',
1: 'blue',
2: 'orange',
3: 'blue',
3: 'red',
};
return h(
'span',

View File

@@ -59,9 +59,9 @@ export const columns: VxeGridProps['columns'] = [
slots: {
default: ({ row }: any) => {
const levelColors: Record<string, string> = {
1: 'red',
1: 'blue',
2: 'orange',
3: 'blue',
3: 'red',
};
return h(
'span',