From b7d886cbbbee5f0afbaefb58cc8068bcba2149ec Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Mon, 23 Sep 2024 09:46:37 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=90=8D=E7=A7=B0=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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SafeCampus.WEB/src/views/userManage/personnel/index.vue b/SafeCampus.WEB/src/views/userManage/personnel/index.vue index d7469d3..31328a9 100644 --- a/SafeCampus.WEB/src/views/userManage/personnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/personnel/index.vue @@ -227,7 +227,7 @@ const RefreshTable = () => { /** 更多下拉菜单命令枚举 */ enum cmdEnum { AddFace = "添加人脸", - UnderpantsUnBinding = "底库解绑" + UnderpantsUnBinding = "班级解绑" } /** 下拉菜单参数接口 */ interface Command { @@ -257,7 +257,7 @@ function handleCommand(command: Command) { personId:command.row.personId, personSetId: command.row.personSetId }).then(res=>{ - ElMessage.success('底库解绑成功'); + ElMessage.success('班级解绑成功'); RefreshTable() }) break; From 11cc99fd8e2e210b7e2bc7efe250cada04aebb48 Mon Sep 17 00:00:00 2001 From: suyanyan <1321717064@qq.com> Date: Mon, 23 Sep 2024 14:44:38 +0800 Subject: [PATCH 2/2] =?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 --- .../api/interface/sys/usermanage/personnel.ts | 2 +- .../classManage/components/formClass/index.vue | 1 + .../src/views/userManage/clothing/index.vue | 17 +++++++++++------ .../keyPersonnel/components/form/form_basic.vue | 2 +- .../keyPersonnel/components/form/index.vue | 1 + .../src/views/userManage/keyPersonnel/index.vue | 5 ++++- .../personnel/components/form/form_basic.vue | 7 +++++-- 7 files changed, 24 insertions(+), 11 deletions(-) diff --git a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts index ae5a192..00dad2c 100644 --- a/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts +++ b/SafeCampus.WEB/src/api/interface/sys/usermanage/personnel.ts @@ -58,7 +58,7 @@ export namespace SysUserPersonnel { /** 姓名 */ name?: string; /** 年龄 */ - age?: number | string; + age?: any; /** 性别 */ gender?: string; /** 手机 */ diff --git a/SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue b/SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue index 371566e..53fe543 100644 --- a/SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue +++ b/SafeCampus.WEB/src/views/userManage/classManage/components/formClass/index.vue @@ -97,6 +97,7 @@ async function handleSubmit() { await userManageClassManageApi .add(sysUserProps.record) .then(() => { + ElMessage.success("新增成功"); sysUserProps.successful!(); //调用父组件的successful方法 }) .finally(() => { diff --git a/SafeCampus.WEB/src/views/userManage/clothing/index.vue b/SafeCampus.WEB/src/views/userManage/clothing/index.vue index 2726795..4dfb22e 100644 --- a/SafeCampus.WEB/src/views/userManage/clothing/index.vue +++ b/SafeCampus.WEB/src/views/userManage/clothing/index.vue @@ -160,13 +160,12 @@ const RefreshTable = () => { getList(clothSetId.value) } // 刷新表格+树 -const RefreshTree = () => { - getList(clothSetId.value) - treeFilter.value?.refresh(); //刷新树形筛选器 +const RefreshTree = async() => { + await getTree(); //刷新树形筛选器 + await getList(clothSetId.value) } - /** 服装库切换切换 */ const clothSetId = ref() function changeTreeFilter(val: number | string) { @@ -183,10 +182,16 @@ const getList = (clothSetId:any)=>{ } }) } -onMounted(async () => { +const getTree =async ()=>{ const { data }:any = await userManageClothApi.getList({}); treeData.value = data; - clothSetId.value = data[0].clothSetId.toString() + if(!clothSetId.value ){ + clothSetId.value = data[0].clothSetId.toString() + } + +} +onMounted(async () => { + await getTree() getList(clothSetId.value) }) 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 50b26c1..b5c6310 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 @@ -46,7 +46,7 @@ - + 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 59dfeee..cd0a535 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/components/form/index.vue @@ -65,6 +65,7 @@ function onOpen(props: FormProps.Base) { if (props.record.personId) { //如果传了id,就去请求api获取record userManageKeyPersonApi.detail({ id: props.record.personId }).then((res: any) => { + if (!res.data.age) res.data.age = ""; sysUserProps.record = res.data; }); } diff --git a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue index 7e36854..a043ea4 100644 --- a/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue +++ b/SafeCampus.WEB/src/views/userManage/keyPersonnel/index.vue @@ -101,7 +101,10 @@ const columns: ColumnProps[] = [ }, { prop: "age", - label: "年龄" + label: "年龄", + render: scope => { + return scope.row.age ? scope.row.age : '--'; + } }, { prop: "operation", label: "操作", width: 250, fixed: "right" } ]; 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 1d932f4..f87922d 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 @@ -151,11 +151,11 @@ const genderOptions = ref([ ]); onMounted(async () => { departmentOptions.value = await getDepartmentList(); - // 获取班级 - classOptions.value = await getClassList(""); // 初始化 userInfo.value.gender = userInfo.value.gender ? userInfo.value.gender : genderOptions.value[0].value; if (userInfo.value.personId) { + majorOptions.value = await getMajorList(userInfo.value.depId); + classOptions.value = await getClassList(userInfo.value.majorId); if (userInfo.value.faces?.length > 0) { fileList.value = [ ...JSON.parse(JSON.stringify(userInfo.value.faces)).map((item: any) => { @@ -176,6 +176,9 @@ onMounted(async () => { }) ]; } + } else { + // 获取班级 + classOptions.value = await getClassList(""); } /* 监听系部、专业 */ watch(