提交 8f20e975 authored 作者: quanlili's avatar quanlili

点击图标的事件

上级 f2b6cf01
......@@ -507,6 +507,7 @@ export default {
this.initEchart()
this.drawLine()//词云的
this.getKeyWordsRelation()//获取人物关系的
this.clickChart();//点击关系
this.__resizeHanlder = debounce(() => {
if (this.relationChart) {
this.relationChart.resize()
......@@ -539,7 +540,6 @@ export default {
}
})
} else if (this.entityTypeFlag == 3) {
console.log(this.entityTypeFlag,'MMM')
localtionDetailAPI(this.entityId)
.then(res => {
if (res.data.code === 0) {
......@@ -568,7 +568,6 @@ export default {
.then(res => {
if (res.data.code === 0) {
_this.characterDetailData = res.data.data;
console.log(_this.characterDetailData,"IIIIIII")
_this.peopleName = res.data.data.keyword;
_this.relateResListState = 4;
}
......@@ -589,10 +588,8 @@ export default {
getRelateCharacterAPI() {//相关人物
var _this = this;
setTimeout(() => {
console.log(this.peopleName)
relateCharacterAPI(this.peopleName)
.then(res => {
console.log(res, 'OPOPOP999')
if (res.data.code === 0) {
_this.relatePeopleData = res.data.data.slice(0, 6);
}
......@@ -602,7 +599,6 @@ export default {
getRelateOrganAPI() {//相关机构
var _this = this;
setTimeout(() => {
console.log(this.peopleName)
relateOrganAPI(this.peopleName)
.then(res => {
if (res.data.code === 0) {
......@@ -614,10 +610,8 @@ export default {
getRelateAreaAPI() {//相关地点
var _this = this;
setTimeout(() => {
console.log(this.peopleName)
relateAreaAPI(this.peopleName)
.then(res => {
console.log(res, "11818188")
if (res.data.code === 0) {
_this.relateAreaData = res.data.data.slice(0, 6);
}
......@@ -633,10 +627,8 @@ export default {
}
relateResourceListAPI(params)
.then(res => {
console.log(res, "11818188")
if (res.data.code === 0) {
_this.tableData = res.data.data;
console.log(_this.tableData,"IOIOI((")
_this.tableData.forEach((item, index) => {
this.$set(item, 'action', '查看')
this.$set(item, 'statusVal', null);
......@@ -792,22 +784,7 @@ export default {
relateOptaion.series[0]['data']=data;
relateOptaion.series[0]['links']=links;
relateOptaion.series[0].categories[0]['name']=resData[0]['relationword'];
this.relationChart.setOption(relateOptaion);
var _this = this;
this.relationChart.on('click', function (params) {
console.log(params.data, "小红真美")//获取点击的头像的数据信息
window.scrollTo(0, 0)
_this.entityTypeFlag = params.data.entityTypeFlag;
_this.entityId = params.data.entityId;
_this.peopleName = params.data.name;
_this.getDetailAPI();
_this.getRelateCharacterAPI();
_this.getRelateOrganAPI();
_this.getRelateAreaAPI();
_this.getRelateResourceListAPI();
_this.getKeyWordsRelation();
_this.drawLine();
});
this.relationChart.setOption(relateOptaion);
} else {
let data=[{name:this.peopleName, showName: this.peopleName, category: 0}];
relateOptaion.series[0]['data']=data;
......@@ -834,6 +811,23 @@ export default {
this.getKeyWordsRelation();
this.drawLine();
},
clickChart(){
var _this = this;
this.relationChart.on('click', function (params) {
console.log(params.data, "小红真美")//获取点击的头像的数据信息
window.scrollTo(0, 0)
_this.entityTypeFlag = params.data.entityTypeFlag;
_this.entityId = params.data.entityId;
_this.peopleName = params.data.name;
_this.getDetailAPI();
_this.getRelateCharacterAPI();
_this.getRelateOrganAPI();
_this.getRelateAreaAPI();
_this.getRelateResourceListAPI();
_this.getKeyWordsRelation();
_this.drawLine();
});
},
addNewDataAttr() {
this.dialogFormVisible = true;
},
......@@ -859,7 +853,6 @@ export default {
}
updateDateAttrAPI(this.dataAttrForm)
.then(res => {
console.log(res, '9527唐伯虎');
if (res.data.code === 0) {
this.dialogFormVisible = false;
this.getDetailAPI();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论