Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TF-MOM-WEB
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TFMOM
TF-MOM-WEB
Commits
c98a39cb
Commit
c98a39cb
authored
Jan 24, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并产品【10235】【测评】安全管理员--用户管理--增加设置用户的密级功能
parent
5be2c0ac
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
197 additions
and
3 deletions
+197
-3
editBySecadmin.vue
.../privateComponents/components/editUser/editBySecadmin.vue
+184
-0
index.vue
...src/privateComponents/components/orgTreeForUser/index.vue
+13
-3
No files found.
applications/dee-user/src/privateComponents/components/editUser/editBySecadmin.vue
0 → 100644
View file @
c98a39cb
/**
* @Description: 编辑用户
* @author wx
* @date 2022/04/18
*/
<
template
>
<div
class=
"edit-user-com"
>
<dee-as-com
ref=
"form"
:form=
"defaultData"
:lay-config=
"
{
typeName: 'DxUserInfo',
layKey: 'defaultEditBySecadmin'
}"
:basic-data="basicData"
@getOriPboData="getPboData"
>
<span
style=
"display:flex"
>
<el-button
type=
"primary"
class=
"searchBtn"
@
click=
"handleSubmit"
>
确定
</el-button>
<el-button
class=
"searchBtn"
@
click=
"handleClose"
>
取消
</el-button>
</span>
</dee-as-com>
</div>
</
template
>
<
script
>
import
{
findCurrentPostByUserOrg
}
from
'@/api/userSystem/user'
export
default
{
componentName
:
'编辑用户'
,
name
:
'EditUser'
,
// import引入的组件需要注入到对象中才能使用
components
:
{},
props
:
{
basicData
:
{
type
:
Object
,
default
:
null
},
searchOriParams
:
{
type
:
Object
,
default
:
null
},
parentTableData
:
{
type
:
Object
,
default
:
null
}
},
data
()
{
// 这里存放数据
return
{
addOrgFormData
:
{},
defaultData
:
{},
orgOptions
:
[],
postOptions
:
[],
orgFormObj
:
{
orgId
:
''
,
postIds
:
''
}
}
},
computed
:
{
editId
()
{
return
this
.
basicData
&&
this
.
basicData
.
id
?
this
.
basicData
.
id
+
''
:
''
}
},
watch
:
{
parentTableData
:
{
immediate
:
true
,
deep
:
true
,
handler
:
function
(
val
)
{
if
(
val
)
{
this
.
$set
(
this
.
orgFormObj
,
'orgId'
,
val
.
id
)
}
}
},
'orgFormObj.orgId'
:
{
immediate
:
true
,
handler
:
function
(
val
)
{
if
(
val
)
{
this
.
getPostOptions
(
val
)
}
else
{
this
.
$set
(
this
.
orgFormObj
,
'postIds'
,
[])
}
}
},
'defaultData.targetDxPostMemberLink'
:
{
immediate
:
true
,
handler
:
function
(
val
)
{
if
(
val
)
{
this
.
$set
(
this
.
orgFormObj
,
'postIds'
,
val
.
map
((
el
)
=>
el
.
sourceId
))
}
}
}
},
// 方法集合
methods
:
{
getPboData
(
form
)
{
if
(
form
&&
form
.
targetDxPostMemberLink
&&
!
this
.
orgFormObj
.
postIds
)
{
const
arr
=
[]
form
.
targetDxPostMemberLink
.
forEach
(
org
=>
{
arr
.
push
(
org
.
sourceId
)
})
this
.
$set
(
this
.
orgFormObj
,
'postIds'
,
arr
)
}
},
getPostOptions
(
val
)
{
findCurrentPostByUserOrg
({
orgId
:
val
}).
then
((
res
)
=>
{
this
.
postOptions
=
[]
if
(
!
this
.
defaultData
.
dxOrganizationId
||
(
this
.
defaultData
.
dxOrganizationId
&&
this
.
defaultData
.
dxOrganizationId
!==
this
.
orgFormObj
.
orgId
))
{
this
.
$set
(
this
.
orgFormObj
,
'postIds'
,
[])
}
if
(
res
.
items
)
{
res
.
items
.
globalPost
&&
res
.
items
.
globalPost
.
forEach
(
item
=>
{
this
.
postOptions
.
push
(
{
label
:
`
${
item
.
postName
}
-
${
item
.
dxOrganization
?
item
.
dxOrganization
.
name
:
'全局'
}
`
,
value
:
item
.
id
,
disabled
:
item
.
postState
===
'DISABLE'
,
postState
:
item
.
postState
}
)
})
res
.
items
.
orgPost
&&
res
.
items
.
orgPost
.
forEach
(
item
=>
{
if
(
!
this
.
postOptions
.
find
(
r
=>
r
.
value
===
item
.
id
))
{
this
.
postOptions
.
push
(
{
label
:
`
${
item
.
postName
}
-
${
item
.
dxOrganization
?
item
.
dxOrganization
.
name
:
'全局'
}
`
,
value
:
item
.
id
,
disabled
:
item
.
postState
===
'DISABLE'
,
postState
:
item
.
postState
}
)
}
})
}
})
},
handleSubmit
()
{
this
.
$refs
.
form
.
$refs
.
asCom
.
$refs
.
deeForm
.
$refs
.
form
.
validate
((
valid
)
=>
{
if
(
!
valid
)
{
return
}
const
form
=
{
...
this
.
$refs
.
form
.
$refs
.
asCom
.
form
}
if
(
this
.
basicData
&&
this
.
basicData
.
id
)
{
// 编辑
const
params
=
{
...
form
,
dxOrganizationId
:
this
.
orgFormObj
.
orgId
,
dxOrganizationIdType
:
'DxOrganization'
,
operator
:
'MODIFY'
}
this
.
saveUser
(
params
,
'DxUserInfo'
)
}
})
},
saveUser
(
dxUserInfo
,
modelName
)
{
this
.
$api
.
recursion
(
modelName
,
dxUserInfo
).
then
(
res
=>
{
this
.
$emit
(
'completeEven'
,
{})
this
.
$utils
.
showMessageSuccess
(
res
.
message
)
})
},
handleClose
()
{
this
.
$emit
(
'cancel'
,
{})
}
}
}
</
script
>
<
style
lang=
'scss'
>
.edit-user-com
{
.avatar
{
width
:
100px
;
height
:
100px
;
}
.add-btn
{
margin-bottom
:
22px
!
important
;
}
.topLevel
div
:nth-child
(
2
)
{
margin
:
0
auto
;
}
}
.el-message-box__wrapper
{
z-index
:
99999
!
important
;
}
</
style
>
applications/dee-user/src/privateComponents/components/orgTreeForUser/index.vue
View file @
c98a39cb
...
...
@@ -27,7 +27,7 @@
<span
class=
"change-text"
>
{{
data
.
name
}}
</span>
</div>
<span
class=
"tree-btn-box"
>
<span
v-if=
"!ternaryUserInfo.isSecAdmin"
class=
"tree-btn-box"
>
<span
class=
"btn-item"
title=
"新增"
@
click=
"() => append(data, node)"
>
<img
src=
"/icons/add-L.png"
alt=
""
>
</span>
...
...
@@ -142,6 +142,12 @@ export default {
}]
}
},
computed
:
{
// 三元用户信息
ternaryUserInfo
()
{
return
this
.
$store
.
getters
.
ternaryUserInfo
}
},
watch
:
{
inputVal
:
{
handler
:
function
(
keyword
)
{
...
...
@@ -167,7 +173,7 @@ export default {
return
type
!==
'inner'
}
},
loadNode
()
{
loadNode
(
data
)
{
const
serverParams
=
{
'searchItems'
:
{
'children'
:
[],
...
...
@@ -206,6 +212,10 @@ export default {
this
.
treeData
=
res
.
items
.
content
||
[]
if
(
this
.
treeData
.
length
)
{
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
id
]
if
(
data
)
{
this
.
$refs
.
tree
.
setCurrentKey
(
data
.
id
)
this
.
$emit
(
'nodeClick'
,
data
)
}
}
// resolve(res.items.content || [])
// if (node.level === 0) {
...
...
@@ -267,7 +277,7 @@ export default {
completeEven
(
data
)
{
if
(
data
.
buttonInformation
.
type
===
'submit'
)
{
if
(
this
.
basicData
&&
this
.
basicData
.
id
)
{
this
.
loadNode
()
this
.
loadNode
(
this
.
basicData
)
}
else
{
if
(
!
this
.
curNode
.
data
.
children
)
{
this
.
$set
(
this
.
curNode
.
data
,
'children'
,
[])
...
...
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