Commit 860fb62f2a761bc2e031293199b7cc87337826db
1 parent
7c0608c7
1、添加表格自动换行
2添加表格列字体对其方式特殊属性 3添加折线图滑块默认100%
Showing
7 changed files
with
62 additions
and
77 deletions
src/mixins/queryform.js
| ... | ... | @@ -98,7 +98,6 @@ export default { |
| 98 | 98 | queryEchartsData(params) { |
| 99 | 99 | return new Promise(async (resolve) => { |
| 100 | 100 | const { code, data } = await getData(params); |
| 101 | - // console.log(data,2222222); | |
| 102 | 101 | if (code != 200) return |
| 103 | 102 | const analysisData = this.analysisChartsData(params, data); |
| 104 | 103 | resolve(analysisData) | ... | ... |
src/views/bigscreenDesigner/designer/widget/bar/widgetBarCompareChart.vue
| ... | ... | @@ -440,8 +440,8 @@ export default { |
| 440 | 440 | series[key].barWidth = optionsSetup.maxWidth; |
| 441 | 441 | } |
| 442 | 442 | } |
| 443 | - console.log(series,'series'); | |
| 444 | - | |
| 443 | + // console.log(series,'series'); | |
| 444 | + | |
| 445 | 445 | this.options.series = series; |
| 446 | 446 | }, |
| 447 | 447 | // tooltip 提示语设置 |
| ... | ... | @@ -559,9 +559,8 @@ export default { |
| 559 | 559 | optionsData.dataType == "staticData" |
| 560 | 560 | ? this.staticDataFn(optionsData.staticData, optionsSetup) |
| 561 | 561 | : this.dynamicDataFn( |
| 562 | - optionsData.dynamicData, | |
| 563 | - optionsData.refreshTime, | |
| 564 | - optionsSetup | |
| 562 | + optionsData.dynamicData, | |
| 563 | + optionsData.refreshTime | |
| 565 | 564 | ); |
| 566 | 565 | }, |
| 567 | 566 | //去重 |
| ... | ... | @@ -611,36 +610,22 @@ export default { |
| 611 | 610 | this.setOptionsLegendName(legendName); |
| 612 | 611 | }, |
| 613 | 612 | // 动态数据 |
| 614 | - dynamicDataFn(val, refreshTime, optionsSetup) { | |
| 613 | + dynamicDataFn(val, refreshTime) { | |
| 615 | 614 | if (!val) return; |
| 616 | 615 | if (this.ispreview) { |
| 617 | - this.getEchartData(val, optionsSetup); | |
| 616 | + this.getEchartData(val); | |
| 618 | 617 | this.flagInter = setInterval(() => { |
| 619 | - this.getEchartData(val, optionsSetup); | |
| 618 | + this.getEchartData(val); | |
| 620 | 619 | }, refreshTime); |
| 621 | 620 | } else { |
| 622 | - this.getEchartData(val, optionsSetup); | |
| 621 | + this.getEchartData(val); | |
| 623 | 622 | } |
| 624 | 623 | }, |
| 625 | - getEchartData(val, optionsSetup) { | |
| 624 | + getEchartData(val) { | |
| 626 | 625 | const data = this.queryEchartsData(val); |
| 627 | 626 | data.then(res => { |
| 628 | - this.renderingFn(optionsSetup, res); | |
| 627 | + this.staticDataFn(res); | |
| 629 | 628 | }); |
| 630 | - }, | |
| 631 | - renderingFn(optionsSetup, val) { | |
| 632 | - const legendName = []; | |
| 633 | - this.options.yAxis[1]['data'] = val.xAxis; | |
| 634 | - if (val.series[0].type == "bar"){ | |
| 635 | - this.options.series[0]['name'] = val.series[0].name; | |
| 636 | - this.options.series[0]['data'] = val.series[0].data; | |
| 637 | - this.options.series[1]['name'] = val.series[1].name; | |
| 638 | - this.options.series[1]['data'] = val.series[1].data; | |
| 639 | - legendName.push(val.series[0].name); | |
| 640 | - legendName.push(val.series[1].name); | |
| 641 | - } | |
| 642 | - this.options.legend['data'] = legendName; | |
| 643 | - this.setOptionsLegendName(legendName); | |
| 644 | 629 | } |
| 645 | 630 | } |
| 646 | 631 | }; | ... | ... |
src/views/bigscreenDesigner/designer/widget/bar/widgetBarchart.vue
| ... | ... | @@ -293,14 +293,12 @@ export default { |
| 293 | 293 | }, |
| 294 | 294 | // 数据解析 |
| 295 | 295 | setOptionsData() { |
| 296 | - const optionsSetup = this.optionsSetup; | |
| 297 | 296 | const optionsData = this.optionsData; // 数据类型 静态 or 动态 |
| 298 | 297 | optionsData.dataType == "staticData" |
| 299 | 298 | ? this.staticDataFn(optionsData.staticData) |
| 300 | 299 | : this.dynamicDataFn( |
| 301 | 300 | optionsData.dynamicData, |
| 302 | - optionsData.refreshTime, | |
| 303 | - optionsSetup | |
| 301 | + optionsData.refreshTime | |
| 304 | 302 | ); |
| 305 | 303 | }, |
| 306 | 304 | // 静态数据 |
| ... | ... | @@ -330,44 +328,46 @@ export default { |
| 330 | 328 | } |
| 331 | 329 | }, |
| 332 | 330 | // 动态数据 |
| 333 | - dynamicDataFn(val, refreshTime, optionsSetup) { | |
| 331 | + dynamicDataFn(val, refreshTime) { | |
| 334 | 332 | if (!val) return; |
| 335 | 333 | if (this.ispreview) { |
| 336 | - this.getEchartData(val, optionsSetup); | |
| 334 | + this.getEchartData(val); | |
| 337 | 335 | this.flagInter = setInterval(() => { |
| 338 | - this.getEchartData(val, optionsSetup); | |
| 336 | + this.getEchartData(val); | |
| 339 | 337 | }, refreshTime); |
| 340 | 338 | } else { |
| 341 | - this.getEchartData(val, optionsSetup); | |
| 339 | + this.getEchartData(val); | |
| 342 | 340 | } |
| 343 | 341 | }, |
| 344 | - getEchartData(val, optionsSetup) { | |
| 342 | + getEchartData(val) { | |
| 345 | 343 | const data = this.queryEchartsData(val); |
| 344 | + console.log("datassssssssssssssss",data) | |
| 346 | 345 | data.then(res => { |
| 347 | - this.renderingFn(optionsSetup, res); | |
| 346 | + this.staticDataFn(res); | |
| 347 | + // renderingFn(optionsSetup, res); | |
| 348 | 348 | }); |
| 349 | - }, | |
| 350 | - renderingFn(optionsSetup, val) { | |
| 351 | - // x轴 | |
| 352 | - if (optionsSetup.verticalShow) { | |
| 353 | - this.options.xAxis.data = []; | |
| 354 | - this.options.yAxis.data = val.xAxis; | |
| 355 | - this.options.xAxis.type = "value"; | |
| 356 | - this.options.yAxis.type = "category"; | |
| 357 | - } else { | |
| 358 | - this.options.xAxis.data = val.xAxis; | |
| 359 | - this.options.yAxis.data = []; | |
| 360 | - this.options.xAxis.type = "category"; | |
| 361 | - this.options.yAxis.type = "value"; | |
| 362 | - } | |
| 363 | - // series | |
| 364 | - const series = this.options.series; | |
| 365 | - for (const i in series) { | |
| 366 | - if (series[i].type == "bar") { | |
| 367 | - series[i].data = val.series[i].data; | |
| 368 | - } | |
| 369 | - } | |
| 370 | 349 | } |
| 350 | + // renderingFn(optionsSetup, val) { | |
| 351 | + // // x轴 | |
| 352 | + // if (optionsSetup.verticalShow) { | |
| 353 | + // this.options.xAxis.data = []; | |
| 354 | + // this.options.yAxis.data = val.xAxis; | |
| 355 | + // this.options.xAxis.type = "value"; | |
| 356 | + // this.options.yAxis.type = "category"; | |
| 357 | + // } else { | |
| 358 | + // this.options.xAxis.data = val.xAxis; | |
| 359 | + // this.options.yAxis.data = []; | |
| 360 | + // this.options.xAxis.type = "category"; | |
| 361 | + // this.options.yAxis.type = "value"; | |
| 362 | + // } | |
| 363 | + // // series | |
| 364 | + // const series = this.options.series; | |
| 365 | + // for (const i in series) { | |
| 366 | + // if (series[i].type == "bar") { | |
| 367 | + // series[i].data = val.series[i].data; | |
| 368 | + // } | |
| 369 | + // } | |
| 370 | + // } | |
| 371 | 371 | } |
| 372 | 372 | }; |
| 373 | 373 | </script> | ... | ... |
src/views/bigscreenDesigner/designer/widget/bar/widgetCapsuleChart.vue
| ... | ... | @@ -53,6 +53,13 @@ export default { |
| 53 | 53 | deep: true |
| 54 | 54 | } |
| 55 | 55 | }, |
| 56 | + // mounted() { | |
| 57 | + // this.optionsStyle = this.value.position; | |
| 58 | + // this.optionsData = this.value.data; | |
| 59 | + // this.optionsCollapse = this.value.setup; | |
| 60 | + // this.optionsSetup = this.value.setup; | |
| 61 | + // this.editorOptions(); | |
| 62 | + // }, | |
| 56 | 63 | created() { |
| 57 | 64 | this.optionsStyle = this.value.position; |
| 58 | 65 | this.optionsData = this.value.data; |
| ... | ... | @@ -84,6 +91,7 @@ export default { |
| 84 | 91 | }, |
| 85 | 92 | setOptionsData() { |
| 86 | 93 | const optionsData = this.optionsData; // 数据类型 静态 or 动态 |
| 94 | + console.log("optionsData.dataType",optionsData.dataType); | |
| 87 | 95 | optionsData.dataType == "staticData" |
| 88 | 96 | ? this.staticDataFn(optionsData.staticData) |
| 89 | 97 | : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); |
| ... | ... | @@ -107,11 +115,10 @@ export default { |
| 107 | 115 | getEchartData(val) { |
| 108 | 116 | const data = this.queryEchartsData(val); |
| 109 | 117 | data.then(res => { |
| 110 | - this.renderingFn(res); | |
| 118 | + this.options.data = res; | |
| 119 | + // console.log("WidgetCapsuleChart2222====",res); | |
| 120 | + // this.staticDataFn(res); | |
| 111 | 121 | }); |
| 112 | - }, | |
| 113 | - renderingFn(val) { | |
| 114 | - this.options.data=val; | |
| 115 | 122 | } |
| 116 | 123 | } |
| 117 | 124 | }; | ... | ... |
src/views/bigscreenDesigner/designer/widget/barline/widgetBarlinechart.vue
| ... | ... | @@ -127,7 +127,7 @@ export default { |
| 127 | 127 | this.optionsCollapse = this.value.collapse; |
| 128 | 128 | this.optionsSetup = this.value.setup; |
| 129 | 129 | this.editorOptions(); |
| 130 | - | |
| 130 | + | |
| 131 | 131 | }, |
| 132 | 132 | methods: { |
| 133 | 133 | // 修改图标options属性 |
| ... | ... | @@ -484,7 +484,8 @@ export default { |
| 484 | 484 | getEchartData(val) { |
| 485 | 485 | const data = this.queryEchartsData(val); |
| 486 | 486 | data.then(res => { |
| 487 | - this.renderingFn(res); | |
| 487 | + this.staticDataFn(res); | |
| 488 | + // this.renderingFn(res); | |
| 488 | 489 | }); |
| 489 | 490 | }, |
| 490 | 491 | renderingFn(val) { | ... | ... |
src/views/bigscreenDesigner/designer/widget/percent/widgetPiePercentageChart.vue
| ... | ... | @@ -454,10 +454,12 @@ export default { |
| 454 | 454 | }, |
| 455 | 455 | getEchartData(val) { |
| 456 | 456 | const data = this.queryEchartsData(val); |
| 457 | + // console.log("ddddddddd",data) | |
| 457 | 458 | data.then(res => { |
| 458 | - this.options.title.text = "{nums|" + res[0].value + "}{percent|%}"; | |
| 459 | - this.options.series[6]["data"][0]["value"] = res[0].value; | |
| 460 | - this.options.series[6]["data"][1]["value"] = 100 - res[0].value; | |
| 459 | + this.staticDataFn(res); | |
| 460 | + // this.options.title.text = "{nums|" + res[0].value + "}{percent|%}"; | |
| 461 | + // this.options.series[6]["data"][0]["value"] = res[0].value; | |
| 462 | + // this.options.series[6]["data"][1]["value"] = 100 - res[0].value; | |
| 461 | 463 | }); |
| 462 | 464 | } |
| 463 | 465 | } | ... | ... |
src/views/screenDesigner/widget/barCharts/widgetBarCompareChart.vue
| ... | ... | @@ -611,22 +611,13 @@ export default { |
| 611 | 611 | getEchartData(val, optionsSetup) { |
| 612 | 612 | const data = this.queryEchartsData(val); |
| 613 | 613 | data.then(res => { |
| 614 | + console.log("柱状对比图",res); | |
| 615 | + // this.staticDataFn(res) | |
| 614 | 616 | this.renderingFn(optionsSetup, res); |
| 615 | 617 | }); |
| 616 | 618 | }, |
| 617 | 619 | renderingFn(optionsSetup, val) { |
| 618 | - const legendName = []; | |
| 619 | - this.options.yAxis[1]['data'] = val.xAxis; | |
| 620 | - if (val.series[0].type == "bar"){ | |
| 621 | - this.options.series[0]['name'] = val.series[0].name; | |
| 622 | - this.options.series[0]['data'] = val.series[0].data; | |
| 623 | - this.options.series[1]['name'] = val.series[1].name; | |
| 624 | - this.options.series[1]['data'] = val.series[1].data; | |
| 625 | - legendName.push(val.series[0].name); | |
| 626 | - legendName.push(val.series[1].name); | |
| 627 | - } | |
| 628 | - this.options.legend['data'] = legendName; | |
| 629 | - this.setOptionsLegendName(legendName); | |
| 620 | + this.staticDataFn(val) | |
| 630 | 621 | } |
| 631 | 622 | } |
| 632 | 623 | }; | ... | ... |