Commit 4bfad21c by 李宁

1

1 parent a6c634b7
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
"Bash(npm install axios)", "Bash(npm install axios)",
"Bash(tree src/)", "Bash(tree src/)",
"Bash(npm run build)", "Bash(npm run build)",
"Bash(npm run build-only)" "Bash(npm run build-only)",
"Bash(npm run type-check)"
], ],
"deny": [], "deny": [],
"ask": [] "ask": []
......
...@@ -257,13 +257,13 @@ ...@@ -257,13 +257,13 @@
<div v-if="!editingUser || !isCurrentUser(editingUser)" class="space-y-4"> <div v-if="!editingUser || !isCurrentUser(editingUser)" class="space-y-4">
<div class="flex items-center justify-between pb-2 border-b border-neutral-200"> <div class="flex items-center justify-between pb-2 border-b border-neutral-200">
<h3 class="text-neutral-900">所属区域 <span class="text-red-500">*</span></h3> <h3 class="text-neutral-900">所属区域 <span class="text-red-500">*</span></h3>
<el-tag <!-- <el-tag
v-if="formData.organizationId" v-if="formData.organizationId"
type="primary" type="primary"
size="small" size="small"
> >
已选择 已选择
</el-tag> </el-tag> -->
</div> </div>
<div class="border border-neutral-300 rounded p-4 bg-neutral-50 max-h-[250px] overflow-y-auto"> <div class="border border-neutral-300 rounded p-4 bg-neutral-50 max-h-[250px] overflow-y-auto">
...@@ -273,7 +273,7 @@ ...@@ -273,7 +273,7 @@
:role-id="formData.roleId" :role-id="formData.roleId"
:roles="roles" :roles="roles"
:expanded-ids="organizationExpandedIds" :expanded-ids="organizationExpandedIds"
:account-type="formData.accountType as any " :account-type="mapAccountType(formData.accountType)"
@select="handleOrganizationSelect" @select="handleOrganizationSelect"
@toggle-expand="handleToggleExpand" @toggle-expand="handleToggleExpand"
/> />
...@@ -426,7 +426,10 @@ const getAccountList = async ()=>{ ...@@ -426,7 +426,10 @@ const getAccountList = async ()=>{
} }
} }
function mapAccountType(val: string | undefined): '1' | '2' | '3' | undefined {
if (val === '1' || val === '2' || val === '3') return val
return undefined // 非法值统一降级
}
const totalUsers = computed(() => props.users.length - 1) // 排除当前登录用户 const totalUsers = computed(() => props.users.length - 1) // 排除当前登录用户
const roleHint = computed(() => { const roleHint = computed(() => {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!