Commit af99cc02 by liuyong

修改bug

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