From 84633099a936846382cdaa9040ecbfb62e462cc8 Mon Sep 17 00:00:00 2001 From: A0066811 <961502390@qq.com> Date: Fri, 7 Nov 2025 14:40:27 +0800 Subject: [PATCH] =?UTF-8?q?hgwms-2098=20fix=20=E7=94=A8=E6=88=B7=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=BC=B9=E7=AA=97=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/user/modal/edit.vue | 200 +++++++++++++++++++-------------- src/view/user/modal/info.vue | 151 +++++++++++++++---------- src/view/user/modal/save.vue | 210 +++++++++++++++++++++-------------- 3 files changed, 330 insertions(+), 231 deletions(-) diff --git a/src/view/user/modal/edit.vue b/src/view/user/modal/edit.vue index 7c231d1..e0a149a 100644 --- a/src/view/user/modal/edit.vue +++ b/src/view/user/modal/edit.vue @@ -1,64 +1,89 @@ \ No newline at end of file + diff --git a/src/view/user/modal/info.vue b/src/view/user/modal/info.vue index 8f116ee..e378bdc 100644 --- a/src/view/user/modal/info.vue +++ b/src/view/user/modal/info.vue @@ -8,52 +8,77 @@ @cancel="cancel" > - - - - - - - - - - - - - - - - - - - - - - - - {{post.name}} - - - - - - - - - + layout="vertical" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ post.name }} + + + + + + + + + + + + + + + @@ -68,36 +93,35 @@ export default defineComponent({ }, record: { type: Object, - } + }, }, emit: ["close"], setup(props, context) { - const formRef = ref(); - const state = reactive({ + const state = reactive({ posts: [], - depts: [], - }) - + depts: [], + }); + const formState = reactive({ enable: true, - gender: "0", + gender: "0", }); const formRules = {}; const loadPost = () => { - list({}).then((response)=>{ + list({}).then((response) => { state.posts = response.data; - }) - } + }); + }; const loadTree = () => { - tree({}).then((response)=>{ + tree({}).then((response) => { state.depts = response.data; - }) - } + }); + }; const submit = (e) => { formRef.value.resetFields(); @@ -114,7 +138,7 @@ export default defineComponent({ /// 加载部门 loadTree(); - watch(props,(props) => { + watch(props, (props) => { formState.id = props.record.id; formState.username = props.record.username; formState.nickname = props.record.nickname; @@ -125,7 +149,7 @@ export default defineComponent({ formState.deptId = props.record.deptId; formState.enable = props.record.enable; formState.remark = props.record.remark; - }) + }); return { state, @@ -138,8 +162,13 @@ export default defineComponent({ labelCol: { span: 6 }, wrapperCol: { span: 18 }, - replaceFields: {children:'children', title:'name', key:'id', value: 'id' } + replaceFields: { + children: "children", + title: "name", + key: "id", + value: "id", + }, }; }, }); - \ No newline at end of file + diff --git a/src/view/user/modal/save.vue b/src/view/user/modal/save.vue index 5158d8f..567fe2b 100644 --- a/src/view/user/modal/save.vue +++ b/src/view/user/modal/save.vue @@ -8,60 +8,91 @@ @cancel="cancel" > - - - - - - - - - - - - - - - - - - - - - - - - - - - {{post.name}} - - - - - - - - - + layout="vertical" + > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ post.name }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file +