Commit af99cc02 by liuyong

修改bug

1 parent fd641b35
......@@ -728,10 +728,12 @@ export default {
});
return;
}
let iconName;
let iconName, eleType;
if(this.tabType == '元模型图元') {
eleType = 1;
iconName = this.selectGraphShape;
}else {
eleType = 2;
iconName = this.selectGraphShape + 'fillColor='+this.ruleForm.let6+';';
}
const params = {
......@@ -744,6 +746,7 @@ export default {
iconName: iconName,
color: this.ruleForm.let6,
state: 1,
eleType
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, elementId: this.elementId, version: this.version };
if(this.is_add_edit == 'add') {
......@@ -794,10 +797,12 @@ export default {
});
return;
}
let iconName;
let iconName, eleType;
if(this.tabType == '元模型图元') {
eleType = 1;
iconName = this.selectGraphShape;
}else {
eleType = 2;
iconName = this.selectGraphShape + 'fillColor='+this.ruleForm.let6+';';
}
const params = {
......@@ -810,6 +815,7 @@ export default {
iconName: iconName,
color: this.ruleForm.let6,
state: 2,
eleType
};
const requestParams = this.is_add_edit == 'add' ? params : { ...params, elementId: this.elementId, version: this.version };
if(this.is_add_edit == 'add') {
......
......@@ -43,14 +43,21 @@ export default {
this.myChart = echarts.init(document.getElementById('main'));
var option = {
tooltip: {
formatter: function (x) {
return x.data.name;
}
},
series: [
{
type: 'graph',
layout: 'force',
symbolSize: 120,
symbolSize: [ 120, 60 ],
label: {
normal: {
show: true,
width: 80,
overflow: 'truncate',
textStyle: {
fontSize: 12
},
......@@ -92,44 +99,48 @@ export default {
let seriesData = [], linkData = [];
if(tree.checkedNodes.length > 0) {
tree.checkedNodes.forEach(item => {
// console.log(item.icon)
if(!item.targetList){
return;
}
seriesData.push({
name: item.assetName,
// symbol: item.icon,
id: item.assetId,
symbol: item.icon,
draggable: true,
itemStyle: {
color: 'green',
normal: {
borderColor: '#82dffe',
borderWidth: 6,
shadowBlur: 20,
shadowColor: '#04f2a7',
color: 'rgb(13,134,127)',
},
// color: 'green',
// normal: {
// borderColor: '#82dffe',
// borderWidth: 6,
// shadowBlur: 20,
// shadowColor: '#04f2a7',
// color: 'rgb(13,134,127)',
// },
}
});
if(item.targetList.length > 0) {
item.targetList.forEach(item2 => {
seriesData.push({
name: item2.assetName,
// symbol: item.icon,
id: item.assetId,
symbol: item.icon,
draggable: true,
itemStyle: {
color: 'green',
normal: {
borderColor: '#82dffe',
borderWidth: 6,
shadowBlur: 20,
shadowColor: '#04f2a7',
color: 'rgb(13,134,127)',
},
}
// itemStyle: {
// color: 'green',
// normal: {
// borderColor: '#82dffe',
// borderWidth: 6,
// shadowBlur: 20,
// shadowColor: '#04f2a7',
// color: 'rgb(13,134,127)',
// },
// }
})
linkData.push({
source: item.assetName,
target: item2.assetName,
source: item.assetId,
target: item2.assetId,
})
})
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!