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
fc57327f
Commit
fc57327f
authored
Dec 20, 2024
by
wangxl
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.yiboshi.com/XuJun/yn-science-front
parents
ab29540d
6248e99a
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
84 additions
and
45 deletions
+84
-45
index.js
src/api/index.js
+13
-4
groupExpertSelect.vue
src/views/assign/components/groupExpertSelect.vue
+37
-36
cascaderSelect.vue
src/views/components/common/cascaderSelect.vue
+34
-5
config.js
src/views/components/common/config.js
+0
-0
No files found.
src/api/index.js
View file @
fc57327f
...
@@ -301,7 +301,10 @@ export default {
...
@@ -301,7 +301,10 @@ export default {
},
},
getExpertListByExpertSpecIds
(
params
)
{
getExpertListByExpertSpecIds
(
params
)
{
return
fetch
(
`/v1/science-admin/com-expert-spec/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
:
{
expertBatch
:
{
getListByPage
(
params
)
{
getListByPage
(
params
)
{
...
@@ -817,9 +820,15 @@ export default {
...
@@ -817,9 +820,15 @@ export default {
getParameterListBySystemCode
(
params
)
{
getParameterListBySystemCode
(
params
)
{
return
fetch
(
`/v1/science-admin/system-parameter/getParameterListBySystemCode`
,
params
)
return
fetch
(
`/v1/science-admin/system-parameter/getParameterListBySystemCode`
,
params
)
},
},
getKnowledgeParameterTreeList
()
{
getKnowledgeInfoList1
()
{
return
fetch
(
`/v1/science-admin/system-parameter/getKnowledgeParameterTreeList`
)
return
fetch
(
`/v1/science-admin/system-parameter/getKnowledgeInfoList1`
)
}
},
getKnowledgeInfoList2
()
{
return
fetch
(
`/v1/science-admin/system-parameter/getKnowledgeInfoList2`
)
},
getSpecArray
()
{
return
fetch
(
`/v1/science-admin/system-parameter/getSpecArray`
)
},
},
},
parameterType
:
{
parameterType
:
{
getListByPage
(
params
)
{
getListByPage
(
params
)
{
...
...
src/views/assign/components/groupExpertSelect.vue
View file @
fc57327f
...
@@ -45,6 +45,7 @@ export default {
...
@@ -45,6 +45,7 @@ export default {
expertSelectedRowKeys
:
[],
expertSelectedRowKeys
:
[],
dataList
:
[],
dataList
:
[],
personName
:
null
,
personName
:
null
,
specArray
:
[],
}
}
},
},
props
:
{
props
:
{
...
@@ -63,66 +64,66 @@ export default {
...
@@ -63,66 +64,66 @@ export default {
},
},
created
()
{
created
()
{
this
.
loadTreeSelect
()
this
.
loadTreeSelect
()
let
parentArray
=
[]
this
.
loadSpecList
()
let
specArray
=
[
"00000000-0000-0000-0000-000000000000"
]
this
.
seachExpert
(
"00000000-0000-0000-0000-000000000000"
,
null
,
null
)
this
.
seachExpert
(
specArray
,
parentArray
)
},
},
methods
:
{
methods
:
{
loadTreeSelect
()
{
loadTreeSelect
()
{
this
.
$api
.
parameter
.
get
TreeListByType
({
typeId
:
56
}
).
then
(({
data
=
{}
})
=>
{
this
.
$api
.
parameter
.
get
KnowledgeInfoList1
(
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
treeData
=
data
this
.
treeData
=
data
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
key
]
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
key
]
}
}
}).
catch
(()
=>
{
this
.
loading
=
true
});
}).
catch
(()
=>
{
this
.
loading
=
true
});
},
},
load
Expert
List
()
{
load
Spec
List
()
{
this
.
$api
.
parameter
.
get
TreeListByType
({
typeId
:
56
}
).
then
(({
data
=
{}
})
=>
{
this
.
$api
.
parameter
.
get
SpecArray
(
).
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
if
(
data
)
{
this
.
treeData
=
data
this
.
specArray
=
data
this
.
defaultExpandedKeys
=
[
this
.
treeData
[
0
].
key
]
this
.
buildSpecKeyMap
()
this
.
loading
=
false
}
}
})
.
catch
(()
=>
{
this
.
loading
=
true
});
})
},
},
onClick
(
value
,
info
)
{
buildSpecKeyMap
()
{
const
content
=
info
.
selectedNodes
[
0
].
componentOptions
.
children
this
.
specKeyMap
=
{}
let
parentArray
=
null
this
.
specArray
.
forEach
(
item
=>
{
let
specArray
=
null
this
.
specKeyMap
[
item
.
key
]
=
3
if
(
content
&&
content
.
length
>
0
)
this
.
specKeyMap
[
item
.
pkey
]
=
2
parentArray
=
value
this
.
specKeyMap
[
item
.
ppkey
]
=
1
})
},
FromSpecArrayFindKey
(
key
)
{
return
this
.
specKeyMap
[
key
]
||
0
},
processExpertSearch
(
value
)
{
const
level
=
this
.
FromSpecArrayFindKey
(
value
)
if
(
level
==
1
)
this
.
seachExpert
(
null
,
null
,
value
)
else
if
(
level
==
2
)
this
.
seachExpert
(
null
,
value
,
null
)
else
else
specArray
=
value
this
.
seachExpert
(
value
,
null
,
null
)
},
this
.
seachExpert
(
specArray
,
parentArray
)
onClick
(
value
,
info
)
{
this
.
processExpertSearch
(
value
)
},
},
onCheck
(
value
,
info
)
{
onCheck
(
value
,
info
)
{
const
content
=
info
.
selectedNodes
[
0
].
componentOptions
.
children
this
.
processExpertSearch
(
value
)
let
parentArray
=
null
let
specArray
=
null
if
(
content
&&
content
.
length
>
0
)
parentArray
=
value
else
specArray
=
value
this
.
seachExpert
(
specArray
,
parentArray
)
},
},
onExpand
(
value
)
{
onExpand
(
value
)
{
this
.
defaultExpandedKeys
=
value
this
.
defaultExpandedKeys
=
value
},
},
changePersonName
()
{
changePersonName
()
{
let
parentArray
=
[]
this
.
seachExpert
(
null
,
null
,
null
)
let
specArray
=
[]
this
.
seachExpert
(
specArray
,
parentArray
)
},
},
seachExpert
(
spec
Array
,
parentArra
y
)
{
seachExpert
(
spec
Id
,
pkey
,
ppke
y
)
{
this
.
loading
=
true
this
.
loading
=
true
let
specIds
=
specArray
===
null
?
null
:
specArray
.
join
(
","
)
let
parentIds
=
parentArray
===
null
?
null
:
parentArray
.
join
(
","
)
if
(
this
.
personName
!==
null
&&
this
.
personName
!==
''
)
{
if
(
this
.
personName
!==
null
&&
this
.
personName
!==
''
)
{
specIds
=
null
specId
=
null
parentIds
=
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
)
{
if
(
data
)
{
this
.
dataList
=
data
this
.
dataList
=
data
this
.
expertFilter
(
this
.
expertSelectKeys
,
this
.
dataList
)
this
.
expertFilter
(
this
.
expertSelectKeys
,
this
.
dataList
)
...
...
src/views/components/common/cascaderSelect.vue
View file @
fc57327f
...
@@ -2,13 +2,14 @@
...
@@ -2,13 +2,14 @@
<a-cascader
v-model=
"selected"
:style=
"
{width:'80%'}" :options="options" :show-search="{ filter }" :display-render="displayRender" expand-trigger="hover" placeholder="请选择学科代码" @change="onChange" />
<a-cascader
v-model=
"selected"
:style=
"
{width:'80%'}" :options="options" :show-search="{ filter }" :display-render="displayRender" expand-trigger="hover" placeholder="请选择学科代码" @change="onChange" />
</
template
>
</
template
>
<
script
>
<
script
>
import
{
specList
,
getSpecArray
}
from
"@/views/components/common/config"
//
import { specList, getSpecArray } from "@/views/components/common/config"
export
default
{
export
default
{
name
:
"cascaderSelect"
,
name
:
"cascaderSelect"
,
data
()
{
data
()
{
return
{
return
{
options
:
specList
,
options
:
[]
,
selected
:
null
,
selected
:
null
,
specArray
:
[],
};
};
},
},
props
:
{
props
:
{
...
@@ -20,13 +21,41 @@ export default {
...
@@ -20,13 +21,41 @@ export default {
},
},
},
},
created
()
{
created
()
{
if
(
!!
this
.
value
)
{
this
.
loadSpecList
()
this
.
selected
=
getSpecArray
(
this
.
value
)
//
this.selected = getSpecArray(this.value)
// this.$emit("change");
// this.$emit("change");
// this.$emit("input", this.selected)
// this.$emit("input", this.selected)
}
},
},
methods
:
{
methods
:
{
loadSpecList
()
{
this
.
$api
.
parameter
.
getKnowledgeInfoList2
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
options
=
data
this
.
loadSpecArray
()
this
.
loading
=
true
}
})
},
loadSpecArray
()
{
this
.
$api
.
parameter
.
getSpecArray
().
then
(({
data
=
{}
})
=>
{
if
(
data
)
{
this
.
specArray
=
data
if
(
!!
this
.
value
)
this
.
selected
=
this
.
getSpecInfo
(
this
.
value
)
}
})
},
getSpecInfo
(
key
)
{
let
newArray
=
this
.
specArray
.
filter
(
function
(
el
)
{
return
el
.
key
==
key
}
);
if
(
!!
newArray
&&
newArray
.
length
>
0
)
return
[
newArray
[
0
].
ppkey
,
newArray
[
0
].
pkey
,
newArray
[
0
].
key
]
else
return
null
},
onChange
(
value
,
selectedOptions
)
{
onChange
(
value
,
selectedOptions
)
{
this
.
selected
=
value
this
.
selected
=
value
if
(
!!
this
.
selected
&&
this
.
selected
.
length
==
3
)
{
if
(
!!
this
.
selected
&&
this
.
selected
.
length
==
3
)
{
...
...
src/views/components/common/config.js
View file @
fc57327f
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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