fix: 真流量虚流量权限
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m42s

This commit is contained in:
sexygoat
2026-05-14 10:52:11 +08:00
parent 1690252740
commit 38cf7d12e9
29 changed files with 859 additions and 198 deletions

View File

@@ -246,6 +246,7 @@
defineOptions({ name: 'Account' }) // 定义组件名称,用于 KeepAlive 缓存控制
const { hasAuth } = useAuth()
const canModifyAccountStatus = hasAuth('account:modify_status')
const route = useRoute()
const dialogType = ref('add')
@@ -399,7 +400,7 @@
{ label: '账号类型', prop: 'user_type' },
{ label: '店铺名称', prop: 'shop_name' },
{ label: '企业名称', prop: 'enterprise_name' },
{ label: '状态', prop: 'status' },
...(canModifyAccountStatus ? [{ label: '状态', prop: 'status' }] : []),
{ label: '创建时间', prop: 'created_at' }
]
@@ -507,24 +508,27 @@
return row.enterprise_name || '-'
}
},
{
prop: 'status',
label: '状态',
width: 100,
formatter: (row: any) => {
return h(ElSwitch, {
modelValue: row.status,
activeValue: CommonStatus.ENABLED,
inactiveValue: CommonStatus.DISABLED,
activeText: getStatusText(CommonStatus.ENABLED),
inactiveText: getStatusText(CommonStatus.DISABLED),
inlinePrompt: true,
disabled: !hasAuth('account:modify_status'),
'onUpdate:modelValue': (val: string | number | boolean) =>
handleStatusChange(row, val as number)
})
}
},
...(canModifyAccountStatus
? [
{
prop: 'status',
label: '状态',
width: 100,
formatter: (row: any) => {
return h(ElSwitch, {
modelValue: row.status,
activeValue: CommonStatus.ENABLED,
inactiveValue: CommonStatus.DISABLED,
activeText: getStatusText(CommonStatus.ENABLED),
inactiveText: getStatusText(CommonStatus.DISABLED),
inlinePrompt: true,
'onUpdate:modelValue': (val: string | number | boolean) =>
handleStatusChange(row, val as number)
})
}
}
]
: []),
{
prop: 'created_at',
label: '创建时间',

View File

@@ -220,6 +220,7 @@
defineOptions({ name: 'EnterpriseCustomer' })
const { hasAuth } = useAuth()
const canUpdateEnterpriseCustomerStatus = hasAuth('enterprise_customer:status')
const userStore = useUserStore()
const router = useRouter()
@@ -344,7 +345,7 @@
{ label: '登录手机号', prop: 'login_phone' },
{ label: '所在地区', prop: 'address' },
{ label: '归属店铺', prop: 'owner_shop_name' },
{ label: '状态', prop: 'status' },
...(canUpdateEnterpriseCustomerStatus ? [{ label: '状态', prop: 'status' }] : []),
{ label: '创建时间', prop: 'created_at' },
{ label: '操作', prop: 'operation' }
]
@@ -457,24 +458,27 @@
showOverflowTooltip: true,
formatter: (row: EnterpriseItem) => row.owner_shop_name || '平台'
},
{
prop: 'status',
label: '状态',
width: 100,
formatter: (row: EnterpriseItem) => {
return h(ElSwitch, {
modelValue: row.status,
activeValue: 1,
inactiveValue: 0,
activeText: '启用',
inactiveText: '禁用',
inlinePrompt: true,
disabled: !hasAuth('enterprise_customer:status'),
'onUpdate:modelValue': (val: string | number | boolean) =>
handleStatusChange(row, val as number)
})
}
},
...(canUpdateEnterpriseCustomerStatus
? [
{
prop: 'status',
label: '状态',
width: 100,
formatter: (row: EnterpriseItem) => {
return h(ElSwitch, {
modelValue: row.status,
activeValue: 1,
inactiveValue: 0,
activeText: '启用',
inactiveText: '禁用',
inlinePrompt: true,
'onUpdate:modelValue': (val: string | number | boolean) =>
handleStatusChange(row, val as number)
})
}
}
]
: []),
{
prop: 'created_at',
label: '创建时间',