Commit e618914a by 李宏达

lhd

parent 854e35de
...@@ -204,7 +204,7 @@ class RegionalpatentmonitoringCtl { ...@@ -204,7 +204,7 @@ class RegionalpatentmonitoringCtl {
if(!type){ if(!type){
return {code:-1,msg:"type参数错误"}; return {code:-1,msg:"type参数错误"};
} }
if(type && type=="2" && !areaname){ if(type && (type=="2"||type == "3" || type == "4") && !areaname){
return {code:-2,msg:"areaname参数错误"}; return {code:-2,msg:"areaname参数错误"};
} }
try { try {
...@@ -260,11 +260,12 @@ class RegionalpatentmonitoringCtl { ...@@ -260,11 +260,12 @@ class RegionalpatentmonitoringCtl {
return {code:-100,msg:"操作失败"}; return {code:-100,msg:"操作失败"};
} }
} }
async aliCategory(obj){//门类 async aliCategory(obj){//门类
var type=obj.type; var type=obj.type;
var areaname = obj.areaname; var areaname = obj.areaname;
var year = obj.year; var year = obj.year;
if (type != "4"){ if (type && type != "4"){
return {code:-1,msg:"type参数错误"}; return {code:-1,msg:"type参数错误"};
} }
try { try {
...@@ -322,6 +323,7 @@ class RegionalpatentmonitoringCtl { ...@@ -322,6 +323,7 @@ class RegionalpatentmonitoringCtl {
} }
async aliGaode(obj){//高德地图鼠标事件 async aliGaode(obj){//高德地图鼠标事件
try { try {
var result = await this.patentycSve.aliGaode(obj); var result = await this.patentycSve.aliGaode(obj);
......
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
<div class="reg-left"> <div class="reg-left">
<div class="reg-left-item"> <div class="reg-left-item">
<div class="reg-left-item-name"> <div class="reg-left-item-name">
<div class="reg-item-nameleft">专利地区分布<span></span></div> <div class="reg-item-nameleft">{{titledq}}<span></span></div>
<div class="reg-item-nameright" @click="CheckDetails(0)">查看详情>><span></span></div> <div class="reg-item-nameright" @click="CheckDetails(0)">查看详情>><span></span></div>
</div> </div>
<div class="reg-echart"> <div class="reg-echart">
......
...@@ -867,7 +867,8 @@ ...@@ -867,7 +867,8 @@
] ]
}] }]
} },
titledq: '专利地区分布'
} }
}, },
mounted:function(){ mounted:function(){
...@@ -978,6 +979,7 @@ ...@@ -978,6 +979,7 @@
} }
} }
this.$root.getReq("/web/regionalpatentmonitoringCtl/aliApplicant",obj).then(d=>{ this.$root.getReq("/web/regionalpatentmonitoringCtl/aliApplicant",obj).then(d=>{
console.log(d,'}}}}}}}}}}}}}}}}}}}');
if(d && d.code==1){ if(d && d.code==1){
var datastring = JSON.stringify(d); var datastring = JSON.stringify(d);
this.aliApplicantString=datastring; this.aliApplicantString=datastring;
...@@ -1103,6 +1105,13 @@ ...@@ -1103,6 +1105,13 @@
obj.areaname=this.provinceName; obj.areaname=this.provinceName;
} }
} }
var typeObj = true;
if (obj.type == 4) {
typeObj = false;
this.titledq = '行业门类分布'
}else {
this.titledq = '专利地区分布'
}
this.$root.getReq("/web/regionalpatentmonitoringCtl/aliplace",obj).then(d=>{ this.$root.getReq("/web/regionalpatentmonitoringCtl/aliplace",obj).then(d=>{
console.log(d,'sssssssssssssssssssddddddddddddddddddd'); console.log(d,'sssssssssssssssssssddddddddddddddddddd');
if(d && d.code==1){ if(d && d.code==1){
...@@ -1117,6 +1126,33 @@ ...@@ -1117,6 +1126,33 @@
this.sqsumsy = data.sqsumsy; this.sqsumsy = data.sqsumsy;
var echarts1 = this.$refs.patentRegionRef.getEchartObj(); var echarts1 = this.$refs.patentRegionRef.getEchartObj();
var this_ = this; var this_ = this;
if (!typeObj) {
this.$root.getReq("/web/regionalpatentmonitoringCtl/aliCategory",obj).then(b=>{
console.log(b,'我是第二套请求');
this_.patentRegionEchartdata.series[0].data = [];
this_.patentRegionEchartdata.series[0].label = {
normal:{
formatter(v) {
let text = v.name;
return text.length < 4
? text
: `${text.slice(0,4)}\n${text.slice(4)}`
}
}
};
b.data.tdata.forEach(row =>{
var map = {};
map['name'] = row.areaname;
map['value'] = row.y_percentnum;
this_.patentRegionEchartdata.series[0].data.push(map);
});
echarts1.setOption(this.patentRegionEchartdata);
window.addEventListener("resize",function(){
echarts1.resize();
});
this.$forceUpdate();
})
}else {
this_.patentRegionEchartdata.series[0].data = []; this_.patentRegionEchartdata.series[0].data = [];
data.tdata.forEach(row =>{ data.tdata.forEach(row =>{
var map = {}; var map = {};
...@@ -1129,6 +1165,7 @@ ...@@ -1129,6 +1165,7 @@
echarts1.resize(); echarts1.resize();
}); });
this.$forceUpdate(); this.$forceUpdate();
}
/* 2 */ /* 2 */
this.myChart = echarts.init(document.getElementById('container')); this.myChart = echarts.init(document.getElementById('container'));
var this_ = this; var this_ = this;
...@@ -1273,23 +1310,41 @@ ...@@ -1273,23 +1310,41 @@
function placeSearch_CallBack(data) { function placeSearch_CallBack(data) {
var poiArr = data.poiList.pois; var poiArr = data.poiList.pois;
var location = poiArr[0].location; var location = poiArr[0].location;
infoWindow.setContent(createContent(poiArr[0]));
infoWindow.open(map,location);
console.log(poiArr); console.log(typeof poiArr[0].location);
var s = {
lat: poiArr[0].location.lat,
lng: poiArr[0].location.lng
};
var obj = { var obj = {
name: poiArr[0].name, name: poiArr[0].name,
location: location location: s
}; };
console.log(obj);
that.$root.getReq("/web/regionalpatentmonitoringCtl/aliGaode",obj).then(d=>{ that.$root.getReq("/web/regionalpatentmonitoringCtl/aliGaode",obj).then(d=>{
console.log(d); console.log(d);
infoWindow.setContent(createContent(d));
infoWindow.open(map,location);
}) })
}; };
function createContent(poi) { function createContent(poi) {
var s = []; var s = [];
s.push('<div class="info-title">'+poi.name+'</div><div class="info-content">'+"地址:" + poi.address); console.log(poi);
s.push("电话:" + poi.tel); var a = poi.data.nameinfo != null ? poi.data.nameinfo : poi.data.locationlist;
s.push("类型:" + poi.type); console.log(a);
if (poi.data.nameinfo == null) {
for (let i = 0; i < a.length; i++) {
s.push('<div class="info-title">'+a[i].name + ":" + a[i].num);
}
}else {
s.push('<div class="info-title">'+a.name);
/*s.push("电话:" + poi.tel);*/
s.push("专利量:" + a.num);
s.push('<div>'); s.push('<div>');
}
console.log(s);
return s.join("<br>"); return s.join("<br>");
}; };
that.aliIpc(4); that.aliIpc(4);
...@@ -1441,4 +1496,5 @@ ...@@ -1441,4 +1496,5 @@
}, },
vname:"gsb-regionalpatentmonitoring" vname:"gsb-regionalpatentmonitoring"
} }
\ No newline at end of file
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