Merge branch 'master' of http://47.109.37.87:3000/by2025/admin-vben5
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
FLL 2025-07-26 17:10:10 +08:00
commit ba1deb7b4e
10 changed files with 140 additions and 50 deletions

View File

@ -14,6 +14,7 @@
<!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 --> <!-- 由 vite 注入 VITE_APP_TITLE 变量,在 .env 文件内配置 -->
<title><%= VITE_APP_TITLE %></title> <title><%= VITE_APP_TITLE %></title>
<link rel="icon" href="/favicon.ico" /> <link rel="icon" href="/favicon.ico" />
<script type="text/javascript" src="/EasyPlayer-element.min.js"></script>
</head> </head>
<body> <body>
<div id="app"></div> <div id="app"></div>

View File

@ -144,9 +144,9 @@ export interface PersonForm extends BaseEntity {
*/ */
authGroupId?: string | number authGroupId?: string | number
begDate?: string authBegDate?: string
endDate?: string authEndDate?: string
} }
export interface PersonQuery extends PageQuery { export interface PersonQuery extends PageQuery {

View File

@ -5,6 +5,7 @@ import { renderDict } from "#/utils/render"
import { resident_unitList } from "#/api/property/resident/unit" import { resident_unitList } from "#/api/property/resident/unit"
import { authGroupList } from '#/api/sis/authGroup' import { authGroupList } from '#/api/sis/authGroup'
import type { AuthGroupVO, AuthGroupQuery } from '#/api/sis/authGroup/model' import type { AuthGroupVO, AuthGroupQuery } from '#/api/sis/authGroup/model'
import { toRaw } from 'vue'
export const querySchema: FormSchemaGetter = () => [ export const querySchema: FormSchemaGetter = () => [
@ -157,9 +158,10 @@ export const modalSchema: FormSchemaGetter = () => [
rules: 'required', rules: 'required',
}, },
{ {
label: '身份证号', label: '号',
fieldName: 'idCard', fieldName: 'idCard',
component: "Input", component: "Input",
rules: 'required',
}, },
{ {
label: '邮箱', label: '邮箱',
@ -221,12 +223,23 @@ export const modalSchema: FormSchemaGetter = () => [
format: 'YYYY-MM-DD HH:mm:ss', format: 'YYYY-MM-DD HH:mm:ss',
valueFormat: 'YYYY-MM-DD HH:mm:ss', valueFormat: 'YYYY-MM-DD HH:mm:ss',
}, },
rules: 'required', dependencies: {
show: (values) => {
return typeof (values.id) !== 'undefined'
},
triggerFields: ['id'],
}
}, },
{ {
label: '通行权限组', label: '通行权限组',
fieldName: 'authGroupId', fieldName: 'authGroupId',
component: 'ApiSelect', component: 'ApiSelect',
dependencies: {
show: (values) => {
return typeof (values.id) !== 'undefined'
},
triggerFields: ['id'],
},
componentProps: { componentProps: {
resultField: 'list', // 根据API返回结构调整 resultField: 'list', // 根据API返回结构调整
labelField: 'name', labelField: 'name',
@ -244,8 +257,7 @@ export const modalSchema: FormSchemaGetter = () => [
} }
return authGroupArr return authGroupArr
}, },
}, }
rules: 'required',
}, },
{ {
label: '人脸图片', label: '人脸图片',

View File

@ -1,56 +1,60 @@
<script setup lang="ts"> <script setup lang="ts">
import {computed, reactive, ref} from 'vue'; import { computed, reactive, ref } from "vue";
import {useVbenModal} from '@vben/common-ui'; import { useVbenModal } from "@vben/common-ui";
import {$t} from '@vben/locales'; import { $t } from "@vben/locales";
import {cloneDeep} from '@vben/utils'; import { cloneDeep } from "@vben/utils";
import {useVbenForm} from '#/adapter/form'; import { useVbenForm } from "#/adapter/form";
import {personAdd, personInfo, personUpdate} from '#/api/property/resident/person'; import {
import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; personAdd,
import {modalSchema} from './data'; personInfo,
import QueryUserList from './query-user-list.vue' personUpdate,
import QueryUnitList from './query-unit-list.vue' } from "#/api/property/resident/person";
import { defaultFormValueGetter, useBeforeCloseDiff } from "#/utils/popup";
import { modalSchema } from "./data";
import QueryUserList from "./query-user-list.vue";
import QueryUnitList from "./query-unit-list.vue";
const emit = defineEmits<{ reload: [] }>(); const emit = defineEmits<{ reload: [] }>();
const isUpdate = ref(false); const isUpdate = ref(false);
const title = computed(() => { const title = computed(() => {
return isUpdate.value ? $t('pages.common.edit') : $t('pages.common.add'); return isUpdate.value ? $t("pages.common.edit") : $t("pages.common.add");
}); });
let userInfo = reactive({ let userInfo = reactive({
userId: '', userId: "",
userName: '', userName: "",
phone: '', phone: "",
gender: '', gender: "",
}); });
let unitName = ref(''); let unitName = ref("");
const userId = ref<number | string>(0); const userId = ref<number | string>(0);
const unitId = ref<string>(''); const unitId = ref<string>("");
const [BasicForm, formApi] = useVbenForm({ const [BasicForm, formApi] = useVbenForm({
commonConfig: { commonConfig: {
// //
formItemClass: 'col-span-1', formItemClass: "col-span-1",
// label px // label px
labelWidth: 100, labelWidth: 100,
// //
componentProps: { componentProps: {
class: 'w-full', class: "w-full",
} },
}, },
schema: modalSchema(), schema: modalSchema(),
showDefaultActions: false, showDefaultActions: false,
wrapperClass: 'grid-cols-2', wrapperClass: "grid-cols-2",
}); });
const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff(
{ {
initializedGetter: defaultFormValueGetter(formApi), initializedGetter: defaultFormValueGetter(formApi),
currentGetter: defaultFormValueGetter(formApi), currentGetter: defaultFormValueGetter(formApi),
}, }
); );
const [BasicModal, modalApi] = useVbenModal({ const [BasicModal, modalApi] = useVbenModal({
// //
class: 'w-[70%]', class: "w-[70%]",
fullscreenButton: false, fullscreenButton: false,
onBeforeClose, onBeforeClose,
onClosed: handleClosed, onClosed: handleClosed,
@ -68,7 +72,7 @@ const [BasicModal, modalApi] = useVbenModal({
const record = await personInfo(id); const record = await personInfo(id);
userId.value = record.userId; userId.value = record.userId;
unitId.value = record.unitId.toString(); unitId.value = record.unitId.toString();
record.state=record.state?.toString() record.state = record.state?.toString();
await formApi.setValues(record); await formApi.setValues(record);
} }
await markInitialized(); await markInitialized();
@ -92,14 +96,16 @@ async function handleConfirm() {
// data.gender = userInfo.gender // data.gender = userInfo.gender
// } // }
if (unitName.value) { if (unitName.value) {
data.unitName = unitName.value data.unitName = unitName.value;
} }
data.begDate = data.authTime[0] if (isUpdate.value && data.authTime !== 0) {
data.endDate = data.authTime[1] data.authBegDate = data.authTime[0];
data.authEndDate = data.authTime[1];
}
await (isUpdate.value ? personUpdate(data) : personAdd(data)); await (isUpdate.value ? personUpdate(data) : personAdd(data));
resetInitialized(); resetInitialized();
emit('reload'); emit("reload");
modalApi.close(); modalApi.close();
} catch (error) { } catch (error) {
console.error(error); console.error(error);
@ -126,10 +132,16 @@ function getUnitInfo(unit: { name: string }) {
<BasicModal :title="title"> <BasicModal :title="title">
<BasicForm> <BasicForm>
<template #userId="slotProps"> <template #userId="slotProps">
<QueryUserList @update:userInfo="getUserInfo" v-bind="slotProps" :isUpdate="isUpdate" :userId="userId"/> <QueryUserList @update:userInfo="getUserInfo"
v-bind="slotProps"
:isUpdate="isUpdate"
:userId="userId" />
</template> </template>
<template #unitId="slotProps"> <template #unitId="slotProps">
<QueryUnitList @update:unitInfo="getUnitInfo" v-bind="slotProps" :isUpdate="isUpdate" :unitId="unitId"/> <QueryUnitList @update:unitInfo="getUnitInfo"
v-bind="slotProps"
:isUpdate="isUpdate"
:unitId="unitId" />
</template> </template>
</BasicForm> </BasicForm>
</BasicModal> </BasicModal>

View File

@ -2,11 +2,11 @@
<Page class="h-full w-full"> <Page class="h-full w-full">
<!-- 设备分组区域 --> <!-- 设备分组区域 -->
<div class="flex h-full gap-[8px]"> <div class="flex h-full gap-[8px]">
<ChannelTree class="w-[260px]" @check="onNodeChecked" /> <ChannelTree class="h-[83vh] w-[260px]" @check="onNodeChecked" />
<!-- 设备分组区域 --> <!-- 设备分组区域 -->
<div class="bg-background flex-1"> <div class="bg-background flex-1">
<div class="video-play-area flex h-[calc(100%-40px)] flex-wrap"> <div class="video-play-area flex h-[calc(100%-30px)] flex-wrap">
<div <div
v-for="i in playerNum" v-for="i in playerNum"
:style="playerStyle" :style="playerStyle"
@ -22,11 +22,19 @@
></video> ></video>
</div> </div>
</div> </div>
<div class="player-area flex h-[40px] gap-[5px]"> <div class="player-area flex h-[30px] gap-[5px]">
<div @click="onPlayerNumChanged(1)" class="h-[40px] w-[40px]">1</div> <div @click="onPlayerNumChanged(1)" class="h-[20px] w-[20px]">
<div @click="onPlayerNumChanged(2)" class="h-[40px] w-[40px]">2</div> <Svg1FrameIcon style="width: 100%; height: 100%" />
<div @click="onPlayerNumChanged(3)" class="h-[40px] w-[40px]">3</div> </div>
<div @click="onPlayerNumChanged(4)" class="h-[40px] w-[40px]">4</div> <div @click="onPlayerNumChanged(2)" class="h-[20px] w-[20px]">
<Svg4FrameIcon style="width: 100%; height: 100%" />
</div>
<div @click="onPlayerNumChanged(3)" class="h-[20px] w-[20px]">
<Svg9FrameIcon style="width: 100%; height: 100%" />
</div>
<div @click="onPlayerNumChanged(4)" class="h-[20px] w-[20px]">
<Svg16FrameIcon style="width: 100%; height: 100%" />
</div>
</div> </div>
</div> </div>
</div> </div>
@ -40,6 +48,12 @@ import ChannelTree from './channel-tree.vue';
import mpegts from 'mpegts.js'; import mpegts from 'mpegts.js';
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue';
import { addStreamProxy } from '#/api/sis/stream'; import { addStreamProxy } from '#/api/sis/stream';
import {
Svg16FrameIcon,
Svg1FrameIcon,
Svg4FrameIcon,
Svg9FrameIcon,
} from '@vben/icons';
const selected = 'selected'; const selected = 'selected';
@ -112,7 +126,6 @@ function onPlayerNumChanged(val: number) {
playerNum.value = changeNum; playerNum.value = changeNum;
// //
if (changeBeforeNum > changeNum) { if (changeBeforeNum > changeNum) {
debugger;
const playerArr = []; const playerArr = [];
for (let i = 0; i < playerList.length; i++) { for (let i = 0; i < playerList.length; i++) {
const playerBox = playerList[i]; const playerBox = playerList[i];
@ -176,7 +189,6 @@ function onNodeChecked(
/** /**
* 如果当前页面有选择播放未知并且播放视频只有一个则播放到制定位置 * 如果当前页面有选择播放未知并且播放视频只有一个则播放到制定位置
*/ */
debugger;
if (currentSelectPlayerIndex.value !== -1 && checkNode.length == 1) { if (currentSelectPlayerIndex.value !== -1 && checkNode.length == 1) {
doPlayer(checkNode[0], currentSelectPlayerIndex.value - 1); doPlayer(checkNode[0], currentSelectPlayerIndex.value - 1);
} }
@ -360,4 +372,10 @@ onUnmounted(() => {
.player.selected { .player.selected {
border: 2px solid deepskyblue; border: 2px solid deepskyblue;
} }
.player-area {
display: flex;
align-items: center;
cursor: pointer;
}
</style> </style>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1737058951278" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7100"
width="200" height="200">
<path d="M929.8 929.8H94.2V94.2h835.5v835.6z m-780.6-55h725.5V149.2H149.2v725.6z" fill="currentColor" p-id="7101"></path>
<path d="M149.8 484.5h725v55h-725zM150.5 673.3h725v55h-725zM149.8 288.4h725v55h-725z" fill="currentColor"
p-id="7102"></path>
<path d="M293.3 149.2h55v725.5h-55zM488.5 149.2h55v725.5h-55zM678.5 149.2h55v725.5h-55z" fill="currentColor"
p-id="7103"></path>
</svg>

After

Width:  |  Height:  |  Size: 696 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1737058918303" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6087"
width="200" height="200">
<path d="M929.8 929.8H94.2V94.2h835.5v835.6z m-780.6-55h725.5V149.2H149.2v725.6z" fill="currentColor" p-id="6088"></path>
<path d="M149.8 621.5h725v55h-725zM149.8 354.4h725v55h-725z" fill="currentColor" p-id="6089"></path>
<path d="M359.3 149.2h55v725.5h-55zM627.5 149.2h55v725.5h-55z" fill="currentColor" p-id="6090"></path>
</svg>

After

Width:  |  Height:  |  Size: 629 B

View File

@ -0,0 +1,9 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1702632074905" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg"
p-id="15294"
width="200" height="200">
<path
d="M874.5 68.2h-726c-45.2 0-82 36.8-82 82v726.1c0 45.2 36.8 82 82 82h726.1c45.2 0 82-36.8 82-82V150.2c-0.1-45.2-36.9-82-82.1-82z m11.7 82v327.9H546.6V138.5h327.9c6.5 0 11.7 5.2 11.7 11.7z m-737.7-11.7h327.9v339.6H136.8V150.2c0-6.5 5.2-11.7 11.7-11.7z m-11.7 737.7V548.4h339.6V888H148.5c-6.5 0-11.7-5.3-11.7-11.8zM874.5 888H546.6V548.4h339.6v327.9c0 6.4-5.2 11.7-11.7 11.7z"
fill="currentColor" p-id="15295"></path>
</svg>

After

Width:  |  Height:  |  Size: 734 B

View File

@ -0,0 +1,8 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN"
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg t="1702631931431" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="9656"
width="200" height="200">
<path
d="M881.2 961.3H136c-42.2 0-76.5-34.3-76.5-76.5V139.5C59.5 97.3 93.8 63 136 63h745.2c42.2 0 76.5 34.3 76.5 76.5v745.2c0.1 42.2-34.3 76.6-76.5 76.6zM136 109.6c-16.5 0-29.9 13.4-29.9 29.9v745.2c0 16.5 13.4 29.9 29.9 29.9h745.2c16.5 0 29.9-13.4 29.9-29.9V139.5c0-16.5-13.4-29.9-29.9-29.9H136z"
fill="currentColor" p-id="9657"></path>
</svg>

After

Width:  |  Height:  |  Size: 644 B

View File

@ -16,8 +16,20 @@ const SvgTopiamIcon = createIconifyIcon('svg:topiam');
const SvgWechatIcon = createIconifyIcon('svg:wechat'); const SvgWechatIcon = createIconifyIcon('svg:wechat');
const SvgQQIcon = createIconifyIcon('svg:qq'); const SvgQQIcon = createIconifyIcon('svg:qq');
const SvgSnailJobIcon = createIconifyIcon('svg:snail-job'); const SvgSnailJobIcon = createIconifyIcon('svg:snail-job');
/*---------------------------------sis 使用的icon------------------------------------------*/
const Svg1FrameIcon = createIconifyIcon('svg:one-frame');
const Svg4FrameIcon = createIconifyIcon('svg:four-frame');
const Svg9FrameIcon = createIconifyIcon('svg:9-frame');
const Svg16FrameIcon = createIconifyIcon('svg:16-frame');
export { export {
Svg1FrameIcon,
Svg4FrameIcon,
Svg9FrameIcon,
Svg16FrameIcon,
SvgAntdvLogoIcon, SvgAntdvLogoIcon,
SvgAvatar1Icon, SvgAvatar1Icon,
SvgAvatar2Icon, SvgAvatar2Icon,