소스 검색

fix:ucharts升级

yf_elsa.cui 5 달 전
부모
커밋
507eece4bb

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

@@ -259,8 +259,9 @@
 			showColumn(id, xtitle, xinfo) {
 				var _self = this;
 				console.log(_self.cWidth, '_self.cWidth');
+				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/historyfile.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"

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

@@ -475,8 +475,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"
@@ -527,15 +528,17 @@
 			},
 			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

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

@@ -189,8 +189,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"
@@ -225,8 +226,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"

+ 6 - 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,17 @@
 			},
 			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

@@ -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"

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

@@ -586,8 +586,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"
@@ -638,15 +639,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

@@ -269,8 +269,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

@@ -282,8 +282,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

@@ -229,8 +229,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.vue

@@ -530,8 +530,9 @@
 			showColumn(id, xtitle, xinfo) {
 				var _self = this;
 				console.log(_self.cWidth, '_self.cWidth');
+				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

@@ -384,9 +384,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",
@@ -420,7 +421,7 @@
 					});
 				} else if (id === "canvasColumnB") {
 					canvaColumnB = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",

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

@@ -328,9 +328,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",
@@ -364,7 +365,7 @@
 					});
 				} else if (id === "canvasColumnB") {
 					canvaColumnB = new uCharts({
-						canvasId: id,
+						context: ctx,
 						type: "line",
 						legend: {
 							position: "top",

+ 2 - 1
pages/environment/equipment.vue

@@ -278,8 +278,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

@@ -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/environment/history.vue

@@ -225,8 +225,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

@@ -344,8 +344,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"
@@ -380,8 +381,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

@@ -285,8 +285,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/waterandfernew/details.vue

@@ -299,8 +299,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"

BIN
static/images/tabBar/gerenzhongxin.png


BIN
static/images/tabBar/gerenzhongxinsel.png


BIN
static/images/tabBar/shebeifenbu.png


BIN
static/images/tabBar/shebeifenbusel.png


BIN
static/images/tabBar/shebeiliebiao.png


BIN
static/images/tabBar/shebeiliebiaosel.png


파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 1052
static/js/cbd_pest_library.js


+ 22 - 2
util/QueryPermission.js

@@ -1,4 +1,3 @@
-
 var list =[]
 function QueryPermission(id) {
 	if(uni.getStorageSync("jurisdiction")){
@@ -22,6 +21,27 @@ function QueryPermission(id) {
 	}
 	return false
 }
+function getUserPermission(){
+	let list = []
+	if(uni.getStorageSync("jurisdiction")){
+		list = JSON.parse(uni.getStorageSync("jurisdiction"))
+	}
+	return list
+}
+function getPermissionById(node = getUserPermission(),id) {
+		for (const child of node) {			
+			if(id == child.pur_id){				
+				return child.children || []
+			}
+			if(child.children){
+				let result = getPermissionById(child.children,id) 
+				if(result){
+					return result
+				}				
+			} 
+		}
+		return null
+}
 export {
-	QueryPermission
+	QueryPermission,getPermissionById,getUserPermission
 }