|
|
@ -1,4 +1,5 @@ |
|
|
|
<!DOCTYPE html> |
|
|
|
<!DOCTYPE html> |
|
|
|
<html lang="en"> |
|
|
|
<html> |
|
|
|
<head> |
|
|
@ -978,21 +979,36 @@ |
|
|
|
</div> |
|
|
|
<!-- 仪表盘属性 --> |
|
|
|
<!-- 仪表盘结束与开始角度 --> |
|
|
|
<!-- <div v-show="editType == 5 && cid == 5 ">--> |
|
|
|
<!-- <div class="tool-title " style="padding: 10px;">仪表盘形状</div>--> |
|
|
|
<!-- <div style="padding-left: 10px;">--> |
|
|
|
<!-- <el-slider--> |
|
|
|
<!-- v-model="piRect"--> |
|
|
|
<!-- range--> |
|
|
|
<!-- show-stops--> |
|
|
|
<!-- :max="360"--> |
|
|
|
<!-- :min="-360"--> |
|
|
|
<!-- style="width:75%;"--> |
|
|
|
<!-- @change="changePiRect"--> |
|
|
|
<!-- >--> |
|
|
|
<!-- </el-slider>--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
<div v-show="editType == 5 && cid == 6 "> |
|
|
|
<div style="padding-left: 10px;"> |
|
|
|
<span class="tool-title ">预设角度</span> |
|
|
|
<select class="el-input__inner" v-model="angleStyle" @change="changeAngleStyle" style="width:75%;"> |
|
|
|
<option selected="selected" value="style1">预设角度1(360度)</option> |
|
|
|
<option value="style2">预设角度2(270度)</option> |
|
|
|
<option value="other">自定义</option> |
|
|
|
</select> |
|
|
|
</div> |
|
|
|
<div style="padding-left: 10px;" v-show="angleStyle=='other'"> |
|
|
|
<el-slider |
|
|
|
v-model="piRect" |
|
|
|
range |
|
|
|
show-stops |
|
|
|
:max="360" |
|
|
|
:min="-360" |
|
|
|
style="width:75%;" |
|
|
|
@change="changePiRect" |
|
|
|
> |
|
|
|
</el-slider> |
|
|
|
|
|
|
|
<div> |
|
|
|
<span class="tool-title ">开始角度:</span> |
|
|
|
<input class="el-input__inner" :value="piRect[0]" type="number" min=-360 max=360 style="width:75%;" @onblur="changeStartAngle"/> |
|
|
|
<br> |
|
|
|
<span class="tool-title ">结束角度:</span> |
|
|
|
<input class="el-input__inner" :value="piRect[1]" type="number" min=-360 max=360 style="width:75%;" @onblur="changeEndAngle"/> |
|
|
|
</div> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- 仪表盘刻度最大值 --> |
|
|
|
<div v-show="editType == 5 && (cid == 5||cid==6) "> |
|
|
|
<div class="tool-title " style="padding: 10px;">仪表盘刻度最大值</div> |
|
|
@ -1000,20 +1016,27 @@ |
|
|
|
<input class="el-input__inner" v-model="pimax" placeholder="刻度最大值" style="width:75%;" @blur="changePiMax"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 仪表盘刻度分段 --> |
|
|
|
<!-- 仪表盘刻度最大值 --> |
|
|
|
<div v-show="editType == 5 && (cid == 5||cid==6) "> |
|
|
|
<div class="tool-title " style="padding: 10px;">仪表盘刻度分段数</div> |
|
|
|
<div class="tool-title " style="padding: 10px;">仪表盘刻度最小值</div> |
|
|
|
<div style="padding-left: 10px;"> |
|
|
|
<input class="el-input__inner" v-model="splitNumber" placeholder="刻度最大值" style="width:75%;" @blur="changeSplitNumber"> |
|
|
|
<input class="el-input__inner" v-model="pimin" placeholder="刻度最小值" style="width:75%;" @blur="changePiMin"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 仪表盘刻度单位 --> |
|
|
|
<!-- 仪表盘刻度分段 --> |
|
|
|
<div v-show="editType == 5 && (cid == 5||cid==6) "> |
|
|
|
<div class="tool-title " style="padding: 10px;">刻度单位</div> |
|
|
|
<div class="tool-title " style="padding: 10px;">仪表盘刻度分段数</div> |
|
|
|
<div style="padding-left: 10px;"> |
|
|
|
<input class="el-input__inner" v-model="piCompany" placeholder="刻度最大值" style="width:75%;" @blur="changePiCompany"> |
|
|
|
<input class="el-input__inner" v-model="splitNumber" placeholder="刻度最大值" style="width:75%;" @blur="changeSplitNumber"> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- 仪表盘刻度单位 --> |
|
|
|
<!-- <div v-show="editType == 5 && (cid == 5||cid==6) ">--> |
|
|
|
<!-- <div class="tool-title " style="padding: 10px;">刻度单位</div>--> |
|
|
|
<!-- <div style="padding-left: 10px;">--> |
|
|
|
<!-- <input class="el-input__inner" v-model="piCompany" placeholder="刻度最大值" style="width:75%;" @blur="changePiCompany">--> |
|
|
|
<!-- </div>--> |
|
|
|
<!-- </div>--> |
|
|
|
|
|
|
|
</div> |
|
|
|
<!-- 折线图,柱状图,饼状图切换 --> |
|
|
@ -1412,9 +1435,11 @@ |
|
|
|
visual_select_code: '' , // 组态内跳转 |
|
|
|
isDisableAnimation:false, // 是否禁用动画 @新增属性 |
|
|
|
shape:"container", // 形状 @新增属性 |
|
|
|
piRect:[225,-45],// 仪表盘区间 |
|
|
|
piRect:[90,-270],// 仪表盘区间 |
|
|
|
splitNumber:10, // 刻度分段数 |
|
|
|
piCompany:'' //刻度单位 |
|
|
|
piCompany:'', //刻度单位 |
|
|
|
pimin:0, //刻度最小值 |
|
|
|
angleStyle:"style1", // 角度预设样式 |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods:{ |
|
|
@ -1921,7 +1946,7 @@ |
|
|
|
changeShape(){ |
|
|
|
const val=this.shape; |
|
|
|
// 更新echarts数据 |
|
|
|
updateChartsOption("shape",val); |
|
|
|
updateChartsOptions(new Map([["shape",val]])); |
|
|
|
// 将数据写入 元素节点属性 |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
cl.attr("shape" , this.shape ) ; |
|
|
@ -1964,16 +1989,50 @@ |
|
|
|
}, |
|
|
|
// 修改仪表盘开始和结束角度 |
|
|
|
changePiRect(value){ |
|
|
|
var obj={startAngle:value[0],endAngle:value[1]}; |
|
|
|
changeChartOption(obj); |
|
|
|
updateChartsOptions(new Map([["startAngle",value[0]],["endAngle",value[1]]])); |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
cl.attr("pi-rect",JSON.stringify( this.piRect)); |
|
|
|
}, |
|
|
|
changeAngleStyle(){ |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
if(this.angleStyle=="style1"){ |
|
|
|
this.piRect=[-90,270]; |
|
|
|
this.changePiRect(this.piRect); |
|
|
|
}else if(this.angleStyle=="style2"){ |
|
|
|
this.piRect=[-45,225]; |
|
|
|
this.changePiRect(this.piRect); |
|
|
|
}else{ |
|
|
|
var rect=cl.attr("pi-rect"); |
|
|
|
this.piRect=JSON.parse(rect); |
|
|
|
} |
|
|
|
|
|
|
|
cl.attr("angle-style",this.angleStyle); |
|
|
|
}, |
|
|
|
changeStartAngle(e){ |
|
|
|
this.piRect[0]=e.target.value; |
|
|
|
this.changePiRect(this.piRect); |
|
|
|
}, |
|
|
|
changeEndAngle(e){ |
|
|
|
this.piRect[1]=e.target.value; |
|
|
|
this.changePiRect(this.piRect); |
|
|
|
}, |
|
|
|
// 修改仪表盘刻度最大值 |
|
|
|
changePiMax(){ |
|
|
|
updateChartsOption("max",this.pimax); |
|
|
|
updateChartsOptions(new Map([["max",this.pimax]])); |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
cl.attr("max",this.pimax); |
|
|
|
}, |
|
|
|
// 修改仪表盘刻度最小值 |
|
|
|
changePiMin (){ |
|
|
|
updateChartsOptions(new Map([["mix",this.pimin]])); |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
cl.attr("mix",this.pimax); |
|
|
|
}, |
|
|
|
// 修改仪表盘刻度分段 |
|
|
|
changeSplitNumber(){ |
|
|
|
updateChartsOption("splitnumber",this.splitNumber); |
|
|
|
updateChartsOptions(new Map(["splitNumber",this.splitNumber])); |
|
|
|
var cl = cfg.current_edit_obj ; |
|
|
|
cl.attr("splitnumber",this.splitNumber); |
|
|
|
}, |
|
|
|
// 修改仪表盘刻度单位 |
|
|
|
changePiCompany(){ |
|
|
@ -1991,7 +2050,7 @@ |
|
|
|
return value + this.piCompany; |
|
|
|
} |
|
|
|
} |
|
|
|
updateChartsOption("axisLabel.formatter",formatter); |
|
|
|
updateChartsOptions(new Map([["axisLabel.formatter",formatter]])); |
|
|
|
cl.attr("picompany",this.piCompany); |
|
|
|
} |
|
|
|
},created(){ |
|
|
|