From adccfe317cd047d184296b4eef0178b112d77fb2 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Wed, 25 Sep 2024 16:45:52 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E7=A6=85=E9=81=93bug=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../views/userManage/classManage/index.vue | 6 +- .../components/form/form_basic.vue | 5 + .../views/userManage/keyPersonnel/index.vue | 98 ++------- .../personnel/components/form/form_basic.vue | 17 +- .../personnel/components/form/index.vue | 1 + .../src/views/userManage/personnel/index.vue | 198 +++++------------- 6 files changed, 92 insertions(+), 233 deletions(-) diff --git a/SafeCampus.WEB/src/views/userManage/classManage/index.vue b/SafeCampus.WEB/src/views/userManage/classManage/index.vue index 5766234..88940d4 100644 --- a/SafeCampus.WEB/src/views/userManage/classManage/index.vue +++ b/SafeCampus.WEB/src/views/userManage/classManage/index.vue @@ -96,7 +96,7 @@ const columns: ColumnProps[] = [ el: "select", span:1, props: { - clearable: false, + clearable: true, placeholder: "请选择专业", }, }, @@ -105,7 +105,9 @@ const columns: ColumnProps[] = [ { prop: "personSetName", label: "班级名称", - search: { el: "input",span:1, } + search: { el: "input",span:1,props: { + clearable: true, + }, }, }, { diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue index b5c6310..19d2dd6 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue @@ -30,6 +30,11 @@ }" > + Preview Image diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue index a043ea4..f6375a8 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue @@ -24,30 +24,6 @@ - - 更多 - - @@ -67,18 +43,12 @@ import { userManageKeyPersonApi,SysUserPersonnel } from "@/api"; import { useHandleData } from "@/hooks/useHandleData"; import { FormOptEnum } from "@/enums"; import Form from "./components/form/index.vue"; -import { ArrowDown } from "@element-plus/icons-vue"; import { ColumnProps, ProTableInstance } from "@/components/ProTable/interface"; import { ElMessage } from "element-plus"; -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(); -const userStore = useUserStore(); -const { accessToken } = userStore; // 表格配置项 const columns: ColumnProps[] = [ { type: "selection", fixed: "left", width: 50 }, @@ -96,8 +66,24 @@ const columns: ColumnProps[] = [ label: "姓名" }, { - prop: "personId", - label: "人员ID" + prop: "gender", + label: "性别", + enum: [{ + label: "未知", + value: "GENDER_UNKNOWN" + }, + { + label: "男", + value: "GENDER_MALE" + }, + { + label: "女", + value: "GENDER_FEMALE" + }], + }, + { + prop: "phone", + label: "手机号" }, { prop: "age", @@ -151,54 +137,6 @@ function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo = const RefreshTable = () => { proTable.value?.refresh(); } - - -/** 更多下拉菜单命令枚举 */ -enum cmdEnum { - AddFace = "添加人脸", -} -/** 下拉菜单参数接口 */ -interface Command { - row: SysUserPersonnel.SysUserPerInfo; - command: cmdEnum; -} - -/**配置command的参数 */ -function command(row: SysUserPersonnel.SysUserPerInfo, command: cmdEnum): Command { - return { - row: row, - command: command - }; -} -/** - * 列表更多下拉菜单点击事件 - * @param command - */ -const personId = ref(); //人员id -function handleCommand(command: Command) { - switch (command.command) { - case cmdEnum.AddFace: - personId.value = command.row.personId; //获取人员id - break - } -} - - - - - -const handleAvatarSuccess: UploadProps["onSuccess"] = (response) => { - if (response.code === 200) { - userManageKeyPersonApi.addFace({ - personId: personId.value, - faceUrl: response.data - }).then(res=>{ - RefreshTable() - }) - } else { - ElMessage.error(response.msg); - } -}; diff --git a/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue b/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue index 09350d7..301b366 100644 --- a/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue +++ b/SafeCampus.WEB/src/views/userManage/dormitory/components/formDormitory/index.vue @@ -23,7 +23,7 @@ - + @@ -71,11 +71,11 @@ const visibleDormitory = ref(false); //是否显示表单 const creamaData = ref([]); const genderOptions = [ { - label: "男", + label: "男生宿舍", value: true }, { - label: "女", + label: "女生宿舍", value: false } ]; @@ -88,7 +88,7 @@ const sysDormitoryProps = reactive>({ // 表单验证规则 const rules = reactive({ name: [required("请输入宿舍楼名称")], - gender: [required("请选择性别")], + gender: [required("请选择宿舍类型")], insCameraId: [required("请选择进楼摄像头")], outCameraId: [required("请选择出楼摄像头")] }); From 7f9ffb1b2e89c86f8e1fa078a889fb35bd0ef013 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Thu, 26 Sep 2024 10:01:06 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=8E=BB=E6=8E=89=E6=80=A7=E5=88=AB?= =?UTF-8?q?=E6=9C=AA=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/views/screen/stureturn.vue | 4 ---- .../userManage/keyPersonnel/components/form/form_basic.vue | 4 ---- SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue | 5 +---- .../userManage/personnel/components/form/form_basic.vue | 4 ---- SafeCampus.WEB/src/views/userManage/personnel/index.vue | 6 +----- SafeCampus.WEB/src/views/violation/portrait/detail.vue | 1 - 6 files changed, 2 insertions(+), 22 deletions(-) diff --git a/SafeCampus.WEB/src/views/screen/stureturn.vue b/SafeCampus.WEB/src/views/screen/stureturn.vue index 4bac293..338cf70 100644 --- a/SafeCampus.WEB/src/views/screen/stureturn.vue +++ b/SafeCampus.WEB/src/views/screen/stureturn.vue @@ -107,10 +107,6 @@ const refresh = (fn = () => {}, time = 5000) => { }; // 性别 const genderOptions = ref([ - { - label: "未知", - value: "GENDER_UNKNOWN" - }, { label: "男", value: "GENDER_MALE" diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue index 19d2dd6..a0320f6 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/form_basic.vue @@ -121,10 +121,6 @@ const handleAvatarError: UploadProps["onError"] = (error, uploadFile, uploadFile }; // 通用状态选项 const genderOptions = ref([ - { - label: "未知", - value: "GENDER_UNKNOWN" - }, { label: "男", value: "GENDER_MALE" diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue index f6375a8..7a0fb76 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue @@ -68,10 +68,7 @@ const columns: ColumnProps[] = [ { prop: "gender", label: "性别", - enum: [{ - label: "未知", - value: "GENDER_UNKNOWN" - }, + enum: [ { label: "男", value: "GENDER_MALE" 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 d486327..119a694 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 @@ -147,10 +147,6 @@ const handleAvatarError: UploadProps["onError"] = (error, uploadFile, uploadFile }; // 通用状态选项 const genderOptions = ref([ - { - label: "未知", - value: "GENDER_UNKNOWN" - }, { label: "男", value: "GENDER_MALE" diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index a5a1ebf..4a6b09d 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -95,11 +95,7 @@ const columns: ColumnProps[] = [ { prop: "gender", label: "性别", - enum: [{ - label: "未知", - value: "GENDER_UNKNOWN" - }, - + enum: [ { label: "男", value: "GENDER_MALE" diff --git a/SafeCampus.WEB/src/views/violation/portrait/detail.vue b/SafeCampus.WEB/src/views/violation/portrait/detail.vue index 4c64def..957fb53 100644 --- a/SafeCampus.WEB/src/views/violation/portrait/detail.vue +++ b/SafeCampus.WEB/src/views/violation/portrait/detail.vue @@ -270,7 +270,6 @@ const state: any = reactive({ oneCard: {} //一卡通消费情况 }); const genderOptions = ref({ - GENDER_UNKNOWN: "未知", GENDER_MALE: "男", GENDER_FEMALE: "女" }); From 65fa6fc91b46ca9484dcf8473d894239139059b2 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Fri, 27 Sep 2024 11:36:10 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../userManage/keyPersonnel/components/form/index.vue | 7 +++++-- .../userManage/personnel/components/form/index.vue | 11 ++++++----- .../src/views/userManage/personnel/index.vue | 4 +++- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue index cd0a535..407bd69 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue @@ -33,7 +33,7 @@ import { FormOptEnum } from "@/enums"; import { required } from "@/utils/formRules"; import { FormInstance } from "element-plus"; import Basic from "./form_basic.vue"; - +import { checkPhoneNumber } from "@/utils/eleValidate"; const visible = ref(false); //是否显示表单 const activeName = ref("basic"); // 表单参数 @@ -48,7 +48,10 @@ const rules = reactive({ name: [required("请输入姓名")], gender: [required("请选择性别")], faces: [required("请上传人脸图片")], - phone: [required("请输入手机号")] + phone: [ + { required: true, message: "请输入手机号", trigger: "blur" }, + { validator: checkPhoneNumber, trigger: "blur" } + ] }); /** 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 046ed2c..cb438b1 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/components/form/index.vue @@ -33,9 +33,10 @@ import { FormOptEnum } from "@/enums"; import { required } from "@/utils/formRules"; import { FormInstance } from "element-plus"; import Basic from "./form_basic.vue"; - +import { checkPhoneNumber } from "@/utils/eleValidate"; const visible = ref(false); //是否显示表单 const activeName = ref("basic"); +const sysUserFormRef = ref(); // 表单参数 const sysUserProps = reactive>({ opt: FormOptEnum.ADD, @@ -48,7 +49,10 @@ const rules = reactive({ name: [required("请输入姓名")], gender: [required("请选择性别")], faces: [required("请上传人脸图片")], - phone: [required("请输入手机号")], + phone: [ + { required: true, message: "请输入手机号", trigger: "blur" }, + { validator: checkPhoneNumber, trigger: "blur" } + ], // depId: [required("请选择系部")], // majorId: [required("请选择专业")], personSetId: [required("请选择班级")] @@ -75,9 +79,6 @@ function onOpen(props: FormProps.Base) { }); } } - -// 提交数据(新增/编辑) -const sysUserFormRef = ref(); /** 提交表单 */ async function handleSubmit() { sysUserFormRef.value?.validate(async valid => { diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index 4a6b09d..5553623 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -86,7 +86,8 @@ const columns: ColumnProps[] = [ el: "select", span:1, props: { - clearable: false, + filterable: true, + clearable: true, placeholder: "请选择所属班级", }, }, @@ -160,6 +161,7 @@ function onOpen(opt: FormOptEnum, record: {} | SysUserPersonnel.SysUserPerInfo = // 刷新表格 const RefreshTable = () => { + proTable.value!.pageable.pageNum = 1; proTable.value?.refresh(); // treeFilter.value?.refresh(); //刷新树形筛选器 } From ad21e24caef505f5746989d81ce5028105828e6b Mon Sep 17 00:00:00 2001 From: wwp <782568523@qq.com> Date: Fri, 27 Sep 2024 13:30:54 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E9=A2=84=E8=AD=A6=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=90=9C=E7=B4=A2=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/views/warn/zjrq/index.vue | 31 ++++++++++++++++---- 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/SafeCampus.WEB/src/views/warn/zjrq/index.vue b/SafeCampus.WEB/src/views/warn/zjrq/index.vue index 414eb92..df8982d 100644 --- a/SafeCampus.WEB/src/views/warn/zjrq/index.vue +++ b/SafeCampus.WEB/src/views/warn/zjrq/index.vue @@ -86,9 +86,6 @@
预警时间:{{ detailData.tick }}
- -
备注信息:{{ detailData.extend ? detailData.extend : "暂无数据" }}
-
复核视频: @@ -102,6 +99,12 @@
+ +
处理时间:{{ detailData.handTime ? detailData.handTime : "暂无数据" }}
+
+ +
备注信息:{{ detailData.extend ? detailData.extend : "暂无数据" }}
+
处理意见: @@ -154,7 +157,7 @@