From 85c54d88f139096614aea4b06f2166cae27729d7 Mon Sep 17 00:00:00 2001 From: zhangwei <1504152376@qq.com> Date: 星期五, 22 八月 2025 10:11:19 +0800 Subject: [PATCH] 用户管理 --- src/views/login/index.vue | 143 ++++++++++++++++++++++++----------------------- 1 files changed, 74 insertions(+), 69 deletions(-) diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 6f87bd5..f79d52d 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -24,7 +24,8 @@ ElRadioGroup, ElRadio, ElRow, - ElTag + ElTag, + ElCol } from "element-plus"; import { useLayout } from "@/layout/hooks/useLayout"; import { useUserStoreHook } from "@/store/modules/user"; @@ -156,78 +157,82 @@ rules: loginRules, size: "large" }, - [ - h(Motion, { delay: 150 }, [ - h( - ElFormItem, - { - prop: "exRoleCode", - label: "" - }, - [ - // 鍗曢�夋缁� - 绾靛悜鎺掑垪 - h( - ElRadioGroup, - { - modelValue: secondId.value, - "onUpdate:modelValue": val => { - secondId.value = val; - } - }, - [ - // 寰幆娓叉煋鍗曢�夋 - 鏍规嵁姣忛」鐨刬sManager鏄剧ず鏍囩 - state.myEnterpriseList.map(item => + { + default: () => { + return [ + h( + ElFormItem, + { prop: "exRoleCode", label: "" }, + { + default: () => { + return [ h( - "el-row", + ElRadioGroup, { - style: { - width: "100%" - } + modelValue: secondId.value, + "onUpdate:modelValue": val => (secondId.value = val) }, - [ - h( - "el-col", - { - span: 24 - }, - [ - h( - ElRadio, - { - key: item.customerUserID, - value: item.customerUserID, - label: item.enterpriseName - }, - [ - // 鍗曢�夋鏂囨湰 - // 鏍规嵁褰撳墠椤圭殑isManager鏄剧ず鏍囩锛堟斁鍦ㄦ枃鏈悗闈級 - item.isManger - ? h( - ElTag, - { - type: "primary", - size: "small", - style: { - marginLeft: "8px", - alignSelf: "center" - } - }, - "绠$悊鍛�" - ) - : null - ] - ) - ] + // ElRadioGroup 鐨勫唴瀹规槸寰幆鐢熸垚鐨勶紝鐢ㄥ嚱鏁板寘瑁� + () => + state.myEnterpriseList.map(item => + h( + ElRow, + { style: { width: "100%" } }, + { + default: () => { + return [ + h( + ElCol, + { span: 24 }, + { + default: () => { + return [ + h( + ElRadio, + { + key: item.customerUserID, + value: item.customerUserID + }, + // ElRadio 鐨勫唴瀹规槸鍔ㄦ�佺殑锛岀敤鍑芥暟鍖呰9 + () => [ + // 鏂囨湰鐩存帴杩斿洖锛堜笉瑕佸祵濂楀嚱鏁帮級 + item.enterpriseName, + item.isManger + ? h( + ElTag, + { + type: "primary", + size: "small", + style: { + marginLeft: "8px", + alignSelf: "center" + } + }, + // ElTag 鐨勫唴瀹规槸闈欐�佹枃鏈紝鐩存帴杩斿洖 + { + default: () => "绠$悊鍛�" + } + ) + : null + ] + ) + ]; + } + } + ) + ]; + } + } + ) ) - ] ) - ) - ] - ) - ] - ) - ]) - ] + ]; + } + } + ) + ]; + } + } ), // jsx 璇硶 锛堟敞鎰忓湪.vue鏂囦欢鍚敤jsx璇硶锛岄渶瑕佸湪script寮�鍚痩ang="tsx"锛� closeCallBack: ({ options, args }) => { @@ -278,7 +283,7 @@ if (obj.theLastLogo) { router .replace({ - name: "Index" + path: "/Index" }) .then(() => { message("鐧诲綍鎴愬姛", { type: "success" }); -- Gitblit v1.9.1