路线图调整优化

qianming 3 years ago
parent 7ea06c1ff0
commit 07336e56e9

@ -145,11 +145,11 @@ export const widgetLineMap = {
}, },
{ {
type: 'el-input-number', type: 'el-input-number',
label: '点大小级别', label: '点大小',
name: 'sourcePointLevel', name: 'sourceSymbolSize',
required: false, required: false,
placeholder: '', placeholder: '',
value: 5, value: 10,
}, },
{ {
type: 'vue-color', type: 'vue-color',
@ -205,7 +205,7 @@ export const widgetLineMap = {
{ {
type: 'el-input-number', type: 'el-input-number',
label: '点大小', label: '点大小',
name: 'targetPointLevel', name: 'targetSymbolSize',
required: false, required: false,
placeholder: '', placeholder: '',
value: 5, value: 5,

@ -124,7 +124,6 @@ import {conversionCity} from '@/utils/china';
韶关市: [113.7964, 24.7028] 韶关市: [113.7964, 24.7028]
};*/ };*/
let geoCoordMap = conversionCity; let geoCoordMap = conversionCity;
let pointLevel = 3;
let planePath = let planePath =
"path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z"; "path://M1705.06,1318.313v-89.254l-319.9-221.799l0.073-208.063c0.521-84.662-26.629-121.796-63.961-121.491c-37.332-0.305-64.482,36.829-63.961,121.491l0.073,208.063l-319.9,221.799v89.254l330.343-157.288l12.238,241.308l-134.449,92.931l0.531,42.034l175.125-42.917l175.125,42.917l0.531-42.034l-134.449-92.931l12.238-241.308L1705.06,1318.313z";
export default { export default {
@ -246,9 +245,7 @@ export default {
} }
}, },
// //
symbolSize: function (val) { symbolSize: 10,
return val[2] / pointLevel;
},
itemStyle: { itemStyle: {
normal: { normal: {
// //
@ -275,9 +272,7 @@ export default {
} }
}, },
// //
symbolSize: function (val) { symbolSize: 10,
return val[2] / pointLevel;
},
itemStyle: { itemStyle: {
normal: { normal: {
// //
@ -387,7 +382,7 @@ export default {
color: optionsSetup.sourcePointColor, color: optionsSetup.sourcePointColor,
} }
}; };
pointLevel = optionsSetup.sourcePointLevel; series.symbolSize = optionsSetup.sourceSymbolSize;
series.label.normal = normal; series.label.normal = normal;
series.itemStyle = itemStyle; series.itemStyle = itemStyle;
}, },
@ -407,7 +402,7 @@ export default {
color: optionsSetup.targetPointColor, color: optionsSetup.targetPointColor,
} }
}; };
pointLevel = optionsSetup.targetPointLevel; series.symbolSize = optionsSetup.targetSymbolSize;
series.label.normal = normal; series.label.normal = normal;
series.itemStyle = itemStyle; series.itemStyle = itemStyle;
}, },
@ -483,19 +478,24 @@ export default {
}, },
staticDataFn(val) { staticDataFn(val) {
const series = this.options.series; const series = this.options.series;
const optionsSetup = this.optionsSetup;
series[0]["data"] = this.convertData(val); series[0]["data"] = this.convertData(val);
series[1]["data"] = this.convertData(val); series[1]["data"] = this.convertData(val);
series[2]["data"] = val.map(function (dataItem) { series[2]["data"] = val.map(function (dataItem) {
if (geoCoordMap[dataItem.source]) {
return { return {
name: dataItem.source, name: dataItem.source,
value: geoCoordMap[dataItem.source].concat([dataItem.value]) value: geoCoordMap[dataItem.source].concat([dataItem.value])
} }
}
}); });
series[3]["data"] = val.map(function (dataItem) { series[3]["data"] = val.map(function (dataItem) {
if (geoCoordMap[dataItem.target]) {
return { return {
name: dataItem.target, name: dataItem.target,
value: geoCoordMap[dataItem.target].concat([dataItem.value]) value: geoCoordMap[dataItem.target].concat([dataItem.value])
} }
}
}); });
}, },
dynamicDataFn(val, refreshTime) { dynamicDataFn(val, refreshTime) {
@ -520,16 +520,20 @@ export default {
series[0]["data"] = this.convertData(val); series[0]["data"] = this.convertData(val);
series[1]["data"] = this.convertData(val); series[1]["data"] = this.convertData(val);
series[2]["data"] = val.map(function (dataItem) { series[2]["data"] = val.map(function (dataItem) {
if (geoCoordMap[dataItem.source]) {
return { return {
name: dataItem.source, name: dataItem.source,
value: geoCoordMap[dataItem.source].concat([dataItem.value]) value: geoCoordMap[dataItem.source].concat([dataItem.value])
} }
}
}); });
series[3]["data"] = val.map(function (dataItem) { series[3]["data"] = val.map(function (dataItem) {
if (geoCoordMap[dataItem.target]) {
return { return {
name: dataItem.target, name: dataItem.target,
value: geoCoordMap[dataItem.target].concat([dataItem.value]) value: geoCoordMap[dataItem.target].concat([dataItem.value])
} }
}
}); });
} }
} }

Loading…
Cancel
Save