需求--中国地图-路线图配置增加

qianming 3 years ago
parent 5335d5f9d4
commit 1a7cba59d6

@ -167,6 +167,47 @@ export const widgetMap = {
}, },
], ],
}, },
{
name: '图标设置',
list: [
{
type: 'el-select',
label: '图标样式',
name: 'symbol',
required: false,
placeholder: '',
selectOptions: [
{code: 'arrow', name: '箭头'},
{code: 'plane', name: '飞机'},
],
value: 'arrow'
},
{
type: 'el-input-number',
label: '动画速度',
name: 'symbolPeriod',
required: false,
placeholder: '',
value: 4,
},
{
type: 'el-input-number',
label: '图标大小',
name: 'symbolSize',
required: false,
placeholder: '',
value: 10,
},
{
type: 'vue-color',
label: '图标颜色',
name: 'symbolColor',
required: false,
placeholder: '',
value: '#46bee9'
},
],
},
{ {
name: '点设置', name: '点设置',
list: [ list: [
@ -188,6 +229,27 @@ export const widgetMap = {
}, },
], ],
}, },
{
name: '线设置',
list: [
{
type: 'vue-color',
label: '线颜色',
name: 'lineColor',
required: false,
placeholder: '',
value: '#ffa022'
},
{
type: 'el-input-number',
label: '线宽度',
name: 'lineWidth',
required: false,
placeholder: '',
value: 2,
},
],
},
{ {
name: '地图颜色', name: '地图颜色',
list: [ list: [

@ -188,7 +188,7 @@ export default {
type: "lines", type: "lines",
zlevel: 1, zlevel: 1,
effect: { effect: {
show: true, show: false,
period: 6, period: 6,
trailLength: 0.7, trailLength: 0.7,
color: "#fff", color: "#fff",
@ -210,14 +210,14 @@ export default {
symbolSize: 10, symbolSize: 10,
effect: { effect: {
show: true, show: true,
period: 6, period: 4,
trailLength: 0, trailLength: 0,
symbol: planePath, symbol: 'arrow',
symbolSize: 15 symbolSize: 5
}, },
lineStyle: { lineStyle: {
normal: { normal: {
// + 线 // + 线
color: '#ffa022', color: '#ffa022',
width: 1, width: 1,
opacity: 0.4, opacity: 0.4,
@ -313,7 +313,9 @@ export default {
editorOptions() { editorOptions() {
this.setOptionsTitle(); this.setOptionsTitle();
this.setOptionsText(); this.setOptionsText();
this.setOptionsSymbol();
this.setOptionsPoint(); this.setOptionsPoint();
this.setOptionsLine();
this.setOptionsColor(); this.setOptionsColor();
this.setOptionsData(); this.setOptionsData();
}, },
@ -350,7 +352,39 @@ export default {
} }
lable["normal"] = normal; lable["normal"] = normal;
}, },
// //
setOptionsSymbol(){
const optionsSetup = this.optionsSetup;
const series = this.options.series[1];
const effect = {
show: true,
period: this.setPeriod(optionsSetup),
trailLength: 0,
symbol: this.setSymbol(optionsSetup),
symbolSize: optionsSetup.symbolSize,
color: optionsSetup.symbolColor,
};
series['effect'] = effect;
},
setSymbol(optionsSetup) {
let symbol;
if (optionsSetup.symbol == 'plane') {
symbol = planePath;
} else {
symbol = "arrow";
}
return symbol;
},
setPeriod(optionsSetup){
let period;
if (optionsSetup.symbol == 'plane') {
period = optionsSetup.symbolPeriod - 1;
}else {
period = optionsSetup.symbolPeriod;
}
return period;
},
//
setOptionsPoint() { setOptionsPoint() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;
const series = this.options.series[2]; const series = this.options.series[2];
@ -362,6 +396,21 @@ export default {
}; };
series["itemStyle"] = itemStyle; series["itemStyle"] = itemStyle;
}, },
// 线
setOptionsLine() {
const optionsSetup = this.optionsSetup;
const series = this.options.series[1];
const lineStyle = {
normal: {
// 线
color: optionsSetup.lineColor,
width: optionsSetup.lineWidth,
opacity: 0.4,
curveness: 0.2
}
};
series['lineStyle'] = lineStyle;
},
// //
setOptionsColor() { setOptionsColor() {
const optionsSetup = this.optionsSetup; const optionsSetup = this.optionsSetup;

Loading…
Cancel
Save