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 01/17] =?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 02/17] =?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 --> @@ -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=" :" > -
+
@@ -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 @@
- + @@ -86,6 +104,8 @@
+ +
@@ -95,12 +115,13 @@
+ + + diff --git a/SafeCampus.WEB/src/views/userManage/clothing/components/form1/index.vue b/SafeCampus.WEB/src/views/userManage/clothing/components/form1/index.vue new file mode 100644 index 0000000..d184d60 --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/clothing/components/form1/index.vue @@ -0,0 +1,105 @@ + + + + + + diff --git a/SafeCampus.WEB/src/views/userManage/clothing/index.vue b/SafeCampus.WEB/src/views/userManage/clothing/index.vue new file mode 100644 index 0000000..0615271 --- /dev/null +++ b/SafeCampus.WEB/src/views/userManage/clothing/index.vue @@ -0,0 +1,194 @@ + + + + From 668a0227ba6fed5b060fc32c783d92706d52f388 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Thu, 18 Jul 2024 16:13:40 +0800 Subject: [PATCH 11/17] =?UTF-8?q?=E9=87=8D=E7=82=B9=E4=BA=BA=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/usermanage/index.ts | 1 + .../api/modules/usermanage/keyPersonnel.ts | 63 +++++ .../src/views/userManage/clothing/index.vue | 12 +- .../components/form/form_basic.vue | 181 ++++++++++++++ .../keyPersonnel/components/form/index.vue | 117 ++++++++++ .../views/userManage/keyPersonnel/index.vue | 220 ++++++++++++++++++ .../src/views/userManage/personnel/index.vue | 14 +- 7 files changed, 595 insertions(+), 13 deletions(-) create mode 100644 SafeCampus.WEB/src/api/modules/usermanage/keyPersonnel.ts create mode 100644 SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue create mode 100644 SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue create mode 100644 SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue diff --git a/SafeCampus.WEB/src/api/modules/usermanage/index.ts b/SafeCampus.WEB/src/api/modules/usermanage/index.ts index 25e4ef4..1252d8b 100644 --- a/SafeCampus.WEB/src/api/modules/usermanage/index.ts +++ b/SafeCampus.WEB/src/api/modules/usermanage/index.ts @@ -16,3 +16,4 @@ export * from "./personnel"; export * from "./classManage"; export * from "./clothing"; export * from "./teacher"; +export * from "./keyPersonnel"; diff --git a/SafeCampus.WEB/src/api/modules/usermanage/keyPersonnel.ts b/SafeCampus.WEB/src/api/modules/usermanage/keyPersonnel.ts new file mode 100644 index 0000000..f3b9de9 --- /dev/null +++ b/SafeCampus.WEB/src/api/modules/usermanage/keyPersonnel.ts @@ -0,0 +1,63 @@ +/** + * @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 { ReqId, SysUserPersonnel } from "@/api/interface"; +const http = moduleRequest("/business/keyPersonnel/"); +/** + * @Description: 单页管理 + * @Author: SYY + * @Date: 2024-7-19 15:34:54 + */ +const userManageKeyPersonApi = { + /** 获取单页分页 */ + page(params: SysUserPersonnel.Page) { + return http.post("pageQuery", params); + }, + /** 获取单页详情 */ + detail(params: ReqId) { + return http.get("getPersionById", params); + }, + /** 删除人员 */ + delete(params: ReqId) { + return http.delete("deletePersonD", params); + }, + /** 新增人员 */ + add(params: any) { + return http.post("createPersonA", params); + }, + /** 修改人员 */ + update(params: any) { + return http.put("updatePersionU", params); + }, + /** 添加人脸 */ + addFace(params: SysUserPersonnel.SysUserAvatar) { + return http.post("addFaceA", params); + }, + /** 删除人脸 */ + deleteFace(params: SysUserPersonnel.SysUserFace) { + return http.post("deleteFaceD", params); + } +}; + +const userKeyPerButtonCode = { + /** 新增人员 */ + add: "userManageKeyPersonAdd", + /** 删除人员 */ + edit: "userManageKeyPersonEdit", + /** 删除人员 */ + delete: "userManageKeyPersonDelete" +}; + +export { userManageKeyPersonApi, userKeyPerButtonCode }; diff --git a/SafeCampus.WEB/src/views/userManage/clothing/index.vue b/SafeCampus.WEB/src/views/userManage/clothing/index.vue index 0615271..98b8676 100644 --- a/SafeCampus.WEB/src/views/userManage/clothing/index.vue +++ b/SafeCampus.WEB/src/views/userManage/clothing/index.vue @@ -10,7 +10,7 @@ label="clothSetName" id="clothSetId" width="300px" - :show-all="false" + :show-all="true" :request-api="userManageClothApi.getList" @change="changeTreeFilter" > @@ -20,11 +20,11 @@