Commit 860fb62f2a761bc2e031293199b7cc87337826db

Authored by qianbao
1 parent 7c0608c7

1、添加表格自动换行

2添加表格列字体对其方式特殊属性
3添加折线图滑块默认100%
src/mixins/queryform.js
@@ -98,7 +98,6 @@ export default { @@ -98,7 +98,6 @@ export default {
98 queryEchartsData(params) { 98 queryEchartsData(params) {
99 return new Promise(async (resolve) => { 99 return new Promise(async (resolve) => {
100 const { code, data } = await getData(params); 100 const { code, data } = await getData(params);
101 - // console.log(data,2222222);  
102 if (code != 200) return 101 if (code != 200) return
103 const analysisData = this.analysisChartsData(params, data); 102 const analysisData = this.analysisChartsData(params, data);
104 resolve(analysisData) 103 resolve(analysisData)
src/views/bigscreenDesigner/designer/widget/bar/widgetBarCompareChart.vue
@@ -440,8 +440,8 @@ export default { @@ -440,8 +440,8 @@ export default {
440 series[key].barWidth = optionsSetup.maxWidth; 440 series[key].barWidth = optionsSetup.maxWidth;
441 } 441 }
442 } 442 }
443 - console.log(series,'series');  
444 - 443 + // console.log(series,'series');
  444 +
445 this.options.series = series; 445 this.options.series = series;
446 }, 446 },
447 // tooltip 提示语设置 447 // tooltip 提示语设置
@@ -559,9 +559,8 @@ export default { @@ -559,9 +559,8 @@ export default {
559 optionsData.dataType == "staticData" 559 optionsData.dataType == "staticData"
560 ? this.staticDataFn(optionsData.staticData, optionsSetup) 560 ? this.staticDataFn(optionsData.staticData, optionsSetup)
561 : this.dynamicDataFn( 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,36 +610,22 @@ export default {
611 this.setOptionsLegendName(legendName); 610 this.setOptionsLegendName(legendName);
612 }, 611 },
613 // 动态数据 612 // 动态数据
614 - dynamicDataFn(val, refreshTime, optionsSetup) { 613 + dynamicDataFn(val, refreshTime) {
615 if (!val) return; 614 if (!val) return;
616 if (this.ispreview) { 615 if (this.ispreview) {
617 - this.getEchartData(val, optionsSetup); 616 + this.getEchartData(val);
618 this.flagInter = setInterval(() => { 617 this.flagInter = setInterval(() => {
619 - this.getEchartData(val, optionsSetup); 618 + this.getEchartData(val);
620 }, refreshTime); 619 }, refreshTime);
621 } else { 620 } else {
622 - this.getEchartData(val, optionsSetup); 621 + this.getEchartData(val);
623 } 622 }
624 }, 623 },
625 - getEchartData(val, optionsSetup) { 624 + getEchartData(val) {
626 const data = this.queryEchartsData(val); 625 const data = this.queryEchartsData(val);
627 data.then(res => { 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,14 +293,12 @@ export default {
293 }, 293 },
294 // 数据解析 294 // 数据解析
295 setOptionsData() { 295 setOptionsData() {
296 - const optionsSetup = this.optionsSetup;  
297 const optionsData = this.optionsData; // 数据类型 静态 or 动态 296 const optionsData = this.optionsData; // 数据类型 静态 or 动态
298 optionsData.dataType == "staticData" 297 optionsData.dataType == "staticData"
299 ? this.staticDataFn(optionsData.staticData) 298 ? this.staticDataFn(optionsData.staticData)
300 : this.dynamicDataFn( 299 : this.dynamicDataFn(
301 optionsData.dynamicData, 300 optionsData.dynamicData,
302 - optionsData.refreshTime,  
303 - optionsSetup 301 + optionsData.refreshTime
304 ); 302 );
305 }, 303 },
306 // 静态数据 304 // 静态数据
@@ -330,44 +328,46 @@ export default { @@ -330,44 +328,46 @@ export default {
330 } 328 }
331 }, 329 },
332 // 动态数据 330 // 动态数据
333 - dynamicDataFn(val, refreshTime, optionsSetup) { 331 + dynamicDataFn(val, refreshTime) {
334 if (!val) return; 332 if (!val) return;
335 if (this.ispreview) { 333 if (this.ispreview) {
336 - this.getEchartData(val, optionsSetup); 334 + this.getEchartData(val);
337 this.flagInter = setInterval(() => { 335 this.flagInter = setInterval(() => {
338 - this.getEchartData(val, optionsSetup); 336 + this.getEchartData(val);
339 }, refreshTime); 337 }, refreshTime);
340 } else { 338 } else {
341 - this.getEchartData(val, optionsSetup); 339 + this.getEchartData(val);
342 } 340 }
343 }, 341 },
344 - getEchartData(val, optionsSetup) { 342 + getEchartData(val) {
345 const data = this.queryEchartsData(val); 343 const data = this.queryEchartsData(val);
  344 + console.log("datassssssssssssssss",data)
346 data.then(res => { 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 </script> 373 </script>
src/views/bigscreenDesigner/designer/widget/bar/widgetCapsuleChart.vue
@@ -53,6 +53,13 @@ export default { @@ -53,6 +53,13 @@ export default {
53 deep: true 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 created() { 63 created() {
57 this.optionsStyle = this.value.position; 64 this.optionsStyle = this.value.position;
58 this.optionsData = this.value.data; 65 this.optionsData = this.value.data;
@@ -84,6 +91,7 @@ export default { @@ -84,6 +91,7 @@ export default {
84 }, 91 },
85 setOptionsData() { 92 setOptionsData() {
86 const optionsData = this.optionsData; // 数据类型 静态 or 动态 93 const optionsData = this.optionsData; // 数据类型 静态 or 动态
  94 + console.log("optionsData.dataType",optionsData.dataType);
87 optionsData.dataType == "staticData" 95 optionsData.dataType == "staticData"
88 ? this.staticDataFn(optionsData.staticData) 96 ? this.staticDataFn(optionsData.staticData)
89 : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime); 97 : this.dynamicDataFn(optionsData.dynamicData, optionsData.refreshTime);
@@ -107,11 +115,10 @@ export default { @@ -107,11 +115,10 @@ export default {
107 getEchartData(val) { 115 getEchartData(val) {
108 const data = this.queryEchartsData(val); 116 const data = this.queryEchartsData(val);
109 data.then(res => { 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,7 +127,7 @@ export default {
127 this.optionsCollapse = this.value.collapse; 127 this.optionsCollapse = this.value.collapse;
128 this.optionsSetup = this.value.setup; 128 this.optionsSetup = this.value.setup;
129 this.editorOptions(); 129 this.editorOptions();
130 - 130 +
131 }, 131 },
132 methods: { 132 methods: {
133 // 修改图标options属性 133 // 修改图标options属性
@@ -484,7 +484,8 @@ export default { @@ -484,7 +484,8 @@ export default {
484 getEchartData(val) { 484 getEchartData(val) {
485 const data = this.queryEchartsData(val); 485 const data = this.queryEchartsData(val);
486 data.then(res => { 486 data.then(res => {
487 - this.renderingFn(res); 487 + this.staticDataFn(res);
  488 + // this.renderingFn(res);
488 }); 489 });
489 }, 490 },
490 renderingFn(val) { 491 renderingFn(val) {
src/views/bigscreenDesigner/designer/widget/percent/widgetPiePercentageChart.vue
@@ -454,10 +454,12 @@ export default { @@ -454,10 +454,12 @@ export default {
454 }, 454 },
455 getEchartData(val) { 455 getEchartData(val) {
456 const data = this.queryEchartsData(val); 456 const data = this.queryEchartsData(val);
  457 + // console.log("ddddddddd",data)
457 data.then(res => { 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,22 +611,13 @@ export default {
611 getEchartData(val, optionsSetup) { 611 getEchartData(val, optionsSetup) {
612 const data = this.queryEchartsData(val); 612 const data = this.queryEchartsData(val);
613 data.then(res => { 613 data.then(res => {
  614 + console.log("柱状对比图",res);
  615 + // this.staticDataFn(res)
614 this.renderingFn(optionsSetup, res); 616 this.renderingFn(optionsSetup, res);
615 }); 617 });
616 }, 618 },
617 renderingFn(optionsSetup, val) { 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 };