提交 e53f4d24 authored 作者: 王腾飞's avatar 王腾飞
......@@ -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);
......@@ -686,7 +678,10 @@ export default {
drawLine () {//词云
// 基于准备好的dom,初始化echarts实例
this.keywordChart = this.$echarts.init(document.getElementById('myChart'))
// 绘制图表
// 绘制图表
var maskImage = new Image();
//重点:云彩图片的base64码
maskImage.src = require('../../../assets/img/yuan_icon.png');
let option = {
title: {
text: '',
......@@ -716,7 +711,8 @@ export default {
shape: 'circle',
rotationRange: [0,0],
sizeRange: [12, 50],
gridSize: 20,
gridSize: 10,
maskImage: maskImage,
textStyle: {
normal: {
fontFamily: 'sans-serif',
......@@ -736,7 +732,8 @@ export default {
shadowColor: '#333'
}
},
data:[],
data:[
],
}]
}
setTimeout(() => {
......@@ -792,22 +789,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 +816,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 +858,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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论