Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
Y
yn-science-front
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
徐俊
yn-science-front
Commits
08ffe7d2
Commit
08ffe7d2
authored
Dec 19, 2024
by
徐俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xujun
parent
8e66191e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
35 deletions
+45
-35
index.js
src/api/index.js
+8
-2
groupExpertSelect.vue
src/views/assign/components/groupExpertSelect.vue
+37
-33
config.js
src/views/components/common/config.js
+0
-0
No files found.
src/api/index.js
View file @
08ffe7d2
...
...
@@ -301,7 +301,10 @@ export default {
},
getExpertListByExpertSpecIds
(
params
)
{
return
fetch
(
`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIds`
,
params
)
}
},
getExpertListByExpertSpecIdOrParentId
(
params
)
{
return
fetch
(
`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIdOrParentId`
,
params
)
},
},
expertBatch
:
{
getListByPage
(
params
)
{
...
...
@@ -819,7 +822,10 @@ export default {
},
getKnowledgeParameterTreeList
()
{
return
fetch
(
`/v1/science-admin/system-parameter/getKnowledgeParameterTreeList`
)
}
},
getSpecArray
()
{
return
fetch
(
`/v1/science-admin/system-parameter/getSpecArray`
)
},
},
parameterType
:
{
getListByPage
(
params
)
{
...
...
src/views/assign/components/groupExpertSelect.vue
View file @
08ffe7d2
...
...
@@ -45,6 +45,7 @@ export default {
expertSelectedRowKeys
:
[],
dataList
:
[],
personName
:
null
,
specArray
:
[],
}
},
props
:
{
...
...
@@ -63,66 +64,69 @@ export default {
},
created
()
{
this
.
loadTreeSelect
()
this
.
loadSpecList
()
let
parentArray
=
[]
let
specArray
=
[
"00000000-0000-0000-0000-000000000000"
]
this
.
seachExpert
(
specArray
,
parentArray
)
},
methods
:
{
loadTreeSelect
()
{
this
.
$api
.
parameter
.
get
TreeListByType
({
typeId
:
56
}
).
then
(({
data
=
{}
})
=>
{
this
.
$api
.
parameter
.
get
KnowledgeParameterTreeList
(
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
treeData
=
data
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
key
]
}
}).
catch
(()
=>
{
this
.
loading
=
true
});
},
load
Expert
List
()
{
this
.
$api
.
parameter
.
get
TreeListByType
({
typeId
:
56
}
).
then
(({
data
=
{}
})
=>
{
load
Spec
List
()
{
this
.
$api
.
parameter
.
get
SpecArray
(
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
treeData
=
data
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
key
]
this
.
loading
=
false
this
.
specArray
=
data
this
.
buildSpecKeyMap
()
}
})
.
catch
(()
=>
{
this
.
loading
=
true
});
})
},
onClick
(
value
,
info
)
{
const
content
=
info
.
selectedNodes
[
0
].
componentOptions
.
children
let
parentArray
=
null
let
specArray
=
null
if
(
content
&&
content
.
length
>
0
)
parentArray
=
value
buildSpecKeyMap
()
{
this
.
specKeyMap
=
{}
this
.
specArray
.
forEach
(
item
=>
{
this
.
specKeyMap
[
item
.
key
]
=
3
this
.
specKeyMap
[
item
.
pkey
]
=
2
this
.
specKeyMap
[
item
.
ppkey
]
=
1
})
},
FromSpecArrayFindKey
(
key
)
{
return
this
.
specKeyMap
[
key
]
||
0
},
processExpertSearch
(
value
)
{
const
level
=
this
.
FromSpecArrayFindKey
(
value
)
console
.
log
(
level
)
if
(
level
==
1
)
this
.
seachExpert
(
null
,
null
,
value
)
else
if
(
level
==
2
)
this
.
seachExpert
(
null
,
value
,
null
)
else
specArray
=
value
this
.
seachExpert
(
specArray
,
parentArray
)
this
.
seachExpert
(
value
,
null
,
null
)
},
onClick
(
value
,
info
)
{
this
.
processExpertSearch
(
value
)
},
onCheck
(
value
,
info
)
{
const
content
=
info
.
selectedNodes
[
0
].
componentOptions
.
children
let
parentArray
=
null
let
specArray
=
null
if
(
content
&&
content
.
length
>
0
)
parentArray
=
value
else
specArray
=
value
this
.
seachExpert
(
specArray
,
parentArray
)
this
.
processExpertSearch
(
value
)
},
onExpand
(
value
)
{
this
.
defaultExpandedKeys
=
value
},
changePersonName
()
{
let
parentArray
=
[]
let
specArray
=
[]
this
.
seachExpert
(
specArray
,
parentArray
)
this
.
seachExpert
(
null
,
null
,
null
)
},
seachExpert
(
spec
Array
,
parentArra
y
)
{
seachExpert
(
spec
Id
,
pkey
,
ppke
y
)
{
this
.
loading
=
true
let
specIds
=
specArray
===
null
?
null
:
specArray
.
join
(
","
)
let
parentIds
=
parentArray
===
null
?
null
:
parentArray
.
join
(
","
)
if
(
this
.
personName
!==
null
&&
this
.
personName
!==
''
)
{
specIds
=
null
parentIds
=
null
specId
=
null
pkey
=
null
ppkey
=
null
}
this
.
$api
.
expertSpec
.
getExpertListByExpertSpecId
s
({
specIds
:
specIds
,
parentIds
:
parentIds
,
personName
:
this
.
personName
}).
then
(({
data
=
{}
})
=>
{
this
.
$api
.
expertSpec
.
getExpertListByExpertSpecId
OrParentId
({
specId
:
specId
,
pkey
:
pkey
,
ppkey
:
ppkey
,
personName
:
this
.
personName
}).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
dataList
=
data
this
.
expertFilter
(
this
.
expertSelectKeys
,
this
.
dataList
)
...
...
src/views/components/common/config.js
View file @
08ffe7d2
This diff is collapsed.
Click to expand it.
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