Skip to content

Commit

Permalink
chore: 优化角色管理部分提示
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles7c committed Aug 31, 2024
1 parent ebef696 commit 80de5b0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/views/system/role/RoleAddModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
@close="reset"
>
<a-steps :current="current" class="mb-15" @change="onChangeCurrent">
<a-step>创建角色</a-step>
<a-step>基础信息</a-step>
<a-step>功能权限</a-step>
<a-step>数据权限</a-step>
</a-steps>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
@close="reset"
>
<a-form ref="formRef" :model="form" :rules="rules" size="large" auto-label-width>
<a-alert v-if="!form.disabled" type="warning" style="margin-bottom: 15px">
变更功能权限或数据权限后,关联在线用户会自动下线!
</a-alert>
<fieldset>
<legend>基础信息</legend>
<a-form-item label="名称" field="name">
Expand Down
12 changes: 6 additions & 6 deletions src/views/system/role/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@
</template>
</GiTable>

<RoleAddModal ref="RoleAddModalRef" @save-success="search"/>
<RoleEditDrawer ref="RoleEditDrawerRef" @save-success="search" />
<RoleAddModal ref="RoleAddModalRef" @save-success="search" />
<RoleUpdateDrawer ref="RoleUpdateDrawerRef" @save-success="search" />
<RoleDetailDrawer ref="RoleDetailDrawerRef" />
</div>
</template>

<script setup lang="ts">
import RoleEditDrawer from './RoleEditDrawer.vue'
import RoleUpdateDrawer from './RoleUpdateDrawer.vue'
import RoleDetailDrawer from './RoleDetailDrawer.vue'
import RoleAddModal from './RoleAddModal.vue'
import { type RoleQuery, type RoleResp, deleteRole, listRole } from '@/apis'
import type { TableInstanceColumns } from '@/components/GiTable/type'
import { useTable } from '@/hooks'
import { useDict } from '@/hooks/app'
import { isMobile } from '@/utils'
import has from '@/utils/has'
import RoleAddModal from './RoleAddModal.vue'
defineOptions({ name: 'SystemRole' })
Expand Down Expand Up @@ -121,7 +121,7 @@ const onDelete = (record: RoleResp) => {
return handleDelete(() => deleteRole(record.id), { content: `是否确定删除 [${record.name}]?`, showModal: true })
}
const RoleEditDrawerRef = ref<InstanceType<typeof RoleEditDrawer>>()
const RoleUpdateDrawerRef = ref<InstanceType<typeof RoleUpdateDrawer>>()
const RoleAddModalRef = ref<InstanceType<typeof RoleAddModal>>()
// 新增
const onAdd = () => {
Expand All @@ -130,7 +130,7 @@ const onAdd = () => {
// 修改
const onUpdate = (record: RoleResp) => {
RoleEditDrawerRef.value?.onUpdate(record.id)
RoleUpdateDrawerRef.value?.onUpdate(record.id)
}
const RoleDetailDrawerRef = ref<InstanceType<typeof RoleDetailDrawer>>()
Expand Down

0 comments on commit 80de5b0

Please sign in to comment.