feat:修改闲可以选择虚线实线,以及虚线的间距

This commit is contained in:
zhangyu
2020-09-07 17:29:18 +08:00
parent 92d3fb967d
commit ab2341d76b
18 changed files with 17 additions and 3 deletions

View File

@@ -37,6 +37,16 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('project.topology.width')" prop="width" class="line-width">
<el-select v-model="form.dashes" placeholder="" :popper-append-to-body="false" size="small">
<div slot="prefix">
{{form.dashes}}
</div>
<el-option v-for="(item,index) in dashesOption" :label="item+'px'" :value="item" :key="index">
</el-option>
</el-select>
</el-form-item>
<el-form-item :label="$t('project.topology.arrows')" prop="arrows" class="arrows">
<el-select v-model="form.arrows" placeholder="" :popper-append-to-body="false" size="small">
<div slot="prefix">
@@ -213,6 +223,7 @@
width:n.width,
lineName:n.label,
name:[],
dashes:!n.dashes?n.dashes:JSON.stringify(n.dashes),
};
if( n.expressions){
n.expressions.forEach((item,index)=>{
@@ -241,6 +252,7 @@
type:'',
roundness:'',
name:[],
dashes:''
},
predefineColors: [
'#ff4500',
@@ -259,6 +271,7 @@
elementIds:[],
legends:[],
widthOption:['1','2','3','4'],
dashesOption:[false,'[3,3]','[9,9]','[15,15]','[21,21]'],
unit:[],
rules:{
// arrows: [
@@ -289,6 +302,7 @@
roundness:(Math.random()*8 +1)/10 ,//获取0.1-0.9之间的随机数
type:'curvedCW',
};
model.dashes=!model.dashes?model.dashes:JSON.parse(model.dashes);
model.expressions=[];
this.promqlKeys.forEach((item,index)=>{
model.expressions.push({

Binary file not shown.

Before

Width:  |  Height:  |  Size: 308 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 551 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 576 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 501 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 817 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 198 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

View File

@@ -170,7 +170,7 @@
color:'#1e90ff',
lineId:'',
width:'1',
dashed:'[5,5]',
dashes:false,
id:'',
};
this.addLineShow=true;
@@ -229,6 +229,7 @@
color:'#1e90ff',
lineId:'',
id:'',
dashes:[],
},
hoverEdge:false,
isLineAdd:true,
@@ -321,6 +322,7 @@
"target": item.to,
"smooth": item.smooth,
"expressions": item.expressions,
"dashes":item.dashes,
};
arr1.push(obj)
});
@@ -488,7 +490,6 @@
}else{
edges.from=this.NodeArr[0];
edges.to=this.NodeArr[1];
edges.dashes=[15,15];
}
edgesArray.push(edges);
this.$emit("setTopologyData",this.nodesArray,edgesArray);

View File

@@ -265,7 +265,6 @@
let arr1=[];
if(!arr){return arr1}
arr.forEach((item)=>{
item.dashes=[5,5];
item.from=item.source;
item.to=item.target;
item.label=item.name;