perf: style
This commit is contained in:
parent
ff48a75830
commit
aa43967c08
@ -1,14 +1,17 @@
|
||||
<template>
|
||||
<div class="w-full">
|
||||
<div class="flex-between mb-16">
|
||||
<div class="flex align-center"
|
||||
v-if="hasPermission([EditionConst.IS_EE,EditionConst.IS_PE], 'OR')">
|
||||
<div
|
||||
class="flex align-center"
|
||||
v-if="hasPermission([EditionConst.IS_EE, EditionConst.IS_PE], 'OR')"
|
||||
>
|
||||
<!-- 企业版: 选优先级-->
|
||||
<span class="lighter mr-16">{{ $t('views.system.resourceAuthorization.priority.label') }}</span>
|
||||
<span class="lighter mr-16">{{
|
||||
$t('views.system.resourceAuthorization.priority.label')
|
||||
}}</span>
|
||||
<el-radio-group v-model="radioRole">
|
||||
<el-radio :value="true" size="large">{{
|
||||
$t('views.system.resourceAuthorization.priority.role')
|
||||
}}
|
||||
<el-radio :value="true" size="large"
|
||||
>{{ $t('views.system.resourceAuthorization.priority.role') }}
|
||||
</el-radio>
|
||||
<el-radio :value="false" size="large">{{ $t('common.custom') }}</el-radio>
|
||||
</el-radio-group>
|
||||
@ -27,7 +30,7 @@
|
||||
row-key="id"
|
||||
:data="filterData"
|
||||
:max-height="tableHeight"
|
||||
:expand-row-keys="['default']"
|
||||
:expand-row-keys="defaultExpandKeys"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column class-name="folder-flex" prop="name" :label="$t('common.name')">
|
||||
@ -183,7 +186,7 @@ import useStore from '@/stores'
|
||||
const { model } = useStore()
|
||||
const props = defineProps({
|
||||
data: {
|
||||
type: Array,
|
||||
type: Array<any>,
|
||||
default: () => [],
|
||||
},
|
||||
id: String,
|
||||
@ -203,6 +206,7 @@ const isKnowledge = computed(() => props.type === AuthorizationEnum.KNOWLEDGE)
|
||||
const isApplication = computed(() => props.type === AuthorizationEnum.APPLICATION)
|
||||
const isTool = computed(() => props.type === AuthorizationEnum.TOOL)
|
||||
const isModel = computed(() => props.type === AuthorizationEnum.MODEL)
|
||||
const defaultExpandKeys = computed(() => (props.data?.length > 0 ? [props.data[0]?.id] : []))
|
||||
const dfsPermission = (arr: any = [], Name: string | number, e: boolean, idArr: any[]) => {
|
||||
arr.map((item: any) => {
|
||||
if (idArr.includes(item.id)) {
|
||||
@ -230,7 +234,7 @@ const filterText = ref('')
|
||||
const filterData = computed(() => {
|
||||
function filterTree(data: any[]): any[] {
|
||||
return data
|
||||
.map(item => {
|
||||
.map((item) => {
|
||||
// 递归过滤 children
|
||||
const children = item.children ? filterTree(item.children) : []
|
||||
// 判断当前节点或其子节点是否匹配
|
||||
|
||||
Loading…
Reference in New Issue
Block a user