fix: 修复角色id, 企微审批场景
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 10m25s

This commit is contained in:
luo
2026-07-28 14:27:55 +08:00
parent 2706c52a47
commit 0e8a11430a
4 changed files with 31 additions and 36 deletions

View File

@@ -631,7 +631,7 @@
const getActions = (row: any) => {
const actions: any[] = []
if (hasAuth(JULY_PERMISSIONS.wecom.binding)) {
if (row.user_type === 2 && hasAuth(JULY_PERMISSIONS.wecom.binding)) {
actions.push({
label: '绑定账号',
handler: () => showWecomBindingDialog(row),
@@ -667,6 +667,11 @@
}
const showWecomBindingDialog = (row: any) => {
if (row.user_type !== 2) {
ElMessage.warning('只有平台用户可以绑定企微账号')
return
}
currentWecomAccount.value = row
wecomBindingForm.application_id = undefined
wecomBindingForm.userid = ''
@@ -706,6 +711,11 @@
const valid = await wecomBindingFormRef.value?.validate().catch(() => false)
if (!valid || !currentWecomAccount.value || !wecomBindingForm.application_id) return
if (currentWecomAccount.value.user_type !== 2) {
ElMessage.error('只有平台用户可以绑定企微账号')
return
}
const accountId = Number(currentWecomAccount.value.id ?? currentWecomAccount.value.ID)
if (!accountId) {
ElMessage.error('当前账号缺少账号标识,无法绑定企微')