Commit ee8022f118b992201b1bbc2eb5e83a66ba271f6f
动态图片加载
Showing
11 changed files
with
18 additions
and
102 deletions
src/mixins/queryform.js
| @@ -118,29 +118,16 @@ export default { | @@ -118,29 +118,16 @@ export default { | ||
| 118 | //barlineCharts 下拉框 | 118 | //barlineCharts 下拉框 |
| 119 | const chartType = params.chartType | 119 | const chartType = params.chartType |
| 120 | // console.log(data,chartType,'33333'); | 120 | // console.log(data,chartType,'33333'); |
| 121 | - if (chartType == "widget-linechart") { | ||
| 122 | - return this.barOrLineChartFn(params.chartProperties, data); | ||
| 123 | - }else if (chartType == "widget-barlinechart" ) { | ||
| 124 | - return this.barLineChartFn(params.chartProperties, data); | ||
| 125 | - // } else if ( chartType == "widget-barchart") { | ||
| 126 | - // return this.barOrLineChartFn(params.chartProperties, data); | ||
| 127 | - } else if ( | ||
| 128 | - chartType == "widget-piechart" || | ||
| 129 | - chartType == "widget-funnel" | ||
| 130 | - ) { | ||
| 131 | - return this.piechartFn(params.chartProperties, data); | ||
| 132 | - } else if (chartType == "widget-text") { | 121 | + if (chartType == "widget-text") { |
| 133 | return this.widgettext(params.chartProperties, data) | 122 | return this.widgettext(params.chartProperties, data) |
| 134 | - } else if (chartType == "widget-stackchart") { | ||
| 135 | - return this.stackChartFn(params.chartProperties, data); | ||
| 136 | - // return this.stackChartFn(params.chartProperties, data) | ||
| 137 | - } else if (chartType == "widget-coord") { | 123 | + } else if (chartType == "widget-coord") { |
| 138 | return this.coordChartFn(params.chartProperties, data) | 124 | return this.coordChartFn(params.chartProperties, data) |
| 139 | } else if (chartType == "widget-linemap") { | 125 | } else if (chartType == "widget-linemap") { |
| 140 | return this.linemapChartFn(params.chartProperties, data) | 126 | return this.linemapChartFn(params.chartProperties, data) |
| 141 | - } else if (chartType == "widget-radar") { | ||
| 142 | - return this.radarChartFn(params.chartProperties, data) | ||
| 143 | - } else if (chartType == "widget-select") { | 127 | + // } else if (chartType == "widget-radar") { |
| 128 | + // return this.radarChartFn(params.chartProperties, data) | ||
| 129 | + } | ||
| 130 | + else if (chartType == "widget-select") { | ||
| 144 | return this.selectChartFn(params.chartProperties, data) | 131 | return this.selectChartFn(params.chartProperties, data) |
| 145 | } else { | 132 | } else { |
| 146 | return data | 133 | return data |
src/views/bigscreenDesigner/designer/widget/div/widgetDtImage.vue
| @@ -84,6 +84,7 @@ export default { | @@ -84,6 +84,7 @@ export default { | ||
| 84 | this.options = this.value; | 84 | this.options = this.value; |
| 85 | this.optionsData = this.value.data; | 85 | this.optionsData = this.value.data; |
| 86 | this.setPicValue(); | 86 | this.setPicValue(); |
| 87 | + this.getEchartData(); | ||
| 87 | 88 | ||
| 88 | }, | 89 | }, |
| 89 | methods: { | 90 | methods: { |
src/views/bigscreenDesigner/designer/widget/funnel/widgetConicalColumnChart.vue
| @@ -135,7 +135,8 @@ export default { | @@ -135,7 +135,8 @@ export default { | ||
| 135 | getEchartData(val) { | 135 | getEchartData(val) { |
| 136 | const data = this.queryEchartsData(val); | 136 | const data = this.queryEchartsData(val); |
| 137 | data.then(res => { | 137 | data.then(res => { |
| 138 | - this.renderingFn(res); | 138 | + // this.renderingFn(res); |
| 139 | + this.staticDataFn(val); | ||
| 139 | }); | 140 | }); |
| 140 | }, | 141 | }, |
| 141 | renderingFn(val) { | 142 | renderingFn(val) { |
src/views/bigscreenDesigner/designer/widget/funnel/widgetFunnel.vue
| @@ -236,7 +236,8 @@ export default { | @@ -236,7 +236,8 @@ export default { | ||
| 236 | getEchartData(val) { | 236 | getEchartData(val) { |
| 237 | const data = this.queryEchartsData(val); | 237 | const data = this.queryEchartsData(val); |
| 238 | data.then(res => { | 238 | data.then(res => { |
| 239 | - this.renderingFn(res); | 239 | + this.staticDataFn(res) |
| 240 | + // this.renderingFn(res); | ||
| 240 | }); | 241 | }); |
| 241 | }, | 242 | }, |
| 242 | renderingFn(val) { | 243 | renderingFn(val) { |
src/views/bigscreenDesigner/designer/widget/line/widgetLineCompareChart.vue
| @@ -670,19 +670,7 @@ export default { | @@ -670,19 +670,7 @@ export default { | ||
| 670 | }); | 670 | }); |
| 671 | }, | 671 | }, |
| 672 | renderingFn(optionsSetup, val) { | 672 | renderingFn(optionsSetup, val) { |
| 673 | - const legendName = []; | ||
| 674 | - this.options.xAxis[0]['data'] = val.xAxis; | ||
| 675 | - this.options.xAxis[1]['data'] = val.xAxis; | ||
| 676 | - if (val.series[0].type == "line") { | ||
| 677 | - this.options.series[0]['name'] = val.series[0].name; | ||
| 678 | - this.options.series[0]['data'] = val.series[0].data; | ||
| 679 | - this.options.series[1]['name'] = val.series[1].name; | ||
| 680 | - this.options.series[1]['data'] = val.series[1].data; | ||
| 681 | - legendName.push(val.series[0].name); | ||
| 682 | - legendName.push(val.series[1].name); | ||
| 683 | - } | ||
| 684 | - this.options.legend['data'] = legendName; | ||
| 685 | - this.setOptionsLegendName(legendName); | 673 | + this.staticDataFn(val) |
| 686 | } | 674 | } |
| 687 | } | 675 | } |
| 688 | }; | 676 | }; |
src/views/bigscreenDesigner/designer/widget/line/widgetLineStackChart.vue
| @@ -450,64 +450,6 @@ export default { | @@ -450,64 +450,6 @@ export default { | ||
| 450 | }, | 450 | }, |
| 451 | renderingFn(optionsSetup, val) { | 451 | renderingFn(optionsSetup, val) { |
| 452 | this.staticDataFn(val); | 452 | this.staticDataFn(val); |
| 453 | - //颜色 | ||
| 454 | - // const customColor = optionsSetup.customColor; | ||
| 455 | - // const arrColor = []; | ||
| 456 | - // for (let i = 0; i < customColor.length; i++) { | ||
| 457 | - // arrColor.push(customColor[i].color); | ||
| 458 | - // } | ||
| 459 | - // // x轴 | ||
| 460 | - // if (optionsSetup.verticalShow) { | ||
| 461 | - // this.options.xAxis.data = []; | ||
| 462 | - // this.options.yAxis.data = val.xAxis; | ||
| 463 | - // this.options.xAxis.type = "value"; | ||
| 464 | - // this.options.yAxis.type = "category"; | ||
| 465 | - // } else { | ||
| 466 | - // this.options.xAxis.data = val.xAxis; | ||
| 467 | - // this.options.yAxis.data = []; | ||
| 468 | - // this.options.xAxis.type = "category"; | ||
| 469 | - // this.options.yAxis.type = "value"; | ||
| 470 | - // } | ||
| 471 | - // const series = []; | ||
| 472 | - // const legendName = []; | ||
| 473 | - // for (const i in val.series) { | ||
| 474 | - // if (val.series[i].type == "line") { | ||
| 475 | - // series.push({ | ||
| 476 | - // name: val.series[i].name, | ||
| 477 | - // type: "line", | ||
| 478 | - // data: val.series[i].data, | ||
| 479 | - // width: optionsSetup.lineWidth, | ||
| 480 | - // symbol: optionsSetup.symbol, | ||
| 481 | - // showSymbol: optionsSetup.markPoint, | ||
| 482 | - // symbolSize: optionsSetup.pointSize, | ||
| 483 | - // symbolColor: arrColor[i], | ||
| 484 | - // smooth: optionsSetup.smoothCurve, | ||
| 485 | - // // 线条 | ||
| 486 | - // lineStyle: { | ||
| 487 | - // color: arrColor[i], | ||
| 488 | - // width: optionsSetup.lineWidth, | ||
| 489 | - // }, | ||
| 490 | - // //点 | ||
| 491 | - // itemStyle: { | ||
| 492 | - // color: arrColor[i], | ||
| 493 | - // }, | ||
| 494 | - // areaStyle: this.getOptionArea(), | ||
| 495 | - // // 标题部分 | ||
| 496 | - // label: { | ||
| 497 | - // show: optionsSetup.isShow, | ||
| 498 | - // position: "top", | ||
| 499 | - // distance: 10, | ||
| 500 | - // fontSize: optionsSetup.fontSize, | ||
| 501 | - // color: optionsSetup.subTextColor, | ||
| 502 | - // fontWeight: optionsSetup.fontWeight, | ||
| 503 | - // }, | ||
| 504 | - // }) | ||
| 505 | - // } | ||
| 506 | - // legendName.push(val.series[i].name); | ||
| 507 | - // } | ||
| 508 | - // this.options.series = series; | ||
| 509 | - // this.options.legend['data'] = legendName; | ||
| 510 | - // this.setOptionsLegendName(legendName); | ||
| 511 | } | 453 | } |
| 512 | } | 454 | } |
| 513 | }; | 455 | }; |
src/views/bigscreenDesigner/designer/widget/line/widgetLinechart.vue
| @@ -365,7 +365,7 @@ export default { | @@ -365,7 +365,7 @@ export default { | ||
| 365 | getEchartData(val) { | 365 | getEchartData(val) { |
| 366 | const data = this.queryEchartsData(val); | 366 | const data = this.queryEchartsData(val); |
| 367 | data.then(res => { | 367 | data.then(res => { |
| 368 | - this.renderingFn(res); | 368 | + this.staticDataFn(res); |
| 369 | }); | 369 | }); |
| 370 | }, | 370 | }, |
| 371 | renderingFn(val) { | 371 | renderingFn(val) { |
src/views/bigscreenDesigner/designer/widget/pie/widgetPieNightingaleRose.vue
| @@ -229,7 +229,7 @@ export default { | @@ -229,7 +229,7 @@ export default { | ||
| 229 | getEchartData(val) { | 229 | getEchartData(val) { |
| 230 | const data = this.queryEchartsData(val); | 230 | const data = this.queryEchartsData(val); |
| 231 | data.then(res => { | 231 | data.then(res => { |
| 232 | - this.renderingFn(res); | 232 | + this.staticDataFn(val); |
| 233 | }); | 233 | }); |
| 234 | }, | 234 | }, |
| 235 | renderingFn(val) { | 235 | renderingFn(val) { |
src/views/bigscreenDesigner/designer/widget/pie/widgetPiechart.vue
| @@ -244,11 +244,7 @@ export default { | @@ -244,11 +244,7 @@ export default { | ||
| 244 | }); | 244 | }); |
| 245 | }, | 245 | }, |
| 246 | renderingFn(val) { | 246 | renderingFn(val) { |
| 247 | - for (const key in this.options.series) { | ||
| 248 | - if (this.options.series[key].type == "pie") { | ||
| 249 | - this.options.series[key].data = val; | ||
| 250 | - } | ||
| 251 | - } | 247 | + this.staticDataFn(val) |
| 252 | const arrColorData = []; | 248 | const arrColorData = []; |
| 253 | for (let i = 0; i < val.length; i++) { | 249 | for (let i = 0; i < val.length; i++) { |
| 254 | const res = val[i]; | 250 | const res = val[i]; |
src/views/bigscreenDesigner/designer/widget/pie/widgetRadioPiechart.vue
| @@ -90,7 +90,7 @@ export default { | @@ -90,7 +90,7 @@ export default { | ||
| 90 | this.optionsCollapse = this.value.collapse; | 90 | this.optionsCollapse = this.value.collapse; |
| 91 | this.optionsSetup = this.value.setup; | 91 | this.optionsSetup = this.value.setup; |
| 92 | this.editorOptions(); | 92 | this.editorOptions(); |
| 93 | - | 93 | + |
| 94 | }, | 94 | }, |
| 95 | methods: { | 95 | methods: { |
| 96 | // 修改图标options属性 | 96 | // 修改图标options属性 |
| @@ -244,7 +244,7 @@ export default { | @@ -244,7 +244,7 @@ export default { | ||
| 244 | getEchartData(val) { | 244 | getEchartData(val) { |
| 245 | const data = this.queryEchartsData(val); | 245 | const data = this.queryEchartsData(val); |
| 246 | data.then(res => { | 246 | data.then(res => { |
| 247 | - this.renderingFn(res); | 247 | + this.staticDataFn(res); |
| 248 | }); | 248 | }); |
| 249 | }, | 249 | }, |
| 250 | renderingFn(val) { | 250 | renderingFn(val) { |
src/views/bigscreenDesigner/designer/widget/radar/widgetRadar.vue
| @@ -273,7 +273,7 @@ export default { | @@ -273,7 +273,7 @@ export default { | ||
| 273 | getEchartData(val) { | 273 | getEchartData(val) { |
| 274 | const data = this.queryEchartsData(val); | 274 | const data = this.queryEchartsData(val); |
| 275 | data.then(res => { | 275 | data.then(res => { |
| 276 | - this.renderingFn(res); | 276 | + this.staticDataFn(res); |
| 277 | }); | 277 | }); |
| 278 | }, | 278 | }, |
| 279 | renderingFn(val) { | 279 | renderingFn(val) { |