feat:修改闲可以选择虚线实线,以及虚线的间距
@@ -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({
|
||||
|
||||
|
Before Width: | Height: | Size: 308 B |
|
Before Width: | Height: | Size: 618 B |
|
Before Width: | Height: | Size: 825 B |
|
Before Width: | Height: | Size: 1.1 KiB |
|
Before Width: | Height: | Size: 551 B |
BIN
nezha-fronted/src/components/common/project/image/dashed0.png
Normal file
|
After Width: | Height: | Size: 540 B |
BIN
nezha-fronted/src/components/common/project/image/dashed1.png
Normal file
|
After Width: | Height: | Size: 576 B |
BIN
nezha-fronted/src/components/common/project/image/dashed2.png
Normal file
|
After Width: | Height: | Size: 475 B |
BIN
nezha-fronted/src/components/common/project/image/dashed3.png
Normal file
|
After Width: | Height: | Size: 501 B |
BIN
nezha-fronted/src/components/common/project/image/dashed4.png
Normal file
|
After Width: | Height: | Size: 512 B |
|
Before Width: | Height: | Size: 817 B |
|
Before Width: | Height: | Size: 858 B |
|
Before Width: | Height: | Size: 256 B |
|
Before Width: | Height: | Size: 198 B |
|
Before Width: | Height: | Size: 270 B |
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||