Commit 08ffe7d2 authored by 徐俊's avatar 徐俊

xujun

parent 8e66191e
......@@ -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) {
......
......@@ -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.getTreeListByType({ typeId: 56 }).then(({ data = {} }) => {
this.$api.parameter.getKnowledgeParameterTreeList().then(({ data = {} }) => {
if (data) {
this.treeData = data
this.defaultExpandedKeys = [this.treeData[0].key]
}
}).catch(() => { this.loading = true });
},
loadExpertList () {
this.$api.parameter.getTreeListByType({ typeId: 56 }).then(({ data = {} }) => {
loadSpecList () {
this.$api.parameter.getSpecArray().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 (specArray, parentArray) {
seachExpert (specId, pkey, ppkey) {
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.getExpertListByExpertSpecIds({ specIds: specIds, parentIds: parentIds, personName: this.personName }).then(({ data = {} }) => {
this.$api.expertSpec.getExpertListByExpertSpecIdOrParentId({ specId: specId, pkey: pkey, ppkey: ppkey, personName: this.personName }).then(({ data = {} }) => {
if (data) {
this.dataList = data
this.expertFilter(this.expertSelectKeys, this.dataList)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment