From d4e22611b7717e4a57fb9646b77ed73d3356d0a2 Mon Sep 17 00:00:00 2001
From: suyanyan <1321717064@qq.com>
Date: Tue, 16 Jul 2024 10:37:19 +0800
Subject: [PATCH 01/11] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=BA=E5=91=98?=
=?UTF-8?q?=E7=AE=A1=E7=90=86=E7=9B=B8=E5=85=B3=E9=A1=B5=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
SafeCampus.WEB/src/api/interface/sys/index.ts | 1 +
.../src/api/interface/sys/usermanage/index.ts | 15 +++
.../api/interface/sys/usermanage/personnel.ts | 47 +++++++
SafeCampus.WEB/src/api/modules/index.ts | 2 +-
.../src/api/modules/usermanage/index.ts | 15 +++
.../src/api/modules/usermanage/personnel.ts | 56 ++++++++
.../src/views/userManage/personnel/index.vue | 127 ++++++++++++++++++
7 files changed, 262 insertions(+), 1 deletion(-)
create mode 100644 SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts
create mode 100644 SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts
create mode 100644 SafeCampus.WEB/src/api/modules/usermanage/index.ts
create mode 100644 SafeCampus.WEB/src/api/modules/usermanage/personnel.ts
create mode 100644 SafeCampus.WEB/src/views/userManage/personnel/index.vue
diff --git a/SafeCampus.WEB/src/api/interface/sys/index.ts b/SafeCampus.WEB/src/api/interface/sys/index.ts
index fec76b9..663fadb 100644
--- a/SafeCampus.WEB/src/api/interface/sys/index.ts
+++ b/SafeCampus.WEB/src/api/interface/sys/index.ts
@@ -20,3 +20,4 @@ export * from "./audit";
export * from "./organization";
export * from "./auth";
export * from "./warn";
+export * from "./usermanage";
diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts
new file mode 100644
index 0000000..7d0c865
--- /dev/null
+++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/index.ts
@@ -0,0 +1,15 @@
+/**
+ * @description
+ * @license Apache License Version 2.0
+ * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
+ * @remarks
+ * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
+ * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
+ * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
+ * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
+ * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
+ * @see https://gitee.com/dotnetmoyu/SimpleAdmin
+ */
+export * from "./personnel";
diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts
new file mode 100644
index 0000000..80ad31b
--- /dev/null
+++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts
@@ -0,0 +1,47 @@
+/**
+ * @description 用户管理接口
+ * @license Apache License Version 2.0
+ * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
+ * @remarks
+ * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
+ * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
+ * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
+ * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
+ * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
+ */
+
+import { ReqId, ReqPage } from "@/api";
+/**
+ * @Description: 人员管理接口
+ * @Author: syy
+ * @Date: 2023-12-15 15:34:54
+ */
+
+export namespace SysUserPersonnel {
+ /** 头像信息 */
+ export interface SysUserAvatar {
+ /** 头像 */
+ avatar?: string;
+ }
+
+ /** 用户信息 */
+ export interface SysUserPerInfo {
+ id: number | string;
+ /** 人员id */
+ personId?: string;
+ /** 姓名 */
+ name?: string;
+ /** 年龄 */
+ age?: number | string;
+ /** 性别 */
+ gender?: string;
+ /** 手机 */
+ phone?: string;
+ /** 扩展字段 */
+ extData?: string;
+ /** 人脸 */
+ // faces: Array<>;
+ }
+}
diff --git a/SafeCampus.WEB/src/api/modules/index.ts b/SafeCampus.WEB/src/api/modules/index.ts
index 50b2c9b..0f7fab2 100644
--- a/SafeCampus.WEB/src/api/modules/index.ts
+++ b/SafeCampus.WEB/src/api/modules/index.ts
@@ -19,4 +19,4 @@ export * from "./warn";
export * from "./monitor";
export * from "./sysconfig";
export * from "./statistion";
-
+export * from "./usermanage";
diff --git a/SafeCampus.WEB/src/api/modules/usermanage/index.ts b/SafeCampus.WEB/src/api/modules/usermanage/index.ts
new file mode 100644
index 0000000..7d0c865
--- /dev/null
+++ b/SafeCampus.WEB/src/api/modules/usermanage/index.ts
@@ -0,0 +1,15 @@
+/**
+ * @description
+ * @license Apache License Version 2.0
+ * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
+ * @remarks
+ * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
+ * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
+ * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
+ * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
+ * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
+ * @see https://gitee.com/dotnetmoyu/SimpleAdmin
+ */
+export * from "./personnel";
diff --git a/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts b/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts
new file mode 100644
index 0000000..29f0c5d
--- /dev/null
+++ b/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts
@@ -0,0 +1,56 @@
+/**
+ * @description 单页管理接口
+ * @license Apache License Version 2.0
+ * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛
+ * @remarks
+ * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款:
+ * 1.请不要删除和修改根目录下的LICENSE文件。
+ * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。
+ * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin
+ * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。
+ * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。
+ * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关
+ * @see https://gitee.com/dotnetmoyu/SimpleAdmin
+ */
+import { moduleRequest } from "@/api/request";
+import { ResPage, ZJRQ, ReqId } from "@/api/interface";
+const http = moduleRequest("/business/personApi/");
+
+/**
+ * @Description: 单页管理
+ * @Author: SYY
+ * @Date: 2023-12-15 15:34:54
+ */
+const userManagePersonnelApi = {
+ /** 获取单页分页 */
+ page(params: ZJRQ.Page) {
+ return http.post("pageQuery", params);
+ },
+ /** 获取单页详情 */
+ detail(params: ReqId) {
+ return http.get("getPersionById", params);
+ },
+ /** 删除机构 */
+ delete(params: ReqId) {
+ return http.post("deletePersonD", params);
+ },
+ /** 新增机构 */
+ add(params: ZJRQ.WarnInfo) {
+ return http.post("createPersonA", params);
+ },
+ /** 修改机构 */
+ edit(params: ZJRQ.WarnInfo) {
+ return http.post("updatePersionU", params);
+ }
+};
+
+const userPerButtonCode = {
+ /** 新增人员 */
+ add: "userManagePersonnelAdd",
+ /** 删除人员 */
+ edit: "userManagePersonnelEdit",
+ /** 删除人员 */
+ delete: "userManagePersonnelDelete"
+};
+
+export { userManagePersonnelApi, userPerButtonCode };
diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue
new file mode 100644
index 0000000..e300ebd
--- /dev/null
+++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue
@@ -0,0 +1,127 @@
+
+
+
x|)&6`jXp5>-14Y6r8c?_xTv})pW(NY1x1P zys2j#RIMZa*4edq;hQ%cV?FucHYBxlq=IOvg9fzR{m<2=S1_%Uav>@s_Cei^7&@}a z8?Zrf8Flx^D8+(OA@q3MmqIoECt1y@hsNoB%v5EF8_~8|ET&La^ rT4 4-; g`v>hiIeW3eryP^17U+<}Ulz=p?Xr4nils#7P zz$V4yC4ZGkIWj4qKjIS8RI)yY9-fSXD_{D{O1t( o=U-ZvcJC2hzV~TchP1bb&fWSS%yP*{qr33$^?WVpnMmM`J3iaxWSuO} zgAZgQu6aAJGCfza1k2BF&`=A0ld?*eS(~s(E2M 4*+th+L7;WjFE5Z|JsV~-?jw(Qyk6jXhQt>5jjEtl?>RA?30 z+ N@(=uFqj`H 0D@|doQO2did~oTvAQA~pIttrXjsr~ zU8*ZHz0-J%Y&TeOw%f(0mt}^ UpVeutD4KN?Jf~b7_glbP^9qpOPAR>}C6~WpwL){sND+Kz zfDA(3jZPy7NTtMJe*_`mHh#O!wq)8*;{EBbS6c~q6zN6vmqk2&hMYd;cr&?}F(l|E zSRj1puEbNF$76hl(E-OoDIl<^@?#r#;S5}z@lsz}#93cn3cjXH0q2dT;A>)ZHw?cs z75(q%Y5VIfqC$yM2d^B%ksk|fMS)IT3yaDs>fT>jo+^!0S@0E&WEOfFIaRAz*nO5q zrDS|L4SRn$piW_7)XEllsi^6PUzgE`lwBV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p3QN|83(3QhqfoU2Of6n!K9q8mRWLQ zQXHDn6Rd^#spRVkR>l3ktEy`KzM!hBR#6yf2HPyWHyV>iCO<2XO9Pg^fhjAo^gYa_ zQ^)_e`s}KsZ(#DEczvi2pyF@VIaZa91G(PU818xZz#@ybS73s!mWP2Y3awo?=9Rvt z@K2oZ t>0quQj580F XBVBl&H z&Fiml*y5Y9`jby1i$<($-)(E0gU$s3Fu_;X6*l!wjXoDi9Vji+5C*^MBP^ul;nzGQ zo0U{S0ZeehOGD?%I5iF!Cx^L>!43YVHjBmDyo0wW04AIqM1wOVK?VQ)b441!QKK)= z`k)s + diff --git a/SafeCampus.WEB/src/views/monitor/live/index.scss b/SafeCampus.WEB/src/views/monitor/live/index.scss new file mode 100644 index 0000000..00728b8 --- /dev/null +++ b/SafeCampus.WEB/src/views/monitor/live/index.scss @@ -0,0 +1,38 @@ +.filter { + box-sizing: border-box; + width: 280px; + height: 100%; + padding: 18px; + margin-right: 10px; + .title { + margin: 0 0 15px; + font-size: 18px; + font-weight: bold; + color: var(--el-color-info-dark-2); + letter-spacing: 0.5px; + } + .el-input { + margin: 0 0 15px; + } + .el-scrollbar { + :deep(.el-tree) { + height: 80%; + overflow: auto; + .el-tree-node__content { + height: 33px; + } + } + :deep(.el-tree--highlight-current) { + .el-tree-node.is-current > .el-tree-node__content { + background-color: var(--el-color-primary); + .el-tree-node__label, + .el-tree-node__expand-icon { + color: white; + } + .is-leaf { + color: transparent; + } + } + } + } +} diff --git a/SafeCampus.WEB/src/views/monitor/live/index.vue b/SafeCampus.WEB/src/views/monitor/live/index.vue index f999c36..2b923b5 100644 --- a/SafeCampus.WEB/src/views/monitor/live/index.vue +++ b/SafeCampus.WEB/src/views/monitor/live/index.vue @@ -4,66 +4,135 @@ * @Date: 2023-12-15 15:44:05 !--> - -- - - - - -- - - - -{{ - dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.MENU) - }} -{{ - dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.LINK) - }} -{{ dictStore.dictTranslation(SysDictEnum.MENU_TYPE, scope.row.menuType) }} -首页 -查看 - - -- -- --+ + + + + + \ No newline at end of file diff --git a/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts b/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts new file mode 100644 index 0000000..00011d7 --- /dev/null +++ b/SafeCampus.WEB/src/api/modules/usermanage/classManage.ts @@ -0,0 +1,52 @@ +/** + * @description 单页管理接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + * @see https://gitee.com/dotnetmoyu/SimpleAdmin + */ +import { moduleRequest } from "@/api/request"; +import { ResPage, ZJRQ, ReqId } from "@/api/interface"; +const http = moduleRequest("/business/dfieldApi/"); + +/** + * @Description: 单页管理 + * @Author: SYY + * @Date: 2023-12-15 15:34:54 + */ +const userManageClassManageApi = { + /** 查询底库列表 */ + page(params: ZJRQ.Page) { + return http.get("queryAll", params); + }, + /** 删除底库 */ + delete(params: ReqId) { + return http.post("deleteDfieldD", params); + }, + /** 创建底库 */ + add(params: ZJRQ.WarnInfo) { + return http.post("createDfieldA", params); + }, + /** 更新底库 */ + edit(params: ZJRQ.WarnInfo) { + return http.post("updateDfieldU", params); + } +}; + +const userClassButtonCode = { + /** 新增人员 */ + add: "userManageClassManageAdd", + /** 删除人员 */ + edit: "userManageClassManageEdit", + /** 删除人员 */ + delete: "userManageClassManageDelete" +}; + +export { userManageClassManageApi,userClassButtonCode }; diff --git a/SafeCampus.WEB/src/api/modules/usermanage/index.ts b/SafeCampus.WEB/src/api/modules/usermanage/index.ts index 7d0c865..db1d1b1 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/index.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/index.ts @@ -13,3 +13,4 @@ * @see https://gitee.com/dotnetmoyu/SimpleAdmin */ export * from "./personnel"; +export * from "./classManage"; From d7f835924c46686931a8e5ce3eee73d918c12b90 Mon Sep 17 00:00:00 2001 From: wwp <782568523@qq.com> Date: Tue, 16 Jul 2024 17:41:47 +0800 Subject: [PATCH 05/11] =?UTF-8?q?=E6=A0=B7=E5=BC=8F=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Selectors/ClassUserselector/index.vue | 246 +++++++++++++++++ .../Selectors/ClassUserselector/interface.ts | 48 ++++ SafeCampus.WEB/src/styles/element.scss | 16 +- .../monitor/live/components/userForm.vue | 127 +++++++++ .../src/views/monitor/live/index.scss | 44 ++- .../src/views/monitor/live/index.vue | 250 +++++++++++++----- 6 files changed, 658 insertions(+), 73 deletions(-) create mode 100644 SafeCampus.WEB/src/components/Selectors/ClassUserselector/index.vue create mode 100644 SafeCampus.WEB/src/components/Selectors/ClassUserselector/interface.ts create mode 100644 SafeCampus.WEB/src/views/monitor/live/components/userForm.vue diff --git a/SafeCampus.WEB/src/components/Selectors/ClassUserselector/index.vue b/SafeCampus.WEB/src/components/Selectors/ClassUserselector/index.vue new file mode 100644 index 0000000..d725bd9 --- /dev/null +++ b/SafeCampus.WEB/src/components/Selectors/ClassUserselector/index.vue @@ -0,0 +1,246 @@ + + +- -- 刷新视频++ ++- - - - + + + + ++ + + + + ++ + + + + + + + + +{{ + dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.MENU) + }} +{{ + dictStore.dictTranslation(SysDictEnum.MENU_TYPE, MenuTypeDictEnum.LINK) + }} +{{ dictStore.dictTranslation(SysDictEnum.MENU_TYPE, scope.row.menuType) }} +首页 +查看 +编辑 ++ + + +- - - - -+ ++ + + +++ ++ 刷新视频++ + + + + + diff --git a/SafeCampus.WEB/src/components/Selectors/ClassUserselector/interface.ts b/SafeCampus.WEB/src/components/Selectors/ClassUserselector/interface.ts new file mode 100644 index 0000000..2c0132b --- /dev/null +++ b/SafeCampus.WEB/src/components/Selectors/ClassUserselector/interface.ts @@ -0,0 +1,48 @@ +/** + * @description 用户选择器接口 + * @license Apache License Version 2.0 + * @Copyright (c) 2022-Now 少林寺驻北固山办事处大神父王喇嘛 + * @remarks + * SimpleAdmin 基于 Apache License Version 2.0 协议发布,可用于商业项目,但必须遵守以下补充条款: + * 1.请不要删除和修改根目录下的LICENSE文件。 + * 2.请不要删除和修改SimpleAdmin源码头部的版权声明。 + * 3.分发源码时候,请注明软件出处 https://gitee.com/dotnetmoyu/SimpleAdmin + * 4.基于本软件的作品,只能使用 SimpleAdmin 作为后台服务,除外情况不可商用且不允许二次分发或开源。 + * 5.请不得将本软件应用于危害国家安全、荣誉和利益的行为,不能以任何形式用于非法为目的的行为不要删除和修改作者声明。 + * 6.任何基于本软件而产生的一切法律纠纷和责任,均于我司无关 + * @see https://gitee.com/dotnetmoyu/SimpleAdmin + */ +import UserSelector from "./index.vue"; + +/** 用户选择器属性 */ +export interface UserSelectProps { + /** 组织树api */ + orgTreeApi: (data?: any) => Promise++ ++ ++ ++ ++ + ++ ++ + ++ + + +添加当前 +添加选中 + + + +添加 + ++ ++ + + +删除当前 +删除选中 + + + 已选择:{{ chooseData.length }}人 + ,最多选择:{{ maxCount }}人 + + + +删除 + +++ +取消 +确定 +; + /** 职位选择api */ + positionTreeApi?: (data?: any) => Promise ; + /** 角色选择api */ + roleTreeApi?: (data?: any) => Promise ; + /** 用户选择api */ + userSelectorApi: (data?: any) => Promise ; + /** 是否多选 */ + multiple?: boolean; + /** 最大用户数 */ + maxCount?: number; + /** 是否是业务 */ + biz?: boolean; +} + +/** 用户选择器表格初始化参数 */ +export interface UserSelectTableInitParams { + /** 组织ID */ + orgId?: number | string | null; + /** 职位ID */ + positionId?: number | string | null; + /** 角色ID */ + roleId?: number | string | null; +} + +/** + * @description 用户选择器实例类型 + */ +export type UserSelectorInstance = Omit , keyof ComponentPublicInstance | keyof UserSelectProps>; diff --git a/SafeCampus.WEB/src/styles/element.scss b/SafeCampus.WEB/src/styles/element.scss index 78f4b47..3e5c6d7 100644 --- a/SafeCampus.WEB/src/styles/element.scss +++ b/SafeCampus.WEB/src/styles/element.scss @@ -249,13 +249,27 @@ /* el-dialog */ .el-dialog { + padding: 0!important; .el-dialog__header { - padding: 15px 20px; + padding: 16px; + margin: 0; border-bottom: 1px solid var(--el-border-color-lighter); .el-dialog__title { font-size: 17px; } + .el-dialog__headerbtn { + top: 6px; + } + } + .el-dialog__body { + padding: 30px; + + } + .el-dialog__footer { + padding: 15px 16px; + box-sizing: border-box; + border-top: 1px solid var(--el-border-color-lighter) } } diff --git a/SafeCampus.WEB/src/views/monitor/live/components/userForm.vue b/SafeCampus.WEB/src/views/monitor/live/components/userForm.vue new file mode 100644 index 0000000..cb6b623 --- /dev/null +++ b/SafeCampus.WEB/src/views/monitor/live/components/userForm.vue @@ -0,0 +1,127 @@ + + + ++ + + + + diff --git a/SafeCampus.WEB/src/views/monitor/live/index.scss b/SafeCampus.WEB/src/views/monitor/live/index.scss index 00728b8..026c873 100644 --- a/SafeCampus.WEB/src/views/monitor/live/index.scss +++ b/SafeCampus.WEB/src/views/monitor/live/index.scss @@ -1,9 +1,16 @@ -.filter { +ul,li { + list-style: none; + padding: 0; + margin: 0; +} + +.treeBox { box-sizing: border-box; width: 280px; height: 100%; - padding: 18px; + padding: 14px; margin-right: 10px; + flex-shrink: 1; .title { margin: 0 0 15px; font-size: 18px; @@ -11,6 +18,36 @@ color: var(--el-color-info-dark-2); letter-spacing: 0.5px; } + .btn { + + } + .treeContent { + padding: 10px 0; + // height: calc(100% - 100px); + // overflow: auto; + .el-tree-node__content { + height: 33px; + } + .custom-tree-node { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + font-size: 14px; + padding-right: 8px; + .node-label { + width: 100px; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + font-size: 16px; + } + + } + :deep(.el-tree-node__content) { + height: 50px; + } + } .el-input { margin: 0 0 15px; } @@ -36,3 +73,6 @@ } } } +.table-box { + width: calc(100% - 280px); +} diff --git a/SafeCampus.WEB/src/views/monitor/live/index.vue b/SafeCampus.WEB/src/views/monitor/live/index.vue index 2b923b5..3b7b71e 100644 --- a/SafeCampus.WEB/src/views/monitor/live/index.vue +++ b/SafeCampus.WEB/src/views/monitor/live/index.vue @@ -5,19 +5,45 @@ !-->+ ++ + ++ +选择 +{{ + liveUserProps.record.directorInfo?.name + }} +取消 +确定 + ++ --摄像头分组管理
-- - - {{ node.label }} - - Append - Delete + +摄像头分组管理
+++ +添加分组 +++ + + {{ node.label }} + + + + ++ + + - - - @@ -32,9 +58,10 @@ :disabled="!scope.isSelected" @click="onDelete(scope.selectedListIds, '删除所选数据')" /> + + +移动至分组 - + -查看 编辑 +查看 + 推送人 + -+ + + + + ++ ++ + + + + + @@ -83,7 +130,7 @@ diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue new file mode 100644 index 0000000..2c3643e --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue @@ -0,0 +1,119 @@ + + +++ + + + + diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue new file mode 100644 index 0000000..59517ab --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue @@ -0,0 +1,108 @@ + + ++ ++ + ++ ++ 取消 +确定 + +++ + + + + diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index e300ebd..ad6ba4d 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -4,35 +4,78 @@ * @Date: 2024-7-15 --> -+ ++ + ++++ ++ ++ ++ 取消 +确定 + +-- - - - + ++ + +- - - - + + + {{ row.node.label }} + + + + + + + + + + + + + + ++ + + ++ + + - + + + +- - - + + + ++ + + +更多 + ++ + +{{ cmdEnum.DeleteFace }} +{{ cmdEnum.UnderpantsUnBinding }} + @@ -47,14 +90,19 @@From 682e437d248c62fcde89a6892f4f7323878b182d Mon Sep 17 00:00:00 2001 From: wwp <782568523@qq.com> Date: Wed, 17 Jul 2024 13:57:57 +0800 Subject: [PATCH 07/11] =?UTF-8?q?=E5=91=8A=E8=AD=A6=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/api/modules/warn/zjrq.ts | 4 + .../monitor/live/components/moveForm.vue | 106 ++++++++++++++++++ .../src/views/monitor/live/index.vue | 34 ++---- SafeCampus.WEB/src/views/warn/zjrq/index.vue | 87 +++++++++++++- 4 files changed, 201 insertions(+), 30 deletions(-) create mode 100644 SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue diff --git a/SafeCampus.WEB/src/api/modules/warn/zjrq.ts b/SafeCampus.WEB/src/api/modules/warn/zjrq.ts index 49a5f93..f975120 100644 --- a/SafeCampus.WEB/src/api/modules/warn/zjrq.ts +++ b/SafeCampus.WEB/src/api/modules/warn/zjrq.ts @@ -38,6 +38,10 @@ const warnZJRQApi = { warnGroup(params: ReqId) { return http.get("getInfo", params); }, + /** 获取告警分组 */ + warnType(params: ReqId) { + return http.get("getAlarmType", params); + }, }; export { warnZJRQApi }; diff --git a/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue b/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue new file mode 100644 index 0000000..6a6f1c9 --- /dev/null +++ b/SafeCampus.WEB/src/views/monitor/live/components/moveForm.vue @@ -0,0 +1,106 @@ + + +++ + + + + diff --git a/SafeCampus.WEB/src/views/monitor/live/index.vue b/SafeCampus.WEB/src/views/monitor/live/index.vue index 3b7b71e..e6d16b1 100644 --- a/SafeCampus.WEB/src/views/monitor/live/index.vue +++ b/SafeCampus.WEB/src/views/monitor/live/index.vue @@ -58,7 +58,7 @@ :disabled="!scope.isSelected" @click="onDelete(scope.selectedListIds, '删除所选数据')" /> -+ ++ + ++ ++ 取消 +确定 + +移动至分组 +移动至分组 - + + @@ -139,6 +140,7 @@ import { useDictStore } from "@/stores/modules"; import Form from "./components/form.vue"; import userForm from "./components/userForm.vue"; + import moveForm from "./components/moveForm.vue"; import { FormOptEnum, SysDictEnum, MenuTypeDictEnum } from "@/enums"; // import './aliyun-rts-sdk.js' import './ali.js' @@ -291,29 +293,13 @@ const remove = (node: Node, data: Tree) => { await useHandleData(monitorLIVEApi.delete, { ids }, msg); RefreshTable(); } - async function move(ids: string[], msg: string) { - return new Promise((resolve, reject) => { - ElMessageBox.confirm(`是否${msg}?`, "温馨提示", { - confirmButtonText: "确定", - cancelButtonText: "取消", - type: 'warning', - draggable: true - }) - .then(async () => { - // const res = await api(params); - // if (!res) return reject(false); - // ElMessage({ - // type: "success", - // message: `${message}成功!` - // }); - resolve(true); - }) - .catch(() => { - //啥也不干 - }); - }) - } + + + const moveFormRef = ref| null>(null); + function omMove(opt: FormOptEnum, record: {} | SysOrg.SysOrgInfo = {}) { + moveFormRef.value?.omMove({ opt: opt, record: record, successful: RefreshTable }); +} /** * 刷新表格 */ diff --git a/SafeCampus.WEB/src/views/warn/zjrq/index.vue b/SafeCampus.WEB/src/views/warn/zjrq/index.vue index 5acb962..be69a3d 100644 --- a/SafeCampus.WEB/src/views/warn/zjrq/index.vue +++ b/SafeCampus.WEB/src/views/warn/zjrq/index.vue @@ -110,7 +110,28 @@ import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface"; import { useDictStore } from "@/stores/modules"; import { FormOptEnum, SysDictEnum, MenuTypeDictEnum } from "@/enums"; const visible = ref(false); //是否显示表单 - +onMounted(() => { + getWarnTypeList(); +}); +let warnOptions = ref([]); +function getWarnTypeList() { + setTimeout(async ()=> { + await warnZJRQApi.warnType({}).then(res => { + let { code, data } = res; + + if (code == 200) { + warnOptions.value = data.map(item => { + return { + label: item.name, + value: item.code + }; + }) + + } + }); + }) + +} // 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数) const proTable = ref (); const dictStore = useDictStore(); @@ -118,7 +139,7 @@ const dictStore = useDictStore(); // 表格配置项 const columns: ColumnProps [] = [ { type: "selection", fixed: "left", width: 80 }, - { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false }, + // { prop: "searchKey", label: "关键字", search: { el: "input" }, isShow: false }, // { prop: "cameraId", label: "所属摄像头", search: { el: "input" }, isShow: false }, // { prop: "alarmTypeDesc", label: "告警类型", search: { el: "input" }, isShow: false }, { @@ -151,21 +172,75 @@ const columns: ColumnProps [] = [ } }, { - prop: "alarmTypeDesc", - label: "告警类型" + prop: "alarmType", + label: "告警类型", + enum: warnOptions, + search: { + el: "tree-select", + // span: 1 + } }, { prop: "warnHand", label: "处理状态", + enum: [ + { + label: "已处理", + value: 1 + }, + { + label: "未处理", + value: 0 + } + ], render: scope => { if (scope.row.warnHand === 1) { return "已处理"; } else { return "未处理"; } - } + }, + search: { + el: "tree-select", + // span: 1 + } }, - { prop: "tick", label: "预警时间" }, + { + prop: "tick", + label: "预警时间", + search: { + // 自定义 search 组件 + span: 1, + render: ({ searchParam }) => { + return ( + ++ ); + } + } + + }, { prop: "operation", label: "操作", width: 250, fixed: "right" } ]; From 0b550a8c76dae38a55e601907b49ce5614417a67 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Wed, 17 Jul 2024 15:36:40 +0800 Subject: [PATCH 08/11] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/interface/sys/usermanage/personnel.ts | 11 +- .../src/api/modules/usermanage/personnel.ts | 18 +-- .../personnel/components/form/form_basic.vue | 122 ++++++++++++++++-- .../personnel/components/form/index.vue | 9 +- .../personnel/components/formClass/index.vue | 3 +- .../src/views/userManage/personnel/index.vue | 31 +++-- 6 files changed, 154 insertions(+), 40 deletions(-) diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts index 628085c..691834d 100644 --- a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts @@ -24,6 +24,8 @@ export namespace SysUserPersonnel { /** 底库信息 */ export interface ClassPage { + personSetId?: string | undefined; + personSetName?: string | undefined; id?: string | undefined; name?: string | undefined; } @@ -31,9 +33,14 @@ export namespace SysUserPersonnel { export interface SysUserAvatar { /** 人脸 */ personId?: string | undefined; - faceId: string; + faceId?: string | number; faceUrl: string; - tag: string; + uid?: string | number; + } + // 人脸删除 + export interface SysUserFace { + personId: string | undefined; + faceIds: Array+ - + + ; } /** 用户信息 */ diff --git a/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts b/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts index 39f7455..ccae5a6 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/personnel.ts @@ -13,7 +13,7 @@ * @see https://gitee.com/dotnetmoyu/SimpleAdmin */ import { moduleRequest } from "@/api/request"; -import { ResPage, ReqPersonId, SysUserPersonnel } from "@/api/interface"; +import { ReqId, ResPage, ReqPersonId, SysUserPersonnel } from "@/api/interface"; const http = moduleRequest("/business/personApi/"); /** @@ -27,18 +27,18 @@ const userManagePersonnelApi = { return http.post("pageQuery", params); }, /** 获取单页详情 */ - detail(params: ReqPersonId) { + detail(params: ReqId) { return http.get("getPersionById", params); }, - /** 删除机构 */ - delete(params: ReqPersonId) { - return http.post("deletePersonD", params); + /** 删除人员 */ + delete(params: ReqId) { + return http.delete("deletePersonD", params); }, - /** 新增机构 */ + /** 新增人员 */ add(params: SysUserPersonnel.SysUserPerInfo) { return http.post("createPersonA", params); }, - /** 修改机构 */ + /** 修改人员 */ update(params: SysUserPersonnel.SysUserPerInfo) { return http.put("updatePersionU", params); }, @@ -47,8 +47,8 @@ const userManagePersonnelApi = { return http.post("addFaceA", params); }, /** 删除人脸 */ - deleteFace(params: SysUserPersonnel.SysUserAvatar) { - return http.delete("deleteFaceD", params); + deleteFace(params: SysUserPersonnel.SysUserFace) { + return http.post("deleteFaceD", params); }, /**底库绑定 */ personBindDfie(params: SysUserPersonnel.ClassPage) { diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue index c85f356..97b7411 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue @@ -4,15 +4,46 @@ * @Date: 2023-12-15 15:45:50 --> - +- ++ + + ++ ++ + + ++ + ++ ++ + + +@@ -42,10 +73,12 @@ @@ -86,4 +182,12 @@ onMounted(() => { :deep(.el-date-editor.el-input) { width: 92% !important; } +:deep(.el-upload-list--picture-card .el-upload-list__item) { + width: 100px !important; + height: 100px !important; +} +:deep(.el-upload--picture-card) { + width: 100px !important; + height: 100px !important; +} diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue index 2c3643e..4c53baa 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue @@ -49,7 +49,7 @@ const rules = reactive({ // personId: [required("请输入人员ID")], name: [required("请输入姓名")], gender: [required("请选择性别")], - // age: [required("请输入年龄")] + faces: [required("请上传人脸图片")], phone: [required("请输入手机号")] // extData: [required("请输入扩展数据")] }); @@ -67,7 +67,7 @@ function onOpen(props: FormProps.Base ) { visible.value = true; //显示表单 if (props.record.personId) { //如果传了id,就去请求api获取record - userManagePersonnelApi.detail({ personId: props.record.personId }).then(res => { + userManagePersonnelApi.detail({ id: props.record.personId }).then(res => { sysUserProps.record = res.data; }); } @@ -80,8 +80,9 @@ async function handleSubmit() { sysUserFormRef.value?.validate(async valid => { if (!valid) return; //表单验证失败 //提交表单 - console.log(sysUserProps); - debugger; + if (sysUserProps.record.faces.length === 0) { + return ElMessage.error("请上传人脸图片"); + } if (sysUserProps.record.personId) { await userManagePersonnelApi .update(sysUserProps.record) diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue index 59517ab..1519d3b 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/formClass/index.vue @@ -15,7 +15,7 @@ label-width="auto" label-suffix=" :" > - +diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index 45a605f..b491cd0 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -38,7 +38,7 @@ @@ -41,7 +41,6 @@ import { required } from "@/utils/formRules"; import { FormInstance } from "element-plus"; const visibleClass = ref(false); //是否显示表单 - // 表单参数 const sysUserProps = reactive >({ opt: FormOptEnum.ADD, diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index ad6ba4d..f5bfbbd 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -35,7 +35,7 @@ -- ++ @@ -53,17 +53,12 @@ - + 更多 - @@ -73,7 +68,7 @@{{ cmdEnum.DeleteFace }} +{{ cmdEnum.AddFace }} {{ cmdEnum.UnderpantsUnBinding }} @@ -105,9 +100,10 @@ const proTable = ref (); const treeFilter = ref | null>(null); // 表格配置项 const columns: ColumnProps [] = [ + { type: "selection", fixed: "left", width: 50 }, { prop: "faceUrl", - label: "头像", + label: "人脸", render: scope => { return ( 0 ? scope.row.faces[0].faceUrl : ''} onClick={() => viewHeadImage(scope)} style='width:50px;height:50px' alt=''/> @@ -127,7 +123,7 @@ const columns: ColumnProps [] = [ label: "年龄" }, { - prop: "name", + prop: "personSets", label: "所属班级", render: scope => { return scope.row.personSets.length > 0 ? scope.row.personSets[0].name : '' @@ -182,8 +178,15 @@ function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo = * @param ids id数组 */ async function onDelete(ids: string[], msg: string) { + if(ids.length === 0){ + ElMessage({ + message: '请选择要删除的人员', + type: 'warning' + }); + return + } // 二次确认 => 请求api => 刷新表格 - await useHandleData(userManagePersonnelApi.delete, { ids }, msg); + await useHandleData(userManagePersonnelApi.delete, {id: ids.join(",") }, msg); RefreshTable(); //刷新表格 } @@ -196,7 +199,7 @@ const RefreshTable = () => { /** 更多下拉菜单命令枚举 */ enum cmdEnum { - DeleteFace = "删除人脸", + AddFace = "添加人脸", UnderpantsUnBinding = "底库解绑" } /** 下拉菜单参数接口 */ @@ -218,7 +221,7 @@ function command(row: SysUserPersonnel.SysUserPerInfo, command: cmdEnum): Comman */ function handleCommand(command: Command) { switch (command.command) { - case cmdEnum.DeleteFace: + case cmdEnum.AddFace: break case cmdEnum.UnderpantsUnBinding: break; From f99d63372645fd722f8ee4ad67a40c3e30b183b2 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Wed, 17 Jul 2024 15:39:17 +0800 Subject: [PATCH 09/11] =?UTF-8?q?=E6=89=80=E5=B1=9E=E7=8F=AD=E7=BA=A7?= =?UTF-8?q?=E5=AD=97=E6=AE=B5=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/views/userManage/personnel/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index f5bfbbd..45a605f 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -126,7 +126,7 @@ const columns: ColumnProps [] = [ prop: "personSets", label: "所属班级", render: scope => { - return scope.row.personSets.length > 0 ? scope.row.personSets[0].name : '' + return scope.row.personSets.length > 0 ? scope.row.personSets[0].personSetName : '' } }, { prop: "operation", label: "操作", width: 250, fixed: "right" } From 684cfcda70012f2effb4e843b924e86667bdf3a7 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Wed, 17 Jul 2024 16:52:50 +0800 Subject: [PATCH 10/11] =?UTF-8?q?=E4=BA=BA=E5=91=98=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E5=88=97=E8=A1=A8=E6=8E=A5=E5=8F=A3=E8=81=94?= =?UTF-8?q?=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/interface/sys/usermanage/personnel.ts | 6 +- .../personnel/components/form/form_basic.vue | 1 - .../src/views/userManage/personnel/index.vue | 65 +++++++++++++++---- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts index 691834d..8f91f0c 100644 --- a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts @@ -24,15 +24,16 @@ export namespace SysUserPersonnel { /** 底库信息 */ export interface ClassPage { - personSetId?: string | undefined; + personSetId?: string | number | undefined; personSetName?: string | undefined; id?: string | undefined; name?: string | undefined; + personId?: string | undefined | number; } /** 人脸信息 */ export interface SysUserAvatar { /** 人脸 */ - personId?: string | undefined; + personId?: string | undefined | number; faceId?: string | number; faceUrl: string; uid?: string | number; @@ -61,5 +62,6 @@ export namespace SysUserPersonnel { faces: Array ; /** 分组 */ personSets: Array ; + personSetId?: number | string; } } diff --git a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue index 97b7411..a8c4c6b 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/form_basic.vue @@ -15,7 +15,6 @@ - - + 更多 - @@ -93,11 +111,16 @@ import FormClass from "./components/formClass/index.vue"; import { ArrowDown } from "@element-plus/icons-vue"; import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface"; import TreeFilter from "@/components/TreeFilter/index.vue"; +import { useUserStore } from "@/stores/modules"; +import { TokenEnum } from "@/enums"; +import type { UploadProps } from "element-plus"; // 获取 ProTable 元素,调用其获取刷新数据方法(还能获取到当前查询参数,方便导出携带参数) const faceUrl = ref(''); const visible = ref(false); //是否显示人员表单 const proTable = ref{{ cmdEnum.AddFace }} -{{ cmdEnum.UnderpantsUnBinding }} ++ + + {{ cmdEnum.AddFace }} + + ++ {{ cmdEnum.UnderpantsUnBinding }} + (); const treeFilter = ref | null>(null); +const userStore = useUserStore(); +const { accessToken } = userStore; // 表格配置项 const columns: ColumnProps [] = [ { type: "selection", fixed: "left", width: 50 }, @@ -219,27 +242,45 @@ function command(row: SysUserPersonnel.SysUserPerInfo, command: cmdEnum): Comman * 更多下拉菜单点击事件 * @param command */ + const personId = ref (); //人员id function handleCommand(command: Command) { switch (command.command) { case cmdEnum.AddFace: + personId.value = command.row.personId; //获取人员id break case cmdEnum.UnderpantsUnBinding: + userManagePersonnelApi.personUnBindDfie({ + personId:command.row.personId, + personSetId: command.row.personSets[0].personSetId + }).then(res=>{ + if(res.code == 200){ + ElMessage.success('底库解绑成功'); + RefreshTable() + } + }) break; } } +const handleAvatarSuccess: UploadProps["onSuccess"] = (response, uploadFile) => { + if (response.code === 200) { + userManagePersonnelApi.addFace({ + personId: personId.value, + faceUrl: response.data + }).then(res=>{ + RefreshTable() + }) + } else { + ElMessage.error(response.msg); + } +}; /** 部门切换 */ +const personSetId = ref () function changeTreeFilter(val: number | string) { - console.log(proTable.value,".........",val); - + personSetId.value = val proTable.value!.pageable.pageNum = 1; - // if (val != "") { - // // 如果传入的val不为空,则将val赋值给initParam.parentId - // initParam.orgId = val; - // } else { - // // 否则将initParam.parentId赋值为0 - // initParam.orgId = 0; - // } + proTable.value!.searchParam.personSetId = val; + proTable.value!.search(); }