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
301e7ed8
Commit
301e7ed8
authored
Feb 18, 2024
by
jingnan
👀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
合并产品【10500】设置全路径,支持组织名称模糊查询,弹框宽度加宽展示内容,支持名称模糊查询
parent
c6fa12ce
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
38 deletions
+33
-38
IndependentOrgTree.vue
...nents/components/orgLazyLoadSelect/IndependentOrgTree.vue
+9
-14
OrgTree.vue
...commonComponents/components/orgLazyLoadSelect/OrgTree.vue
+20
-20
index.vue
...c/commonComponents/components/orgLazyLoadSelect/index.vue
+3
-3
selectedOrgTable.vue
...ponents/components/orgLazyLoadSelect/selectedOrgTable.vue
+1
-1
No files found.
applications/architecture-dee/src/commonComponents/components/orgLazyLoadSelect/IndependentOrgTree.vue
View file @
301e7ed8
...
...
@@ -70,7 +70,13 @@ export default {
loadTreeData
()
{
let
handler
=
null
if
(
this
.
selectScope
===
'currentUser'
)
{
handler
=
http
.
get
(
'/DxOrganization/getUserOrganizations?userId='
+
this
.
userInfo
.
id
)
const
params
=
{
userId
:
this
.
userInfo
.
id
}
if
(
this
.
orgNameCopy
)
{
params
.
fuzzOrgName
=
this
.
fuzzOrgName
}
handler
=
http
.
get
(
'/DxOrganization/getUserOrganizations'
,
params
)
.
then
(
res
=>
res
.
items
)
}
else
if
(
this
.
selectScope
===
'specified'
)
{
const
params
=
{
...
...
@@ -121,13 +127,13 @@ export default {
.
then
(
res
=>
res
.
items
.
content
)
}
handler
.
then
(
items
=>
{
this
.
treeData
=
this
.
setNodeFullPath
(
items
)
this
.
treeData
=
items
this
.
setCheckedData
()
})
},
onQuery
()
{
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
if
(
this
.
orgNameCopy
!==
orgName
)
{
if
(
this
.
orgNameCopy
!==
orgName
||
!
orgName
)
{
this
.
orgNameCopy
=
orgName
this
.
loadTreeData
()
}
...
...
@@ -161,17 +167,6 @@ export default {
this
.
updateCheckedData
()
})
},
// 设置节点全路径
setNodeFullPath
(
children
,
parent
)
{
let
parentPath
=
this
.
$utils
.
_get
(
parent
,
'fullPath'
)
||
''
if
(
parentPath
)
{
parentPath
+=
'/'
}
children
.
forEach
(
data
=>
{
data
.
fullPath
=
parentPath
+
(
data
.
name
||
''
)
})
return
children
},
// 回显已勾选数据
setCheckedData
()
{
if
(
!
(
Array
.
isArray
(
this
.
checkedData
)
&&
this
.
checkedData
.
length
>
0
))
return
...
...
applications/architecture-dee/src/commonComponents/components/orgLazyLoadSelect/OrgTree.vue
View file @
301e7ed8
...
...
@@ -100,11 +100,11 @@ export default {
}
}
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
.
push
(
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
}
)
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
pres
=>
{
resolve
(
pres
.
items
.
content
)
...
...
@@ -129,7 +129,9 @@ export default {
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'value'
:
this
.
specifiedOrg
}]
},
}
]
},
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
}
...
...
@@ -163,11 +165,11 @@ export default {
'pageSize'
:
20
}
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
.
push
(
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
}
)
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
last
)
{
...
...
@@ -191,7 +193,7 @@ export default {
]
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
const
content
=
this
.
setNodeFullPath
(
res
.
items
.
content
,
node
.
data
)
const
content
=
res
.
items
.
content
resolve
(
content
)
this
.
setCheckedData
()
})
...
...
@@ -207,7 +209,9 @@ export default {
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'value'
:
this
.
specifiedOrg
}]
},
}
]
},
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
}
...
...
@@ -233,6 +237,13 @@ export default {
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
}
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
last
)
{
this
.
isLoadMore
=
false
...
...
@@ -246,10 +257,10 @@ export default {
},
onQuery
()
{
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
if
(
this
.
orgNameCopy
!==
orgName
)
{
if
(
this
.
orgNameCopy
!==
orgName
||
!
orgName
)
{
this
.
orgNameCopy
=
orgName
// 重置执行懒加载根节点数据
this
.
$refs
.
tree
.
loaded
=
false
this
.
$refs
.
tree
.
root
.
loaded
=
false
this
.
$refs
.
tree
.
root
.
expand
()
}
},
...
...
@@ -282,17 +293,6 @@ export default {
this
.
updateCheckedData
()
})
},
// 设置节点全路径
setNodeFullPath
(
children
,
parent
)
{
let
parentPath
=
this
.
$utils
.
_get
(
parent
,
'fullPath'
)
||
''
if
(
parentPath
)
{
parentPath
+=
'/'
}
children
.
forEach
(
data
=>
{
data
.
fullPath
=
parentPath
+
(
data
.
name
||
''
)
})
return
children
},
// 回显已勾选数据
setCheckedData
()
{
if
(
!
(
Array
.
isArray
(
this
.
checkedData
)
&&
this
.
checkedData
.
length
>
0
))
return
...
...
applications/architecture-dee/src/commonComponents/components/orgLazyLoadSelect/index.vue
View file @
301e7ed8
...
...
@@ -20,7 +20,7 @@
/>
</el-select>
<!-- 弹出框 -->
<dee-dialog
title=
"选择组织"
:dialog-visible=
"showDialog"
:destroy-on-close=
"true"
@
handleClose=
"onClose"
>
<dee-dialog
width=
"60%"
title=
"选择组织"
:dialog-visible=
"showDialog"
:destroy-on-close=
"true"
@
handleClose=
"onClose"
>
<div
class=
"OrgLazyLoadSelectCmp_dialog"
>
<div
class=
"wrap-left"
>
<!-- 独立组织树 -->
...
...
@@ -290,13 +290,13 @@ export default {
border
:
1px
solid
#E1E1E1
;
overflow
:
hidden
;
.wrap-left
{
width
:
3
00px
;
width
:
4
00px
;
height
:
100%
;
padding-right
:
5px
;
border-right
:
1px
solid
#E1E1E1
;
}
.wrap-right
{
width
:
calc
(
100%
-
3
00px
);
width
:
calc
(
100%
-
4
00px
);
height
:
100%
;
padding
:
0
5px
;
}
...
...
applications/architecture-dee/src/commonComponents/components/orgLazyLoadSelect/selectedOrgTable.vue
View file @
301e7ed8
...
...
@@ -37,7 +37,7 @@ export default {
title
:
'操作'
,
key
:
'operate'
,
hideTip
:
true
,
minWidth
:
'50
'
,
width
:
'60px
'
,
align
:
'center'
,
component
:
{
show
:
true
,
...
...
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