Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cea7b41a
authored
Mar 04, 2023
by
gexinzhineng/gxzn27
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
租户和角色管理的菜单权限不能滚动
租户新增菜单权限校验不通过 角色管理详情页不展示对应的部门 XTable中主题颜色不跟随项目主体一起切换
parent
7a5a08d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
6 deletions
+56
-6
src/components/XTable/src/XTable.vue
+27
-4
src/views/system/tenantPackage/tenantPackage.data.ts
+6
-1
src/views/system/user/index.vue
+23
-1
No files found.
src/components/XTable/src/XTable.vue
View file @
cea7b41a
...
@@ -12,7 +12,7 @@ import { useAppStore } from '@/store/modules/app'
...
@@ -12,7 +12,7 @@ import { useAppStore } from '@/store/modules/app'
import
{
useDesign
}
from
'@/hooks/web/useDesign'
import
{
useDesign
}
from
'@/hooks/web/useDesign'
import
{
XTableProps
}
from
'./type'
import
{
XTableProps
}
from
'./type'
import
{
isBoolean
,
isFunction
}
from
'@/utils/is'
import
{
isBoolean
,
isFunction
}
from
'@/utils/is'
import
styleCss
from
'./style/dark.scss'
import
download
from
'@/utils/download'
import
download
from
'@/utils/download'
const
{
t
}
=
useI18n
()
const
{
t
}
=
useI18n
()
...
@@ -25,15 +25,38 @@ const prefixCls = getPrefixCls('x-vxe-table')
...
@@ -25,15 +25,38 @@ const prefixCls = getPrefixCls('x-vxe-table')
const
attrs
=
useAttrs
()
const
attrs
=
useAttrs
()
const
emit
=
defineEmits
([
'register'
])
const
emit
=
defineEmits
([
'register'
])
const
removeStyles
=
()
=>
{
var
filename
=
'cssTheme'
//移除引入的文件名
var
targetelement
=
'style'
var
targetattr
=
'id'
var
allsuspects
=
document
.
getElementsByTagName
(
targetelement
)
for
(
var
i
=
allsuspects
.
length
;
i
>=
0
;
i
--
)
{
if
(
allsuspects
[
i
]
&&
allsuspects
[
i
].
getAttribute
(
targetattr
)
!=
null
&&
allsuspects
[
i
].
getAttribute
(
targetattr
)?.
indexOf
(
filename
)
!=
-
1
)
{
console
.
log
(
allsuspects
[
i
],
'node'
)
allsuspects
[
i
].
parentNode
?.
removeChild
(
allsuspects
[
i
])
}
}
}
const
reImport
=
()
=>
{
var
head
=
document
.
getElementsByTagName
(
'head'
)[
0
]
var
style
=
document
.
createElement
(
'style'
)
style
.
innerText
=
styleCss
style
.
id
=
'cssTheme'
head
.
appendChild
(
style
)
}
watch
(
watch
(
()
=>
appStore
.
getIsDark
,
()
=>
appStore
.
getIsDark
,
()
=>
{
()
=>
{
if
(
appStore
.
getIsDark
==
true
)
{
if
(
appStore
.
getIsDark
==
true
)
{
import
(
'./style/dark.scss'
)
reImport
(
)
}
}
if
(
appStore
.
getIsDark
==
false
)
{
if
(
appStore
.
getIsDark
==
false
)
{
import
(
'./style/light.scss'
)
removeStyles
(
)
}
}
},
},
{
immediate
:
true
}
{
immediate
:
true
}
...
...
src/views/system/tenantPackage/tenantPackage.data.ts
View file @
cea7b41a
...
@@ -33,7 +33,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
...
@@ -33,7 +33,12 @@ const crudSchemas = reactive<VxeCrudSchema>({
{
{
title
:
'菜单权限'
,
title
:
'菜单权限'
,
field
:
'menuIds'
,
field
:
'menuIds'
,
isTable
:
false
isTable
:
false
,
form
:
{
colProps
:
{
span
:
24
}
}
},
},
{
{
title
:
t
(
'form.remark'
),
title
:
t
(
'form.remark'
),
...
...
src/views/system/user/index.vue
View file @
cea7b41a
...
@@ -159,7 +159,7 @@
...
@@ -159,7 +159,7 @@
:data=
"detailData"
:data=
"detailData"
>
>
<
template
#
deptId=
"{ row }"
>
<
template
#
deptId=
"{ row }"
>
<
span>
{{
row
.
dept
?.
name
}}
</span
>
<
el-tag>
{{
dataFormater
(
row
.
deptId
)
}}
</el-tag
>
</
template
>
</
template
>
<
template
#
postIds=
"{ row }"
>
<
template
#
postIds=
"{ row }"
>
<template
v-if=
"row.postIds !== ''"
>
<template
v-if=
"row.postIds !== ''"
>
...
@@ -332,6 +332,28 @@ const getPostOptions = async () => {
...
@@ -332,6 +332,28 @@ const getPostOptions = async () => {
const
res
=
await
listSimplePostsApi
()
const
res
=
await
listSimplePostsApi
()
postOptions
.
value
.
push
(...
res
)
postOptions
.
value
.
push
(...
res
)
}
}
const
dataFormater
=
(
val
)
=>
{
return
deptFormater
(
deptOptions
.
value
,
val
)
}
//部门回显
const
deptFormater
=
(
ary
,
val
:
any
)
=>
{
var
o
=
''
if
(
ary
&&
val
)
{
for
(
const
v
of
ary
)
{
if
(
v
.
id
==
val
)
{
o
=
v
.
name
if
(
o
)
return
o
}
else
if
(
v
.
children
?.
length
)
{
o
=
deptFormater
(
v
.
children
,
val
)
if
(
o
)
return
o
}
}
return
o
}
else
{
return
val
}
}
// 设置标题
// 设置标题
const
setDialogTile
=
async
(
type
:
string
)
=>
{
const
setDialogTile
=
async
(
type
:
string
)
=>
{
dialogTitle
.
value
=
t
(
'action.'
+
type
)
dialogTitle
.
value
=
t
(
'action.'
+
type
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment