提交
This commit is contained in:
1 parent
3e15776dba
commit
93c28759d0
54 files changed
+6504
-5865
No files matched your search
@@ -186,7 +186,7 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="采集量">
|
||||
<el-form-item v-if="!hideCollectDetailFields" label="采集量">
|
||||
<el-input
|
||||
v-model="sampleDraft.collectAmount"
|
||||
type="number"
|
||||
@@ -195,7 +195,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位">
|
||||
<el-form-item v-if="!hideCollectDetailFields" label="单位">
|
||||
<el-select
|
||||
v-model="sampleDraft.unitId"
|
||||
placeholder="输入单位检索"
|
||||
@@ -222,7 +222,7 @@
|
||||
<el-form-item v-if="showPrice" label="优惠价格(元)">
|
||||
<AmountInput v-model="sampleDraft.price" :min="0" placeholder="请输入优惠价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="存储年限(年)">
|
||||
<el-form-item v-if="!hideCollectDetailFields" label="存储年限(年)">
|
||||
<el-input
|
||||
v-model="sampleDraft.storageYears"
|
||||
type="number"
|
||||
@@ -411,6 +411,7 @@
|
||||
siteOptions: Api.Site.SiteItem[]
|
||||
expressCompanyOptions: Api.ExpressCompany.ExpressCompanyItem[]
|
||||
showPrice?: boolean
|
||||
hideCollectDetailFields?: boolean
|
||||
sampleCodeUsedKey?: 'usedInProtocol'
|
||||
sampleCodeOptionsLoading?: boolean
|
||||
sampleTypeOptionsLoading?: boolean
|
||||
@@ -420,6 +421,7 @@
|
||||
}>(),
|
||||
{
|
||||
showPrice: false,
|
||||
hideCollectDetailFields: false,
|
||||
sampleCodeUsedKey: 'usedInProtocol',
|
||||
sampleCodeOptionsLoading: false,
|
||||
sampleTypeOptionsLoading: false,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
{{ userInfo.realName || userInfo.username || '管理员' }}
|
||||
</span>
|
||||
<span class="block mt-0.5 text-xs text-g-500 truncate">
|
||||
{{ getRoleName(userInfo.role) }}
|
||||
{{ roleDisplayText }}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -97,6 +97,14 @@
|
||||
() => userInfo.value.realName?.charAt(0) || userInfo.value.username?.charAt(0) || '管'
|
||||
)
|
||||
|
||||
const roleDisplayText = computed(() => {
|
||||
const names = userInfo.value.roleNames
|
||||
if (Array.isArray(names) && names.length > 0) {
|
||||
return names.join('、')
|
||||
}
|
||||
return '暂无角色'
|
||||
})
|
||||
|
||||
const userMenuPopover = ref()
|
||||
const profileDialogVisible = ref(false)
|
||||
const passwordDialogVisible = ref(false)
|
||||
@@ -115,19 +123,6 @@
|
||||
}, 150)
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取角色名称
|
||||
*/
|
||||
const getRoleName = (role: string) => {
|
||||
const roleMap: Record<string, string> = {
|
||||
admin: '运营管理员',
|
||||
supplier: '供应商',
|
||||
client: '客户',
|
||||
deliver: '配送员'
|
||||
}
|
||||
return roleMap[role] || role || '未知角色'
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户登出确认
|
||||
*/
|
||||
|
||||
Reference in new issue
Block a user