Browse Source

fix:ucharts升级

yf_elsa.cui 5 months ago
parent
commit
f978609c54

+ 2 - 2
components/js_sdk/u-charts/u-charts/config.js

@@ -28,7 +28,7 @@ module.exports = {
 		},
 		dataLabel: true,
 		extra: {
-			pie: {
+			ring: {
 		    border:true,
 		    borderColor:'#FFFFFF',
 		    borderWidth:3
@@ -61,7 +61,7 @@ module.exports = {
 			fontSize: 15,
 		},
 		extra: {
-			pie: {
+			ring: {
 			  offsetAngle: 0,
 			  ringWidth: 40,
 			  labelWidth:15

+ 2 - 1
pages/cb/bzy/equip-set/bzyhistoryile.vue

@@ -253,8 +253,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 5 - 3
pages/cb/cbd/equip-set/analyse.vue

@@ -644,8 +644,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -696,15 +697,16 @@
 			},
 			showRing(data) {
 				var _self = this
+				const ctx = uni.createCanvasContext("canvasRing", this);
 				canvasRing = new uCharts({
-					canvasId: "canvasRing",
+					context: ctx,
 					type: 'ring',
 					fontSize: 11,
 					legend: {
 						show: true,
 					},
 					extra: {
-						pie: {
+						ring: {
 							offsetAngle: -45,
 							ringWidth: 40 * _self.pixelRatio,
 							labelWidth: 15

+ 2 - 1
pages/cb/cbd/equip-set/historyfile.vue

@@ -274,8 +274,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/cb/cbd/equip-set/newhistoryfile.vue

@@ -245,8 +245,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 5 - 3
pages/cb/cbd/equip-set/statistics.vue

@@ -494,8 +494,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -546,13 +547,14 @@
 			},
 			showRing(data) {
 				var _self = this
+				const ctx = uni.createCanvasContext('canvasRing', this);
 				canvasRing = new uCharts({
-					canvasId: "canvasRing",
+					context: ctx,
 					type: 'ring',
 					fontSize: 11,
 					legend: true,
 					extra: {
-						pie: {
+						ring: {
 							offsetAngle: -45,
 							ringWidth: 40 * _self.pixelRatio,
 							labelWidth: 15

+ 17 - 1
pages/cb/index/index.vue

@@ -309,7 +309,7 @@
 				item.pur_id = this.equipArr[this.active].pur_id||0
 				let data = JSON.stringify(item)
 			
-				
+				console.log('item',item)
 				if (item.type == 10) {
 					uni.navigateTo({
 						url: '/pages/cb/xy2.0/particulars?info=' + data
@@ -327,6 +327,22 @@
 					uni.navigateTo({
 						url: '/pages/cb/sy/detail?detail=' + data
 					});
+				}else if (item.type == 24) {
+					uni.navigateTo({
+						url: '/pages/cb/zjxydetail/thxydetail?imei=' +  item.imei
+					});
+				}else if (item.type == 25) {
+					uni.navigateTo({
+						url: '/pages/cb/xylps/detail?detail=' + data
+					});
+				}else if (item.type == 28) {
+					uni.navigateTo({
+						url: '/pages/cb/smallPest/smallPest?info=' + data
+					});
+				}else if (item.type == 29) {
+					uni.navigateTo({
+						url: `/pages/cb/nlNewXy/nlNewXy?imei=${item.imei}&showId=${item.only_for_show}`
+					});
 				}else if (item.type == 32||item.type == 33||item.type == 34||item.type == 35) {
 					uni.navigateTo({
 						url: '/pages/cb/equip-detail/equip-detail-new?info=' + data

+ 4 - 2
pages/cb/nlNewXy/thxyhisdata.vue

@@ -190,8 +190,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -226,8 +227,9 @@
 			},
 			showColumn2(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnB = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 5 - 3
pages/cb/smallPest/analyse.vue

@@ -588,8 +588,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -640,15 +641,16 @@
 			},
 			showRing(data) {
 				var _self = this
+				const ctx = uni.createCanvasContext('canvasRing', this);
 				canvasRing = new uCharts({
-					canvasId: "canvasRing",
+					context: ctx,
 					type: 'ring',
 					fontSize: 11,
 					legend: {
 						show: true,
 					},
 					extra: {
-						pie: {
+						ring: {
 							offsetAngle: -45,
 							ringWidth: 40 * _self.pixelRatio,
 							labelWidth: 15

+ 2 - 1
pages/cb/smallPest/smallPest.vue

@@ -276,8 +276,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 4 - 2
pages/cb/thxydetail/thxyhisdata.vue

@@ -252,8 +252,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -288,8 +289,9 @@
 			},
 			showColumn2(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnB = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 5 - 3
pages/cb/xctdetail/analyse.vue

@@ -589,8 +589,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -641,15 +642,16 @@
 			},
 			showRing(data) {
 				var _self = this
+				const ctx = uni.createCanvasContext('canvasRing', this);
 				canvasRing = new uCharts({
-					canvasId: "canvasRing",
+					context: ctx,
 					type: 'ring',
 					fontSize: 11,
 					legend: {
 						show: true,
 					},
 					extra: {
-						pie: {
+						ring: {
 							offsetAngle: -45,
 							ringWidth: 40 * _self.pixelRatio,
 							labelWidth: 15

+ 2 - 1
pages/cb/xctdetail/xctdetail.vue

@@ -270,8 +270,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/cb/xy/equip-set/xyhistoryile.vue

@@ -275,8 +275,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/cb/xy2.0/historydatas.vue

@@ -227,8 +227,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/cb/xylps/detail/detail.vue

@@ -534,8 +534,9 @@
 			// 害虫统计折线图
 			showColumn(id, xtitle, xinfo) {
 				var _self = this;
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 4 - 2
pages/cb/zjxydetail/thxyhisdata.vue

@@ -251,8 +251,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -287,8 +288,9 @@
 			},
 			showColumn2(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnB = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 3 - 2
pages/disease/cmb.vue

@@ -389,9 +389,10 @@
 			showColumn(id, xtitle, xinfo) {
 				console.log(id);
 				var _self = this;
+				const ctx = uni.createCanvasContext(id, this);
 				if (id === "canvasColumnA") {
 					canvaColumnA = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",
@@ -425,7 +426,7 @@
 					});
 				} else if (id === "canvasColumnB") {
 					canvaColumnB = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",

+ 3 - 2
pages/disease/mls/mls.vue

@@ -327,9 +327,10 @@
 			showColumn(id, xtitle, xinfo) {
 				console.log(id);
 				var _self = this;
+				const ctx = uni.createCanvasContext(id, this);
 				if (id === "canvasColumnA") {
 					canvaColumnA = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",
@@ -363,7 +364,7 @@
 					});
 				} else if (id === "canvasColumnB") {
 					canvaColumnB = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",

+ 2 - 1
pages/environment/equipment.vue

@@ -277,8 +277,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvasColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/environment/gshistory.vue

@@ -231,8 +231,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/environment/history.vue

@@ -228,8 +228,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvasColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 4 - 2
pages/prevention/ucharts.vue

@@ -375,8 +375,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -411,8 +412,9 @@
 			},
 			showColumnb(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnB = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 4 - 2
pages/waterandfer/elementdata.vue

@@ -257,8 +257,9 @@
 			},
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"
@@ -293,8 +294,9 @@
 			},
 			showColumnb(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnB = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"

+ 2 - 1
pages/waterandfernew/details.vue

@@ -353,8 +353,9 @@
 			// 绘制折线图
 			showColumn(id, xtitle, xinfo) {
 				var _self = this
+				const ctx = uni.createCanvasContext(id, this);
 				canvaColumnA = new uCharts({
-					canvasId: id,
+					context: ctx,
 					type: 'line',
 					legend: {
 						position: "top"