commit:应用权限功能
This commit is contained in:
@@ -58,6 +58,15 @@
|
||||
<span>菜单权限</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{ type: 'app', row }"
|
||||
v-if="checkPermi(['system:permission:assign-role-app'])"
|
||||
>
|
||||
<div class="flex items-center">
|
||||
<Icon icon="ep:menu" />
|
||||
<span>应用权限</span>
|
||||
</div>
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="{ type: 'data', row }"
|
||||
v-if="checkPermi(['system:permission:assign-role-data-scope'])"
|
||||
@@ -86,6 +95,8 @@
|
||||
<RoleAssignMenuForm ref="assignMenuFormRef" @success="getTableData" />
|
||||
<!-- 表单弹窗:数据权限 -->
|
||||
<RoleDataPermissionForm ref="dataPermissionFormRef" @success="getTableData" />
|
||||
<!-- 表单弹窗:应用权限 -->
|
||||
<RoleAssignAppForm ref="assignAppFormRef" @success="getTableData" />
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
|
||||
@@ -96,6 +107,7 @@ import * as RoleApi from '@/api/system/role'
|
||||
import { CommonStatusEnum } from '@/utils/constants'
|
||||
import RoleAssignMenuForm from './RoleAssignMenuForm.vue'
|
||||
import RoleDataPermissionForm from './RoleDataPermissionForm.vue'
|
||||
import RoleAssignAppForm from './RoleAssignAppForm.vue'
|
||||
|
||||
defineOptions({ name: 'SystemRole' })
|
||||
|
||||
@@ -186,7 +198,7 @@ const tablePage = ref({
|
||||
total: 0
|
||||
})
|
||||
const permission = getCurrPermi(['system:role'])
|
||||
|
||||
const assignAppFormRef = ref()
|
||||
const crudRef = ref()
|
||||
|
||||
useCrudHeight(crudRef)
|
||||
@@ -197,6 +209,11 @@ const menuHandle = ({ row, type }) => {
|
||||
if (type == 'menu') openAssignMenuForm(row)
|
||||
else if (type == 'data') openDataPermissionForm(row)
|
||||
else if (type == 'del') rowDel(row)
|
||||
else if (type == 'app') openAssignAppForm(row)
|
||||
}
|
||||
|
||||
const openAssignAppForm = (row) => {
|
||||
assignAppFormRef.value.open(row)
|
||||
}
|
||||
|
||||
/** 查询列表 */
|
||||
|
||||
Reference in New Issue
Block a user