Эх сурвалжийг харах

Merge remote-tracking branch 'origin/master'

zhoupeng 1 жил өмнө
parent
commit
87fc32c6a1

+ 1 - 1
PrintServer/src/main/resources/static/cy-sheet-ss/excel.js

@@ -22,7 +22,7 @@ function exportSheetExcel(luckysheet, reportChartList, name = "file") { // 参
 			// saveFile(buf, name);
 			uploadExcel(buf, uploadpath+"?randomId="+ getURLParameter('randomId') )
 		})
-	},500);
+	},1500);
 
 }
 

+ 1 - 0
PrintServer/src/main/resources/static/cy-sheet-ss/index.js

@@ -11,6 +11,7 @@ console.info("path=" + path);
 const getSheetApi = () => {
 	$.ajax({
 		url: path + '/reportTable/getPrintReportById/' + getURLParameter('id'),
+		type: 'GET',
 		// data: {
 		// 	id: getURLParameter('id')
 		// },

+ 7 - 5
chuanyi_client2/src/utils/luckysheettool.js

@@ -76,17 +76,19 @@ export function insertLuckysheetEChart({
     let S = r.init(document.getElementsByClassName(u)[0]);
     f.animation = false;
 	// 图例为空时,从数据组series中获取名称
-	if (!f.legend.data || f.legend.data.length == 0 || !f.legend.data[0]) {
+	if (f.legend && (!f.legend.data || f.legend.data.length == 0 || !f.legend.data[0])) {
 		let arr = []
 		 for (let nn = 0; nn < f.series.length; nn++) {
 		 	arr.push(f.series[nn].name)
 		 }
 		 f.legend.data = arr
 	}
-	// 动态获取图例所占高度
-	const height = getLegendHeight(j, f.legend.data)
-	console.log(height)
-	f.grid.bottom = height + 80
+	if (f.legend) {
+		// 动态获取图例所占高度
+		const height = getLegendHeight(j, f.legend.data)
+		console.log(height)
+		f.grid.bottom = height + 80
+	}
     S.on('finished', function() {
         // const imgBase = n(`.${u} canvas`)[0].toDataURL('image/png');
         // console.log(imgBase);

+ 1 - 1
chuanyi_client2/src/views/report_template/index.vue

@@ -2568,7 +2568,7 @@ export default {
       this.barChartForm.title = temp.title.text
       this.barChartForm.subtitle = temp.title.subtext
       this.barChartForm.showTitle = temp.title.show ? '1' : '0'
-      this.barChartForm.showLegend = temp.legend.show ? '1' : '0'
+      this.barChartForm.showLegend = temp.legend?.show ? '1' : '0'
       this.barChartForm.type = temp.series[0].type
       this.barChartForm.legendType = '1'
       this.barChartForm.bucketType = chartInfo.bucketType