feat: small fix
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m12s

This commit is contained in:
luo
2026-07-29 11:36:34 +08:00
parent 827de02f2b
commit 4394ae0f78
10 changed files with 58 additions and 64 deletions

View File

@@ -76,22 +76,8 @@
<template #footer>
<div class="dialog-footer">
<ElButton @click="visible = false">取消</ElButton>
<ElButton
v-if="isEdit"
v-permission="JULY_PERMISSIONS.wecom.application"
:loading="testing"
@click="testApplication"
>
测试连接
</ElButton>
<ElButton
v-permission="JULY_PERMISSIONS.wecom.application"
type="primary"
:loading="saving"
@click="saveApplication"
>
保存应用
</ElButton>
<ElButton v-if="isEdit" :loading="testing" @click="testApplication"> 测试连接 </ElButton>
<ElButton type="primary" :loading="saving" @click="saveApplication"> 保存应用 </ElButton>
</div>
</template>
</ElDialog>
@@ -102,7 +88,6 @@
import { ElMessage } from 'element-plus'
import type { FormInstance, FormRules } from 'element-plus'
import { WecomService } from '@/api/modules'
import { JULY_PERMISSIONS } from '@/config/constants'
import type { WecomApplication } from '@/types/api'
defineOptions({ name: 'WecomApplicationFormDialog' })

View File

@@ -9,7 +9,7 @@
>
<template #left>
<ElButton
v-permission="JULY_PERMISSIONS.wecom.application"
v-permission="JULY_PERMISSIONS.wecom.applicationCreate"
type="primary"
@click="openCreateDialog"
>
@@ -173,19 +173,21 @@
const getActions = (row: WecomApplication) => {
const actions: any[] = []
if (hasAuth(JULY_PERMISSIONS.wecom.application)) {
if (hasAuth(JULY_PERMISSIONS.wecom.applicationTest)) {
actions.push({
label: '测试连接',
handler: () => testApplication(row.id),
type: 'primary'
})
}
if (hasAuth(JULY_PERMISSIONS.wecom.applicationEdit)) {
actions.push({
label: '编辑配置',
handler: () => openEditDialog(row),
type: 'primary'
})
}
if (hasAuth(JULY_PERMISSIONS.wecom.member)) {
if (hasAuth(JULY_PERMISSIONS.wecom.memberManage)) {
actions.push({
label: '成员管理',
handler: () => goToMembers(row.id),

View File

@@ -13,7 +13,7 @@
<div class="members-toolbar">
<div class="toolbar-actions">
<ElButton
v-permission="JULY_PERMISSIONS.wecom.member"
v-permission="JULY_PERMISSIONS.wecom.memberSync"
:disabled="!selectedApplicationId"
:loading="syncing"
type="primary"
@@ -42,7 +42,7 @@
</ElTag>
<ElTag
v-else
v-permission="JULY_PERMISSIONS.wecom.member"
v-permission="JULY_PERMISSIONS.wecom.memberDefaultCreator"
class="member-card__action-tag"
type="primary"
effect="plain"

View File

@@ -9,7 +9,7 @@
>
<template #left>
<ElButton
v-permission="JULY_PERMISSIONS.wecom.scene"
v-permission="JULY_PERMISSIONS.wecom.sceneCreate"
type="primary"
@click="createScene"
>
@@ -88,11 +88,7 @@
<ElFormItem label="模板 ID" required>
<ElInput v-model="sceneForm.template_id" placeholder="请输入企微后台模板 ID">
<template #append>
<ElButton
v-permission="JULY_PERMISSIONS.wecom.scene"
:loading="inspectingTemplate"
@click="syncTemplate()"
>
<ElButton :loading="inspectingTemplate" @click="syncTemplate()">
同步模板
</ElButton>
</template>
@@ -173,14 +169,7 @@
<div class="dialog-footer">
<ElButton @click="editorVisible = false">取消</ElButton>
<ElButton @click="createScene">清空表单</ElButton>
<ElButton
v-permission="JULY_PERMISSIONS.wecom.scene"
type="primary"
:loading="saving"
@click="saveScene"
>
保存并校验
</ElButton>
<ElButton type="primary" :loading="saving" @click="saveScene"> 保存并校验 </ElButton>
</div>
</template>
</ElDialog>
@@ -490,7 +479,7 @@
}
const getActions = (row: WecomScene) => {
if (!hasAuth(JULY_PERMISSIONS.wecom.scene)) return []
if (!hasAuth(JULY_PERMISSIONS.wecom.sceneEdit)) return []
return [
{
label: '编辑',