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 {
...
@@ -70,7 +70,13 @@ export default {
loadTreeData
()
{
loadTreeData
()
{
let
handler
=
null
let
handler
=
null
if
(
this
.
selectScope
===
'currentUser'
)
{
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
)
.
then
(
res
=>
res
.
items
)
}
else
if
(
this
.
selectScope
===
'specified'
)
{
}
else
if
(
this
.
selectScope
===
'specified'
)
{
const
params
=
{
const
params
=
{
...
@@ -121,13 +127,13 @@ export default {
...
@@ -121,13 +127,13 @@ export default {
.
then
(
res
=>
res
.
items
.
content
)
.
then
(
res
=>
res
.
items
.
content
)
}
}
handler
.
then
(
items
=>
{
handler
.
then
(
items
=>
{
this
.
treeData
=
this
.
setNodeFullPath
(
items
)
this
.
treeData
=
items
this
.
setCheckedData
()
this
.
setCheckedData
()
})
})
},
},
onQuery
()
{
onQuery
()
{
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
if
(
this
.
orgNameCopy
!==
orgName
)
{
if
(
this
.
orgNameCopy
!==
orgName
||
!
orgName
)
{
this
.
orgNameCopy
=
orgName
this
.
orgNameCopy
=
orgName
this
.
loadTreeData
()
this
.
loadTreeData
()
}
}
...
@@ -161,17 +167,6 @@ export default {
...
@@ -161,17 +167,6 @@ export default {
this
.
updateCheckedData
()
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
()
{
setCheckedData
()
{
if
(
!
(
Array
.
isArray
(
this
.
checkedData
)
&&
this
.
checkedData
.
length
>
0
))
return
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 {
...
@@ -100,11 +100,11 @@ export default {
}
}
}
}
if
(
this
.
orgNameCopy
)
{
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
.
push
(
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
'value'
:
this
.
orgNameCopy
}
)
}
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
pres
=>
{
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
pres
=>
{
resolve
(
pres
.
items
.
content
)
resolve
(
pres
.
items
.
content
)
...
@@ -129,7 +129,9 @@ export default {
...
@@ -129,7 +129,9 @@ export default {
'fieldName'
:
'id'
,
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'operator'
:
'IN'
,
'value'
:
this
.
specifiedOrg
'value'
:
this
.
specifiedOrg
}]
},
}
]
},
'pageFrom'
:
this
.
pageFrom
,
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
'pageSize'
:
20
}
}
...
@@ -163,11 +165,11 @@ export default {
...
@@ -163,11 +165,11 @@ export default {
'pageSize'
:
20
'pageSize'
:
20
}
}
if
(
this
.
orgNameCopy
)
{
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
.
push
(
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
'value'
:
this
.
orgNameCopy
}
)
}
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
last
)
{
if
(
res
.
items
.
last
)
{
...
@@ -191,7 +193,7 @@ export default {
...
@@ -191,7 +193,7 @@ export default {
]
}
]
}
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
const
content
=
this
.
setNodeFullPath
(
res
.
items
.
content
,
node
.
data
)
const
content
=
res
.
items
.
content
resolve
(
content
)
resolve
(
content
)
this
.
setCheckedData
()
this
.
setCheckedData
()
})
})
...
@@ -207,7 +209,9 @@ export default {
...
@@ -207,7 +209,9 @@ export default {
'fieldName'
:
'id'
,
'fieldName'
:
'id'
,
'operator'
:
'IN'
,
'operator'
:
'IN'
,
'value'
:
this
.
specifiedOrg
'value'
:
this
.
specifiedOrg
}]
},
}
]
},
'pageFrom'
:
this
.
pageFrom
,
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
'pageSize'
:
20
}
}
...
@@ -233,6 +237,13 @@ export default {
...
@@ -233,6 +237,13 @@ export default {
'pageFrom'
:
this
.
pageFrom
,
'pageFrom'
:
this
.
pageFrom
,
'pageSize'
:
20
'pageSize'
:
20
}
}
if
(
this
.
orgNameCopy
)
{
params
.
searchItems
.
items
[
0
]
=
{
'fieldName'
:
'name'
,
'operator'
:
'LIKE'
,
'value'
:
this
.
orgNameCopy
}
}
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
this
.
$api
.
searchApi
(
'DxOrganization'
,
params
).
then
(
res
=>
{
if
(
res
.
items
.
last
)
{
if
(
res
.
items
.
last
)
{
this
.
isLoadMore
=
false
this
.
isLoadMore
=
false
...
@@ -246,10 +257,10 @@ export default {
...
@@ -246,10 +257,10 @@ export default {
},
},
onQuery
()
{
onQuery
()
{
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
const
orgName
=
(
this
.
orgName
||
''
).
trim
()
if
(
this
.
orgNameCopy
!==
orgName
)
{
if
(
this
.
orgNameCopy
!==
orgName
||
!
orgName
)
{
this
.
orgNameCopy
=
orgName
this
.
orgNameCopy
=
orgName
// 重置执行懒加载根节点数据
// 重置执行懒加载根节点数据
this
.
$refs
.
tree
.
loaded
=
false
this
.
$refs
.
tree
.
root
.
loaded
=
false
this
.
$refs
.
tree
.
root
.
expand
()
this
.
$refs
.
tree
.
root
.
expand
()
}
}
},
},
...
@@ -282,17 +293,6 @@ export default {
...
@@ -282,17 +293,6 @@ export default {
this
.
updateCheckedData
()
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
()
{
setCheckedData
()
{
if
(
!
(
Array
.
isArray
(
this
.
checkedData
)
&&
this
.
checkedData
.
length
>
0
))
return
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 @@
...
@@ -20,7 +20,7 @@
/>
/>
</el-select>
</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=
"OrgLazyLoadSelectCmp_dialog"
>
<div
class=
"wrap-left"
>
<div
class=
"wrap-left"
>
<!-- 独立组织树 -->
<!-- 独立组织树 -->
...
@@ -290,13 +290,13 @@ export default {
...
@@ -290,13 +290,13 @@ export default {
border
:
1px
solid
#E1E1E1
;
border
:
1px
solid
#E1E1E1
;
overflow
:
hidden
;
overflow
:
hidden
;
.wrap-left
{
.wrap-left
{
width
:
3
00px
;
width
:
4
00px
;
height
:
100%
;
height
:
100%
;
padding-right
:
5px
;
padding-right
:
5px
;
border-right
:
1px
solid
#E1E1E1
;
border-right
:
1px
solid
#E1E1E1
;
}
}
.wrap-right
{
.wrap-right
{
width
:
calc
(
100%
-
3
00px
);
width
:
calc
(
100%
-
4
00px
);
height
:
100%
;
height
:
100%
;
padding
:
0
5px
;
padding
:
0
5px
;
}
}
...
...
applications/architecture-dee/src/commonComponents/components/orgLazyLoadSelect/selectedOrgTable.vue
View file @
301e7ed8
...
@@ -37,7 +37,7 @@ export default {
...
@@ -37,7 +37,7 @@ export default {
title
:
'操作'
,
title
:
'操作'
,
key
:
'operate'
,
key
:
'operate'
,
hideTip
:
true
,
hideTip
:
true
,
minWidth
:
'50
'
,
width
:
'60px
'
,
align
:
'center'
,
align
:
'center'
,
component
:
{
component
:
{
show
:
true
,
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