Commit e618914a by 李宏达

lhd

parent 854e35de
......@@ -204,7 +204,7 @@ class RegionalpatentmonitoringCtl {
if(!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参数错误"};
}
try {
......@@ -260,11 +260,12 @@ class RegionalpatentmonitoringCtl {
return {code:-100,msg:"操作失败"};
}
}
async aliCategory(obj){//门类
var type=obj.type;
var areaname = obj.areaname;
var year = obj.year;
if (type != "4"){
if (type && type != "4"){
return {code:-1,msg:"type参数错误"};
}
try {
......@@ -322,6 +323,7 @@ class RegionalpatentmonitoringCtl {
}
async aliGaode(obj){//高德地图鼠标事件
try {
var result = await this.patentycSve.aliGaode(obj);
......
......@@ -15,7 +15,7 @@
<div class="reg-left">
<div class="reg-left-item">
<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>
<div class="reg-echart">
......
......@@ -867,7 +867,8 @@
]
}]
}
},
titledq: '专利地区分布'
}
},
mounted:function(){
......@@ -978,6 +979,7 @@
}
}
this.$root.getReq("/web/regionalpatentmonitoringCtl/aliApplicant",obj).then(d=>{
console.log(d,'}}}}}}}}}}}}}}}}}}}');
if(d && d.code==1){
var datastring = JSON.stringify(d);
this.aliApplicantString=datastring;
......@@ -1103,6 +1105,13 @@
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=>{
console.log(d,'sssssssssssssssssssddddddddddddddddddd');
if(d && d.code==1){
......@@ -1117,18 +1126,46 @@
this.sqsumsy = data.sqsumsy;
var echarts1 = this.$refs.patentRegionRef.getEchartObj();
var this_ = this;
this_.patentRegionEchartdata.series[0].data = [];
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();
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 = [];
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();
}
/* 2 */
this.myChart = echarts.init(document.getElementById('container'));
var this_ = this;
......@@ -1273,23 +1310,41 @@
function placeSearch_CallBack(data) {
var poiArr = data.poiList.pois;
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 = {
name: poiArr[0].name,
location: location
location: s
};
console.log(obj);
that.$root.getReq("/web/regionalpatentmonitoringCtl/aliGaode",obj).then(d=>{
console.log(d);
infoWindow.setContent(createContent(d));
infoWindow.open(map,location);
})
};
function createContent(poi) {
var s = [];
s.push('<div class="info-title">'+poi.name+'</div><div class="info-content">'+"地址:" + poi.address);
s.push("电话:" + poi.tel);
s.push("类型:" + poi.type);
s.push('<div>');
console.log(poi);
var a = poi.data.nameinfo != null ? poi.data.nameinfo : poi.data.locationlist;
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>');
}
console.log(s);
return s.join("<br>");
};
that.aliIpc(4);
......@@ -1441,4 +1496,5 @@
},
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