diff --git a/SafeCampus.WEB/src/App.vue b/SafeCampus.WEB/src/App.vue index 94537b6..2bbf751 100644 --- a/SafeCampus.WEB/src/App.vue +++ b/SafeCampus.WEB/src/App.vue @@ -21,3 +21,10 @@ const assemblySize = computed(() => globalStore.assemblySize); // element button config const buttonConfig = reactive({ autoInsertSpace: false }); + 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/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/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("请选择出楼摄像头")] }); 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..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 @@ -30,6 +30,11 @@ }" > + Preview Image @@ -116,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/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/keyPersonnel/index.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue index a043ea4..7a0fb76 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,21 @@ const columns: ColumnProps[] = [ label: "姓名" }, { - prop: "personId", - label: "人员ID" + prop: "gender", + label: "性别", + enum: [ + { + label: "男", + value: "GENDER_MALE" + }, + { + label: "女", + value: "GENDER_FEMALE" + }], + }, + { + prop: "phone", + label: "手机号" }, { prop: "age", @@ -151,54 +134,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); - } -};