Vergelijk commits
	
		
			6 Commits
		
	
	
		
			6b452dce36
			...
			b0078cb099
		
	
	| Auteur | SHA1 | Datum | |
|---|---|---|---|
| b0078cb099 | |||
| e5acd497b5 | |||
| aacf87f6d3 | |||
|  | bfa17e422d | ||
|  | e25f872589 | ||
| 83b834d2fc | 
| @@ -1,7 +1,7 @@ | |||||||
| <!-- | <!-- | ||||||
|  * @Author: zhp |  * @Author: zhp | ||||||
|  * @Date: 2024-01-29 13:45:56 |  * @Date: 2024-01-29 13:45:56 | ||||||
|  * @LastEditTime: 2024-04-11 11:02:53 |  * @LastEditTime: 2024-04-15 09:28:21 | ||||||
|  * @LastEditors: zhp |  * @LastEditors: zhp | ||||||
|  * @Description: |  * @Description: | ||||||
| --> | --> | ||||||
| @@ -13,6 +13,7 @@ | |||||||
| </template> | </template> | ||||||
|  |  | ||||||
| <script> | <script> | ||||||
|  | import { position } from '@antv/x6-common/lib/dom/position'; | ||||||
| import * as echarts from 'echarts'; | import * as echarts from 'echarts'; | ||||||
| // import resize from './../mixins/resize' | // import resize from './../mixins/resize' | ||||||
| // import NotMsg from './../components/NotMsg' | // import NotMsg from './../components/NotMsg' | ||||||
| @@ -49,29 +50,45 @@ export default { | |||||||
|   mounted() { |   mounted() { | ||||||
|     this.chartData = [ |     this.chartData = [ | ||||||
|       { |       { | ||||||
|         name: '细长泡', |         name: '0904褶皱/严重', | ||||||
|         num: 1112, |         num: 1112, | ||||||
|         yield: 0.97, |         yield: 0.97, | ||||||
|       }, |       }, | ||||||
|       { |       { | ||||||
|         name: '长泡', |         name: '0904褶皱/严重', | ||||||
|         num: 1112, |         num: 1112, | ||||||
|         yield: 0.97, |         yield: 0.97, | ||||||
|       }, |       }, | ||||||
|        { |        { | ||||||
|          name: '开口泡', |          name: '0904褶皱/严重', | ||||||
|         num: 1112, |         num: 1112, | ||||||
|         yield: 0.97, |         yield: 0.97, | ||||||
|       }, |       }, | ||||||
|        { |        { | ||||||
|          name: '结石', |          name: '0904褶皱/严重', | ||||||
|         num: 1112, |         num: 1112, | ||||||
|         yield: 0.97, |         yield: 0.97, | ||||||
|       } |       } | ||||||
|     ] |     ] | ||||||
|     this.updateChart() |     this.updateChart() | ||||||
|   }, |   }, | ||||||
| 	methods: { |   methods: { | ||||||
|  |     getEqualNewlineString(params, length) { | ||||||
|  |       let text = '' | ||||||
|  |       let count = Math.ceil(params.length / length) // 向上取整数 | ||||||
|  |       // 一行展示length个 | ||||||
|  |       if (count > 1) { | ||||||
|  |         for (let z = 1; z <= count; z++) { | ||||||
|  |           text += params.substr((z - 1) * length, length) | ||||||
|  |           if (z < count) { | ||||||
|  |             text += '\n' | ||||||
|  |           } | ||||||
|  |         } | ||||||
|  |       } else { | ||||||
|  |         text += params.substr(0, length) | ||||||
|  |       } | ||||||
|  |       return text | ||||||
|  |     }, | ||||||
| 		updateChart() { | 		updateChart() { | ||||||
| 			console.log('update') | 			console.log('update') | ||||||
| 			let num = 0 | 			let num = 0 | ||||||
| @@ -127,27 +144,38 @@ export default { | |||||||
| 				}, | 				}, | ||||||
| 				series:[{ | 				series:[{ | ||||||
| 						name: 'ISRA缺陷检测', | 						name: 'ISRA缺陷检测', | ||||||
| 						type: 'pie', |             type: 'pie', | ||||||
|  |             // position:outerHeight, | ||||||
| 						center: ['50%', '40%'], | 						center: ['50%', '40%'], | ||||||
| 						radius: ['45%', '70%'], | 						radius: ['45%', '70%'], | ||||||
| 						avoidLabelOverlap: true, | 						avoidLabelOverlap: true, | ||||||
| 						label: { |           label: { | ||||||
|               show: true, |             show: true, | ||||||
|             normal: { |             normal: { | ||||||
|  |               alignTo: 'labelLine', | ||||||
|  |               margin: 10, | ||||||
|  |               edgeDistance: 10, | ||||||
|  |               lineHeight: 16, | ||||||
|               // 各分区的提示内容 |               // 各分区的提示内容 | ||||||
|               // params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式 |               // params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式 | ||||||
|               formatter: function (params) { |               formatter: function (params) { | ||||||
|                 console.log(params); |                 console.log(params); | ||||||
|                 return params.value + " | " + params.percent.toFixed(0) + "%" + "\n\n" + params.name; |                 return ; | ||||||
|  |               }, | ||||||
|  |               formatter: (params) => { | ||||||
|  |                 //调用自定义显示格式 | ||||||
|  |                 return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name,10); | ||||||
|               }, |               }, | ||||||
|               textStyle: {            // 提示文字的样式 |               textStyle: {            // 提示文字的样式 | ||||||
|                 // color: '#595959', |                 // color: '#595959', | ||||||
|                 fontSize: 24.48 |                 fontSize: 16 | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
| 						}, | 						}, | ||||||
| 						labelLine: { | 						labelLine: { | ||||||
| 							show: true, |               show: true, | ||||||
|  |               length: 25, | ||||||
|  |               length2: 10, | ||||||
| 						}, | 						}, | ||||||
| 						data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({ | 						data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({ | ||||||
| 						name:item.name, | 						name:item.name, | ||||||
|   | |||||||
| @@ -58,20 +58,12 @@ export default { | |||||||
| 					type: 'bar', | 					type: 'bar', | ||||||
| 					data: [], | 					data: [], | ||||||
| 					barWidth: 20, | 					barWidth: 20, | ||||||
| 					label: { |  | ||||||
| 						show: true, |  | ||||||
| 						position: 'top', |  | ||||||
| 					}, |  | ||||||
| 				}, | 				}, | ||||||
| 				{ | 				{ | ||||||
| 					name: '上期', | 					name: '上期', | ||||||
| 					type: 'bar', | 					type: 'bar', | ||||||
| 					data: [], | 					data: [], | ||||||
| 					barWidth: 20, | 					barWidth: 20, | ||||||
| 					// label: { |  | ||||||
| 					//   show: true, |  | ||||||
| 					//   position: 'top' |  | ||||||
| 					// } |  | ||||||
| 				}, | 				}, | ||||||
| 			]; | 			]; | ||||||
| 			for (let j = 0; j < arr.length; j++) { | 			for (let j = 0; j < arr.length; j++) { | ||||||
|   | |||||||
| @@ -103,7 +103,6 @@ export default { | |||||||
| 					: undefined, | 					: undefined, | ||||||
|       ].filter((v) => v), |       ].filter((v) => v), | ||||||
|       tableData: [], |       tableData: [], | ||||||
|  |  | ||||||
| 			tableProps: [ | 			tableProps: [ | ||||||
| 				// { | 				// { | ||||||
| 				// 	prop: 'createTime', | 				// 	prop: 'createTime', | ||||||
|   | |||||||
		Verwijs in nieuw issue
	
	Block a user