|
@@ -94,6 +94,7 @@ export default {
|
|
|
loadingBtn:false,
|
|
|
id:null,
|
|
|
loading:false,
|
|
|
+ patentNum:0
|
|
|
};
|
|
|
},
|
|
|
watch: {},
|
|
@@ -109,16 +110,61 @@ export default {
|
|
|
projectId(){
|
|
|
return this.$route.query.projectId
|
|
|
},
|
|
|
- patentNum(){
|
|
|
- return this.$route.query.patentNum || 0
|
|
|
+ patentNums(){
|
|
|
+ return this.$route.query.patentNum || 0
|
|
|
},
|
|
|
+ searchPatentNum(){
|
|
|
+ return this.$route.query.searchPatentNum
|
|
|
+ }
|
|
|
},
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
+ this.getPatentNum()
|
|
|
this.getData()
|
|
|
window.addEventListener('resize',this.refreshChart)
|
|
|
},
|
|
|
methods: {
|
|
|
+ getPatentNum(){
|
|
|
+ if(!this.searchPatentNum){
|
|
|
+ this.patentNum = this.patentNums
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let params1 = {
|
|
|
+ projectId: this.projectId,
|
|
|
+ }
|
|
|
+ this.$api.getAllCountColumns(params1).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ var data = []
|
|
|
+ res.data.data.forEach(item => {
|
|
|
+ if (item.filedKind == -1) {
|
|
|
+ item.value = item.field
|
|
|
+ }
|
|
|
+ if (item.filedKind == 0 && (item.type == 'tree')) {
|
|
|
+
|
|
|
+ } else {
|
|
|
+ data.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ this.$store.commit('SET_SYSTEM_FIELD',data)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ let params = {
|
|
|
+ current: 1,
|
|
|
+ size: 1,
|
|
|
+ projectId: this.projectId,
|
|
|
+ searchQuery: '',//检索条件
|
|
|
+ customFields: [],
|
|
|
+ orderDTOList: [],//排序信息
|
|
|
+ }
|
|
|
+ this.$api.QueryPatent(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ this.patentNum = res.data.total
|
|
|
+ }
|
|
|
+ }).catch(error=>{
|
|
|
+ this.patentNum = 0
|
|
|
+ })
|
|
|
+ },
|
|
|
openDrawer(type){
|
|
|
var components = {
|
|
|
1:'tabData',
|
|
@@ -439,7 +485,7 @@ export default {
|
|
|
var form = this.form
|
|
|
var obj = form.schema[dimension]
|
|
|
this.loading = true
|
|
|
- if(obj.filedKind == 0){
|
|
|
+ if(obj.fieldKind == 0){
|
|
|
count.push(
|
|
|
{
|
|
|
field:'field',
|
|
@@ -484,6 +530,21 @@ export default {
|
|
|
countVOS:count
|
|
|
}
|
|
|
try{
|
|
|
+ // var haveCustom = count.find(item=>{
|
|
|
+ // return item.field == 'field' && item.fieldId
|
|
|
+ // })
|
|
|
+ // if(haveCustom){
|
|
|
+ // let Custom = {
|
|
|
+ // customFieldId: haveCustom.fieldId,
|
|
|
+ // }
|
|
|
+ // const customResponse = await this.$api.queryCustomOption(Custom)
|
|
|
+ // if(customResponse.code == 200){
|
|
|
+ // // var customData =this.$commonJS.treeToArray(customResponse.data.data,{children:child})
|
|
|
+ // var customData =customResponse.data.data
|
|
|
+ // }else{
|
|
|
+ // var customData = []
|
|
|
+ // }
|
|
|
+ // }
|
|
|
const response = await this.$api.esCountAnalysis(params)
|
|
|
if(sign){
|
|
|
var res = Object.keys(response.data.analyseMap)
|
|
@@ -498,11 +559,31 @@ export default {
|
|
|
for(var j =0 ;j<analyseMapData.length;j++){
|
|
|
obj[analyseMapData[j].name] = analyseMapData[j].number
|
|
|
}
|
|
|
- data[res[i]] = obj
|
|
|
+ var key = res[i]
|
|
|
+ // if(haveCustom){
|
|
|
+ // var index = customData.findIndex(item=>{
|
|
|
+ // return item.id == key
|
|
|
+ // })
|
|
|
+ // if(index!=-1){
|
|
|
+ // key = customData[index].name
|
|
|
+ // customData.splice(index,1)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ data[key] = obj
|
|
|
}
|
|
|
}else{
|
|
|
for(var i = 0;i<response.data.detailDTOS.length;i++){
|
|
|
- data[response.data.detailDTOS[i].name] = response.data.detailDTOS[i].number
|
|
|
+ var key = response.data.detailDTOS[i].name
|
|
|
+ // if(haveCustom){
|
|
|
+ // var index = customData.findIndex(item=>{
|
|
|
+ // return item.id == key
|
|
|
+ // })
|
|
|
+ // if(index!=-1){
|
|
|
+ // key = customData[index].name
|
|
|
+ // customData.splice(index,1)
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ data[key] = response.data.detailDTOS[i].number
|
|
|
}
|
|
|
}
|
|
|
|