Compare commits
	
		
			182 Commits
		
	
	
		
			45538e80c4
			...
			projects/m
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8da6dc6232 | ||
| 
						 | 
					3e2661581e | ||
| ec5e47a416 | |||
| 
						 | 
					99d60a14bd | ||
| 
						 | 
					6409d2d348 | ||
| 71f548cb3b | |||
| 
						 | 
					8ecf281f08 | ||
| 
						 | 
					fa75a2b89f | ||
| 
						 | 
					c469ca5ebe | ||
| 9b8c090f7e | |||
| 
						 | 
					cbae9ef922 | ||
| 
						 | 
					c7a6ad2e22 | ||
| e66ef52489 | |||
| 
						 | 
					ebb7f597b9 | ||
| 
						 | 
					7d6a0e228f | ||
| 3bec7e3333 | |||
| 
						 | 
					5444ff92f7 | ||
| 
						 | 
					0713cb1650 | ||
| 9da2e20b24 | |||
| 
						 | 
					efa5a7c383 | ||
| 6ba4c90767 | |||
| 
						 | 
					b45818e2a4 | ||
| 
						 | 
					00a5a8ed34 | ||
| f51d786fd3 | |||
| 
						 | 
					01464663fa | ||
| 
						 | 
					db393bec12 | ||
| 59df1c16f6 | |||
| 
						 | 
					2f2d3defd0 | ||
| 
						 | 
					0b847d2903 | ||
| 5b0bb2ccdb | |||
| 
						 | 
					4d4feee160 | ||
| 
						 | 
					8d370118aa | ||
| 3a5c2eeb2a | |||
| 
						 | 
					72f146394b | ||
| 53b10a9847 | |||
| 
						 | 
					82a7a2b8cd | ||
| 
						 | 
					3e327277e9 | ||
| 
						 | 
					06ab8159c5 | ||
| cdf0525fca | |||
| 
						 | 
					0547133e35 | ||
| 
						 | 
					11387724de | ||
| fe6fb41e29 | |||
| 
						 | 
					074432851c | ||
| 
						 | 
					8af5158a1b | ||
| 46743fa4ef | |||
| 
						 | 
					91c352ff79 | ||
| 
						 | 
					41748b740d | ||
| 8d524a71a6 | |||
| 
						 | 
					4fa58b62fc | ||
| 
						 | 
					2d67ca4347 | ||
| 
						 | 
					91ac125671 | ||
| 
						 | 
					9ea2f2dbe3 | ||
| 30e04d641f | |||
| 
						 | 
					6f2f751b0e | ||
| 
						 | 
					96f7798708 | ||
| 1aa2310adf | |||
| 
						 | 
					63f4fd7cb5 | ||
| 
						 | 
					72855a6f04 | ||
| b3bd3eea22 | |||
| 
						 | 
					2c53c249af | ||
| 
						 | 
					f2d57a8ebb | ||
| 00ed35ed82 | |||
| 
						 | 
					689de3173f | ||
| 
						 | 
					865698a9be | ||
| 798ea2d90d | |||
| 
						 | 
					44f3ab3e99 | ||
| 
						 | 
					3e025020ab | ||
| d62015bfbb | |||
| 
						 | 
					a7e89fe7e8 | ||
| 
						 | 
					6cb91b2c4a | ||
| 165722d67d | |||
| 
						 | 
					486cffd64e | ||
| 
						 | 
					81c4af0cc8 | ||
| db113cdba9 | |||
| 
						 | 
					af52db4a37 | ||
| 
						 | 
					e0ca435014 | ||
| affe8ec026 | |||
| 
						 | 
					aa6ae82607 | ||
| 
						 | 
					eee121e5ab | ||
| 4332113e3b | |||
| 
						 | 
					53ba98b01a | ||
| 
						 | 
					23cf4aaa1e | ||
| 81a110ba45 | |||
| 
						 | 
					a249e88530 | ||
| 
						 | 
					2128538199 | ||
| 
						 | 
					052d0704fd | ||
| 749b9c6576 | |||
| 
						 | 
					3f942111b0 | ||
| 
						 | 
					716c88dfc4 | ||
| ec0a99b5fb | |||
| 
						 | 
					384527d6db | ||
| 
						 | 
					26cf9a6ce4 | ||
| 5ba0b62ae6 | |||
| 
						 | 
					5ac5da1bf5 | ||
| 
						 | 
					99f5f978d4 | ||
| 
						 | 
					04af70f416 | ||
| 
						 | 
					242e42a56a | ||
| 
						 | 
					2ab541d4c1 | ||
| 95d530e5f1 | |||
| 
						 | 
					83b9867c2a | ||
| 
						 | 
					7b8f4cac21 | ||
| 7886d5ad5a | |||
| b31b67d2ed | |||
| fc21359f8f | |||
| be6d84daf5 | |||
| daaec2417c | |||
| dcf4f6c392 | |||
| d27e56cd7f | |||
| 
						 | 
					445ebe339d | ||
| 
						 | 
					353e3e0f35 | ||
| ea29a33c2a | |||
| 
						 | 
					d5673f3c9f | ||
| 
						 | 
					3064722052 | ||
| 
						 | 
					dfe52cbac5 | ||
| 68e386333b | |||
| 
						 | 
					96d55b5a57 | ||
| 
						 | 
					fb74340f0f | ||
| b1ddfa5c0d | |||
| 
						 | 
					f7b151f9aa | ||
| 
						 | 
					51938926d3 | ||
| 588037c45c | |||
| 
						 | 
					354031f119 | ||
| 
						 | 
					44c5271b5a | ||
| 241810d1c8 | |||
| 
						 | 
					92a297a5e9 | ||
| 
						 | 
					f67e781146 | ||
| e310c5465e | |||
| 
						 | 
					f2cfe94dfc | ||
| 
						 | 
					92c0c33fbd | ||
| 0a391a4de5 | |||
| 
						 | 
					8be57f586e | ||
| 
						 | 
					4e5a5f9ba2 | ||
| a78c3d79f1 | |||
| 
						 | 
					3c5163bd66 | ||
| 
						 | 
					8437d52c1b | ||
| ca0a0142db | |||
| 703334ac3c | |||
| 3897f35d28 | |||
| 3c6e408074 | |||
| a9392c8999 | |||
| 
						 | 
					196a615f61 | ||
| 
						 | 
					8395f37371 | ||
| 
						 | 
					5e703350e1 | ||
| 266604878b | |||
| 
						 | 
					0c2221b373 | ||
| 
						 | 
					0992940655 | ||
| 7e1b0f8725 | |||
| 8f8d0396b7 | |||
| 582484f6db | |||
| b259cdb545 | |||
| b6aa6a19f4 | |||
| a9e176be74 | |||
| a237c66901 | |||
| 
						 | 
					c7205e32a3 | ||
| 
						 | 
					b180bac226 | ||
| 
						 | 
					670d7e5600 | ||
| 69b3e7de2e | |||
| 
						 | 
					0eb17fa08b | ||
| 
						 | 
					cc800eae5d | ||
| 
						 | 
					6be1a83dd8 | ||
| 033d61ea96 | |||
| 4fb88a5201 | |||
| 0e60ba7dc8 | |||
| 1969cd3ada | |||
| 
						 | 
					510f12e40b | ||
| 
						 | 
					7a67da105f | ||
| 6c145579cb | |||
| e512ad5858 | |||
| a7b13c6a8f | |||
| 0655eafb1d | |||
| ce350c0c7f | |||
| abfd20bac6 | |||
| 7ba831f496 | |||
| 78d387b2c6 | |||
| 
						 | 
					15d3b3622c | ||
| 
						 | 
					c8bc54e04b | ||
| a5d0970fa0 | |||
| 
						 | 
					2368916e62 | ||
| 
						 | 
					2d5bd161f3 | ||
| ff424ca1b6 | |||
| 9de0dfc639 | |||
| fc0a97a9c6 | 
							
								
								
									
										9
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										9
									
								
								.env.dev
									
									
									
									
									
								
							@@ -1,7 +1,7 @@
 | 
				
			|||||||
###
 | 
					###
 | 
				
			||||||
 # @Author: zhp
 | 
					 # @Author: zhp
 | 
				
			||||||
 # @Date: 2024-04-28 13:42:51
 | 
					 # @Date: 2024-04-28 13:42:51
 | 
				
			||||||
 # @LastEditTime: 2024-06-17 09:01:32
 | 
					 # @LastEditTime: 2024-06-24 16:57:53
 | 
				
			||||||
 # @LastEditors: DY
 | 
					 # @LastEditors: DY
 | 
				
			||||||
 # @Description:
 | 
					 # @Description:
 | 
				
			||||||
###
 | 
					###
 | 
				
			||||||
@@ -14,13 +14,18 @@ VUE_APP_TITLE = 发电玻璃智能管控平台
 | 
				
			|||||||
# 芋道管理系统/开发环境
 | 
					# 芋道管理系统/开发环境
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.1.70:30307'
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.70:30307'
 | 
				
			||||||
VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
 | 
					VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
 | 
				
			||||||
 | 
					# 闫阳
 | 
				
			||||||
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.81:48080'
 | 
				
			||||||
 | 
					# 徐
 | 
				
			||||||
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.56:48080'
 | 
				
			||||||
# 郭
 | 
					# 郭
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.1.61:48080'
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.61:48080'
 | 
				
			||||||
# sara
 | 
					# sara
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.1.63:48080'
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.63:48080'
 | 
				
			||||||
# 张一丁
 | 
					# 张一丁
 | 
				
			||||||
# VUE_APP_BASE_API = 'http://192.168.4.139:48080'
 | 
					# VUE_APP_BASE_API = 'http://192.168.4.139:48080'
 | 
				
			||||||
 | 
					# 蔡
 | 
				
			||||||
 | 
					# VUE_APP_BASE_API = 'http://192.168.1.54:48080'
 | 
				
			||||||
# 路由懒加载
 | 
					# 路由懒加载
 | 
				
			||||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
					VUE_CLI_BABEL_TRANSPILE_MODULES = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-07 08:54:59
 | 
					 * @Date: 2024-05-07 08:54:59
 | 
				
			||||||
 * @LastEditTime: 2024-06-03 08:52:02
 | 
					 * @LastEditTime: 2024-06-19 15:22:10
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -10,23 +10,33 @@ import request from '@/utils/request'
 | 
				
			|||||||
// 查询生产数据管理分页
 | 
					// 查询生产数据管理分页
 | 
				
			||||||
export function getProduceDataPage(data) {
 | 
					export function getProduceDataPage(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: 'ip/prod-output/prodOutputDataPage',
 | 
					    url: '/ip/proddata/page',
 | 
				
			||||||
    method: 'post',
 | 
					    method: 'post',
 | 
				
			||||||
    data: data
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function getProduceDataDetail(id){
 | 
					// 查询图数据
 | 
				
			||||||
 | 
					export function getproddata(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
     url: '/ip/prod-output/get?id=' + id,
 | 
					    url: '/ip/proddata/list',
 | 
				
			||||||
    method: 'get'
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getProduceDataDetail(data){
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/proddata/get',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 导出生产数据
 | 
					// 导出生产数据
 | 
				
			||||||
export function exportOutPutExcel(data) {
 | 
					export function exportOutPutExcel(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: '/ip/prod-output/output-export-excel',
 | 
					    url: '/ip/proddata/export-excel',
 | 
				
			||||||
    method: 'post',
 | 
					    method: 'post',
 | 
				
			||||||
    data: data,
 | 
					    data: data,
 | 
				
			||||||
    responseType: 'blob'
 | 
					    responseType: 'blob'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,6 +1,115 @@
 | 
				
			|||||||
// 对标报表的接口
 | 
					// 对标报表的接口
 | 
				
			||||||
import request from '@/utils/request'
 | 
					import request from '@/utils/request'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 产量对标FTO
 | 
				
			||||||
 | 
					export function fTOReportByDateRangePage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/queryOBFTOReportByDateRange',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 产量对标FTO导出
 | 
				
			||||||
 | 
					export function fTOReportByDateRangeExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/queryOBFTOReportByDateRangeExcel',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 芯片产量对标
 | 
				
			||||||
 | 
					export function cPReportByDateRangePage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/queryCPReportByDateRange',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 芯片产量对标导出
 | 
				
			||||||
 | 
					export function cPReportByDateRangeExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/queryCPReportByDateRangeExport',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 标准组件产量对标
 | 
				
			||||||
 | 
					export function sCPReportByDateRangePage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/querySCPReportByDateRange',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 标准组件产量对标导出
 | 
				
			||||||
 | 
					export function sCPReportByDateRangeExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/querySCPReportByDateRangeExport',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 转化效率对标
 | 
				
			||||||
 | 
					export function componentconvertrateCPage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/componentconvertrate-compare/page',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 转化效率对标导出
 | 
				
			||||||
 | 
					export function componentconvertrateCExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/componentconvertrate-compare/export-excel',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 芯片良率对标
 | 
				
			||||||
 | 
					export function chipyieldRatePage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/chipyield-rate/page',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 芯片良率对标导出
 | 
				
			||||||
 | 
					export function chipyieldRateExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/chipyield-rate/export-excel',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 标准组件良率对标
 | 
				
			||||||
 | 
					export function componentyieldRatePage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/componentyield-rate/page',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 标准组件良率对标导出
 | 
				
			||||||
 | 
					export function componentyieldRateExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/componentyield-rate/export-excel',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// 稼动率对标
 | 
					// 稼动率对标
 | 
				
			||||||
export function utilzationComparePage(data) {
 | 
					export function utilzationComparePage(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
@@ -36,3 +145,75 @@ export function chipoeeCompareExport(data) {
 | 
				
			|||||||
    data: data
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 封装OEE对标
 | 
				
			||||||
 | 
					export function componentOEEPage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/component-oee/page',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 封装OEE对标导出
 | 
				
			||||||
 | 
					export function componentOEEExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/component-oee/export',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 芯片人均产量
 | 
				
			||||||
 | 
					export function chipAnnualAverageProductionPage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/chip-annual-average-production/page',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 芯片人均产量导出
 | 
				
			||||||
 | 
					export function chipAnnualAverageProductionExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/chip-annual-average-production/export',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 标准组件人均产量对标
 | 
				
			||||||
 | 
					export function componentAapPage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/componentAap',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 标准组件人均产量对标导出
 | 
				
			||||||
 | 
					export function componentAapExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/componentAap-export',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// 指标完成情况对标
 | 
				
			||||||
 | 
					export function targetCompletionPage(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/TargetCompletion',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					// 指标完成情况对标导出
 | 
				
			||||||
 | 
					export function targetCompletionExport(data) {
 | 
				
			||||||
 | 
					  return request({
 | 
				
			||||||
 | 
					    url: '/ip/prod-output/TargetCompletion-export',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-17 09:41:03
 | 
					 * @Date: 2024-06-17 09:41:03
 | 
				
			||||||
 * @LastEditTime: 2024-06-18 13:47:36
 | 
					 * @LastEditTime: 2024-06-20 15:39:21
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -9,11 +9,21 @@ import request from '@/utils/request'
 | 
				
			|||||||
export function getComprehensiveDataPage(data) {
 | 
					export function getComprehensiveDataPage(data) {
 | 
				
			||||||
  return request({
 | 
					  return request({
 | 
				
			||||||
    url: 'ip/comprehensive/data/get/comprehensive/data',
 | 
					    url: 'ip/comprehensive/data/get/comprehensive/data',
 | 
				
			||||||
    method: 'get',
 | 
					    method: 'post',
 | 
				
			||||||
    params: data
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function exportComprehensiveDataPage(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/comprehensive/data/export/comprehensive/data',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data,
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function getProduceTransData(data) {
 | 
					export function getProduceTransData(data) {
 | 
				
			||||||
   return request({
 | 
					   return request({
 | 
				
			||||||
    url: 'ip/prod-output/queryYCEReportByDateRange',
 | 
					    url: 'ip/prod-output/queryYCEReportByDateRange',
 | 
				
			||||||
@@ -21,3 +31,65 @@ export function getProduceTransData(data) {
 | 
				
			|||||||
    data: data
 | 
					    data: data
 | 
				
			||||||
  })
 | 
					  })
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function exportProduceTransData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/prod-output/queryYCEReportByDateRangeExcel',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data,
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getProduceSituationData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/production/situation/get/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function exportProduceSituationData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/production/situation/export/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					     data: data,
 | 
				
			||||||
 | 
					      responseType: 'blob',
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getProductionSituationMWData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/production/situation/power/get/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function exportProductionSituationMWData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/production/situation/power/export/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					     data: data,
 | 
				
			||||||
 | 
					      responseType: 'blob',
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function getProductionYieldSituationMWData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/product/yield/get/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export function exportProductionYieldSituationMWData(data) {
 | 
				
			||||||
 | 
					   return request({
 | 
				
			||||||
 | 
					    url: 'ip/product/yield/export/production/situation',
 | 
				
			||||||
 | 
					    method: 'post',
 | 
				
			||||||
 | 
					    data: data,
 | 
				
			||||||
 | 
					    responseType: 'blob',
 | 
				
			||||||
 | 
					  })
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								src/assets/icons/svg/darkHome.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/assets/icons/svg/darkHome.svg
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8"?>
 | 
				
			||||||
 | 
					<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
 | 
				
			||||||
 | 
					    <title>编组</title>
 | 
				
			||||||
 | 
					    <g id="01数字驾驶舱" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
 | 
				
			||||||
 | 
					        <g id="产量驾驶舱" transform="translate(-1438.000000, -12.000000)" fill="#FFFFFF" fill-rule="nonzero">
 | 
				
			||||||
 | 
					            <g id="编组-20" transform="translate(1438.000000, 8.000000)">
 | 
				
			||||||
 | 
					                <g id="编组" transform="translate(0.000000, 4.000000)">
 | 
				
			||||||
 | 
					                    <rect id="矩形" opacity="0" x="0" y="0" width="24" height="24"></rect>
 | 
				
			||||||
 | 
					                    <path d="M11.1710783,2.42919989 C11.7298936,2.09409047 12.4328291,2.12455473 12.9654367,2.52059014 L20.3218013,7.99000647 L20.4665209,8.10559268 C21.0744501,8.62656431 21.4302636,9.40344805 21.4302636,10.227099 L21.4302636,19.0470569 L21.4250327,19.2212289 C21.3382831,20.6611171 20.1833875,21.8011882 18.7715031,21.8011882 L5.2284969,21.8011882 L5.06035624,21.7957697 C3.67032883,21.7059084 2.56973638,20.5095861 2.56973638,19.0470569 L2.56973638,10.2273587 L2.57600507,10.0381789 C2.63012926,9.22282649 3.03207443,8.47038558 3.67819781,7.99000711 L11.034559,2.52059336 Z M12.0713092,3.55793652 C11.9772762,3.53774358 11.8769764,3.55793433 11.7954857,3.6185066 L4.43911542,9.0879271 L4.32641124,9.18150853 C4.04059293,9.44596068 3.87451485,9.82573182 3.87451485,10.2273587 L3.87451485,19.0470569 L3.880713,19.1821318 C3.94632222,19.8933667 4.52470053,20.4496068 5.2284969,20.4496068 L11.2507497,20.4487759 L11.3507364,20.3451977 L11.3512202,14.4627186 L11.3582338,14.3683764 C11.4044406,14.0603828 11.6734228,13.8227675 12,13.8227675 C12.3345637,13.8227675 12.6123182,14.0734451 12.6454705,14.3976012 L12.6489183,14.4681588 L12.6487364,20.3451881 L12.7487231,20.4487759 L18.7714898,20.4496068 L18.9018895,20.4431864 C19.5885066,20.3752237 20.1254851,19.7760987 20.1254851,19.0470569 L20.1254851,10.2273587 L20.1177907,10.0779557 C20.0769951,9.68325297 19.8759128,9.32208831 19.5608746,9.08791971 L12.2045243,3.61851399 L12.1402672,3.58065321 Z" id="形状结合" stroke="#FFFFFF" stroke-width="0.1"></path>
 | 
				
			||||||
 | 
					                </g>
 | 
				
			||||||
 | 
					            </g>
 | 
				
			||||||
 | 
					        </g>
 | 
				
			||||||
 | 
					    </g>
 | 
				
			||||||
 | 
					</svg>
 | 
				
			||||||
| 
		 After Width: | Height: | Size: 2.2 KiB  | 
@@ -1,11 +1,13 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-breadcrumb class="app-breadcrumb" separator="/">
 | 
					  <el-breadcrumb class="app-breadcrumb" separator="/">
 | 
				
			||||||
    <transition-group name="breadcrumb">
 | 
					    <transition-group name="breadcrumb">
 | 
				
			||||||
      <el-breadcrumb-item v-for="(item, index) in levelList" :key="item.path">
 | 
					      <el-breadcrumb-item v-for=" (item, index) in levelList" :key="item.path">
 | 
				
			||||||
        <span v-if="item.redirect === 'noRedirect' || index === levelList.length - 1" class="no-redirect">{{
 | 
					        <span :style="{ color: (changeColor == true ? 'rgba(255, 255, 255, 0.45)' :' rgba(0, 0, 0, .65)')}"
 | 
				
			||||||
        item.meta.title
 | 
					          v-if="item.redirect === 'noRedirect' || index === levelList.length - 1" class="no-redirect">{{
 | 
				
			||||||
      }}</span>
 | 
					          item.meta.title
 | 
				
			||||||
        <a v-else @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
 | 
					          }}</span>
 | 
				
			||||||
 | 
					        <a :style="{ color: (changeColor == true ? 'rgba(255, 255, 255, 0.45)' :' rgba(0, 0, 0, .45)')}" v-else
 | 
				
			||||||
 | 
					          @click.prevent="handleLink(item)">{{ item.meta.title }}</a>
 | 
				
			||||||
      </el-breadcrumb-item>
 | 
					      </el-breadcrumb-item>
 | 
				
			||||||
    </transition-group>
 | 
					    </transition-group>
 | 
				
			||||||
  </el-breadcrumb>
 | 
					  </el-breadcrumb>
 | 
				
			||||||
@@ -18,7 +20,29 @@ export default {
 | 
				
			|||||||
      levelList: null
 | 
					      levelList: null
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      // console.log(this.$route);
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
 | 
					    changeColor(val) {
 | 
				
			||||||
 | 
					      if (val == true) {
 | 
				
			||||||
 | 
					        let item = document.getElementsByClassName('el-breadcrumb__separator')
 | 
				
			||||||
 | 
					        // let item  =document.getElementsByClassName('')
 | 
				
			||||||
 | 
					        item[0].style.color = rgba(255, 255, 255, 0.45)
 | 
				
			||||||
 | 
					        item[1].style.color = rgba(255, 255, 255, 0.45)
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        let item = document.getElementsByClassName('el-breadcrumb__separator')
 | 
				
			||||||
 | 
					        item[0].style.color = ''
 | 
				
			||||||
 | 
					          item[1].style.color = ''
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    $route(route) {
 | 
					    $route(route) {
 | 
				
			||||||
      // if you go to the redirect page, do not update the breadcrumbs
 | 
					      // if you go to the redirect page, do not update the breadcrumbs
 | 
				
			||||||
      if (route.path.startsWith('/redirect/')) {
 | 
					      if (route.path.startsWith('/redirect/')) {
 | 
				
			||||||
@@ -70,13 +94,20 @@ export default {
 | 
				
			|||||||
  margin-left: 8px;
 | 
					  margin-left: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .no-redirect {
 | 
					  .no-redirect {
 | 
				
			||||||
    color: rgba(0, 0, 0, 0.65);
 | 
					    color: rgba(0, 0, 0, .45);
 | 
				
			||||||
    cursor: text;
 | 
					    cursor: text;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 | 
				
			||||||
.app-breadcrumb .el-breadcrumb__inner a,
 | 
					.app-breadcrumb .el-breadcrumb__inner a,
 | 
				
			||||||
.el-breadcrumb__inner.is-link {
 | 
					.el-breadcrumb__inner.is-link {
 | 
				
			||||||
  color: rgba(0, 0, 0, 0.45);
 | 
					  color:rgba(0, 0, 0, 0.65)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 | 
					<!-- <style lang="scss">
 | 
				
			||||||
 | 
					.changeColor {
 | 
				
			||||||
 | 
					  --theme-color: rgba(255, 255, 255, 0.45);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.el-breadcrumb__separator {
 | 
				
			||||||
 | 
					  color:var(--theme-color);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style> -->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,14 +1,16 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-03 15:38:31
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-11 13:56:19
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div style="padding: 0 15px;" @click="toggleClick">
 | 
					  <div style="padding: 0 15px;" @click="toggleClick">
 | 
				
			||||||
    <svg
 | 
					    <svg :class="{'is-active':isActive}" class="hamburger" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
      :class="{'is-active':isActive}"
 | 
					      width="64" height="64" :fill="changeColor === true ? 'rgba(255, 255, 255, 1)' : '' ">
 | 
				
			||||||
      class="hamburger"
 | 
					      <path
 | 
				
			||||||
      viewBox="0 0 1024 1024"
 | 
					        d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
 | 
				
			||||||
      xmlns="http://www.w3.org/2000/svg"
 | 
					 | 
				
			||||||
      width="64"
 | 
					 | 
				
			||||||
      height="64"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM142.4 642.1L298.7 519a8.84 8.84 0 0 0 0-13.9L142.4 381.9c-5.8-4.6-14.4-.5-14.4 6.9v246.3a8.9 8.9 0 0 0 14.4 7z" />
 | 
					 | 
				
			||||||
    </svg>
 | 
					    </svg>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -22,6 +24,15 @@ export default {
 | 
				
			|||||||
      default: false
 | 
					      default: false
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    toggleClick() {
 | 
					    toggleClick() {
 | 
				
			||||||
      this.$emit('toggleClick')
 | 
					      this.$emit('toggleClick')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,6 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="navbar">
 | 
					  <div ref="navbar" class="navbar"
 | 
				
			||||||
 | 
					    :style="changeColor ? 'background: rgba(0, 21, 41, 1);boxShadow:0px 1px 8px 0px rgba(0,131,255,0.35)' : ''">
 | 
				
			||||||
    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
 | 
					    <hamburger id="hamburger-container" :is-active="sidebar.opened" class="hamburger-container"
 | 
				
			||||||
      @toggleClick="toggleSideBar" />
 | 
					      @toggleClick="toggleSideBar" />
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -41,6 +42,13 @@ export default {
 | 
				
			|||||||
      'nickname',
 | 
					      'nickname',
 | 
				
			||||||
      'device'
 | 
					      'device'
 | 
				
			||||||
    ]),
 | 
					    ]),
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    setting: {
 | 
					    setting: {
 | 
				
			||||||
      get() {
 | 
					      get() {
 | 
				
			||||||
        return this.$store.state.settings.showSettings
 | 
					        return this.$store.state.settings.showSettings
 | 
				
			||||||
@@ -58,6 +66,23 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    // changeColor: {
 | 
				
			||||||
 | 
					    //   handler(val){
 | 
				
			||||||
 | 
					    //     if (val == true) {
 | 
				
			||||||
 | 
					    //       let svg = document.getElementsByClassName('hamburger')
 | 
				
			||||||
 | 
					    //       console.log('svg', svg)
 | 
				
			||||||
 | 
					    //       svg[0].style.color = 'rgba(255, 255, 255, 1)'
 | 
				
			||||||
 | 
					    //       svg[0].setAttribute('fill', 'rgba(255, 255, 255, 1)')
 | 
				
			||||||
 | 
					    //     } else {
 | 
				
			||||||
 | 
					    //       let svg = document.getElementsByClassName('hamburger')
 | 
				
			||||||
 | 
					    //       console.log('svg', svg);
 | 
				
			||||||
 | 
					    //       svg[0].setAttribute('fill', '')
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   },
 | 
				
			||||||
 | 
					    //   immediate: true, //立即执行
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    toggleSideBar() {
 | 
					    toggleSideBar() {
 | 
				
			||||||
      this.$store.dispatch('app/toggleSideBar')
 | 
					      this.$store.dispatch('app/toggleSideBar')
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,25 +1,31 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
 | 
					  <div class="right-msg" :style="blackTitle ? 'color: #000' : 'color: #fff'">
 | 
				
			||||||
    <div class="home-icon" v-if='blackTitle'>
 | 
					    <div class="home-icon" v-if='blackTitle'>
 | 
				
			||||||
      <svg-icon icon-class="home" style="font-size: 24px; cursor: pointer;" @click="toHome" />
 | 
					      <svg-icon :icon-class="changeColor === true ? 'darkHome' : 'home'"
 | 
				
			||||||
 | 
					        style="font-size: 24px; cursor: pointer;color: aqua;" @click="toHome" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="time-msg">
 | 
					    <div class="time-msg">
 | 
				
			||||||
      <div class="line1">{{ timeZone }}    {{ topTime }}</div>
 | 
					      <div class="line1" :style="changeColor === true ? 'color:rgba(255, 255, 255, 1)' : ''">{{ timeZone
 | 
				
			||||||
      <div class="line2">{{ topDate }}</div>
 | 
					        }}    {{ topTime }}</div>
 | 
				
			||||||
 | 
					      <div :style="changeColor === true ? 'color:rgba(255, 255, 255, .65)' : ''" class="line2">{{ topDate }}</div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="base-msg">
 | 
					    <div class="base-msg">
 | 
				
			||||||
      <div class="avatar">
 | 
					      <div class="avatar">
 | 
				
			||||||
        <el-dropdown>
 | 
					        <el-dropdown>
 | 
				
			||||||
          <img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
 | 
					          <img :src="require(`../../assets/images/choicepart/avatar.png`)" alt="" width="32" height="32" />
 | 
				
			||||||
          <el-dropdown-menu slot="dropdown">
 | 
					          <el-dropdown-menu slot="dropdown">
 | 
				
			||||||
            <el-dropdown-item><svg-icon icon-class="helpbtn" />帮助文档</el-dropdown-item>
 | 
					            <el-dropdown-item>
 | 
				
			||||||
            <el-dropdown-item @click.native="logout"><svg-icon icon-class="exitbtn" />退出登录</el-dropdown-item>
 | 
					              <svg-icon icon-class="helpbtn" />帮助文档
 | 
				
			||||||
 | 
					            </el-dropdown-item>
 | 
				
			||||||
 | 
					            <el-dropdown-item @click.native="logout">
 | 
				
			||||||
 | 
					              <svg-icon icon-class="exitbtn" />退出登录
 | 
				
			||||||
 | 
					            </el-dropdown-item>
 | 
				
			||||||
          </el-dropdown-menu>
 | 
					          </el-dropdown-menu>
 | 
				
			||||||
        </el-dropdown>
 | 
					        </el-dropdown>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div class="use-msg">
 | 
					      <div class="use-msg">
 | 
				
			||||||
        <div class="line1">{{ nickname }}</div>
 | 
					        <div :style="changeColor === true ? 'color:rgba(255, 255, 255, 1)' : ''" class="line1">{{ nickname }}</div>
 | 
				
			||||||
        <div class="line2">{{ dept }}</div>
 | 
					        <div :style="changeColor === true ? 'color:rgba(255, 255, 255, .65)' : ''" class="line2">{{ dept }}</div>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -48,6 +54,15 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
    // this.getUserMsg()
 | 
					    // this.getUserMsg()
 | 
				
			||||||
    this.getTime()
 | 
					    this.getTime()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,10 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-03 15:38:31
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-04 10:44:35
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
 | 
					  <el-scrollbar ref="scrollContainer" :vertical="false" class="scroll-container" @wheel.native.prevent="handleScroll">
 | 
				
			||||||
    <slot />
 | 
					    <slot />
 | 
				
			||||||
@@ -17,7 +24,9 @@ export default {
 | 
				
			|||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    scrollWrapper() {
 | 
					    scrollWrapper() {
 | 
				
			||||||
      return this.$refs.scrollContainer.$refs.wrap
 | 
					      return this.$refs.scrollContainer.$refs.wrap
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)
 | 
					    this.scrollWrapper.addEventListener('scroll', this.emitScroll, true)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,5 +1,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div id="tags-view-container" class="tags-view-container">
 | 
					  <div ref="tagsViewContainer"
 | 
				
			||||||
 | 
					    :style="changeColor === true ? 'background:rgba(0, 21, 41, 1);borderTop:0px solid #d8dce5' : ''" id="tags-view-container"
 | 
				
			||||||
 | 
					    class="tags-view-container">
 | 
				
			||||||
    <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
 | 
					    <scroll-pane ref="scrollPane" class="tags-view-wrapper" @scroll="handleScroll">
 | 
				
			||||||
      <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''"
 | 
					      <router-link v-for="tag in visitedViews" ref="tag" :key="tag.path" :class="isActive(tag) ? 'active' : ''"
 | 
				
			||||||
        :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item"
 | 
					        :to="{ path: tag.path, query: tag.query, fullPath: tag.fullPath }" tag="span" class="tags-view-item"
 | 
				
			||||||
@@ -36,6 +38,13 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    visitedViews() {
 | 
					    visitedViews() {
 | 
				
			||||||
      return this.$store.state.tagsView.visitedViews
 | 
					      return this.$store.state.tagsView.visitedViews
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -44,9 +53,31 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    theme() {
 | 
					    theme() {
 | 
				
			||||||
      return this.$store.state.settings.theme;
 | 
					      return this.$store.state.settings.theme;
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  watch: {
 | 
				
			||||||
 | 
					    changeColor(val) {
 | 
				
			||||||
 | 
					      if (val == true) {
 | 
				
			||||||
 | 
					        // console.log('this.$refs.tagsViewContainer', this.$refs.tagsViewContainer);
 | 
				
			||||||
 | 
					        // this.$refs.tagsViewContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
 | 
				
			||||||
 | 
					        // this.$refs.tagsViewContainer.style.borderTop = '0px solid #d8dce5'
 | 
				
			||||||
 | 
					        var tag = document.getElementsByClassName("tags-view-item")
 | 
				
			||||||
 | 
					        console.log('tag', tag)
 | 
				
			||||||
 | 
					        for (let i in tag) {
 | 
				
			||||||
 | 
					          tag[i].classList.add("changeColor")
 | 
				
			||||||
 | 
					          // tag[i].classList.remove("default")
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // console.log('this.$refs.scrollContainer', this.$refs.tag);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        // this.$refs.tagsViewContainer.style.backgroundColor = ''
 | 
				
			||||||
 | 
					        // this.$refs.tagsViewContainer.style.borderTop = '1px solid #d8dce5'
 | 
				
			||||||
 | 
					        var tag = document.getElementsByClassName("tags-view-item")
 | 
				
			||||||
 | 
					        for (let i in tag) {
 | 
				
			||||||
 | 
					          tag[i].classList.remove("changeColor")
 | 
				
			||||||
 | 
					          // tag[i].classList.add("default")
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    $route() {
 | 
					    $route() {
 | 
				
			||||||
      this.addTags()
 | 
					      this.addTags()
 | 
				
			||||||
      this.moveToCurrentTag()
 | 
					      this.moveToCurrentTag()
 | 
				
			||||||
@@ -60,6 +91,7 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    console.log(this.$route, this.changeColor);
 | 
				
			||||||
    this.initTags()
 | 
					    this.initTags()
 | 
				
			||||||
    this.addTags()
 | 
					    this.addTags()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -68,11 +100,23 @@ export default {
 | 
				
			|||||||
      return route.path === this.$route.path
 | 
					      return route.path === this.$route.path
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    activeStyle(tag) {
 | 
					    activeStyle(tag) {
 | 
				
			||||||
      if (!this.isActive(tag)) return {};
 | 
					      if (this.changeColor) {
 | 
				
			||||||
      return {
 | 
					        if (!this.isActive(tag)) return {
 | 
				
			||||||
        "background-color": this.theme,
 | 
					          "background-color": 'rgba(0, 59, 115, 1)',
 | 
				
			||||||
        "border-color": this.theme
 | 
					          "border-color": 'rgba(0, 59, 115, 1)',
 | 
				
			||||||
      };
 | 
					          "color": 'rgba(255, 255, 255, 1)'
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					          "background-color": this.theme,
 | 
				
			||||||
 | 
					          "border-color": this.theme
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        if (!this.isActive(tag)) return {};
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					          "background-color": this.theme,
 | 
				
			||||||
 | 
					          "border-color": this.theme
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    isAffix(tag) {
 | 
					    isAffix(tag) {
 | 
				
			||||||
      return tag.meta && tag.meta.affix
 | 
					      return tag.meta && tag.meta.affix
 | 
				
			||||||
@@ -230,6 +274,14 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					// :root{
 | 
				
			||||||
 | 
					//   --theme-color: rgba(0, 0, 0, 0.45);
 | 
				
			||||||
 | 
					//   --theme-background: #f4f4f4ff;
 | 
				
			||||||
 | 
					// }
 | 
				
			||||||
 | 
					.changeColor{
 | 
				
			||||||
 | 
					  --theme-background: rgba(0, 59, 115, 1);
 | 
				
			||||||
 | 
					  --theme-color: rgba(255, 255, 255, 1);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.tags-view-container {
 | 
					.tags-view-container {
 | 
				
			||||||
  height: 42px;
 | 
					  height: 42px;
 | 
				
			||||||
  width: 100%;
 | 
					  width: 100%;
 | 
				
			||||||
@@ -245,8 +297,8 @@ export default {
 | 
				
			|||||||
      cursor: pointer;
 | 
					      cursor: pointer;
 | 
				
			||||||
      height: 28px;
 | 
					      height: 28px;
 | 
				
			||||||
      line-height: 28px;
 | 
					      line-height: 28px;
 | 
				
			||||||
      color: rgba(0, 0, 0, 0.45);
 | 
					      color: var(--theme-color,rgba(0, 0, 0, 0.45));
 | 
				
			||||||
      background: #F4F4F4FF;
 | 
					      background:var(--theme-background,#f4f4f4ff);
 | 
				
			||||||
      padding: 0 8px 0 12px;
 | 
					      padding: 0 8px 0 12px;
 | 
				
			||||||
      font-size: 14px;
 | 
					      font-size: 14px;
 | 
				
			||||||
      letter-spacing: 1px;
 | 
					      letter-spacing: 1px;
 | 
				
			||||||
@@ -331,7 +383,7 @@ export default {
 | 
				
			|||||||
      .el-icon-close {
 | 
					      .el-icon-close {
 | 
				
			||||||
        &:hover {
 | 
					        &:hover {
 | 
				
			||||||
          background-color: #fff;
 | 
					          background-color: #fff;
 | 
				
			||||||
          color: #409eff;
 | 
					          color: rgba(62, 142, 247, 1);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,8 @@
 | 
				
			|||||||
  <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
 | 
					  <div :class="classObj" class="app-wrapper" :style="{ '--current-color': theme }">
 | 
				
			||||||
    <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
 | 
					    <div v-if="device === 'mobile' && sidebar.opened" class="drawer-bg" @click="handleClickOutside" />
 | 
				
			||||||
    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
 | 
					    <sidebar v-if="!sidebar.hide" class="sidebar-container" />
 | 
				
			||||||
    <div :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
 | 
					    <div :style="changeColor ? 'background: rgba(0, 21, 41, 1)' : ''" ref="mainContainer"
 | 
				
			||||||
 | 
					      :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }" class="main-container">
 | 
				
			||||||
      <div :class="{ 'fixed-header': fixedHeader }">
 | 
					      <div :class="{ 'fixed-header': fixedHeader }">
 | 
				
			||||||
        <navbar />
 | 
					        <navbar />
 | 
				
			||||||
        <tags-view v-if="needTagsView" />
 | 
					        <tags-view v-if="needTagsView" />
 | 
				
			||||||
@@ -39,6 +40,13 @@ export default {
 | 
				
			|||||||
      needTagsView: state => state.settings.tagsView,
 | 
					      needTagsView: state => state.settings.tagsView,
 | 
				
			||||||
      fixedHeader: state => state.settings.fixedHeader
 | 
					      fixedHeader: state => state.settings.fixedHeader
 | 
				
			||||||
    }),
 | 
					    }),
 | 
				
			||||||
 | 
					    changeColor() {
 | 
				
			||||||
 | 
					      if (this.$route.path == '/copilot/efficiency-container' || this.$route.path == '/copilot/main' || this.$route.path == '/factoryData/hdIndex' || this.$route.path === '/factoryData/factory-data') {
 | 
				
			||||||
 | 
					        return true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        return false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    classObj() {
 | 
					    classObj() {
 | 
				
			||||||
      return {
 | 
					      return {
 | 
				
			||||||
        hideSidebar: !this.sidebar.opened,
 | 
					        hideSidebar: !this.sidebar.opened,
 | 
				
			||||||
@@ -51,6 +59,16 @@ export default {
 | 
				
			|||||||
      return variables;
 | 
					      return variables;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    // changeColor(val) {
 | 
				
			||||||
 | 
					    //   if (val == true) {
 | 
				
			||||||
 | 
					    //     // console.log('this.$refs.mainContainer', this.$refs.mainContainer);
 | 
				
			||||||
 | 
					    //     this.$refs.mainContainer.style.backgroundColor = 'rgba(0, 21, 41, 1)'
 | 
				
			||||||
 | 
					    //   } else {
 | 
				
			||||||
 | 
					    //     this.$refs.mainContainer.style.backgroundColor = ''
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    handleClickOutside() {
 | 
					    handleClickOutside() {
 | 
				
			||||||
      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
 | 
					      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -92,7 +92,7 @@ const actions = {
 | 
				
			|||||||
  /** 初始化首页数据 */
 | 
					  /** 初始化首页数据 */
 | 
				
			||||||
  async initHome({ commit }) {
 | 
					  async initHome({ commit }) {
 | 
				
			||||||
    const dataArr = await getHomeInfo();
 | 
					    const dataArr = await getHomeInfo();
 | 
				
			||||||
    console.log('dataArr', dataArr);
 | 
					    // console.log('dataArr', dataArr);
 | 
				
			||||||
      let preData = dataArr.previousProdOutputOutDO
 | 
					      let preData = dataArr.previousProdOutputOutDO
 | 
				
			||||||
      let preFtoData = dataArr.previousProdOutputFtoDO
 | 
					      let preFtoData = dataArr.previousProdOutputFtoDO
 | 
				
			||||||
    // const targetArr = await getHomeInfo();
 | 
					    // const targetArr = await getHomeInfo();
 | 
				
			||||||
@@ -127,7 +127,7 @@ const actions = {
 | 
				
			|||||||
    //   const payload = handler(factoryData)
 | 
					    //   const payload = handler(factoryData)
 | 
				
			||||||
    //   commit("SET_COPILOT_INFO", { type, payload });
 | 
					    //   commit("SET_COPILOT_INFO", { type, payload });
 | 
				
			||||||
    // } else {
 | 
					    // } else {
 | 
				
			||||||
      console.log('factoryList',factoryList)
 | 
					      // console.log('factoryList',factoryList)
 | 
				
			||||||
      let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
 | 
					      let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
 | 
				
			||||||
      let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
 | 
					      let preData = factoryList.previousProdOutputOutDO ? factoryList.previousProdOutputOutDO : factoryList.previousProdOutputRateDO
 | 
				
			||||||
      let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
 | 
					      let preFtoData = factoryList.previousProdOutputFtoDO ? factoryList.previousProdOutputFtoDO : []
 | 
				
			||||||
@@ -289,7 +289,7 @@ function splitCurrentAndPreviousB(factoryListResponse) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
 | 
					function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
 | 
				
			||||||
  console.log('工厂',targetListResponse);
 | 
					  // console.log('工厂',preData);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // 初始数据
 | 
					  // 初始数据
 | 
				
			||||||
  const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
 | 
					  const { chipOeeRate, transformRate, chipRate, stdRate } = initA();
 | 
				
			||||||
@@ -343,17 +343,24 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
 | 
				
			|||||||
  //     componentYieldRate: 0.73,
 | 
					  //     componentYieldRate: 0.73,
 | 
				
			||||||
  //   },
 | 
					  //   },
 | 
				
			||||||
  // ];
 | 
					  // ];
 | 
				
			||||||
  if (preData && preData[0] != null) {
 | 
					  if (preData) {
 | 
				
			||||||
    for (const factory of preData) {
 | 
					    for (const factory of preData) {
 | 
				
			||||||
      const fId = getPreFactoryId(factory);
 | 
					      const fId = getPreFactoryId(factory)
 | 
				
			||||||
 | 
					      // console.log('factory',factory.previousYearOee);
 | 
				
			||||||
        //  chipInvest.previous[fId] = factory.previousYearInputNumber;
 | 
					        //  chipInvest.previous[fId] = factory.previousYearInputNumber;
 | 
				
			||||||
      // chipOeeRate.current[fId] = factory.oee;
 | 
					      // chipOeeRate.current[fId] = factory.oee;
 | 
				
			||||||
      chipOeeRate.previous[fId] = factory.previousYearOee;
 | 
					      if (factory.previousGlassType === 0) {
 | 
				
			||||||
 | 
					         chipOeeRate.previous[fId] = factory.previousYearOee;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      // chipOeeRate.previous[fId] = factory.previousYearOee;
 | 
				
			||||||
      // 转化效率
 | 
					      // 转化效率
 | 
				
			||||||
      transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
 | 
					        if (factory.previousGlassType === 1) {
 | 
				
			||||||
 | 
					        transformRate.previous[fId] = factory.previousYearComponentConversionEfficiency;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      // transformRate.previous[fId] =factory.previousYearComponentConversionEfficiency ;
 | 
				
			||||||
      // 芯片良率 与 标准组件良率
 | 
					      // 芯片良率 与 标准组件良率
 | 
				
			||||||
      if (![0, 1].includes(factory.glassType)) continue;
 | 
					      if (![0, 1].includes(factory.previousGlassType)) continue;
 | 
				
			||||||
      const _t = [chipRate, stdRate][factory.glassType]
 | 
					      const _t = [chipRate, stdRate][factory.previousGlassType]
 | 
				
			||||||
      // _t.current[fId] = factory.yieldRate ;
 | 
					      // _t.current[fId] = factory.yieldRate ;
 | 
				
			||||||
      _t.previous[fId] = factory.previousYearYieldRate ;
 | 
					      _t.previous[fId] = factory.previousYearYieldRate ;
 | 
				
			||||||
      // }
 | 
					      // }
 | 
				
			||||||
@@ -393,6 +400,7 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
 | 
				
			|||||||
      _t.current[fId] = factory.yieldRate ;
 | 
					      _t.current[fId] = factory.yieldRate ;
 | 
				
			||||||
      // _t.previous[fId] = factory.previousYearYieldRate ;
 | 
					      // _t.previous[fId] = factory.previousYearYieldRate ;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					    // console.log('chipOeeRate',stdRate);
 | 
				
			||||||
    // console.log('chipOeeRate',chipOeeRate);
 | 
					    // console.log('chipOeeRate',chipOeeRate);
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      chipOeeRate,
 | 
					      chipOeeRate,
 | 
				
			||||||
@@ -404,12 +412,12 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse, prodO
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
 | 
					function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes,preData,preFtoData) {
 | 
				
			||||||
  console.log('prodOutputFtoListRes',preFtoData);
 | 
					  // console.log('prodOutputFtoListRes',preFtoData);
 | 
				
			||||||
  // 初始数据
 | 
					  // 初始数据
 | 
				
			||||||
  const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init()
 | 
					  const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init()
 | 
				
			||||||
   if (prodOutputFtoListRes.length !== 0 ) {
 | 
					   if (prodOutputFtoListRes.length !== 0 ) {
 | 
				
			||||||
    for (const factory of prodOutputFtoListRes) {
 | 
					    for (const factory of prodOutputFtoListRes) {
 | 
				
			||||||
      console.log(factory);
 | 
					      // console.log(factory);
 | 
				
			||||||
      const fId = getFactoryId(factory);
 | 
					      const fId = getFactoryId(factory);
 | 
				
			||||||
      // const preFId = getPreFactoryId(factory);
 | 
					      // const preFId = getPreFactoryId(factory);
 | 
				
			||||||
      // if (fId) {
 | 
					      // if (fId) {
 | 
				
			||||||
@@ -422,7 +430,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
 | 
				
			|||||||
   }
 | 
					   }
 | 
				
			||||||
   if (preFtoData) {
 | 
					   if (preFtoData) {
 | 
				
			||||||
    for (const factory of preFtoData) {
 | 
					    for (const factory of preFtoData) {
 | 
				
			||||||
      console.log(factory);
 | 
					      // console.log(factory);
 | 
				
			||||||
      const fId = getPreFactoryId(factory);
 | 
					      const fId = getPreFactoryId(factory);
 | 
				
			||||||
      // const preFId = getPreFactoryId(factory);
 | 
					      // const preFId = getPreFactoryId(factory);
 | 
				
			||||||
      // if (fId) {
 | 
					      // if (fId) {
 | 
				
			||||||
@@ -455,7 +463,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
 | 
				
			|||||||
  if (factoryListResponse) {
 | 
					  if (factoryListResponse) {
 | 
				
			||||||
    for (const factory of factoryListResponse) {
 | 
					    for (const factory of factoryListResponse) {
 | 
				
			||||||
      const fId = getFactoryId(factory);
 | 
					      const fId = getFactoryId(factory);
 | 
				
			||||||
      console.log('factory.inputNumber', factory, fId);
 | 
					      // console.log('factory.inputNumber', factory, fId);
 | 
				
			||||||
      if (factory.glassType === 0) {
 | 
					      if (factory.glassType === 0) {
 | 
				
			||||||
      chipInvest.current[fId] = factory.inputNumber
 | 
					      chipInvest.current[fId] = factory.inputNumber
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@@ -476,7 +484,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOu
 | 
				
			|||||||
      const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType];
 | 
					      const _t = [chipOutput, stdOutput, bipvOutput][factory.glassType];
 | 
				
			||||||
        _t.current[fId] = factory.outputNumber;
 | 
					        _t.current[fId] = factory.outputNumber;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    console.log('chipInvest',ftoInvest);
 | 
					    // console.log('chipInvest',ftoInvest);
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      chipInvest,
 | 
					      chipInvest,
 | 
				
			||||||
      // ftoInvest,
 | 
					      // ftoInvest,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -143,6 +143,8 @@ export const tyjxfactoryList =[
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// 暂时只有瑞昌邯郸数据
 | 
					// 暂时只有瑞昌邯郸数据
 | 
				
			||||||
export const factoryList =['瑞昌中建材光电材料有限公司', '邯郸中建材光电材料有限公司']
 | 
					export const factoryList =['瑞昌中建材光电材料有限公司', '邯郸中建材光电材料有限公司']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const factoryListabbr =['瑞昌', '邯郸']
 | 
				
			||||||
export const factoryArray =[
 | 
					export const factoryArray =[
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    name: '瑞昌中建材光电材料有限公司',
 | 
					    name: '瑞昌中建材光电材料有限公司',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,11 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-10 15:17:28
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-19 15:18:00
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!--
 | 
					<!--
 | 
				
			||||||
    filename: ChartContainer.vue
 | 
					    filename: ChartContainer.vue
 | 
				
			||||||
    author: liubin
 | 
					    author: liubin
 | 
				
			||||||
@@ -43,7 +51,7 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
::-webkit-scrollbar {
 | 
					::-webkit-scrollbar {
 | 
				
			||||||
  width: 8px;
 | 
					  width: 80%;
 | 
				
			||||||
  height: 8px;
 | 
					  height: 8px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
  <chart-container class="bar-chart-base">
 | 
					  <chart-container class="bar-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span v-for="item in legend" :key="item.label" class="legend-item"
 | 
					      <span v-for="item in legend" :key="item.label" class="legend-item"
 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div ref="chart" style="height:94%;width:100%"></div>
 | 
					    <div ref="chart" style="height:94%;width:100%"></div>
 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
@@ -62,7 +62,36 @@ export default {
 | 
				
			|||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(255,255,255,0.85);display:inline-block;margin-bottom:8px;'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align: right;'>${params[i].value ? params[i].value : 0}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -73,24 +102,24 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/片",
 | 
					          name: "单位/片",
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            align: "right",
 | 
					            align: "right",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -108,7 +137,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[0].name,
 | 
					            name: "", // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -143,7 +172,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[1].name,
 | 
					            name: "", // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -188,19 +217,19 @@ export default {
 | 
				
			|||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    isFullscreen(val) {
 | 
					    isFullscreen(val) {
 | 
				
			||||||
      this.actualOptions.series.map((item) => {
 | 
					      this.options.series.map((item) => {
 | 
				
			||||||
        item.barWidth = val ? 18 : 12;
 | 
					        item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initChart(this.actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.initChart(this.actualOptions);
 | 
					      // this.initChart(this.actualOptions);
 | 
				
			||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -209,14 +238,14 @@ export default {
 | 
				
			|||||||
        this.initChart(this.options);
 | 
					        this.initChart(this.options);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
					      // const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
				
			||||||
      console.log('actualOptions', this.options)
 | 
					      // console.log('actualOptions', this.options)
 | 
				
			||||||
      actualOptions.series[0].data = val[0].data;
 | 
					      this.options.series[0].data = val[0].data;
 | 
				
			||||||
      actualOptions.series[0].name = val[0].name;
 | 
					      this.options.series[0].name = val[0].name;
 | 
				
			||||||
      actualOptions.series[1].data = val?.[1]?.data || [];
 | 
					      this.options.series[1].data = val?.[1]?.data || [];
 | 
				
			||||||
      actualOptions.series[1].name = val?.[1]?.name || "";
 | 
					      this.options.series[1].name = val?.[1]?.name || "";
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      // this.actualOptions = actualOptions;
 | 
				
			||||||
      this.initChart(actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
@@ -225,7 +254,7 @@ export default {
 | 
				
			|||||||
        this.isFullscreen = screenfull.isFullscreen;
 | 
					        this.isFullscreen = screenfull.isFullscreen;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.actualOptions = this.options
 | 
					    // this.actualOptions = this.options
 | 
				
			||||||
    this.canvasReset();
 | 
					    this.canvasReset();
 | 
				
			||||||
    window.addEventListener("resize", this.canvasReset);
 | 
					    window.addEventListener("resize", this.canvasReset);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -249,7 +278,7 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(this.$refs.chart);
 | 
					      this.chart = echarts.init(this.$refs.chart);
 | 
				
			||||||
      this.chart.setOption(this.actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,9 +8,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="copilot-container">
 | 
					  <div class="copilot-container">
 | 
				
			||||||
    <!-- refresh btn  -->
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
    <button
 | 
					    <button v-if="0" style="
 | 
				
			||||||
      v-if="0"
 | 
					 | 
				
			||||||
      style="
 | 
					 | 
				
			||||||
        appearance: none;
 | 
					        appearance: none;
 | 
				
			||||||
        outline: none;
 | 
					        outline: none;
 | 
				
			||||||
        border: none;
 | 
					        border: none;
 | 
				
			||||||
@@ -20,22 +18,11 @@
 | 
				
			|||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        top: 8px;
 | 
					        top: 8px;
 | 
				
			||||||
        right: 8px;
 | 
					        right: 8px;
 | 
				
			||||||
      "
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
      @click="$emit('refresh')"
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
    >
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
      <svg
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
        xmlns="http://www.w3.org/2000/svg"
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
        fill="none"
 | 
					 | 
				
			||||||
        viewBox="0 0 24 24"
 | 
					 | 
				
			||||||
        stroke-width="1.5"
 | 
					 | 
				
			||||||
        stroke="currentColor"
 | 
					 | 
				
			||||||
        style="width: 24px; height: 24px"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <path
 | 
					 | 
				
			||||||
          stroke-linecap="round"
 | 
					 | 
				
			||||||
          stroke-linejoin="round"
 | 
					 | 
				
			||||||
          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </svg>
 | 
					      </svg>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
    <!-- decoration  -->
 | 
					    <!-- decoration  -->
 | 
				
			||||||
@@ -44,19 +31,13 @@
 | 
				
			|||||||
    <div v-if="side == 'left'" class="corner bl"></div>
 | 
					    <div v-if="side == 'left'" class="corner bl"></div>
 | 
				
			||||||
    <div v-if="side == 'right'" class="corner br"></div>
 | 
					    <div v-if="side == 'right'" class="corner br"></div>
 | 
				
			||||||
    <!-- content  -->
 | 
					    <!-- content  -->
 | 
				
			||||||
    <div
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
      class="container-head"
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
      class="container-body"
 | 
					 | 
				
			||||||
      :class="[
 | 
					 | 
				
			||||||
        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
      ]"
 | 
					      ]">
 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <slot />
 | 
					      <slot />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -92,6 +73,7 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -141,7 +123,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -161,8 +143,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-28 13:42:51
 | 
					 * @Date: 2024-04-28 13:42:51
 | 
				
			||||||
 * @LastEditTime: 2024-05-07 16:54:54
 | 
					 * @LastEditTime: 2024-07-09 16:55:58
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -61,8 +61,8 @@ export default {
 | 
				
			|||||||
.container-icon {
 | 
					.container-icon {
 | 
				
			||||||
  //   width: 32px;
 | 
					  //   width: 32px;
 | 
				
			||||||
  //   height: 32px;
 | 
					  //   height: 32px;
 | 
				
			||||||
  width: 1.701vw;
 | 
					  width: 1.4vw;
 | 
				
			||||||
  height: 1.701vw;
 | 
					  height: 1.4vw;
 | 
				
			||||||
  background: #ccc2;
 | 
					  background: #ccc2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,7 @@
 | 
				
			|||||||
    <div class="page-title">{{ companyName }}</div>
 | 
					    <div class="page-title">{{ companyName }}</div>
 | 
				
			||||||
    <section class="menu2">
 | 
					    <section class="menu2">
 | 
				
			||||||
      <div class="btn-group">
 | 
					      <div class="btn-group">
 | 
				
			||||||
        <el-tooltip class="item" effect="dark" content="导出" placement="top">
 | 
					        <el-tooltip v-if="showPeriod" class="item" effect="dark" content="导出" placement="top">
 | 
				
			||||||
          <button type="button" class="export-btn" @click="handleExport" />
 | 
					          <button type="button" class="export-btn" @click="handleExport" />
 | 
				
			||||||
        </el-tooltip>
 | 
					        </el-tooltip>
 | 
				
			||||||
        <el-tooltip class="item" effect="dark" :content="isFullscreen  === false ? '退出全屏' : '全屏'" placement="top">
 | 
					        <el-tooltip class="item" effect="dark" :content="isFullscreen  === false ? '退出全屏' : '全屏'" placement="top">
 | 
				
			||||||
@@ -48,10 +48,20 @@ export default {
 | 
				
			|||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    period(val) {
 | 
				
			||||||
 | 
					      if (val != 1) {
 | 
				
			||||||
 | 
					        this.showPeriod = true
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.showPeriod = false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      isFullscreen: false,
 | 
					      isFullscreen: false,
 | 
				
			||||||
      content:'全屏',
 | 
					      content: '全屏',
 | 
				
			||||||
 | 
					      showPeriod:false,
 | 
				
			||||||
      dataList: [
 | 
					      dataList: [
 | 
				
			||||||
        { id: 1, name: "日" },
 | 
					        { id: 1, name: "日" },
 | 
				
			||||||
        { id: 2, name: "周" },
 | 
					        { id: 2, name: "周" },
 | 
				
			||||||
@@ -63,14 +73,20 @@ export default {
 | 
				
			|||||||
  computed: {},
 | 
					  computed: {},
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
      exportFactoryDataExcel({
 | 
					      // if (this.period != 1) {
 | 
				
			||||||
        factoryId: this.companyId,
 | 
					        this.showPeriod = true
 | 
				
			||||||
        timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
 | 
					        exportFactoryDataExcel({
 | 
				
			||||||
        compare: this.than === '同比' ? 1 : 2
 | 
					          factoryId: this.companyId,
 | 
				
			||||||
      }).then(response => {
 | 
					          timeSelection: this.period === 1 ? 0 : this.period === 2 ? 1 : this.period === 3 ? 2 : 3,
 | 
				
			||||||
        this.$download.excel(response, `${this.companyName}生产数据.xls`);
 | 
					          compare: this.than === '同比' ? 1 : 2
 | 
				
			||||||
      // this.exportLoading = false;
 | 
					        }).then(response => {
 | 
				
			||||||
    }).catch(() => { });
 | 
					          this.$download.excel(response, `${this.companyName}生产数据.xls`);
 | 
				
			||||||
 | 
					          // this.exportLoading = false;
 | 
				
			||||||
 | 
					        }).catch(() => { });
 | 
				
			||||||
 | 
					      // } else {
 | 
				
			||||||
 | 
					      //   this.showPeriod = false
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    toggleFullScreen() {
 | 
					    toggleFullScreen() {
 | 
				
			||||||
      this.isFullscreen = !this.isFullscreen;
 | 
					      this.isFullscreen = !this.isFullscreen;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										226
									
								
								src/views/copilot/components/bottomLeftContainer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										226
									
								
								src/views/copilot/components/bottomLeftContainer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,226 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-09 15:07:50
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 15:41:38
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-05 09:43:51
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 15:06:52
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="copilot-container">
 | 
				
			||||||
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
 | 
					    <button v-if="false" style="
 | 
				
			||||||
 | 
					        appearance: none;
 | 
				
			||||||
 | 
					        outline: none;
 | 
				
			||||||
 | 
					        border: none;
 | 
				
			||||||
 | 
					        background: none;
 | 
				
			||||||
 | 
					        color: #fff;
 | 
				
			||||||
 | 
					        cursor: pointer;
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        top: 8px;
 | 
				
			||||||
 | 
					        right: 8px;
 | 
				
			||||||
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					    <!-- decoration  -->
 | 
				
			||||||
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
 | 
					    <!-- content  -->
 | 
				
			||||||
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
 | 
					      ]">
 | 
				
			||||||
 | 
					      <slot />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import ContainerIconVue from "./ContainerIcon.vue";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    side: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "left",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "cube",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "Default Title",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					.copilot-container {
 | 
				
			||||||
 | 
					  height: 0;
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-left: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 10%,
 | 
				
			||||||
 | 
					        #024798 20%,
 | 
				
			||||||
 | 
					        transparent 90%) 1;
 | 
				
			||||||
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::before {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    height: 92%;
 | 
				
			||||||
 | 
					    width: 0.11415vw;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    top: 0%;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    background: radial-gradient(
 | 
				
			||||||
 | 
					      circle at center,
 | 
				
			||||||
 | 
					      #024798 2%,
 | 
				
			||||||
 | 
					      #024798 100%,
 | 
				
			||||||
 | 
					      transparent
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::after {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: 90%;
 | 
				
			||||||
 | 
					    height: 0.31415vh;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    left: 8%;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, transparent 60%, #024798 98%, transparent 90%);
 | 
				
			||||||
 | 
					    z-index: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-head {
 | 
				
			||||||
 | 
					    // height: 40px;
 | 
				
			||||||
 | 
					    height: 3.8vh;
 | 
				
			||||||
 | 
					    padding: 8px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .container-title {
 | 
				
			||||||
 | 
					      font-size: 1vw;
 | 
				
			||||||
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
 | 
					      font-weight: normal;
 | 
				
			||||||
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-body {
 | 
				
			||||||
 | 
					    padding: 12px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    flex: 1;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner {
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    // width: 16px;
 | 
				
			||||||
 | 
					    // height: 16px;
 | 
				
			||||||
 | 
					    width: 0.95vw;
 | 
				
			||||||
 | 
					    height: 0.95vw;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tl {
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tr {
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-right: 2px solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.bl {
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    // border-left: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid transparent;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: .6vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.br {
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    // border-left: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // transform: rotate(-90deg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										219
									
								
								src/views/copilot/components/bottomRightContainer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										219
									
								
								src/views/copilot/components/bottomRightContainer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,219 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					    filename: Container.vue
 | 
				
			||||||
 | 
					    author: liubin
 | 
				
			||||||
 | 
					    date: 2024-04-09 10:44:09
 | 
				
			||||||
 | 
					    description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="copilot-container">
 | 
				
			||||||
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
 | 
					    <button v-if="false" style="
 | 
				
			||||||
 | 
					        appearance: none;
 | 
				
			||||||
 | 
					        outline: none;
 | 
				
			||||||
 | 
					        border: none;
 | 
				
			||||||
 | 
					        background: none;
 | 
				
			||||||
 | 
					        color: #fff;
 | 
				
			||||||
 | 
					        cursor: pointer;
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        top: 8px;
 | 
				
			||||||
 | 
					        right: 8px;
 | 
				
			||||||
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					    <!-- decoration  -->
 | 
				
			||||||
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
 | 
					    <!-- content  -->
 | 
				
			||||||
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
 | 
					      ]">
 | 
				
			||||||
 | 
					      <slot />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import ContainerIconVue from "./ContainerIcon.vue";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    side: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "left",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "cube",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "Default Title",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.copilot-container {
 | 
				
			||||||
 | 
					  height: 0;
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-right: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 10%,
 | 
				
			||||||
 | 
					        #024798 20%,
 | 
				
			||||||
 | 
					        transparent 90%) 1;
 | 
				
			||||||
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::before {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    height: 92%;
 | 
				
			||||||
 | 
					    width: 0.11415vw;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    top: 0%;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    background: radial-gradient(
 | 
				
			||||||
 | 
					      circle at center,
 | 
				
			||||||
 | 
					      #024798 2%,
 | 
				
			||||||
 | 
					      #024798 100%,
 | 
				
			||||||
 | 
					      transparent
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::after {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: 95%;
 | 
				
			||||||
 | 
					    height: 0.31415vh;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    right: 3%;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, transparent 60%, #024798 98%, transparent 98%);
 | 
				
			||||||
 | 
					    z-index: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-head {
 | 
				
			||||||
 | 
					    // height: 40px;
 | 
				
			||||||
 | 
					    height: 3.8vh;
 | 
				
			||||||
 | 
					    padding: 8px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .container-title {
 | 
				
			||||||
 | 
					      font-size: 1vw;
 | 
				
			||||||
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
 | 
					      font-weight: normal;
 | 
				
			||||||
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-body {
 | 
				
			||||||
 | 
					    padding: 12px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    flex: 1;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner {
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    // width: 16px;
 | 
				
			||||||
 | 
					    // height: 16px;
 | 
				
			||||||
 | 
					    width: 0.95vw;
 | 
				
			||||||
 | 
					    height: 0.95vw;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tl {
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tr {
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-right: 2px solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.bl {
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    // border-left: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid transparent;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.br {
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    // border-left: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // transform: rotate(-90deg);
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: .6vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -75,8 +75,8 @@ button {
 | 
				
			|||||||
.copilot-btn::after {
 | 
					.copilot-btn::after {
 | 
				
			||||||
  content: "";
 | 
					  content: "";
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
  width: 16px;
 | 
					  width: 0.7vw;
 | 
				
			||||||
  height: 16px;
 | 
					  height: 0.7vw;
 | 
				
			||||||
  top: 0;
 | 
					  top: 0;
 | 
				
			||||||
  background: transparent;
 | 
					  background: transparent;
 | 
				
			||||||
  border-style: solid;
 | 
					  border-style: solid;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										220
									
								
								src/views/copilot/components/efficiencyLeftContainer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										220
									
								
								src/views/copilot/components/efficiencyLeftContainer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,220 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-09 15:15:00
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-19 16:11:37
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="copilot-container">
 | 
				
			||||||
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
 | 
					    <button v-if="false" style="
 | 
				
			||||||
 | 
					        appearance: none;
 | 
				
			||||||
 | 
					        outline: none;
 | 
				
			||||||
 | 
					        border: none;
 | 
				
			||||||
 | 
					        background: none;
 | 
				
			||||||
 | 
					        color: #fff;
 | 
				
			||||||
 | 
					        cursor: pointer;
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        top: 8px;
 | 
				
			||||||
 | 
					        right: 8px;
 | 
				
			||||||
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					    <!-- decoration  -->
 | 
				
			||||||
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
 | 
					    <!-- content  -->
 | 
				
			||||||
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
 | 
					      ]">
 | 
				
			||||||
 | 
					      <slot />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import ContainerIconVue from "./ContainerIcon.vue";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    side: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "left",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "cube",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "Default Title",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.copilot-container {
 | 
				
			||||||
 | 
					  height: 0;
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-left: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 5%,
 | 
				
			||||||
 | 
					        #024798 10%,
 | 
				
			||||||
 | 
					        transparent 90%) 1;
 | 
				
			||||||
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::before {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    height: 92%;
 | 
				
			||||||
 | 
					    width: 0.11415vw;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    top: 0%;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    background: radial-gradient(
 | 
				
			||||||
 | 
					      circle at center,
 | 
				
			||||||
 | 
					      #024798 5%,
 | 
				
			||||||
 | 
					      #024798 100%,
 | 
				
			||||||
 | 
					      transparent
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::after {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: 90%;
 | 
				
			||||||
 | 
					    height: 0.31415vh;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    left: 10%;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    background: linear-gradient(to right,transparent 60%, #024798 95%, transparent 97%);
 | 
				
			||||||
 | 
					    z-index: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-head {
 | 
				
			||||||
 | 
					    // height: 40px;
 | 
				
			||||||
 | 
					    height: 3.8vh;
 | 
				
			||||||
 | 
					    padding: 8px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .container-title {
 | 
				
			||||||
 | 
					      font-size: 1vw;
 | 
				
			||||||
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
 | 
					      font-weight: normal;
 | 
				
			||||||
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-body {
 | 
				
			||||||
 | 
					    padding: 12px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    flex: 1;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner {
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    // width: 16px;
 | 
				
			||||||
 | 
					    // height: 16px;
 | 
				
			||||||
 | 
					    width: 0.7vw;
 | 
				
			||||||
 | 
					    height: 0.7vw;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tl {
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tr {
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-right: 2px solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.bl {
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    // border-left: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid transparent;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: .6vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.br {
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    // border-left: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // transform: rotate(-90deg);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										220
									
								
								src/views/copilot/components/efficiencyRightContainer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										220
									
								
								src/views/copilot/components/efficiencyRightContainer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,220 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					    filename: Container.vue
 | 
				
			||||||
 | 
					    author: liubin
 | 
				
			||||||
 | 
					    date: 2024-04-09 10:44:09
 | 
				
			||||||
 | 
					    description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="copilot-container">
 | 
				
			||||||
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
 | 
					    <button v-if="false" style="
 | 
				
			||||||
 | 
					        appearance: none;
 | 
				
			||||||
 | 
					        outline: none;
 | 
				
			||||||
 | 
					        border: none;
 | 
				
			||||||
 | 
					        background: none;
 | 
				
			||||||
 | 
					        color: #fff;
 | 
				
			||||||
 | 
					        cursor: pointer;
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        top: 8px;
 | 
				
			||||||
 | 
					        right: 8px;
 | 
				
			||||||
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					    <!-- decoration  -->
 | 
				
			||||||
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
 | 
					    <!-- content  -->
 | 
				
			||||||
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
 | 
					      ]">
 | 
				
			||||||
 | 
					      <slot />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import ContainerIconVue from "./ContainerIcon.vue";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    side: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "left",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "cube",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "Default Title",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.copilot-container {
 | 
				
			||||||
 | 
					  height: 0;
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-right: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom,transparent 5%,
 | 
				
			||||||
 | 
					    #024798 10%,
 | 
				
			||||||
 | 
					    transparent 90%) 1;
 | 
				
			||||||
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::before {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    height: 92%;
 | 
				
			||||||
 | 
					    width: 0.11415vw;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    top: 0%;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    background: radial-gradient(
 | 
				
			||||||
 | 
					      circle at center,
 | 
				
			||||||
 | 
					      #024798 2%,
 | 
				
			||||||
 | 
					      #024798 100%,
 | 
				
			||||||
 | 
					      transparent
 | 
				
			||||||
 | 
					    );
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::after {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: 95%;
 | 
				
			||||||
 | 
					    height: 0.31415vh;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    right: 3%;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, transparent 60%, #024798 98%, transparent 98%);
 | 
				
			||||||
 | 
					    z-index: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-head {
 | 
				
			||||||
 | 
					    // height: 40px;
 | 
				
			||||||
 | 
					    height: 3.8vh;
 | 
				
			||||||
 | 
					    padding: 8px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .container-title {
 | 
				
			||||||
 | 
					      font-size: 1vw;
 | 
				
			||||||
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
 | 
					      font-weight: normal;
 | 
				
			||||||
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-body {
 | 
				
			||||||
 | 
					    padding: 12px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    flex: 1;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner {
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    // width: 16px;
 | 
				
			||||||
 | 
					    // height: 16px;
 | 
				
			||||||
 | 
					    width: 0.7vw;
 | 
				
			||||||
 | 
					    height: 0.7vw;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tl {
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tr {
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-right: 2px solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.bl {
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    // border-left: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid transparent;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.br {
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    // border-left: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // transform: rotate(-90deg);
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: .6vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-23 15:49:14
 | 
					 * @Date: 2024-05-23 15:49:14
 | 
				
			||||||
 * @LastEditTime: 2024-06-04 08:54:10
 | 
					 * @LastEditTime: 2024-07-19 16:08:27
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -10,7 +10,7 @@
 | 
				
			|||||||
  <chart-container class="bar-chart-base">
 | 
					  <chart-container class="bar-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span v-for="item in legend" :key="item.label" class="legend-item"
 | 
					      <span v-for="item in legend" :key="item.label" class="legend-item"
 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div ref="ftoChart" style="height:94%;width:100%"></div>
 | 
					    <div ref="ftoChart" style="height:94%;width:100%"></div>
 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
@@ -63,7 +63,36 @@ export default {
 | 
				
			|||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(255,255,255,0.85);display:inline-block;margin-bottom:8px;'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align: right;'>${params[i].value ? params[i].value : 0 }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -74,24 +103,24 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/片",
 | 
					          name: "单位/片",
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            align: "right",
 | 
					            align: "right",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -109,7 +138,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[0].name,
 | 
					            name: "", // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -144,7 +173,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[1].name,
 | 
					            name: "", // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -189,19 +218,19 @@ export default {
 | 
				
			|||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    isFullscreen(val) {
 | 
					    isFullscreen(val) {
 | 
				
			||||||
      this.actualOptions.series.map((item) => {
 | 
					      this.options.series.map((item) => {
 | 
				
			||||||
        item.barWidth = val ? 18 : 12;
 | 
					        item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initChart(this.actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.initChart(this.actualOptions);
 | 
					      // this.initChart(this.actualOptions);
 | 
				
			||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
@@ -210,14 +239,14 @@ export default {
 | 
				
			|||||||
        this.initChart(this.options);
 | 
					        this.initChart(this.options);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
					      // const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
				
			||||||
      console.log('actualOptions', this.options)
 | 
					      // console.log('actualOptions', this.options)
 | 
				
			||||||
      actualOptions.series[0].data = val[0].data;
 | 
					      this.options.series[0].data = val[0].data;
 | 
				
			||||||
      actualOptions.series[0].name = val[0].name;
 | 
					      this.options.series[0].name = val[0].name;
 | 
				
			||||||
      actualOptions.series[1].data = val[1].data;
 | 
					      this.options.series[1].data = val[1].data;
 | 
				
			||||||
      actualOptions.series[1].name = val[1].name;
 | 
					      this.options.series[1].name = val[1].name;
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      // this.actualOptions = actualOptions;
 | 
				
			||||||
      this.initChart(actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
@@ -226,7 +255,7 @@ export default {
 | 
				
			|||||||
        this.isFullscreen = screenfull.isFullscreen;
 | 
					        this.isFullscreen = screenfull.isFullscreen;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.actualOptions = this.options
 | 
					    // this.actualOptions = this.options
 | 
				
			||||||
    this.canvasReset();
 | 
					    this.canvasReset();
 | 
				
			||||||
    window.addEventListener("resize", this.canvasReset);
 | 
					    window.addEventListener("resize", this.canvasReset);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -250,7 +279,7 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(this.$refs.ftoChart);
 | 
					      this.chart = echarts.init(this.$refs.ftoChart);
 | 
				
			||||||
      this.chart.setOption(this.actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,14 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-05 09:43:51
 | 
					 * @Date: 2024-06-05 09:43:51
 | 
				
			||||||
 * @LastEditTime: 2024-06-05 09:43:52
 | 
					 * @LastEditTime: 2024-07-19 16:11:59
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="copilot-container">
 | 
					  <div class="copilot-container">
 | 
				
			||||||
    <!-- refresh btn  -->
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
    <button
 | 
					    <button v-if="false" style="
 | 
				
			||||||
      v-if="false"
 | 
					 | 
				
			||||||
      style="
 | 
					 | 
				
			||||||
        appearance: none;
 | 
					        appearance: none;
 | 
				
			||||||
        outline: none;
 | 
					        outline: none;
 | 
				
			||||||
        border: none;
 | 
					        border: none;
 | 
				
			||||||
@@ -20,43 +18,26 @@
 | 
				
			|||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        top: 8px;
 | 
					        top: 8px;
 | 
				
			||||||
        right: 8px;
 | 
					        right: 8px;
 | 
				
			||||||
      "
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
      @click="$emit('refresh')"
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
    >
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
      <svg
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
        xmlns="http://www.w3.org/2000/svg"
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
        fill="none"
 | 
					 | 
				
			||||||
        viewBox="0 0 24 24"
 | 
					 | 
				
			||||||
        stroke-width="1.5"
 | 
					 | 
				
			||||||
        stroke="currentColor"
 | 
					 | 
				
			||||||
        style="width: 24px; height: 24px"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <path
 | 
					 | 
				
			||||||
          stroke-linecap="round"
 | 
					 | 
				
			||||||
          stroke-linejoin="round"
 | 
					 | 
				
			||||||
          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </svg>
 | 
					      </svg>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
    <!-- decoration  -->
 | 
					    <!-- decoration  -->
 | 
				
			||||||
    <div class="corner tl"></div>
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
    <div class="corner tr"></div>
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
    <div  class="corner bl"></div>
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
    <div  class="corner br"></div>
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
    <!-- content  -->
 | 
					    <!-- content  -->
 | 
				
			||||||
    <div
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
      class="container-head"
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
      class="container-body"
 | 
					 | 
				
			||||||
      :class="[
 | 
					 | 
				
			||||||
        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
      ]"
 | 
					      ]">
 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <slot />
 | 
					      <slot />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -92,6 +73,7 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -99,23 +81,25 @@ export default {
 | 
				
			|||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-left: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 10%,
 | 
				
			||||||
 | 
					        #024798 20%,
 | 
				
			||||||
 | 
					        transparent 90%) 1;
 | 
				
			||||||
  backdrop-filter: blur(4px);
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  &::before {
 | 
					  &::before {
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    height: 100%;
 | 
					    height: 92%;
 | 
				
			||||||
    width: 0.11415vw;
 | 
					    width: 0.11415vw;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    top: 0%;
 | 
					    top: 0%;
 | 
				
			||||||
    left: 0;
 | 
					    right: 0;
 | 
				
			||||||
    background: radial-gradient(
 | 
					    background: radial-gradient(circle at center,
 | 
				
			||||||
      circle at center,
 | 
					          #024798 2%,
 | 
				
			||||||
      #024798 2%,
 | 
					          #024798 100%,
 | 
				
			||||||
      #024798 30%,
 | 
					          transparent);
 | 
				
			||||||
      transparent
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
    z-index: 1;
 | 
					    z-index: 1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -123,12 +107,12 @@ export default {
 | 
				
			|||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    width: 60%;
 | 
					    width: 90%;
 | 
				
			||||||
    height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    left: 8%;
 | 
					    left: 7%;
 | 
				
			||||||
    bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
    background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to right,transparent 60%, #024798 95%, transparent 97%);
 | 
				
			||||||
    z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -141,7 +125,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -161,8 +145,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,9 +8,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="copilot-container">
 | 
					  <div class="copilot-container">
 | 
				
			||||||
    <!-- refresh btn  -->
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
    <button
 | 
					    <button v-if="false" style="
 | 
				
			||||||
      v-if="false"
 | 
					 | 
				
			||||||
      style="
 | 
					 | 
				
			||||||
        appearance: none;
 | 
					        appearance: none;
 | 
				
			||||||
        outline: none;
 | 
					        outline: none;
 | 
				
			||||||
        border: none;
 | 
					        border: none;
 | 
				
			||||||
@@ -20,43 +18,26 @@
 | 
				
			|||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        top: 8px;
 | 
					        top: 8px;
 | 
				
			||||||
        right: 8px;
 | 
					        right: 8px;
 | 
				
			||||||
      "
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
      @click="$emit('refresh')"
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
    >
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
      <svg
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
        xmlns="http://www.w3.org/2000/svg"
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
        fill="none"
 | 
					 | 
				
			||||||
        viewBox="0 0 24 24"
 | 
					 | 
				
			||||||
        stroke-width="1.5"
 | 
					 | 
				
			||||||
        stroke="currentColor"
 | 
					 | 
				
			||||||
        style="width: 24px; height: 24px"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <path
 | 
					 | 
				
			||||||
          stroke-linecap="round"
 | 
					 | 
				
			||||||
          stroke-linejoin="round"
 | 
					 | 
				
			||||||
          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </svg>
 | 
					      </svg>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
    <!-- decoration  -->
 | 
					    <!-- decoration  -->
 | 
				
			||||||
    <div class="corner tl"></div>
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
    <div class="corner tr"></div>
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
    <div  class="corner bl"></div>
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
    <div  class="corner br"></div>
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
    <!-- content  -->
 | 
					    <!-- content  -->
 | 
				
			||||||
    <div
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
      class="container-head"
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
      class="container-body"
 | 
					 | 
				
			||||||
      :class="[
 | 
					 | 
				
			||||||
        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
      ]"
 | 
					      ]">
 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <slot />
 | 
					      <slot />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -92,6 +73,8 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -99,13 +82,17 @@ export default {
 | 
				
			|||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-right: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom,transparent 10%,
 | 
				
			||||||
 | 
					    #024798 20%,
 | 
				
			||||||
 | 
					    transparent 90%) 1;
 | 
				
			||||||
  backdrop-filter: blur(4px);
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  &::before {
 | 
					  &::before {
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    height: 100%;
 | 
					    height: 92%;
 | 
				
			||||||
    width: 0.11415vw;
 | 
					    width: 0.11415vw;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    top: 0%;
 | 
					    top: 0%;
 | 
				
			||||||
@@ -113,7 +100,7 @@ export default {
 | 
				
			|||||||
    background: radial-gradient(
 | 
					    background: radial-gradient(
 | 
				
			||||||
      circle at center,
 | 
					      circle at center,
 | 
				
			||||||
      #024798 2%,
 | 
					      #024798 2%,
 | 
				
			||||||
      #024798 30%,
 | 
					      #024798 100%,
 | 
				
			||||||
      transparent
 | 
					      transparent
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    z-index: 1;
 | 
					    z-index: 1;
 | 
				
			||||||
@@ -123,12 +110,12 @@ export default {
 | 
				
			|||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    width: 60%;
 | 
					    width: 95%;
 | 
				
			||||||
    height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    left: 8%;
 | 
					    right: 1%;
 | 
				
			||||||
    bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
    background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to left, transparent 60%, #024798 98%, transparent 98%);
 | 
				
			||||||
    z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -141,7 +128,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -161,8 +148,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-05 09:48:37
 | 
					 * @Date: 2024-06-05 09:48:37
 | 
				
			||||||
 * @LastEditTime: 2024-06-05 09:53:49
 | 
					 * @LastEditTime: 2024-07-19 16:14:07
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -55,7 +55,7 @@
 | 
				
			|||||||
      class="container-head"
 | 
					      class="container-head"
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					      <Icon  :icon="icon"></Icon>
 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div
 | 
				
			||||||
@@ -99,6 +99,8 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -106,23 +108,25 @@ export default {
 | 
				
			|||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-right: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 10%,
 | 
				
			||||||
 | 
					          #024798 20%,
 | 
				
			||||||
 | 
					          transparent 90%) 1;
 | 
				
			||||||
  backdrop-filter: blur(4px);
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  &::before {
 | 
					  &::before {
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    height: 100%;
 | 
					    height: 92%;
 | 
				
			||||||
    width: 0.11415vw;
 | 
					    width: 0.11415vw;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    top: 0%;
 | 
					    top: 0%;
 | 
				
			||||||
    left: 0;
 | 
					    left: 0;
 | 
				
			||||||
    background: radial-gradient(
 | 
					    background: radial-gradient(circle at center,
 | 
				
			||||||
      circle at center,
 | 
					          #024798 2%,
 | 
				
			||||||
      #024798 2%,
 | 
					          #024798 100%,
 | 
				
			||||||
      #024798 30%,
 | 
					          transparent);
 | 
				
			||||||
      transparent
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
    z-index: 1;
 | 
					    z-index: 1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -133,7 +137,7 @@ export default {
 | 
				
			|||||||
    width: 60%;
 | 
					    width: 60%;
 | 
				
			||||||
    height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    left: 8%;
 | 
					    left: 6%;
 | 
				
			||||||
    bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
    background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to right, #024798, transparent);
 | 
				
			||||||
    z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
@@ -148,7 +152,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -168,8 +172,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					      height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,44 +63,47 @@ export default {
 | 
				
			|||||||
      const year = new Date().getFullYear();
 | 
					      const year = new Date().getFullYear();
 | 
				
			||||||
      if (this.period === '日' && this.than === '同比') {
 | 
					      if (this.period === '日' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
 | 
					          { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${yesterday}日`, color: "#58adfa" },
 | 
					          { label: `${yesterday}日`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '日' && this.than === '环比') {
 | 
					      } else if (this.period === '日' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${dayBeYes}日`, color: "#12f7f1" },
 | 
					          { label: `${dayBeYes}日`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${yesterday}日`, color: "#58adfa" },
 | 
					          { label: `${yesterday}日`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '同比') {
 | 
					      } else if (this.period === '周' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year-1}年本周`, color: "#12f7f1" },
 | 
					          { label: `本周目标`, color: "#58adfa" },
 | 
				
			||||||
 | 
					          { label: `${year - 1}年本周`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `本周`, color: "#58adfa" },
 | 
					          { label: `本周`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '环比') {
 | 
					      } else if (this.period === '周' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `本周目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `上周`, color: "#12f7f1" },
 | 
					          { label: `上周`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `本周`, color: "#58adfa" },
 | 
					          { label: `本周`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '同比') {
 | 
					      } else if (this.period === '月' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year-1}年${month}月`, color: "#12f7f1" },
 | 
					 | 
				
			||||||
          { label: `${month}月`, color: "#58adfa" },
 | 
					 | 
				
			||||||
          { label: `${month}月目标`, color: "#58adfa" },
 | 
					          { label: `${month}月目标`, color: "#58adfa" },
 | 
				
			||||||
 | 
					          { label: `${year - 1}年${month}月`, color: "#12f7f1" },
 | 
				
			||||||
 | 
					          { label: `${month}月`, color: "#58adfa" },
 | 
				
			||||||
          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
					          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '环比') {
 | 
					      } else if (this.period === '月' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${month}月目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${lastMonth}月`, color: "#12f7f1" },
 | 
					          { label: `${lastMonth}月`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${month}月`, color: "#58adfa" },
 | 
					          { label: `${month}月`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${month}月目标`, color: "#58adfa" },
 | 
					 | 
				
			||||||
          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
					          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${year}年目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${year - 1}年`, color: "#12f7f1" },
 | 
					          { label: `${year - 1}年`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${year}年`, color: "#58adfa" },
 | 
					          { label: `${year}年`, color: "#58adfa" },
 | 
				
			||||||
          { label:  `${year}年目标`, color: "#58adfa" },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          // { label: `${year}年目标`, value: valueTuple[2] },
 | 
					          // { label: `${year}年目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@@ -141,14 +144,6 @@ export default {
 | 
				
			|||||||
      // console.log('chipOee', chipOeeRate)
 | 
					      // console.log('chipOee', chipOeeRate)
 | 
				
			||||||
      let dataList = null
 | 
					      let dataList = null
 | 
				
			||||||
      switch (this.period) {
 | 
					      switch (this.period) {
 | 
				
			||||||
        case "日":
 | 
					 | 
				
			||||||
          dataList = [];
 | 
					 | 
				
			||||||
          dataList[0] = chipOeeRate?.previous;
 | 
					 | 
				
			||||||
          dataList[1] = chipOeeRate?.current;
 | 
					 | 
				
			||||||
        case "周":
 | 
					 | 
				
			||||||
          dataList = [];
 | 
					 | 
				
			||||||
          dataList[0] = chipOeeRate?.previous;
 | 
					 | 
				
			||||||
          dataList[1] = chipOeeRate?.current;
 | 
					 | 
				
			||||||
          default:
 | 
					          default:
 | 
				
			||||||
          dataList = [];
 | 
					          dataList = [];
 | 
				
			||||||
          dataList[0] = chipOeeRate?.previous;
 | 
					          dataList[0] = chipOeeRate?.previous;
 | 
				
			||||||
@@ -191,6 +186,11 @@ function getTemplate(period, dataList, than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `${yesterday}日目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '日' && than === '环比') {
 | 
					  } else if (period === '日' && than === '环比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -203,6 +203,11 @@ function getTemplate(period, dataList, than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `${yesterday}日目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '周' && than === '同比') {
 | 
					  } else if (period === '周' && than === '同比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -215,6 +220,11 @@ function getTemplate(period, dataList, than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `本周目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '周' && than === '环比') {
 | 
					  } else if (period === '周' && than === '环比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -227,6 +237,11 @@ function getTemplate(period, dataList, than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `本周目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '月' && than === '同比') {
 | 
					  } else if (period === '月' && than === '同比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,44 +63,47 @@ export default {
 | 
				
			|||||||
      const year = new Date().getFullYear();
 | 
					      const year = new Date().getFullYear();
 | 
				
			||||||
      if (this.period === '日' && this.than === '同比') {
 | 
					      if (this.period === '日' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
 | 
					          { label: `${year - 1}年${yesterday}日`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${yesterday}日`, color: "#58adfa" },
 | 
					          { label: `${yesterday}日`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '日' && this.than === '环比') {
 | 
					      } else if (this.period === '日' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${dayBeYes}日`, color: "#12f7f1" },
 | 
					          { label: `${dayBeYes}日`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${yesterday}日`, color: "#58adfa" },
 | 
					          { label: `${yesterday}日`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '同比') {
 | 
					      } else if (this.period === '周' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year-1}年本周`, color: "#12f7f1" },
 | 
					          { label: `本周目标`, color: "#58adfa" },
 | 
				
			||||||
 | 
					          { label: `${year - 1}年本周`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `本周`, color: "#58adfa" },
 | 
					          { label: `本周`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '环比') {
 | 
					      } else if (this.period === '周' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `本周目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `上周`, color: "#12f7f1" },
 | 
					          { label: `上周`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `本周`, color: "#58adfa" },
 | 
					          { label: `本周`, color: "#58adfa" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '同比') {
 | 
					      } else if (this.period === '月' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year-1}年${month}月`, color: "#12f7f1" },
 | 
					 | 
				
			||||||
          { label: `${month}月`, color: "#58adfa" },
 | 
					 | 
				
			||||||
          { label: `${month}月目标`, color: "#58adfa" },
 | 
					          { label: `${month}月目标`, color: "#58adfa" },
 | 
				
			||||||
 | 
					          { label: `${year - 1}年${month}月`, color: "#12f7f1" },
 | 
				
			||||||
 | 
					          { label: `${month}月`, color: "#58adfa" },
 | 
				
			||||||
          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
					          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '环比') {
 | 
					      } else if (this.period === '月' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${month}月目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${lastMonth}月`, color: "#12f7f1" },
 | 
					          { label: `${lastMonth}月`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${month}月`, color: "#58adfa" },
 | 
					          { label: `${month}月`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${month}月目标`, color: "#58adfa" },
 | 
					 | 
				
			||||||
          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
					          // { label: `${month}月目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
 | 
					          { label: `${year}年目标`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${year - 1}年`, color: "#12f7f1" },
 | 
					          { label: `${year - 1}年`, color: "#12f7f1" },
 | 
				
			||||||
          { label: `${year}年`, color: "#58adfa" },
 | 
					          { label: `${year}年`, color: "#58adfa" },
 | 
				
			||||||
          { label: `${year}年目标`, color: "#58adfa" },
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
          // { label: `${year}年目标`, value: valueTuple[2] },
 | 
					          // { label: `${year}年目标`, value: valueTuple[2] },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
@@ -112,17 +115,9 @@ export default {
 | 
				
			|||||||
    series() {
 | 
					    series() {
 | 
				
			||||||
      // console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
 | 
					      // console.log('aaaaaaaa', this.$store.getters.copilot.efficiency.chipOee);
 | 
				
			||||||
      const transformRate = this.transformRate
 | 
					      const transformRate = this.transformRate
 | 
				
			||||||
      // console.log('chipOee', chipOeeRate)
 | 
					      console.log('chipOee', transformRate)
 | 
				
			||||||
      let dataList = null;
 | 
					      let dataList = null;
 | 
				
			||||||
      switch (this.period) {
 | 
					      switch (this.period) {
 | 
				
			||||||
        case "日":
 | 
					 | 
				
			||||||
          dataList = [];
 | 
					 | 
				
			||||||
          dataList[0] = transformRate.previous;
 | 
					 | 
				
			||||||
          dataList[1] = transformRate.current;
 | 
					 | 
				
			||||||
        case "周":
 | 
					 | 
				
			||||||
          dataList = [];
 | 
					 | 
				
			||||||
          dataList[0] = transformRate.previous;
 | 
					 | 
				
			||||||
          dataList[1] = transformRate.current;
 | 
					 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
          dataList = [];
 | 
					          dataList = [];
 | 
				
			||||||
          dataList[0] = transformRate.previous;
 | 
					          dataList[0] = transformRate.previous;
 | 
				
			||||||
@@ -182,6 +177,11 @@ function getTemplate(period, dataList,than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `${yesterday}日目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '日' && than === '环比') {
 | 
					  } else if (period === '日' && than === '环比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -194,6 +194,11 @@ function getTemplate(period, dataList,than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `${yesterday}日目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '周' && than === '同比') {
 | 
					  } else if (period === '周' && than === '同比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -206,6 +211,11 @@ function getTemplate(period, dataList,than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `本周目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '周' && than === '环比') {
 | 
					  } else if (period === '周' && than === '环比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
@@ -218,6 +228,11 @@ function getTemplate(period, dataList,than) {
 | 
				
			|||||||
        data: dataList ? dataList[1] : [],
 | 
					        data: dataList ? dataList[1] : [],
 | 
				
			||||||
        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        name: `本周目标`,
 | 
				
			||||||
 | 
					        data: dataList ? dataList[2] : [],
 | 
				
			||||||
 | 
					        // : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    ];
 | 
					    ];
 | 
				
			||||||
  } else if (period === '月' && than === '同比') {
 | 
					  } else if (period === '月' && than === '同比') {
 | 
				
			||||||
    items = [
 | 
					    items = [
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-07 13:22:43
 | 
					 * @Date: 2024-05-07 13:22:43
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 09:22:17
 | 
					 * @LastEditTime: 2024-07-19 16:10:10
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
  <chart-container class="bar-chart-base">
 | 
					  <chart-container class="bar-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
					      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div ref="oeeChart" style="height:94%;width:100%"></div>
 | 
					    <div ref="oeeChart" style="height:94%;width:100%"></div>
 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
@@ -62,7 +62,42 @@ export default {
 | 
				
			|||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(255,255,255,0.85);margin-bottom:8px'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `${params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                ? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:76.3%;left:3.5%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width: 10px;height: 10px;border-radius: 100%;background-color: #f3c000;position: absolute;top:72.6%;left:4.8%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					                  : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					                }` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;text-align: right;width:180px;color:rgba(255,255,255,0.65);;font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value + '%' : 0 + '%'}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -73,23 +108,23 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/%",
 | 
					          name: "单位/%",
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -107,7 +142,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[0].name,
 | 
					            name: "", // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -142,7 +177,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[1].name,
 | 
					            name: "", // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -222,11 +257,11 @@ export default {
 | 
				
			|||||||
    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
					    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
				
			||||||
    isFullscreen(val) {
 | 
					    isFullscreen(val) {
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // if (val === false && this.isOpen === true) {
 | 
					      // if (val === false && this.isOpen === true) {
 | 
				
			||||||
      //   console.log(val)
 | 
					      //   console.log(val)
 | 
				
			||||||
      //   this.width = 97 + '%'
 | 
					      //   this.width = 97 + '%'
 | 
				
			||||||
@@ -236,12 +271,12 @@ export default {
 | 
				
			|||||||
      //   this.canvasReset()
 | 
					      //   this.canvasReset()
 | 
				
			||||||
      // }
 | 
					      // }
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initChart(this.actualOptions)
 | 
					      this.initChart(this.options)
 | 
				
			||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    series(val) {
 | 
					    series(val) {
 | 
				
			||||||
@@ -252,14 +287,14 @@ export default {
 | 
				
			|||||||
      // console.log('val', val)
 | 
					      // console.log('val', val)
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
					      const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
				
			||||||
      console.log(actualOptions)
 | 
					      console.log(actualOptions)
 | 
				
			||||||
      actualOptions.series[0].data = val[0].data;
 | 
					      this.options.series[0].data = val[0].data;
 | 
				
			||||||
      actualOptions.series[0].name = val[0].name;
 | 
					      this.options.series[0].name = val[0].name;
 | 
				
			||||||
      actualOptions.series[1].data = val?.[1]?.data;
 | 
					      this.options.series[1].data = val?.[1]?.data;
 | 
				
			||||||
      actualOptions.series[1].name = val?.[1]?.name;
 | 
					      this.options.series[1].name = val?.[1]?.name;
 | 
				
			||||||
      actualOptions.series[2].data = val?.[2]?.data || [];
 | 
					      this.options.series[2].data = val?.[2]?.data || [];
 | 
				
			||||||
      actualOptions.series[2].name = val?.[2]?.name || "";
 | 
					      this.options.series[2].name = val?.[2]?.name || "";
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      this.actualOptions = actualOptions;
 | 
				
			||||||
      this.initChart(actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
@@ -273,7 +308,7 @@ export default {
 | 
				
			|||||||
        this.isFullscreen = screenfull.isFullscreen;
 | 
					        this.isFullscreen = screenfull.isFullscreen;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.actualOptions = this.options
 | 
					    // this.actualOptions = this.options
 | 
				
			||||||
    this.canvasReset();
 | 
					    this.canvasReset();
 | 
				
			||||||
    window.addEventListener("resize", this.canvasReset);
 | 
					    window.addEventListener("resize", this.canvasReset);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -296,7 +331,7 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(this.$refs.oeeChart);
 | 
					      this.chart = echarts.init(this.$refs.oeeChart);
 | 
				
			||||||
      this.chart.setOption(this.actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -328,10 +363,10 @@ export default {
 | 
				
			|||||||
      margin-right: 0.22vw;
 | 
					      margin-right: 0.22vw;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
     .legend-item:nth-child(3) {
 | 
					     .legend-item:nth-child(1) {
 | 
				
			||||||
       margin-left: 1vw;
 | 
					       margin-left: 1vw;
 | 
				
			||||||
     }
 | 
					     }
 | 
				
			||||||
 .legend-item:nth-child(3):before {
 | 
					 .legend-item:nth-child(1):before {
 | 
				
			||||||
   // width: 12px;
 | 
					   // width: 12px;
 | 
				
			||||||
   // height: 2px;
 | 
					   // height: 2px;
 | 
				
			||||||
   width: 1vw;
 | 
					   width: 1vw;
 | 
				
			||||||
@@ -340,11 +375,11 @@ export default {
 | 
				
			|||||||
   position: absolute;
 | 
					   position: absolute;
 | 
				
			||||||
   top: 50%;
 | 
					   top: 50%;
 | 
				
			||||||
   // left: -16px;
 | 
					   // left: -16px;
 | 
				
			||||||
   left: -0.951vw;
 | 
					   left: -1.3vw;
 | 
				
			||||||
   transform: translateY(-50%);
 | 
					   transform: translateY(-50%);
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 .legend-item:nth-child(3):after {
 | 
					 .legend-item:nth-child(1):after {
 | 
				
			||||||
   background-color: #f3c000;
 | 
					   background-color: #f3c000;
 | 
				
			||||||
   content: "";
 | 
					   content: "";
 | 
				
			||||||
   display: inline-block;
 | 
					   display: inline-block;
 | 
				
			||||||
@@ -355,15 +390,15 @@ export default {
 | 
				
			|||||||
   height: 0.3191vw;
 | 
					   height: 0.3191vw;
 | 
				
			||||||
   border-radius: 100%;
 | 
					   border-radius: 100%;
 | 
				
			||||||
   top: 50%;
 | 
					   top: 50%;
 | 
				
			||||||
   left: -0.851vw;
 | 
					   left: -1.13vw;
 | 
				
			||||||
   // left: -16px;
 | 
					   // left: -16px;
 | 
				
			||||||
   transform: translateY(-50%) translateX(50%);
 | 
					   transform: translateY(-50%) translateX(50%);
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
  .legend-item:nth-child(1):before {
 | 
					  .legend-item:nth-child(2):before {
 | 
				
			||||||
    background-color: #12f7f1;
 | 
					    background-color: #12f7f1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .legend-item:nth-child(2):before {
 | 
					  .legend-item:nth-child(3):before {
 | 
				
			||||||
    background-color: #58adfa;
 | 
					    background-color: #58adfa;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-23 15:50:44
 | 
					 * @Date: 2024-05-23 15:50:44
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 09:23:39
 | 
					 * @LastEditTime: 2024-07-19 16:10:19
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
  <chart-container class="bar-chart-base">
 | 
					  <chart-container class="bar-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
					      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div ref="oeeChart" style="height:94%;width:100%"></div>
 | 
					    <div ref="oeeChart" style="height:94%;width:100%"></div>
 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
@@ -62,7 +62,42 @@ export default {
 | 
				
			|||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(255,255,255,0.85);margin-bottom:8px'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `${params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                ? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:76.3%;left:3.5%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width: 10px;height: 10px;border-radius: 100%;background-color: #f3c000;position: absolute;top:72.6%;left:4.8%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					                : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					                }` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;text-align: right;width:180px;color:rgba(255,255,255,0.65);;font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value + '%' : 0 + '%'}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -73,23 +108,23 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/%",
 | 
					          name: "单位/%",
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -107,7 +142,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[0].name,
 | 
					            name: "", // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -142,7 +177,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[1].name,
 | 
					            name: "", // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -222,11 +257,11 @@ export default {
 | 
				
			|||||||
    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
					    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
				
			||||||
    isFullscreen(val) {
 | 
					    isFullscreen(val) {
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // if (val === false && this.isOpen === true) {
 | 
					      // if (val === false && this.isOpen === true) {
 | 
				
			||||||
      //   console.log(val)
 | 
					      //   console.log(val)
 | 
				
			||||||
      //   this.width = 97 + '%'
 | 
					      //   this.width = 97 + '%'
 | 
				
			||||||
@@ -236,12 +271,12 @@ export default {
 | 
				
			|||||||
      //   this.canvasReset()
 | 
					      //   this.canvasReset()
 | 
				
			||||||
      // }
 | 
					      // }
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initChart(this.actualOptions)
 | 
					      this.initChart(this.options)
 | 
				
			||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    series(val) {
 | 
					    series(val) {
 | 
				
			||||||
@@ -250,15 +285,15 @@ export default {
 | 
				
			|||||||
        return;
 | 
					        return;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log(val)
 | 
					      console.log(val)
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
					      // const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
				
			||||||
      actualOptions.series[0].data = val[0].data;
 | 
					      this.options.series[0].data = val[0].data;
 | 
				
			||||||
      actualOptions.series[0].name = val[0].name;
 | 
					      this.options.series[0].name = val[0].name;
 | 
				
			||||||
      actualOptions.series[1].data = val?.[1]?.data || [];
 | 
					      this.options.series[1].data = val?.[1]?.data || [];
 | 
				
			||||||
      actualOptions.series[1].name = val?.[1]?.name || "";
 | 
					      this.options.series[1].name = val?.[1]?.name || "";
 | 
				
			||||||
      actualOptions.series[2].data = val?.[2]?.data || [];
 | 
					      this.options.series[2].data = val?.[2]?.data || [];
 | 
				
			||||||
      actualOptions.series[2].name = val?.[2]?.name || "";
 | 
					      this.options.series[2].name = val?.[2]?.name || "";
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      // this.actualOptions = actualOptions;
 | 
				
			||||||
      this.initChart(actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
@@ -272,7 +307,7 @@ export default {
 | 
				
			|||||||
        this.isFullscreen = screenfull.isFullscreen;
 | 
					        this.isFullscreen = screenfull.isFullscreen;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    this.actualOptions = this.options
 | 
					    // this.actualOptions = this.options
 | 
				
			||||||
    this.canvasReset();
 | 
					    this.canvasReset();
 | 
				
			||||||
    window.addEventListener("resize", this.canvasReset);
 | 
					    window.addEventListener("resize", this.canvasReset);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -295,7 +330,7 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(this.$refs.oeeChart);
 | 
					      this.chart = echarts.init(this.$refs.oeeChart);
 | 
				
			||||||
      this.chart.setOption(this.actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
@@ -327,43 +362,43 @@ export default {
 | 
				
			|||||||
      margin-right: 0.22vw;
 | 
					      margin-right: 0.22vw;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 .legend-item:nth-child(3) {
 | 
					 .legend-item:nth-child(1) {
 | 
				
			||||||
   margin-left: 1vw;
 | 
					   margin-left: 1vw;
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
  .legend-item:nth-child(1):before {
 | 
					  .legend-item:nth-child(2):before {
 | 
				
			||||||
    background-color: #12f7f1;
 | 
					    background-color: #12f7f1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .legend-item:nth-child(2):before {
 | 
					  .legend-item:nth-child(3):before {
 | 
				
			||||||
    background-color: #58adfa;
 | 
					    background-color: #58adfa;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
    .legend-item:nth-child(3):before {
 | 
					 .legend-item:nth-child(1):before {
 | 
				
			||||||
      // width: 12px;
 | 
					   // width: 12px;
 | 
				
			||||||
      // height: 2px;
 | 
					   // height: 2px;
 | 
				
			||||||
      width: 1vw;
 | 
					   width: 1vw;
 | 
				
			||||||
      height: 0.1064vw;
 | 
					   height: 0.1064vw;
 | 
				
			||||||
      background-color: #f3c000;
 | 
					   background-color: #f3c000;
 | 
				
			||||||
      position: absolute;
 | 
					   position: absolute;
 | 
				
			||||||
      top: 50%;
 | 
					   top: 50%;
 | 
				
			||||||
      // left: -16px;
 | 
					   // left: -16px;
 | 
				
			||||||
      left: -0.951vw;
 | 
					   left: -1.3vw;
 | 
				
			||||||
      transform: translateY(-50%);
 | 
					   transform: translateY(-50%);
 | 
				
			||||||
    }
 | 
					 }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .legend-item:nth-child(3):after {
 | 
					 .legend-item:nth-child(1):after {
 | 
				
			||||||
      background-color: #f3c000;
 | 
					   background-color: #f3c000;
 | 
				
			||||||
      content: "";
 | 
					   content: "";
 | 
				
			||||||
      display: inline-block;
 | 
					   display: inline-block;
 | 
				
			||||||
      position: absolute;
 | 
					   position: absolute;
 | 
				
			||||||
      // width: 6px;
 | 
					   // width: 6px;
 | 
				
			||||||
      // height: 6px;
 | 
					   // height: 6px;
 | 
				
			||||||
      width: 0.3191vw;
 | 
					   width: 0.3191vw;
 | 
				
			||||||
      height: 0.3191vw;
 | 
					   height: 0.3191vw;
 | 
				
			||||||
      border-radius: 100%;
 | 
					   border-radius: 100%;
 | 
				
			||||||
      top: 50%;
 | 
					   top: 50%;
 | 
				
			||||||
      left: -0.851vw;
 | 
					   left: -1.13vw;
 | 
				
			||||||
      // left: -16px;
 | 
					   // left: -16px;
 | 
				
			||||||
      transform: translateY(-50%) translateX(50%);
 | 
					   transform: translateY(-50%) translateX(50%);
 | 
				
			||||||
    }
 | 
					 }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,13 +65,13 @@ export default {
 | 
				
			|||||||
    valueTuple() {
 | 
					    valueTuple() {
 | 
				
			||||||
      const getter = this.chipRate;
 | 
					      const getter = this.chipRate;
 | 
				
			||||||
      // console.log(getter)
 | 
					      // console.log(getter)
 | 
				
			||||||
      if (this.period === "日" || this.period === "周") {
 | 
					      // if (this.period === "日" || this.period === "周") {
 | 
				
			||||||
        return [
 | 
					      //   return [
 | 
				
			||||||
          getter.previous[this.factoryId],
 | 
					      //     getter.previous[this.factoryId],
 | 
				
			||||||
          getter.current[this.factoryId],
 | 
					      //     getter.current[this.factoryId],
 | 
				
			||||||
          0,
 | 
					      //     0,
 | 
				
			||||||
        ];
 | 
					      //   ];
 | 
				
			||||||
      }
 | 
					      // }
 | 
				
			||||||
      // [100, 200, 200]
 | 
					      // [100, 200, 200]
 | 
				
			||||||
      return [
 | 
					      return [
 | 
				
			||||||
        getter.previous[this.factoryId],
 | 
					        getter.previous[this.factoryId],
 | 
				
			||||||
@@ -105,21 +105,25 @@ export default {
 | 
				
			|||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${yesterday}日良率`, },
 | 
					          { label: `${yesterday}日良率`, },
 | 
				
			||||||
          { label: `${year - 1}年${yesterday}日良率` },
 | 
					          { label: `${year - 1}年${yesterday}日良率` },
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标` },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '日' && this.than === '环比') {
 | 
					      } else if (this.period === '日' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${yesterday}日良率` },
 | 
					          { label: `${yesterday}日良率` },
 | 
				
			||||||
          { label: `${dayBeYes}日良率` },
 | 
					          { label: `${dayBeYes}日良率` },
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标` },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '同比') {
 | 
					      } else if (this.period === '周' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `本周良率`, },
 | 
					          { label: `本周良率`, },
 | 
				
			||||||
          { label: `${year-1}年本周良率` },
 | 
					          { label: `${year - 1}年本周良率` },
 | 
				
			||||||
 | 
					          { label: `本周目标`, },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '环比') {
 | 
					      } else if (this.period === '周' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `本周良率`, },
 | 
					          { label: `本周良率`, },
 | 
				
			||||||
          { label: `上周良率`, },
 | 
					          { label: `上周良率`, },
 | 
				
			||||||
 | 
					          { label: `本周目标`, },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '同比') {
 | 
					      } else if (this.period === '月' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
@@ -147,12 +151,13 @@ export default {
 | 
				
			|||||||
          月: `${month}月良率`,
 | 
					          月: `${month}月良率`,
 | 
				
			||||||
          年: `${year}良率`,
 | 
					          年: `${year}良率`,
 | 
				
			||||||
        }[this.period];
 | 
					        }[this.period];
 | 
				
			||||||
      console.log(vt[1]);
 | 
					      console.log(vt[0]);
 | 
				
			||||||
      const t = getOptions({
 | 
					      const t = getOptions({
 | 
				
			||||||
        // single,
 | 
					        // single,
 | 
				
			||||||
        color: this.color == 1 ? "#4CF0E8" : "#1065ff",
 | 
					        color: this.color == 1 ? "#4CF0E8" : "#1065ff",
 | 
				
			||||||
        titleValue,
 | 
					        titleValue,
 | 
				
			||||||
        subtitle,
 | 
					        subtitle,
 | 
				
			||||||
 | 
					        yesterday,
 | 
				
			||||||
        currentName: items[0].label,
 | 
					        currentName: items[0].label,
 | 
				
			||||||
        preName: items[1].label,
 | 
					        preName: items[1].label,
 | 
				
			||||||
        previousSum: vt[0],
 | 
					        previousSum: vt[0],
 | 
				
			||||||
@@ -182,22 +187,25 @@ export default {
 | 
				
			|||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year - 1}年${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
 | 
					          { label: `${year - 1}年${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
 | 
				
			||||||
          { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
					          { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '日' && this.than === '环比') {
 | 
					      } else if (this.period === '日' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
					          { label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
				
			||||||
          { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
					          { label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
				
			||||||
 | 
					          { label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '同比') {
 | 
					      } else if (this.period === '周' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
					          { label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
				
			||||||
          { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
					          { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
				
			||||||
 | 
					          { label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '周' && this.than === '环比') {
 | 
					      } else if (this.period === '周' && this.than === '环比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
          { label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
					          { label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
 | 
				
			||||||
          { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
					          { label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
 | 
				
			||||||
 | 
					          { label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
 | 
				
			||||||
        ];
 | 
					        ];
 | 
				
			||||||
      } else if (this.period === '月' && this.than === '同比') {
 | 
					      } else if (this.period === '月' && this.than === '同比') {
 | 
				
			||||||
        items = [
 | 
					        items = [
 | 
				
			||||||
@@ -310,6 +318,8 @@ export default {
 | 
				
			|||||||
  .legend-item {
 | 
					  .legend-item {
 | 
				
			||||||
    margin-left: 15px;
 | 
					    margin-left: 15px;
 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    font-size: 16px;
 | 
				
			||||||
 | 
					    // font-weight: 600;
 | 
				
			||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
    // align-items: center;
 | 
					    // align-items: center;
 | 
				
			||||||
    align-items: flex-start;
 | 
					    align-items: flex-start;
 | 
				
			||||||
@@ -363,8 +373,6 @@ export default {
 | 
				
			|||||||
  background: #003982;
 | 
					  background: #003982;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
  .legend-item__value {
 | 
					  .legend-item__value {
 | 
				
			||||||
    font-size: 24px;
 | 
					 | 
				
			||||||
    font-weight: 600;
 | 
					 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,12 +47,12 @@ export default {
 | 
				
			|||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    dataRate() {
 | 
					    dataRate() {
 | 
				
			||||||
      // if (this.current != 0 && this.target != 0) {
 | 
					      // if (this.current != 0 && this.target != 0) {
 | 
				
			||||||
        console.log( '1111111111', this.current, this.target);
 | 
					        console.log( '1111111111', this.current, this.target,this.previous);
 | 
				
			||||||
      return this.current == 0 && this.target == 0
 | 
					      return this.current == 0 && this.target == 0
 | 
				
			||||||
          ? 0
 | 
					          ? 0
 | 
				
			||||||
        : this.current != 0 && this.target != 0
 | 
					        : this.current != 0 && this.target != 0
 | 
				
			||||||
          ? `${((this.current / this.target) * 100).toFixed(2)}%`
 | 
					          ? `${((this.current / this.target) * 100).toFixed(2)}%`
 | 
				
			||||||
          : this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? this.current + '%' : this.previous >=100 ? 100 + '%' : this.previous + '%';
 | 
					          : this.current != 0 && this.target == 0 && this.current >= 100 ? 100 + '%' : this.current != 0 && this.target == 0 && this.current < 100 ? parseFloat(this.current).toFixed(2) + '%' : 0 + '%'
 | 
				
			||||||
      // } else if(this.previous != 0) {
 | 
					      // } else if(this.previous != 0) {
 | 
				
			||||||
      //   return this.previous + '%'
 | 
					      //   return this.previous + '%'
 | 
				
			||||||
      // }
 | 
					      // }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-07 10:25:10
 | 
					 * @Date: 2024-05-07 10:25:10
 | 
				
			||||||
 * @LastEditTime: 2024-06-14 09:58:01
 | 
					 * @LastEditTime: 2024-07-09 15:04:24
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -11,21 +11,21 @@
 | 
				
			|||||||
    <CityName :value="city.name" />
 | 
					    <CityName :value="city.name" />
 | 
				
			||||||
    <div class="std-rate-item__value">
 | 
					    <div class="std-rate-item__value">
 | 
				
			||||||
      <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
 | 
					      <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
 | 
				
			||||||
      <ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
					      <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
  <div v-else-if="period == '周'" class="std-rate-item">
 | 
					  <div v-else-if="period == '周'" class="std-rate-item">
 | 
				
			||||||
    <CityName :value="city.name" />
 | 
					    <CityName :value="city.name" />
 | 
				
			||||||
    <div class="std-rate-item__value">
 | 
					    <div class="std-rate-item__value">
 | 
				
			||||||
      <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
 | 
					      <ProgressBar :period="period" :title="title" :target="city.target" :current="city.current" />
 | 
				
			||||||
      <ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
					      <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
  <div v-else-if="period == '月'" class="std-rate-item">
 | 
					  <div v-else-if="period == '月'" class="std-rate-item">
 | 
				
			||||||
    <CityName :value="city.name" />
 | 
					    <CityName :value="city.name" />
 | 
				
			||||||
    <div class="std-rate-item__value">
 | 
					    <div class="std-rate-item__value">
 | 
				
			||||||
      <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
 | 
					      <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
 | 
				
			||||||
      <ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
					      <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
				
			||||||
      <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
 | 
					      <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -33,7 +33,7 @@
 | 
				
			|||||||
    <CityName :value="city.name" />
 | 
					    <CityName :value="city.name" />
 | 
				
			||||||
    <div class="std-rate-item__value">
 | 
					    <div class="std-rate-item__value">
 | 
				
			||||||
      <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
 | 
					      <ProgressBar :period="period" :title="titleTarget" :target="city.target" :current="city.current" />
 | 
				
			||||||
      <ProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
					      <preProgressBar :period="period" :title="titlePre" :previous="city.previous" />
 | 
				
			||||||
      <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
 | 
					      <!-- <ProgressBar :period="period" :title="title" :value="city.current" /> -->
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -42,10 +42,12 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import CityName from "./CityName.vue";
 | 
					import CityName from "./CityName.vue";
 | 
				
			||||||
import ProgressBar from "./ProgressBar.vue";
 | 
					import ProgressBar from "./ProgressBar.vue";
 | 
				
			||||||
 | 
					import preProgressBar from "./preProgressBar.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "StdRateItem",
 | 
					  name: "StdRateItem",
 | 
				
			||||||
  components: { CityName, ProgressBar },
 | 
					  components: { CityName, ProgressBar, preProgressBar },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    city: {
 | 
					    city: {
 | 
				
			||||||
      type: Object,
 | 
					      type: Object,
 | 
				
			||||||
@@ -148,7 +150,7 @@ export default {
 | 
				
			|||||||
  align-items: center;
 | 
					  align-items: center;
 | 
				
			||||||
  gap: 8px;
 | 
					  gap: 8px;
 | 
				
			||||||
  flex: 1 1 auto;
 | 
					  flex: 1 1 auto;
 | 
				
			||||||
  padding: 12px;
 | 
					  padding: 16px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.std-rate-item__value {
 | 
					.std-rate-item__value {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,130 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-27 09:12:54
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 15:02:46
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="progress-bar" :data-title="title" :data-rate="previous + '%'">
 | 
				
			||||||
 | 
					    <div class="progress-bar__rate" :style="{ width: dataRate == '-' ? 0 : dataRate }"></div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "ProgressBar",
 | 
				
			||||||
 | 
					  components: {},
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    value: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 0,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    target: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 0,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    previous: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 0,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    current: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 0,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // total: {
 | 
				
			||||||
 | 
					    //   type: Number,
 | 
				
			||||||
 | 
					    //   default: 0,
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRate() {
 | 
				
			||||||
 | 
					      // if (this.current != 0 && this.target != 0) {
 | 
				
			||||||
 | 
					        // console.log( '1111111111', this.current, this.target,this.previous);
 | 
				
			||||||
 | 
					      return this.previous >= 100 ? 100 + '%' : parseFloat(this.previous).toFixed(2) + '%';
 | 
				
			||||||
 | 
					      // } else if(this.previous != 0) {
 | 
				
			||||||
 | 
					      //   return this.previous + '%'
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					.progress-bar {
 | 
				
			||||||
 | 
					  height: 10px;
 | 
				
			||||||
 | 
					  background-color: #002f6b;
 | 
				
			||||||
 | 
					  border-radius: 4px;
 | 
				
			||||||
 | 
					  margin-bottom: 12px;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:before {
 | 
				
			||||||
 | 
					    content: attr(data-title);
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    color: #fff;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    bottom: -200%;
 | 
				
			||||||
 | 
					    font-size: 12px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:after {
 | 
				
			||||||
 | 
					    content: attr(data-rate);
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    color: #fff;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    bottom: -200%;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    font-size: 12px;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:first-child {
 | 
				
			||||||
 | 
					    &:after {
 | 
				
			||||||
 | 
					      color: #11eae3;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:nth-child(2) {
 | 
				
			||||||
 | 
					    &:after {
 | 
				
			||||||
 | 
					      color: #0e65fd;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .progress-bar__rate {
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    height: 100%;
 | 
				
			||||||
 | 
					    width: 0;
 | 
				
			||||||
 | 
					    border-radius: 4px;
 | 
				
			||||||
 | 
					     background: linear-gradient(to right,
 | 
				
			||||||
 | 
					          #004c5e11 10%,
 | 
				
			||||||
 | 
					          #004c5e,
 | 
				
			||||||
 | 
					          #0ac0c0,
 | 
				
			||||||
 | 
					          #11eae3);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:first-child {
 | 
				
			||||||
 | 
					    .progress-bar__rate {
 | 
				
			||||||
 | 
					      background: linear-gradient(to right,
 | 
				
			||||||
 | 
					          #004c5e11 10%,
 | 
				
			||||||
 | 
					          #004c5e,
 | 
				
			||||||
 | 
					          #0ac0c0,
 | 
				
			||||||
 | 
					          #11eae3);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &:nth-child(2) {
 | 
				
			||||||
 | 
					    .progress-bar__rate {
 | 
				
			||||||
 | 
					      background: linear-gradient(to right, #0048a811, #0048a8, #0e65fd);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-07 10:04:53
 | 
					 * @Date: 2024-05-07 10:04:53
 | 
				
			||||||
 * @LastEditTime: 2024-06-05 09:45:47
 | 
					 * @LastEditTime: 2024-07-09 15:16:43
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -30,8 +30,9 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import Container from "@/views/copilot/components/rightContainer.vue";
 | 
					import Container from "@/views/copilot/components/efficiencyRightContainer.vue";
 | 
				
			||||||
import leftContainer from "@/views/copilot/components/leftContainer.vue";
 | 
					import leftContainer from "@/views/copilot/components/efficiencyLeftContainer.vue";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import ChipOeeVue from "./components/ChipOee.vue";
 | 
					import ChipOeeVue from "./components/ChipOee.vue";
 | 
				
			||||||
import ChipRateVue from "./components/ChipRate.vue";
 | 
					import ChipRateVue from "./components/ChipRate.vue";
 | 
				
			||||||
import StdRateVue from "./components/StdRate.vue";
 | 
					import StdRateVue from "./components/StdRate.vue";
 | 
				
			||||||
@@ -102,12 +103,12 @@ export default {
 | 
				
			|||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  gap: 16px;
 | 
					  gap: 20px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.flex {
 | 
					.flex {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  gap: 16px;
 | 
					  gap: 20px;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,4 +1,4 @@
 | 
				
			|||||||
export default ({
 | 
					 export default ({
 | 
				
			||||||
  titleValue,
 | 
					  titleValue,
 | 
				
			||||||
  subtitle,
 | 
					  subtitle,
 | 
				
			||||||
  previousSum,
 | 
					  previousSum,
 | 
				
			||||||
@@ -6,6 +6,7 @@ export default ({
 | 
				
			|||||||
  targetSum,
 | 
					  targetSum,
 | 
				
			||||||
  currentName,
 | 
					  currentName,
 | 
				
			||||||
  preName,
 | 
					  preName,
 | 
				
			||||||
 | 
					  yesterday,
 | 
				
			||||||
}) => ({
 | 
					}) => ({
 | 
				
			||||||
  grid: {
 | 
					  grid: {
 | 
				
			||||||
    left: 300,
 | 
					    left: 300,
 | 
				
			||||||
@@ -14,22 +15,27 @@ export default ({
 | 
				
			|||||||
    top: 0,
 | 
					    top: 0,
 | 
				
			||||||
    containLabel: true,
 | 
					    containLabel: true,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  tooltip: {},
 | 
					  tooltip: {
 | 
				
			||||||
 | 
					    trigger: "item",
 | 
				
			||||||
 | 
					    extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
 | 
				
			||||||
 | 
					    backgroundColor: '#001829',
 | 
				
			||||||
 | 
					    borderColor: '#001829',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  title: {
 | 
					  title: {
 | 
				
			||||||
    text: titleValue,
 | 
					    text: titleValue,
 | 
				
			||||||
    left: "48%",
 | 
					    left: "48%",
 | 
				
			||||||
    top: "37%",
 | 
					    top: "middle",
 | 
				
			||||||
    textAlign: "center",
 | 
					    textAlign: "center",
 | 
				
			||||||
    textStyle: {
 | 
					    textStyle: {
 | 
				
			||||||
      fontWeight: 600,
 | 
					      fontWeight: 600,
 | 
				
			||||||
      fontSize: 26,
 | 
					      fontSize: 36,
 | 
				
			||||||
      color: "#fffd",
 | 
					       color: "rgba(223,241,254,.8)",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    subtext: `\u2002${subtitle}\u2002`,
 | 
					    subtext: `\u2002${yesterday + '日良率'}\u2002`,
 | 
				
			||||||
    subtextStyle: {
 | 
					    subtextStyle: {
 | 
				
			||||||
      fontSize: 14,
 | 
					      fontSize: 16,
 | 
				
			||||||
      fontWeight: 100,
 | 
					      fontWeight: 100,
 | 
				
			||||||
      color: "#fffd",
 | 
					      color: "rgba(255,255,255,.7)",
 | 
				
			||||||
      align: "right",
 | 
					      align: "right",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -61,7 +67,15 @@ export default ({
 | 
				
			|||||||
          value: currentSum,
 | 
					          value: currentSum,
 | 
				
			||||||
          name: currentName,
 | 
					          name: currentName,
 | 
				
			||||||
          tooltip: {
 | 
					          tooltip: {
 | 
				
			||||||
            formatter: `${currentName} : ${currentSum}`
 | 
					            backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter:`
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          selected: false,
 | 
					          selected: false,
 | 
				
			||||||
          itemStyle: {
 | 
					          itemStyle: {
 | 
				
			||||||
@@ -86,7 +100,15 @@ export default ({
 | 
				
			|||||||
          value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
 | 
					          value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
 | 
				
			||||||
          name: currentName,
 | 
					          name: currentName,
 | 
				
			||||||
          tooltip: {
 | 
					          tooltip: {
 | 
				
			||||||
            formatter: `${currentName} : ${currentSum}`
 | 
					           backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter:`
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          itemStyle: { color: "transparent" },
 | 
					          itemStyle: { color: "transparent" },
 | 
				
			||||||
          label: { show: false },
 | 
					          label: { show: false },
 | 
				
			||||||
@@ -109,6 +131,17 @@ export default ({
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          value: previousSum,
 | 
					          value: previousSum,
 | 
				
			||||||
          name: preName,
 | 
					          name: preName,
 | 
				
			||||||
 | 
					           tooltip: {
 | 
				
			||||||
 | 
					           backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					            extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					            formatter:`
 | 
				
			||||||
 | 
					                <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                `
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
          selected: false,
 | 
					          selected: false,
 | 
				
			||||||
          itemStyle: {
 | 
					          itemStyle: {
 | 
				
			||||||
            borderJoin: "round",
 | 
					            borderJoin: "round",
 | 
				
			||||||
@@ -129,10 +162,19 @@ export default ({
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          value:previousSum == 0
 | 
					          value:previousSum === 0 ? 1 : 0,
 | 
				
			||||||
              ? 1
 | 
					          name: preName,
 | 
				
			||||||
              : 0,
 | 
					          tooltip: {
 | 
				
			||||||
          name: "-",
 | 
					             backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					            extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					            formatter:`
 | 
				
			||||||
 | 
					                <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                `
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
          itemStyle: { color: "transparent" },
 | 
					          itemStyle: { color: "transparent" },
 | 
				
			||||||
          label: { show: false },
 | 
					          label: { show: false },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -55,13 +55,40 @@ export default {
 | 
				
			|||||||
      options: {
 | 
					      options: {
 | 
				
			||||||
        color: ["#FFD160", "#2760FF", "#12FFF5"],
 | 
					        color: ["#FFD160", "#2760FF", "#12FFF5"],
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          left: "7%",
 | 
					          left: "9%",
 | 
				
			||||||
          right: "7%",
 | 
					          right: "3%",
 | 
				
			||||||
          bottom: "15%",
 | 
					          bottom: "15%",
 | 
				
			||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: "axis",
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            var res = ``;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>` +
 | 
				
			||||||
 | 
					                `<span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${params[i].value ? params[i].value  : 0}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					            // return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
@@ -75,8 +102,8 @@ export default {
 | 
				
			|||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            interval: 0,//设置横坐标为斜
 | 
					            interval: 0,//设置横坐标为斜
 | 
				
			||||||
            rotate:45,
 | 
					            rotate:45,
 | 
				
			||||||
            color: "rgba(255, 255, 255, 0.7)",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            // formatter: function (value) {
 | 
					            // formatter: function (value) {
 | 
				
			||||||
            //   console.log(value);
 | 
					            //   console.log(value);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -95,17 +122,18 @@ export default {
 | 
				
			|||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
            type: "value",
 | 
					            type: "value",
 | 
				
			||||||
            name: "单位/片",
 | 
					            name: "单位/片",
 | 
				
			||||||
 | 
					            position: 'left',
 | 
				
			||||||
            nameTextStyle: {
 | 
					            nameTextStyle: {
 | 
				
			||||||
              color: "rgba(255, 255, 255, 0.7)",
 | 
					              color: "rgba(223,241,254,.8)",
 | 
				
			||||||
              fontSize: 12,
 | 
					              fontSize: 16,
 | 
				
			||||||
              align: "right",
 | 
					              align: "right",
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisTick: {
 | 
					            axisTick: {
 | 
				
			||||||
              show: false,
 | 
					              show: false,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLabel: {
 | 
					            axisLabel: {
 | 
				
			||||||
              color: "rgba(255, 255, 255, 0.7)",
 | 
					              color: "rgba(223,241,254,.8)",
 | 
				
			||||||
              fontSize: 10,
 | 
					              fontSize:16,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            axisLine: {
 | 
					            axisLine: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
@@ -173,7 +201,7 @@ export default {
 | 
				
			|||||||
            //     { offset: 1, color: "#12FFF5" + "00" },
 | 
					            //     { offset: 1, color: "#12FFF5" + "00" },
 | 
				
			||||||
            //   ]),
 | 
					            //   ]),
 | 
				
			||||||
            // },
 | 
					            // },
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -217,11 +245,11 @@ export default {
 | 
				
			|||||||
    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
					    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
				
			||||||
    // isFullscreen(val) {
 | 
					    // isFullscreen(val) {
 | 
				
			||||||
    //   this.actualOptions.series.map((item) => {
 | 
					    //   this.actualOptions.series.map((item) => {
 | 
				
			||||||
    //     item.barWidth = val ? 18 : 12;
 | 
					    //     item.barWidth = val ? 18 : 16;
 | 
				
			||||||
    //   });
 | 
					    //   });
 | 
				
			||||||
    //   this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					    //   this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
    //   this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					    //   this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
    //   this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					    //   this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
    //   this.initOptions(this.actualOptions);
 | 
					    //   this.initOptions(this.actualOptions);
 | 
				
			||||||
    // },
 | 
					    // },
 | 
				
			||||||
    // series(val) {
 | 
					    // series(val) {
 | 
				
			||||||
@@ -396,11 +424,11 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
 | 
					      this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
					      // const actualOptions = JSON.parse(JSON.stringify(this.options));
 | 
				
			||||||
      actualOptions.xAxis.data = this.orderXAxis;
 | 
					      this.options.xAxis.data = this.orderXAxis;
 | 
				
			||||||
      actualOptions.series[0].data = this.data;
 | 
					      this.options.series[0].data = this.data;
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      // this.actualOptions = actualOptions;
 | 
				
			||||||
      this.chart.setOption(actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-30 08:58:39
 | 
					 * @Date: 2024-05-30 08:58:39
 | 
				
			||||||
 * @LastEditTime: 2024-06-07 09:29:45
 | 
					 * @LastEditTime: 2024-07-18 16:48:10
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -9,7 +9,7 @@
 | 
				
			|||||||
  <chart-container class="bar-chart-base">
 | 
					  <chart-container class="bar-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
					      <span v-for="(item,index) in legend" :key="index" class="legend-item"
 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }">{{ item.label }}</span>
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div ref="oeeChart" style="height:100%"></div>
 | 
					    <div ref="oeeChart" style="height:100%"></div>
 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
@@ -56,13 +56,70 @@ export default {
 | 
				
			|||||||
      actualOptions: null,
 | 
					      actualOptions: null,
 | 
				
			||||||
      options: {
 | 
					      options: {
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          left: "5%",
 | 
					          left: "8%",
 | 
				
			||||||
          right: "0%",
 | 
					          right: "0%",
 | 
				
			||||||
          bottom: "3%",
 | 
					          bottom: "3%",
 | 
				
			||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        // tooltip: {
 | 
				
			||||||
 | 
					        //   trigger: "axis",
 | 
				
			||||||
 | 
					        //   axisPointer: {
 | 
				
			||||||
 | 
					        //     // type: "cross",
 | 
				
			||||||
 | 
					        //     crossStyle: {
 | 
				
			||||||
 | 
					        //       color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					        //     },
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        //   extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
 | 
				
			||||||
 | 
					        //   backgroundColor: '#001829',
 | 
				
			||||||
 | 
					        //   borderColor: '#001829',
 | 
				
			||||||
 | 
					        //   // textStyle: {
 | 
				
			||||||
 | 
					        //   //   color:'rgba(255, 255, 255, 0.85)'
 | 
				
			||||||
 | 
					        //   // },
 | 
				
			||||||
 | 
					        //   formatter: params => {
 | 
				
			||||||
 | 
					        //     console.log('params', params)
 | 
				
			||||||
 | 
					        //     var res = `<span style='color:rgba(255,255,255,0.85)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					        //     for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					        //       res +=
 | 
				
			||||||
 | 
					        //         "<br/>" +
 | 
				
			||||||
 | 
					        //         `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
 | 
				
			||||||
 | 
					        //         `<span style='display:inline-block;width:150px;color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					        //         `<span style='color:rgba(255,255,255,0.65);font-size:14px;'>${params[i].value}</span>`;
 | 
				
			||||||
 | 
					        //     }
 | 
				
			||||||
 | 
					        //     return res;
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:12px;height:12px;background-color:${color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:60px;color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;text-align:right'>${params[i].value ? params[i].value : 0}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					            // return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -73,24 +130,25 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/片",
 | 
					          name: "单位/片",
 | 
				
			||||||
 | 
					          position: 'left',
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            align: "right",
 | 
					            align: "right",
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -108,7 +166,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "FTO", // this.series[0].name,
 | 
					            name: "FTO", // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -143,7 +201,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // this.series[1].name,
 | 
					            name: "", // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -175,7 +233,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // "2024年目标值",
 | 
					            name: "", // "2024年目标值",
 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color:'#f3c000'
 | 
					              color:'#f3c000'
 | 
				
			||||||
@@ -201,12 +259,12 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
					    /** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
 | 
				
			||||||
    isFullscreen(val) {
 | 
					    isFullscreen(val) {
 | 
				
			||||||
      this.actualOptions.series.map((item) => {
 | 
					      this.options.series.map((item) => {
 | 
				
			||||||
        item.barWidth = val ? 18 : 12;
 | 
					        item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      this.options.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // if (val === false && this.isOpen === true) {
 | 
					      // if (val === false && this.isOpen === true) {
 | 
				
			||||||
      //   console.log(val)
 | 
					      //   console.log(val)
 | 
				
			||||||
      //   this.width = 97 + '%'
 | 
					      //   this.width = 97 + '%'
 | 
				
			||||||
@@ -216,12 +274,12 @@ export default {
 | 
				
			|||||||
      //   this.canvasReset()
 | 
					      //   this.canvasReset()
 | 
				
			||||||
      // }
 | 
					      // }
 | 
				
			||||||
      // this.actualOptions.series.map((item) => {
 | 
					      // this.actualOptions.series.map((item) => {
 | 
				
			||||||
      //   item.barWidth = val ? 18 : 12;
 | 
					      //   item.barWidth = val ? 18 : 16;
 | 
				
			||||||
      // });
 | 
					      // });
 | 
				
			||||||
      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initChart(this.actualOptions)
 | 
					      this.initChart(this.options)
 | 
				
			||||||
      this.canvasReset()
 | 
					      this.canvasReset()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    series(val) {
 | 
					    series(val) {
 | 
				
			||||||
@@ -231,16 +289,17 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      // console.log('val', val)
 | 
					      // console.log('val', val)
 | 
				
			||||||
      const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
					      const actualOptions = JSON.parse(JSON.stringify(this.options))
 | 
				
			||||||
 | 
					      console.log(actualOptions);
 | 
				
			||||||
      // actualOptions.xAxis.data = val
 | 
					      // actualOptions.xAxis.data = val
 | 
				
			||||||
      console.log(actualOptions)
 | 
					      console.log(actualOptions)
 | 
				
			||||||
      actualOptions.series[0].data = val[0].data;
 | 
					      this.options.series[0].data = val[0].data;
 | 
				
			||||||
      actualOptions.series[0].name = val[0].name;
 | 
					      this.options.series[0].name = val[0].name;
 | 
				
			||||||
      actualOptions.series[1].data = val?.[1]?.data;
 | 
					      this.options.series[1].data = val?.[1]?.data;
 | 
				
			||||||
      actualOptions.series[1].name = val?.[1]?.name;
 | 
					      this.options.series[1].name = val?.[1]?.name;
 | 
				
			||||||
      actualOptions.series[2].data = val?.[2]?.data || [];
 | 
					      this.options.series[2].data = val?.[2]?.data || [];
 | 
				
			||||||
      actualOptions.series[2].name = val?.[2]?.name || "";
 | 
					      this.options.series[2].name = val?.[2]?.name || "";
 | 
				
			||||||
      this.actualOptions = actualOptions;
 | 
					      this.actualOptions = actualOptions;
 | 
				
			||||||
      this.initChart(actualOptions);
 | 
					      this.initChart(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
@@ -277,27 +336,28 @@ export default {
 | 
				
			|||||||
        this.chart.dispose();
 | 
					        this.chart.dispose();
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.chart = echarts.init(this.$refs.oeeChart);
 | 
					      this.chart = echarts.init(this.$refs.oeeChart);
 | 
				
			||||||
      this.chart.setOption(this.actualOptions);
 | 
					      this.chart.setOption(this.options);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.bar-chart-base {
 | 
					.bar-chart-base {
 | 
				
			||||||
  // position: relative;
 | 
					  // position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .legend {
 | 
					  .legend {
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 5.2vh;
 | 
					    top: 3vh;
 | 
				
			||||||
    right: 1vw;
 | 
					    right: 13vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .legend-item {
 | 
					  .legend-item {
 | 
				
			||||||
    position: relative;
 | 
					    position: relative;
 | 
				
			||||||
    // font-size: 12px;
 | 
					    font-size: 1.2vw;
 | 
				
			||||||
    margin-right:1.2vw;
 | 
					    margin-right:1.2vw;
 | 
				
			||||||
 | 
					    color: #DFF1FE;
 | 
				
			||||||
    &::before {
 | 
					    &::before {
 | 
				
			||||||
      content: "";
 | 
					      content: "";
 | 
				
			||||||
      display: inline-block;
 | 
					      display: inline-block;
 | 
				
			||||||
@@ -347,4 +407,8 @@ export default {
 | 
				
			|||||||
   transform: translateY(-50%) translateX(50%);
 | 
					   transform: translateY(-50%) translateX(50%);
 | 
				
			||||||
 }
 | 
					 }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					 .echarts-tooltip-dark {
 | 
				
			||||||
 | 
					   background: #001829;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,3 +1,10 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-03 15:38:31
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 16:49:22
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
<!--
 | 
					<!--
 | 
				
			||||||
    filename: ContainerIcon.vue
 | 
					    filename: ContainerIcon.vue
 | 
				
			||||||
    author: liubin
 | 
					    author: liubin
 | 
				
			||||||
@@ -49,8 +56,8 @@ export default {
 | 
				
			|||||||
.container-icon {
 | 
					.container-icon {
 | 
				
			||||||
  //   width: 32px;
 | 
					  //   width: 32px;
 | 
				
			||||||
  //   height: 32px;
 | 
					  //   height: 32px;
 | 
				
			||||||
  width: 1.701vw;
 | 
					  width: 1.4vw;
 | 
				
			||||||
  height: 1.701vw;
 | 
					  height: 1.4vw;
 | 
				
			||||||
  background: #ccc2;
 | 
					  background: #ccc2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,19 +1,19 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="order-container">
 | 
					  <div class="order-container">
 | 
				
			||||||
    <div class="table">
 | 
					    <div class="table">
 | 
				
			||||||
      <dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%; color: rgba(255, 255, 255, .6);" ref="orderScrollBoard" />
 | 
					      <dv-scroll-board v-if="showTable" :config="config"
 | 
				
			||||||
 | 
					        style="width: 100%; height: 100%; color: rgba(255, 255, 255,1);font-size:16," ref="orderScrollBoard" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="chart">
 | 
					    <div class="chart">
 | 
				
			||||||
      <div class="chart-title">
 | 
					      <div class="chart-title">
 | 
				
			||||||
        <span class="title">工单情况</span>
 | 
					        <span class="title">工单情况</span>
 | 
				
			||||||
        <span class="line"></span>
 | 
					        <span class="line"></span>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <div class="button-type" style="margin-left: auto;position: absolute;right: 1%;top: 57%;z-index: 999;">
 | 
					      <div class="button-type" style="margin-left: auto;position: absolute;right: 3%;top: 57%;z-index: 999;">
 | 
				
			||||||
        <CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i"
 | 
					        <CopilotButton v-for="i in ['目标产量', '计划投入', '实际投入', '实际产出', '废品数量', '待再加工']" :key="i" :label="i"
 | 
				
			||||||
          :active="i === type" @click="() => $emit('update:type', i)" />
 | 
					          :active="i === type" @click="() => $emit('update:type', i)" />
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <barChartBase :type="type" :energyCockpits="prodOrder" ref="barChart"
 | 
					      <barChartBase :type="type" :energyCockpits="prodOrder" ref="barChart" style="height: 0;flex:1"></barChartBase>
 | 
				
			||||||
        style="height: 0;flex:1"></barChartBase>
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -40,6 +40,7 @@ export default {
 | 
				
			|||||||
        evenRowBGC: "rgba(rgba(2, 13, 45, 0.18)",
 | 
					        evenRowBGC: "rgba(rgba(2, 13, 45, 0.18)",
 | 
				
			||||||
        data: [],
 | 
					        data: [],
 | 
				
			||||||
        rowNum: 12,
 | 
					        rowNum: 12,
 | 
				
			||||||
 | 
					        fontSize:16,
 | 
				
			||||||
        waitTime: 3000,
 | 
					        waitTime: 3000,
 | 
				
			||||||
        columnWidth: [150],
 | 
					        columnWidth: [150],
 | 
				
			||||||
        align: ["left"],
 | 
					        align: ["left"],
 | 
				
			||||||
@@ -99,33 +100,33 @@ export default {
 | 
				
			|||||||
          let arr = [];
 | 
					          let arr = [];
 | 
				
			||||||
          // arr.push(i + 1);
 | 
					          // arr.push(i + 1);
 | 
				
			||||||
          arr.push(
 | 
					          arr.push(
 | 
				
			||||||
            `<span title=${this.prodOrder[i].workOrderNumber || ""}>${
 | 
					            `<span title=${this.prodOrder[i].workOrderNumber || ""} style='color: rgba(223,241,254,.8);font-size:16px' >${
 | 
				
			||||||
            this.prodOrder[i].workOrderNumber || ""
 | 
					            this.prodOrder[i].workOrderNumber || ""
 | 
				
			||||||
            }</span>`,
 | 
					            }</span>`,
 | 
				
			||||||
              `<span title=${this.prodOrder[i].orderStatus || ""}>${this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
 | 
					              `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].orderStatus || ""}>${this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
 | 
				
			||||||
              }</span>`,
 | 
					              }</span>`,
 | 
				
			||||||
              `<span title=${this.prodOrder[i].plannedInvestment || ""}>${this.prodOrder[i].plannedInvestment || ""
 | 
					              `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].plannedInvestment || ""}>${this.prodOrder[i].plannedInvestment || ""
 | 
				
			||||||
              }</span>`,
 | 
					              }</span>`,
 | 
				
			||||||
              `<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
 | 
					              `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
 | 
				
			||||||
              }</span>`,
 | 
					              }</span>`,
 | 
				
			||||||
              `<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
 | 
					              `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
 | 
				
			||||||
              }</span>`,
 | 
					              }</span>`,
 | 
				
			||||||
              `<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
 | 
					              `<span style='color: rgba(223,241,254,.8);font-size:16px' title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
 | 
				
			||||||
              }</span>`,
 | 
					              }</span>`,
 | 
				
			||||||
              `<span style="display:inline-block;width:45px;">${this.prodOrder[i].productionProgress
 | 
					              `<span style="display:inline-block;width:45px;color: rgba(223,241,254,.8)">${this.prodOrder[i].productionProgress
 | 
				
			||||||
                ? this.prodOrder[i].productionProgress.toFixed(0) + "%"
 | 
					                ? this.prodOrder[i].productionProgress.toFixed(2) * 100 + "%"
 | 
				
			||||||
                : "0%"
 | 
					                : "0%"
 | 
				
			||||||
              }</span>
 | 
					              }</span>
 | 
				
			||||||
            <div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
 | 
					            <div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
 | 
				
			||||||
            <svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
 | 
					            <svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
 | 
				
			||||||
              <circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
 | 
					              <circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
 | 
				
			||||||
              <circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${this.prodOrder[i].productionProgress
 | 
					              <circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${this.prodOrder[i].productionProgress
 | 
				
			||||||
                ? this.prodOrder[i].productionProgress.toFixed(0) *
 | 
					                ? this.prodOrder[i].productionProgress.toFixed(2) *100 *
 | 
				
			||||||
                37.68 *
 | 
					                37.68 *
 | 
				
			||||||
                0.01 +
 | 
					                0.01 +
 | 
				
			||||||
                "," +
 | 
					                "," +
 | 
				
			||||||
                (1 -
 | 
					                (1 -
 | 
				
			||||||
                  this.prodOrder[i].productionProgress.toFixed(0) * 0.01) *
 | 
					                  this.prodOrder[i].productionProgress.toFixed(2) * 0.01) * 100 *
 | 
				
			||||||
                37.68
 | 
					                37.68
 | 
				
			||||||
                : 0 + "," + 37.68
 | 
					                : 0 + "," + 37.68
 | 
				
			||||||
              }"/>
 | 
					              }"/>
 | 
				
			||||||
@@ -188,7 +189,7 @@ export default {
 | 
				
			|||||||
              height: 1px; // display: inline-block;
 | 
					              height: 1px; // display: inline-block;
 | 
				
			||||||
              border: 1px solid;
 | 
					              border: 1px solid;
 | 
				
			||||||
              // display: inline-block;
 | 
					              // display: inline-block;
 | 
				
			||||||
              border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%, ) 2 2;
 | 
					              border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 0%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%, ) 2 2;
 | 
				
			||||||
              backdrop-filter: blur(3px);
 | 
					              backdrop-filter: blur(3px);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -28,8 +28,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">良品数量</span>
 | 
					              <span class="type">良品数量</span>
 | 
				
			||||||
              <span class="type-name">{{
 | 
					              <span class="type-name">{{
 | 
				
			||||||
              msgObj.stand.goodNumber ? msgObj.stand.goodNumber.toLocaleString() : 0
 | 
					                msgObj.stand.goodNumber ? msgObj.stand.goodNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@@ -38,8 +38,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">生产数量</span>
 | 
					              <span class="type">生产数量</span>
 | 
				
			||||||
              <span class="num">{{
 | 
					              <span class="num">{{
 | 
				
			||||||
              msgObj.stand.outputNumber ? msgObj.stand.outputNumber.toLocaleString() : 0
 | 
					                msgObj.stand.outputNumber ? msgObj.stand.outputNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type1">良品率</span>
 | 
					              <span class="type1">良品率</span>
 | 
				
			||||||
@@ -61,8 +61,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">良品数量</span>
 | 
					              <span class="type">良品数量</span>
 | 
				
			||||||
              <span class="type-name">{{
 | 
					              <span class="type-name">{{
 | 
				
			||||||
              msgObj.chip.goodNumber ? msgObj.chip.goodNumber.toLocaleString() : 0
 | 
					                msgObj.chip.goodNumber ? msgObj.chip.goodNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@@ -71,8 +71,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">生产数量</span>
 | 
					              <span class="type">生产数量</span>
 | 
				
			||||||
              <span class="num">{{
 | 
					              <span class="num">{{
 | 
				
			||||||
              msgObj.chip.outputNumber ? msgObj.chip.outputNumber.toLocaleString() : 0
 | 
					                msgObj.chip.outputNumber ? msgObj.chip.outputNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type1">良品率</span>
 | 
					              <span class="type1">良品率</span>
 | 
				
			||||||
@@ -94,8 +94,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">良品数量</span>
 | 
					              <span class="type">良品数量</span>
 | 
				
			||||||
              <span class="type-name">{{
 | 
					              <span class="type-name">{{
 | 
				
			||||||
              msgObj.bipv.goodNumber ? msgObj.bipv.goodNumber.toLocaleString() : 0
 | 
					                msgObj.bipv.goodNumber ? msgObj.bipv.goodNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
        </div>
 | 
					        </div>
 | 
				
			||||||
@@ -104,8 +104,8 @@
 | 
				
			|||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type">生产数量</span>
 | 
					              <span class="type">生产数量</span>
 | 
				
			||||||
              <span class="num">{{
 | 
					              <span class="num">{{
 | 
				
			||||||
              msgObj.bipv.outputNumber ? msgObj.bipv.outputNumber.toLocaleString() : 0
 | 
					                msgObj.bipv.outputNumber ? msgObj.bipv.outputNumber.toLocaleString() : 0
 | 
				
			||||||
              }}</span>
 | 
					                }}</span>
 | 
				
			||||||
            </div>
 | 
					            </div>
 | 
				
			||||||
            <div>
 | 
					            <div>
 | 
				
			||||||
              <span class="type1">良品率</span>
 | 
					              <span class="type1">良品率</span>
 | 
				
			||||||
@@ -118,7 +118,11 @@
 | 
				
			|||||||
    <div class="chart">
 | 
					    <div class="chart">
 | 
				
			||||||
      <div class="chart-title">
 | 
					      <div class="chart-title">
 | 
				
			||||||
        <span class="title">生产情况</span>
 | 
					        <span class="title">生产情况</span>
 | 
				
			||||||
        <span class="line"></span>
 | 
					        <div class="button-than" style="position: absolute;right: 3%;">
 | 
				
			||||||
 | 
					          <CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
 | 
				
			||||||
 | 
					            @click="() => $emit('update:than', i)" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <!-- <span class="line"></span> -->
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
      <barChartBase :companyId="companyId" :than="than" :period="period" :data="factoryData" ref="barChart"
 | 
					      <barChartBase :companyId="companyId" :than="than" :period="period" :data="factoryData" ref="barChart"
 | 
				
			||||||
        style="height: 0;flex:1">
 | 
					        style="height: 0;flex:1">
 | 
				
			||||||
@@ -129,10 +133,12 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import { number } from 'echarts';
 | 
					import { number } from 'echarts';
 | 
				
			||||||
import barChartBase from './ChipOee'
 | 
					import barChartBase from './ChipOee'
 | 
				
			||||||
 | 
					import CopilotButton from "./button.vue"
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "ProdMonitor",
 | 
					  name: "ProdMonitor",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    barChartBase,
 | 
					    barChartBase,
 | 
				
			||||||
 | 
					    CopilotButton
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -153,6 +159,9 @@ export default {
 | 
				
			|||||||
      type: Number,
 | 
					      type: Number,
 | 
				
			||||||
      default:0
 | 
					      default:0
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    than: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    than: {
 | 
					    than: {
 | 
				
			||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
      default: '同比',
 | 
					      default: '同比',
 | 
				
			||||||
@@ -181,10 +190,14 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.makeData();
 | 
					    this.makeData();
 | 
				
			||||||
 | 
					    this.$nextTick(() => {
 | 
				
			||||||
 | 
					      let button = document.getElementsByClassName('button-than')
 | 
				
			||||||
 | 
					      button[0].children[0].style.borderRadius = '4px 0 0 4px'
 | 
				
			||||||
 | 
					      button[0].children[1].style.borderRadius = '0px 4px 4px 0'
 | 
				
			||||||
 | 
					    })
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    makeData() {
 | 
					    makeData() {
 | 
				
			||||||
      console.log('msgObj', this.msgObj);
 | 
					 | 
				
			||||||
      this.msgObj.chip = {};
 | 
					      this.msgObj.chip = {};
 | 
				
			||||||
      this.msgObj.stand = {};
 | 
					      this.msgObj.stand = {};
 | 
				
			||||||
      this.msgObj.bipv = {};
 | 
					      this.msgObj.bipv = {};
 | 
				
			||||||
@@ -233,19 +246,19 @@ export default {
 | 
				
			|||||||
          // width: 5vw;
 | 
					          // width: 5vw;
 | 
				
			||||||
          color: #FFFFFF;
 | 
					          color: #FFFFFF;
 | 
				
			||||||
          line-height: 24px;
 | 
					          line-height: 24px;
 | 
				
			||||||
          text-align: left;
 | 
					          // text-align: left;
 | 
				
			||||||
          font-style: normal;
 | 
					          font-style: normal;
 | 
				
			||||||
          display: inline-block;
 | 
					          display: inline-block;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      .line{
 | 
					      // .line{
 | 
				
			||||||
        flex: 1;
 | 
					      //   flex: 1;
 | 
				
			||||||
        // width: 80%;
 | 
					      //   // width: 80%;
 | 
				
			||||||
        height: 1px;        // display: inline-block;
 | 
					      //   height: 1px;        // display: inline-block;
 | 
				
			||||||
        border: 1px solid;
 | 
					      //   border: 1px solid;
 | 
				
			||||||
        // display: inline-block;
 | 
					      //   // display: inline-block;
 | 
				
			||||||
        border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2;
 | 
					      //   border-image: linear-gradient(90deg, rgba(25, 146, 255, 0) 10%, rgba(95, 190, 249, 1), rgba(0, 120, 228, 0) 90%,) 2 2;
 | 
				
			||||||
        backdrop-filter: blur(3px);
 | 
					      //   backdrop-filter: blur(3px);
 | 
				
			||||||
      }
 | 
					      // }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  .data{
 | 
					  .data{
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-06 14:22:56
 | 
					 * @Date: 2024-06-06 14:22:56
 | 
				
			||||||
 * @LastEditTime: 2024-06-07 10:53:39
 | 
					 * @LastEditTime: 2024-07-02 13:54:08
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -62,7 +62,7 @@ button {
 | 
				
			|||||||
  font-size: 16px;
 | 
					  font-size: 16px;
 | 
				
			||||||
  color: #FFFFFF;
 | 
					  color: #FFFFFF;
 | 
				
			||||||
  line-height: 22px;
 | 
					  line-height: 22px;
 | 
				
			||||||
  letter-spacing: 5px;
 | 
					  /* letter-spacing: 5px; */
 | 
				
			||||||
  text-align: center;
 | 
					  text-align: center;
 | 
				
			||||||
  font-style: normal;
 | 
					  font-style: normal;
 | 
				
			||||||
  letter-spacing: 10px;
 | 
					  letter-spacing: 10px;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-07 08:37:17
 | 
					 * @Date: 2024-06-07 08:37:17
 | 
				
			||||||
 * @LastEditTime: 2024-06-07 11:04:41
 | 
					 * @LastEditTime: 2024-07-18 16:16:24
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -59,7 +59,7 @@ button {
 | 
				
			|||||||
  font-size: 18px; */
 | 
					  font-size: 18px; */
 | 
				
			||||||
  font-family: PingFangSC, PingFang SC;
 | 
					  font-family: PingFangSC, PingFang SC;
 | 
				
			||||||
  font-weight: 400;
 | 
					  font-weight: 400;
 | 
				
			||||||
  font-size: 12px;
 | 
					  font-size: 14px;
 | 
				
			||||||
  color: #FFFFFF;
 | 
					  color: #FFFFFF;
 | 
				
			||||||
  line-height: 22px;
 | 
					  line-height: 22px;
 | 
				
			||||||
  letter-spacing: 5px;
 | 
					  letter-spacing: 5px;
 | 
				
			||||||
@@ -91,7 +91,7 @@ button {
 | 
				
			|||||||
  font-size: 18px; */
 | 
					  font-size: 18px; */
 | 
				
			||||||
  font-family: PingFangSC, PingFang SC;
 | 
					  font-family: PingFangSC, PingFang SC;
 | 
				
			||||||
  font-weight: 400;
 | 
					  font-weight: 400;
 | 
				
			||||||
  font-size: 12px;
 | 
					  font-size: 14px;
 | 
				
			||||||
  color: #FFFFFF;
 | 
					  color: #FFFFFF;
 | 
				
			||||||
  line-height: 22px;
 | 
					  line-height: 22px;
 | 
				
			||||||
  letter-spacing: 5px;
 | 
					  letter-spacing: 5px;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-06-05 09:36:07
 | 
					 * @Date: 2024-06-05 09:36:07
 | 
				
			||||||
 * @LastEditTime: 2024-06-05 09:38:23
 | 
					 * @LastEditTime: 2024-07-19 16:16:02
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -15,9 +15,7 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div class="copilot-container">
 | 
					  <div class="copilot-container">
 | 
				
			||||||
    <!-- refresh btn  -->
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
    <button
 | 
					    <button v-if="false" style="
 | 
				
			||||||
      v-if="false"
 | 
					 | 
				
			||||||
      style="
 | 
					 | 
				
			||||||
        appearance: none;
 | 
					        appearance: none;
 | 
				
			||||||
        outline: none;
 | 
					        outline: none;
 | 
				
			||||||
        border: none;
 | 
					        border: none;
 | 
				
			||||||
@@ -27,43 +25,26 @@
 | 
				
			|||||||
        position: absolute;
 | 
					        position: absolute;
 | 
				
			||||||
        top: 8px;
 | 
					        top: 8px;
 | 
				
			||||||
        right: 8px;
 | 
					        right: 8px;
 | 
				
			||||||
      "
 | 
					      " @click="$emit('refresh')">
 | 
				
			||||||
      @click="$emit('refresh')"
 | 
					      <svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
 | 
				
			||||||
    >
 | 
					        style="width: 24px; height: 24px">
 | 
				
			||||||
      <svg
 | 
					        <path stroke-linecap="round" stroke-linejoin="round"
 | 
				
			||||||
        xmlns="http://www.w3.org/2000/svg"
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99" />
 | 
				
			||||||
        fill="none"
 | 
					 | 
				
			||||||
        viewBox="0 0 24 24"
 | 
					 | 
				
			||||||
        stroke-width="1.5"
 | 
					 | 
				
			||||||
        stroke="currentColor"
 | 
					 | 
				
			||||||
        style="width: 24px; height: 24px"
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
        <path
 | 
					 | 
				
			||||||
          stroke-linecap="round"
 | 
					 | 
				
			||||||
          stroke-linejoin="round"
 | 
					 | 
				
			||||||
          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
 | 
					 | 
				
			||||||
        />
 | 
					 | 
				
			||||||
      </svg>
 | 
					      </svg>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
    <!-- decoration  -->
 | 
					    <!-- decoration  -->
 | 
				
			||||||
    <div class="corner tl"></div>
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
    <div class="corner tr"></div>
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
    <div  class="corner bl"></div>
 | 
					    <div class="corner bl"></div>
 | 
				
			||||||
    <div  class="corner br"></div>
 | 
					    <div class="corner br"></div>
 | 
				
			||||||
    <!-- content  -->
 | 
					    <!-- content  -->
 | 
				
			||||||
    <div
 | 
					    <div class="container-head" :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
      class="container-head"
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
      class="container-body"
 | 
					 | 
				
			||||||
      :class="[
 | 
					 | 
				
			||||||
        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
      ]"
 | 
					      ]">
 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <slot />
 | 
					      <slot />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -99,6 +80,8 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -106,21 +89,23 @@ export default {
 | 
				
			|||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-left: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom, transparent 2%, rgba(5, 138, 237, .7) 20%, rgba(2, 82, 215, 0.24) 70%, ) 71 71;
 | 
				
			||||||
  backdrop-filter: blur(4px);
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  &::before {
 | 
					  &::before {
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    height: 100%;
 | 
					    height: 96%;
 | 
				
			||||||
    width: 0.11415vw;
 | 
					    width: 0.11415vw;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    top: 0%;
 | 
					    top: 0%;
 | 
				
			||||||
    left: 0;
 | 
					    right: 0;
 | 
				
			||||||
    background: radial-gradient(
 | 
					    background: radial-gradient(
 | 
				
			||||||
      circle at center,
 | 
					      circle at center,
 | 
				
			||||||
      #024798 2%,
 | 
					      #024798 2%,
 | 
				
			||||||
      #024798 30%,
 | 
					      #024798 100%,
 | 
				
			||||||
      transparent
 | 
					      transparent
 | 
				
			||||||
    );
 | 
					    );
 | 
				
			||||||
    z-index: 1;
 | 
					    z-index: 1;
 | 
				
			||||||
@@ -130,12 +115,12 @@ export default {
 | 
				
			|||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    width: 60%;
 | 
					    width: 80%;
 | 
				
			||||||
    height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    left: 8%;
 | 
					    right: 4%;
 | 
				
			||||||
    bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
    background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to right, transparent 10%, #024798 95%, transparent 98%);
 | 
				
			||||||
    z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -148,7 +133,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -168,8 +153,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -33,12 +33,8 @@
 | 
				
			|||||||
    <!-- content  -->
 | 
					    <!-- content  -->
 | 
				
			||||||
    <div class="container-head" ref="container-head"
 | 
					    <div class="container-head" ref="container-head"
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
					      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']">
 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
      <div class="button-than" style="margin-left: auto;">
 | 
					 | 
				
			||||||
        <CopilotButton v-for="i in ['同比', '环比']" :key="i" :label="i" :active="i === than"
 | 
					 | 
				
			||||||
          @click="() => $emit('update:than', i)" />
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="container-body" :class="[
 | 
					    <div class="container-body" :class="[
 | 
				
			||||||
      side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
					      side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
@@ -50,12 +46,10 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import ContainerIconVue from "./ContainerIcon.vue"
 | 
					import ContainerIconVue from "./ContainerIcon.vue"
 | 
				
			||||||
import CopilotButton from "./button.vue"
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "DashboardContainer",
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    Icon: ContainerIconVue,
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
    CopilotButton
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
    side: {
 | 
					    side: {
 | 
				
			||||||
@@ -66,9 +60,6 @@ export default {
 | 
				
			|||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
      default: "cube",
 | 
					      default: "cube",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    than: {
 | 
					 | 
				
			||||||
      type: String,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    title: {
 | 
					    title: {
 | 
				
			||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
      default: "Default Title",
 | 
					      default: "Default Title",
 | 
				
			||||||
@@ -80,43 +71,38 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {},
 | 
					  computed: {},
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    this.$nextTick(() => {
 | 
					
 | 
				
			||||||
      let button = document.getElementsByClassName('button-than')
 | 
					 | 
				
			||||||
      console.log(button);
 | 
					 | 
				
			||||||
      button[0].children[0].style.borderRadius = '4px 0 0 4px'
 | 
					 | 
				
			||||||
      button[0].children[1].style.borderRadius = '0px 4px 4px 0'
 | 
					 | 
				
			||||||
      console.log(button[0].children[0].style);
 | 
					 | 
				
			||||||
    })
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {},
 | 
					  methods: {},
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.copilot-container {
 | 
					.copilot-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 100%;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					  border-right: 0.11415vw solid;
 | 
				
			||||||
 | 
					  border-image: linear-gradient(to bottom,transparent 0%,rgba(5, 138, 237, .7) 40%, rgba(2, 82, 215, 0.24) 70%,) 71 71;
 | 
				
			||||||
  backdrop-filter: blur(4px);
 | 
					  backdrop-filter: blur(4px);
 | 
				
			||||||
 | 
					 | 
				
			||||||
  &::before {
 | 
					  &::before {
 | 
				
			||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    height: 100%;
 | 
					    height: 96%;
 | 
				
			||||||
    width: 0.11415vw;
 | 
					      width: 0.11415vw;
 | 
				
			||||||
    border-radius: 2px;
 | 
					      border-radius: 2px;
 | 
				
			||||||
    top: 0%;
 | 
					      top: 0%;
 | 
				
			||||||
    left: 0;
 | 
					      left: 0;
 | 
				
			||||||
    background: radial-gradient(
 | 
					      background: radial-gradient(circle at center,
 | 
				
			||||||
      circle at center,
 | 
					          #024798 2%,
 | 
				
			||||||
      #024798 2%,
 | 
					          #024798 100%,
 | 
				
			||||||
      #024798 30%,
 | 
					          transparent);
 | 
				
			||||||
      transparent
 | 
					 | 
				
			||||||
    );
 | 
					 | 
				
			||||||
    z-index: 1;
 | 
					    z-index: 1;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -124,12 +110,12 @@ export default {
 | 
				
			|||||||
    content: "";
 | 
					    content: "";
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
    width: 60%;
 | 
					    width: 80%;
 | 
				
			||||||
    height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
    border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
    left: 8%;
 | 
					    left: 3%;
 | 
				
			||||||
    bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
    background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to left, transparent 10%, #024798 95%, transparent 98%);
 | 
				
			||||||
    z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -142,7 +128,7 @@ export default {
 | 
				
			|||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -162,8 +148,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,9 +4,9 @@
 | 
				
			|||||||
      @update:than="updateThan" @update:period="updatePeriod" />
 | 
					      @update:than="updateThan" @update:period="updatePeriod" />
 | 
				
			||||||
    <div class="factory-section">
 | 
					    <div class="factory-section">
 | 
				
			||||||
      <section class="top flex">
 | 
					      <section class="top flex">
 | 
				
			||||||
        <db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than">
 | 
					        <db-container title="生产监控" icon="prod">
 | 
				
			||||||
          <prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
 | 
					          <prod-monitor @update:than="updateThan" :companyId="companyId" :factoryData="factoryData" :than="than"
 | 
				
			||||||
            :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
 | 
					            :period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
 | 
				
			||||||
        </db-container>
 | 
					        </db-container>
 | 
				
			||||||
        <left-container title="工单监控" icon="order">
 | 
					        <left-container title="工单监控" icon="order">
 | 
				
			||||||
          <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
 | 
					          <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
 | 
				
			||||||
@@ -88,7 +88,7 @@ export default {
 | 
				
			|||||||
    updateThan(val) {
 | 
					    updateThan(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      console.log(val);
 | 
				
			||||||
      this.than = val;
 | 
					      this.than = val;
 | 
				
			||||||
      // this.getMes();
 | 
					      this.getMes()
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    updatePeriod(val) {
 | 
					    updatePeriod(val) {
 | 
				
			||||||
      this.period = val;
 | 
					      this.period = val;
 | 
				
			||||||
@@ -134,11 +134,11 @@ export default {
 | 
				
			|||||||
        if (preData && preData[0] != null) {
 | 
					        if (preData && preData[0] != null) {
 | 
				
			||||||
          for (const factory of preData) {
 | 
					          for (const factory of preData) {
 | 
				
			||||||
            if (factory.previousGlassType === 0) {
 | 
					            if (factory.previousGlassType === 0) {
 | 
				
			||||||
              preDataDetail[1] = factory.previousYearOutputNumber
 | 
					              preDataDetail[1] = factory.previousOutputNumber
 | 
				
			||||||
            } else if (factory.previousGlassType === 1) {
 | 
					            } else if (factory.previousGlassType === 1) {
 | 
				
			||||||
              preDataDetail[2] = factory.previousYearOutputNumber
 | 
					              preDataDetail[2] = factory.previousOutputNumber
 | 
				
			||||||
            } else if (factory.previousYearOutputNumber === 2) {
 | 
					            } else if (factory.previousGlassType === 2) {
 | 
				
			||||||
              currentDataDetail[3] = factory.outputNumber
 | 
					              preDataDetail[3] = factory.previousOutputNumber
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,9 +4,9 @@
 | 
				
			|||||||
      @update:period="updatePeriod" />
 | 
					      @update:period="updatePeriod" />
 | 
				
			||||||
    <div class="factory-section">
 | 
					    <div class="factory-section">
 | 
				
			||||||
      <section class="top flex">
 | 
					      <section class="top flex">
 | 
				
			||||||
        <db-container title="生产监控" icon="prod" @update:than="updateThan" :than="than">
 | 
					        <db-container title="生产监控" icon="prod">
 | 
				
			||||||
          <prod-monitor :companyId="companyId" :factoryData="factoryData" :than="than" :period="period" :data="data"
 | 
					          <prod-monitor @update:than="updateThan" :than="than" :companyId="companyId" :factoryData="factoryData"
 | 
				
			||||||
            :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
 | 
					             :period="period" :data="data" :prodOutPut="prodOutPut" :prodFto="prodFto" :showBipv="show" />
 | 
				
			||||||
        </db-container>
 | 
					        </db-container>
 | 
				
			||||||
        <left-container title="工单监控" icon="order">
 | 
					        <left-container title="工单监控" icon="order">
 | 
				
			||||||
          <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
 | 
					          <order @update:type="updateType" :type="type" :prodOrder="prodOrder" />
 | 
				
			||||||
@@ -132,16 +132,17 @@ export default {
 | 
				
			|||||||
            // }
 | 
					            // }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (preData && preData[0] != null) {
 | 
					        if (preData) {
 | 
				
			||||||
          for (const factory of preData) {
 | 
					          for (const factory of preData) {
 | 
				
			||||||
            if (factory.previousGlassType === 0) {
 | 
					            if (factory.previousGlassType === 0) {
 | 
				
			||||||
              preDataDetail[1] = factory.previousYearOutputNumber
 | 
					              console.log('factory', factory)
 | 
				
			||||||
 | 
					              preDataDetail[1] = factory.previousOutputNumber
 | 
				
			||||||
            } else if (factory.previousGlassType === 1) {
 | 
					            } else if (factory.previousGlassType === 1) {
 | 
				
			||||||
              preDataDetail[2] = factory.previousYearOutputNumber
 | 
					              preDataDetail[2] = factory.previousOutputNumber
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        if (targetListResponse && targetListResponse[0] != null) {
 | 
					        if (targetListResponse) {
 | 
				
			||||||
          for (const factory of targetListResponse) {
 | 
					          for (const factory of targetListResponse) {
 | 
				
			||||||
            targetDataDetail[0] = factory.ftoInput
 | 
					            targetDataDetail[0] = factory.ftoInput
 | 
				
			||||||
            // if (factory.previousGlassType === 0) {
 | 
					            // if (factory.previousGlassType === 0) {
 | 
				
			||||||
@@ -153,7 +154,7 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        // console.log('ftoInvest',ftoInvest)
 | 
					        // console.log('ftoInvest',ftoInvest)
 | 
				
			||||||
        if (factoryListResponse && factoryListResponse[0] != null) {
 | 
					        if (factoryListResponse) {
 | 
				
			||||||
          for (const factory of factoryListResponse) {
 | 
					          for (const factory of factoryListResponse) {
 | 
				
			||||||
            // targetDataDetail[0] = factory.ftoInput
 | 
					            // targetDataDetail[0] = factory.ftoInput
 | 
				
			||||||
            if (factory.glassType === 0) {
 | 
					            if (factory.glassType === 0) {
 | 
				
			||||||
@@ -163,6 +164,7 @@ export default {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        console.log('  this.factoryData.preDataDetail', preDataDetail);
 | 
				
			||||||
        this.factoryData.preDataDetail = preDataDetail
 | 
					        this.factoryData.preDataDetail = preDataDetail
 | 
				
			||||||
        this.factoryData.currentDataDetail = currentDataDetail
 | 
					        this.factoryData.currentDataDetail = currentDataDetail
 | 
				
			||||||
        this.factoryData.targetDataDetail = targetDataDetail
 | 
					        this.factoryData.targetDataDetail = targetDataDetail
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-20 13:32:59
 | 
					 * @Date: 2024-05-20 13:32:59
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 16:42:12
 | 
					 * @LastEditTime: 2024-07-19 16:05:46
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -165,10 +165,15 @@ export default {
 | 
				
			|||||||
        subtitle =
 | 
					        subtitle =
 | 
				
			||||||
          this.period == "日" ? `${yesterday}日累计完成值` : this.period == "周" ? `本周累计完成值` : this.period == "月" ? `${month}月累计完成值` : `${year}年累计完成值`;
 | 
					          this.period == "日" ? `${yesterday}日累计完成值` : this.period == "周" ? `本周累计完成值` : this.period == "月" ? `${month}月累计完成值` : `${year}年累计完成值`;
 | 
				
			||||||
      console.log('titleValue', items)
 | 
					      console.log('titleValue', items)
 | 
				
			||||||
 | 
					      let titleSize = fontSize(0.35)
 | 
				
			||||||
 | 
					      let subtitleSize = fontSize(0.14)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // console.log(this.valueTuple[2]- this.valueTuple[1])
 | 
					      // console.log(this.valueTuple[2]- this.valueTuple[1])
 | 
				
			||||||
      return getOptions({
 | 
					      return getOptions({
 | 
				
			||||||
        titleValue,
 | 
					        titleValue,
 | 
				
			||||||
        subtitle,
 | 
					        subtitle,
 | 
				
			||||||
 | 
					        titleSize,
 | 
				
			||||||
 | 
					        subtitleSize,
 | 
				
			||||||
        currentName: items[0].label,
 | 
					        currentName: items[0].label,
 | 
				
			||||||
        preName: items[1].label,
 | 
					        preName: items[1].label,
 | 
				
			||||||
        previousSum: this.valueTuple[0],
 | 
					        previousSum: this.valueTuple[0],
 | 
				
			||||||
@@ -219,7 +224,12 @@ export default {
 | 
				
			|||||||
    // },
 | 
					    // },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					function fontSize(res){
 | 
				
			||||||
 | 
					  let clientWidth = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth;
 | 
				
			||||||
 | 
					  if (!clientWidth) return;
 | 
				
			||||||
 | 
					  let fontSize = 100 * (clientWidth / 1920);
 | 
				
			||||||
 | 
					  return res * fontSize;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
function calculateItems(period, valueTuple, than) {
 | 
					function calculateItems(period, valueTuple, than) {
 | 
				
			||||||
  console.log('valueTuple', valueTuple);
 | 
					  console.log('valueTuple', valueTuple);
 | 
				
			||||||
  let items = [];
 | 
					  let items = [];
 | 
				
			||||||
@@ -296,8 +306,9 @@ function calculateItems(period, valueTuple, than) {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.double-ring-chart {
 | 
					.double-ring-chart {
 | 
				
			||||||
  height: 100%;
 | 
					  height: 98%;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -312,7 +323,7 @@ function calculateItems(period, valueTuple, than) {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.double-ring-chart__legend {
 | 
					.double-ring-chart__legend {
 | 
				
			||||||
  padding: 12px;
 | 
					  /* padding: 12px; */
 | 
				
			||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  justify-content: center;
 | 
					  justify-content: center;
 | 
				
			||||||
@@ -321,6 +332,7 @@ function calculateItems(period, valueTuple, than) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.legend-item {
 | 
					.legend-item {
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  /* font-size:16px; */
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
  align-items: flex-start;
 | 
					  align-items: flex-start;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-30 16:00:50
 | 
					 * @Date: 2024-05-30 16:00:50
 | 
				
			||||||
 * @LastEditTime: 2024-06-03 16:26:03
 | 
					 * @LastEditTime: 2024-07-09 09:09:07
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -42,10 +42,11 @@ export default {
 | 
				
			|||||||
    return {
 | 
					    return {
 | 
				
			||||||
      factoryId: 4, // 默认成都
 | 
					      factoryId: 4, // 默认成都
 | 
				
			||||||
      cityOptions: [
 | 
					      cityOptions: [
 | 
				
			||||||
 | 
					        "瑞昌",
 | 
				
			||||||
        // "成都",
 | 
					        // "成都",
 | 
				
			||||||
        "邯郸",
 | 
					        "邯郸",
 | 
				
			||||||
        // "株洲",
 | 
					        // "株洲",
 | 
				
			||||||
        "瑞昌",
 | 
					
 | 
				
			||||||
        // "佳木斯",
 | 
					        // "佳木斯",
 | 
				
			||||||
        // "凯盛光伏",
 | 
					        // "凯盛光伏",
 | 
				
			||||||
        // "蚌埠兴科",
 | 
					        // "蚌埠兴科",
 | 
				
			||||||
@@ -63,7 +64,7 @@ export default {
 | 
				
			|||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
.double-ring-wrapper {
 | 
					.double-ring-wrapper {
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
  padding: 12px 24px;
 | 
					  padding: 0px 24px;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  gap: 12px;
 | 
					  gap: 12px;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-24 15:15:00
 | 
					 * @Date: 2024-05-24 15:15:00
 | 
				
			||||||
 * @LastEditTime: 2024-05-31 16:16:16
 | 
					 * @LastEditTime: 2024-07-09 09:27:12
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -74,7 +74,7 @@ export default {
 | 
				
			|||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
.double-ring-wrapper {
 | 
					.double-ring-wrapper {
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
  padding: 12px 24px;
 | 
					  padding: 0px 24px;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  gap: 12px;
 | 
					  gap: 12px;
 | 
				
			||||||
  flex-direction: column;
 | 
					  flex-direction: column;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-05-10 11:10:54
 | 
					 * @Date: 2024-05-10 11:10:54
 | 
				
			||||||
 * @LastEditTime: 2024-06-05 09:49:46
 | 
					 * @LastEditTime: 2024-07-09 15:09:27
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -20,12 +20,12 @@
 | 
				
			|||||||
      </left-container>
 | 
					      </left-container>
 | 
				
			||||||
    </section>
 | 
					    </section>
 | 
				
			||||||
    <section class="bottom flex">
 | 
					    <section class="bottom flex">
 | 
				
			||||||
      <right-container class="fto-involve" title="FTO投入">
 | 
					      <bottom-right-container class="fto-involve" title="FTO投入">
 | 
				
			||||||
        <fto-invest :period="period" :than="than" />
 | 
					        <fto-invest :period="period" :than="than" />
 | 
				
			||||||
      </right-container>
 | 
					      </bottom-right-container>
 | 
				
			||||||
      <left-container class="chip-involve" title="芯片投入" icon="chip">
 | 
					      <bottom-left-container class="chip-involve" title="芯片投入" icon="chip">
 | 
				
			||||||
        <chip-invest :period="period" :than="than" />
 | 
					        <chip-invest :period="period" :than="than" />
 | 
				
			||||||
      </left-container>
 | 
					        </bottom-left-container>
 | 
				
			||||||
    </section>
 | 
					    </section>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -34,7 +34,8 @@
 | 
				
			|||||||
import twoContainer from "@/views/copilot/components/twoContainer.vue";
 | 
					import twoContainer from "@/views/copilot/components/twoContainer.vue";
 | 
				
			||||||
import leftContainer from "@/views/copilot/components/leftContainer.vue";
 | 
					import leftContainer from "@/views/copilot/components/leftContainer.vue";
 | 
				
			||||||
import rightContainer from "@/views/copilot/components/rightContainer.vue";
 | 
					import rightContainer from "@/views/copilot/components/rightContainer.vue";
 | 
				
			||||||
 | 
					import bottomRightContainer from "@/views/copilot/components/bottomRightContainer.vue";
 | 
				
			||||||
 | 
					import bottomLeftContainer from "@/views/copilot/components/bottomLeftContainer.vue";
 | 
				
			||||||
import StdOutput from "./components/StdOutput.vue";
 | 
					import StdOutput from "./components/StdOutput.vue";
 | 
				
			||||||
import ChipOutput from "./components/ChipOutput.vue";
 | 
					import ChipOutput from "./components/ChipOutput.vue";
 | 
				
			||||||
import FtoInvest from "./components/FtoInvest.vue";
 | 
					import FtoInvest from "./components/FtoInvest.vue";
 | 
				
			||||||
@@ -45,6 +46,8 @@ export default {
 | 
				
			|||||||
  name: "YieldCopilot",
 | 
					  name: "YieldCopilot",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    DbContainer: twoContainer,
 | 
					    DbContainer: twoContainer,
 | 
				
			||||||
 | 
					    bottomRightContainer,
 | 
				
			||||||
 | 
					    bottomLeftContainer,
 | 
				
			||||||
    leftContainer,
 | 
					    leftContainer,
 | 
				
			||||||
    rightContainer,
 | 
					    rightContainer,
 | 
				
			||||||
    StdOutput,
 | 
					    StdOutput,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -3,6 +3,8 @@ export default ({
 | 
				
			|||||||
  subtitle,
 | 
					  subtitle,
 | 
				
			||||||
  previousSum,
 | 
					  previousSum,
 | 
				
			||||||
  currentSum,
 | 
					  currentSum,
 | 
				
			||||||
 | 
					  subtitleSize,
 | 
				
			||||||
 | 
					  titleSize,
 | 
				
			||||||
  targetSum,
 | 
					  targetSum,
 | 
				
			||||||
  currentName,
 | 
					  currentName,
 | 
				
			||||||
  preName,
 | 
					  preName,
 | 
				
			||||||
@@ -14,22 +16,29 @@ export default ({
 | 
				
			|||||||
    top: 0,
 | 
					    top: 0,
 | 
				
			||||||
    containLabel: true,
 | 
					    containLabel: true,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  tooltip: {},
 | 
					  tooltip: {
 | 
				
			||||||
 | 
					    trigger: "item",
 | 
				
			||||||
 | 
					    // extraCssText: 'box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38); border- radius: 4px;opacity: 0.6;backdrop- filter: blur(6px);',
 | 
				
			||||||
 | 
					    // backgroundColor: '#001829',
 | 
				
			||||||
 | 
					    // borderColor: '#001829',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  title: {
 | 
					  title: {
 | 
				
			||||||
    text: titleValue,
 | 
					    text: titleValue,
 | 
				
			||||||
    left: "44%",
 | 
					    left: "48.5%",
 | 
				
			||||||
    top: "37%",
 | 
					    top: "middle",
 | 
				
			||||||
 | 
					    itemGap: 12,
 | 
				
			||||||
 | 
					    textVerticalAlign:'auto',
 | 
				
			||||||
    textAlign: "center",
 | 
					    textAlign: "center",
 | 
				
			||||||
    textStyle: {
 | 
					    textStyle: {
 | 
				
			||||||
      fontWeight: 600,
 | 
					      fontWeight: 400,
 | 
				
			||||||
      fontSize: 20,
 | 
					      fontSize: titleSize,
 | 
				
			||||||
      color: "#fffd",
 | 
					      color: "rgba(223,241,254,.8)",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    subtext: `\u2002${subtitle}\u2002`,
 | 
					    subtext: `\u2002${subtitle}\u2002`,
 | 
				
			||||||
    subtextStyle: {
 | 
					    subtextStyle: {
 | 
				
			||||||
      fontSize: 14,
 | 
					      fontSize: subtitleSize,
 | 
				
			||||||
      fontWeight: 100,
 | 
					      fontWeight: 100,
 | 
				
			||||||
      color: "#fffd",
 | 
					      color: "rgba(255,255,255,.7)",
 | 
				
			||||||
      align: "right",
 | 
					      align: "right",
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -38,8 +47,8 @@ export default ({
 | 
				
			|||||||
    {
 | 
					    {
 | 
				
			||||||
      type: "pie",
 | 
					      type: "pie",
 | 
				
			||||||
      name: "当前目标",
 | 
					      name: "当前目标",
 | 
				
			||||||
     radius: ["80%", "90%"],
 | 
					      radius: ["74%", "86%"],
 | 
				
			||||||
      center: ["45%", "52%"],
 | 
					      center: ["50%", "48%"],
 | 
				
			||||||
      emptyCircleStyle: {
 | 
					      emptyCircleStyle: {
 | 
				
			||||||
        color: "#042c5f33",
 | 
					        color: "#042c5f33",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
@@ -47,8 +56,8 @@ export default ({
 | 
				
			|||||||
    // 数据 series
 | 
					    // 数据 series
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      type: "pie",
 | 
					      type: "pie",
 | 
				
			||||||
      radius: ["80%", "90%"],
 | 
					      radius: ["74%", "86%"],
 | 
				
			||||||
      center: ["45%", "52%"],
 | 
					      center: ["50%", "48%"],
 | 
				
			||||||
      avoidLabelOvervlap: false,
 | 
					      avoidLabelOvervlap: false,
 | 
				
			||||||
      label: {
 | 
					      label: {
 | 
				
			||||||
        show: false,
 | 
					        show: false,
 | 
				
			||||||
@@ -61,8 +70,16 @@ export default ({
 | 
				
			|||||||
          value: currentSum,
 | 
					          value: currentSum,
 | 
				
			||||||
          name: currentName,
 | 
					          name: currentName,
 | 
				
			||||||
          selected: false,
 | 
					          selected: false,
 | 
				
			||||||
           tooltip: {
 | 
					          tooltip: {
 | 
				
			||||||
            formatter: `${currentName} : ${currentSum}`
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter:`
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          itemStyle: {
 | 
					          itemStyle: {
 | 
				
			||||||
            borderJoin: "round",
 | 
					            borderJoin: "round",
 | 
				
			||||||
@@ -85,8 +102,16 @@ export default ({
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
 | 
					          value:(targetSum - currentSum) === 0 ? 1 : (targetSum - currentSum),
 | 
				
			||||||
          name: currentName,
 | 
					          name: currentName,
 | 
				
			||||||
          tooltip: {
 | 
					           tooltip: {
 | 
				
			||||||
            formatter: `${currentName} : ${currentSum}`
 | 
					              backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					            extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					            formatter:`
 | 
				
			||||||
 | 
					                <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${currentName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${currentSum}</span>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          itemStyle: { color: "transparent" },
 | 
					          itemStyle: { color: "transparent" },
 | 
				
			||||||
          label: { show: false },
 | 
					          label: { show: false },
 | 
				
			||||||
@@ -96,8 +121,8 @@ export default ({
 | 
				
			|||||||
    // 数据 series2 - 2023累计
 | 
					    // 数据 series2 - 2023累计
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
      type: "pie",
 | 
					      type: "pie",
 | 
				
			||||||
      radius: ["70%", "80%"],
 | 
					      radius: ["61%", "74%"],
 | 
				
			||||||
      center: ["45%", "52%"],
 | 
					      center: ["50%", "48%"],
 | 
				
			||||||
      avoidLabelOvervlap: false,
 | 
					      avoidLabelOvervlap: false,
 | 
				
			||||||
      label: {
 | 
					      label: {
 | 
				
			||||||
        show: false,
 | 
					        show: false,
 | 
				
			||||||
@@ -111,7 +136,15 @@ export default ({
 | 
				
			|||||||
          name: preName,
 | 
					          name: preName,
 | 
				
			||||||
          selected: false,
 | 
					          selected: false,
 | 
				
			||||||
          tooltip: {
 | 
					          tooltip: {
 | 
				
			||||||
            formatter: `${preName} : ${previousSum}`
 | 
					            backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					            extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					            formatter:`
 | 
				
			||||||
 | 
					                <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          itemStyle: {
 | 
					          itemStyle: {
 | 
				
			||||||
            borderJoin: "round",
 | 
					            borderJoin: "round",
 | 
				
			||||||
@@ -135,8 +168,16 @@ export default ({
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
          value:previousSum === 0 ? 1 : 0,
 | 
					          value:previousSum === 0 ? 1 : 0,
 | 
				
			||||||
          name: preName,
 | 
					          name: preName,
 | 
				
			||||||
           tooltip: {
 | 
					          tooltip: {
 | 
				
			||||||
            formatter: `${preName} : ${previousSum}`
 | 
					            backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					            extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					            formatter:`
 | 
				
			||||||
 | 
					                <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					                  <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;'>${preName}</span>
 | 
				
			||||||
 | 
					                   <span style='color:rgba(255,255,255,0.65);font-size:16px;'>${previousSum}</span>
 | 
				
			||||||
 | 
					                </div>
 | 
				
			||||||
 | 
					                `
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          itemStyle: { color: "transparent" },
 | 
					          itemStyle: { color: "transparent" },
 | 
				
			||||||
          label: { show: false },
 | 
					          label: { show: false },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,9 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
    filename: chip-invest.vue
 | 
					 * @Author: zhp
 | 
				
			||||||
    author: liubin
 | 
					 * @Date: 2024-06-03 15:38:31
 | 
				
			||||||
    date: 2024-04-10 08:59:28
 | 
					 * @LastEditTime: 2024-06-21 15:06:39
 | 
				
			||||||
    description:
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -34,6 +35,7 @@ export default {
 | 
				
			|||||||
      xAxis: cities,
 | 
					      xAxis: cities,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    series() {
 | 
					    series() {
 | 
				
			||||||
      const chipInvest = this.$store.getters.home.chipInvest;
 | 
					      const chipInvest = this.$store.getters.home.chipInvest;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-28 13:42:51
 | 
					 * @Date: 2024-04-28 13:42:51
 | 
				
			||||||
 * @LastEditTime: 2024-06-14 09:03:26
 | 
					 * @LastEditTime: 2024-07-18 16:37:41
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -53,7 +53,17 @@ export default {
 | 
				
			|||||||
          top: 0,
 | 
					          top: 0,
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "item",
 | 
				
			||||||
 | 
					          // axisPointer: {
 | 
				
			||||||
 | 
					          //   // type: "cross",
 | 
				
			||||||
 | 
					          //   crossStyle: {
 | 
				
			||||||
 | 
					          //     color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					          //   },
 | 
				
			||||||
 | 
					          // },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        title: {
 | 
					        title: {
 | 
				
			||||||
          text: "0%",
 | 
					          text: "0%",
 | 
				
			||||||
          left: "48%",
 | 
					          left: "48%",
 | 
				
			||||||
@@ -66,7 +76,7 @@ export default {
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
          subtext: `\u2002${year}年累计产出\u2002`,
 | 
					          subtext: `\u2002${year}年累计产出\u2002`,
 | 
				
			||||||
          subtextStyle: {
 | 
					          subtextStyle: {
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 15,
 | 
				
			||||||
            fontWeight: 100,
 | 
					            fontWeight: 100,
 | 
				
			||||||
            color: "#fffd",
 | 
					            color: "#fffd",
 | 
				
			||||||
            align: "right",
 | 
					            align: "right",
 | 
				
			||||||
@@ -102,7 +112,6 @@ export default {
 | 
				
			|||||||
                name: `${year}累计产出`,
 | 
					                name: `${year}累计产出`,
 | 
				
			||||||
                selected: false,
 | 
					                selected: false,
 | 
				
			||||||
                tooltip: {
 | 
					                tooltip: {
 | 
				
			||||||
                  formatter: null,
 | 
					 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                itemStyle: {
 | 
					                itemStyle: {
 | 
				
			||||||
                  borderJoin: "round",
 | 
					                  borderJoin: "round",
 | 
				
			||||||
@@ -126,7 +135,6 @@ export default {
 | 
				
			|||||||
                value: 0,
 | 
					                value: 0,
 | 
				
			||||||
                name: `${year}目标`,
 | 
					                name: `${year}目标`,
 | 
				
			||||||
                tooltip: {
 | 
					                tooltip: {
 | 
				
			||||||
                  formatter: null,
 | 
					 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                itemStyle: { color: "transparent" },
 | 
					                itemStyle: { color: "transparent" },
 | 
				
			||||||
                label: { show: false },
 | 
					                label: { show: false },
 | 
				
			||||||
@@ -151,7 +159,17 @@ export default {
 | 
				
			|||||||
                name: `${year - 1}累计产出`,
 | 
					                name: `${year - 1}累计产出`,
 | 
				
			||||||
                selected: false,
 | 
					                selected: false,
 | 
				
			||||||
                tooltip: {
 | 
					                tooltip: {
 | 
				
			||||||
                  formatter: null,
 | 
					                  trigger: "item",
 | 
				
			||||||
 | 
					                  // axisPointer: {
 | 
				
			||||||
 | 
					                  //   // type: "cross",
 | 
				
			||||||
 | 
					                  //   crossStyle: {
 | 
				
			||||||
 | 
					                  //     color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					                  //   },
 | 
				
			||||||
 | 
					                  // },
 | 
				
			||||||
 | 
					                  backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					                  extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					                  formatter: params => {
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                itemStyle: {
 | 
					                itemStyle: {
 | 
				
			||||||
                  borderJoin: "round",
 | 
					                  borderJoin: "round",
 | 
				
			||||||
@@ -175,7 +193,15 @@ export default {
 | 
				
			|||||||
                value: 0,
 | 
					                value: 0,
 | 
				
			||||||
                name: `${year - 1}累计产出`,
 | 
					                name: `${year - 1}累计产出`,
 | 
				
			||||||
                tooltip: {
 | 
					                tooltip: {
 | 
				
			||||||
                  formatter:null,
 | 
					                  trigger: "item",
 | 
				
			||||||
 | 
					                  // axisPointer: {
 | 
				
			||||||
 | 
					                  //   // type: "cross",
 | 
				
			||||||
 | 
					                  //   crossStyle: {
 | 
				
			||||||
 | 
					                  //     color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					                  //   },
 | 
				
			||||||
 | 
					                  // },
 | 
				
			||||||
 | 
					                  backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					                  extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
                },
 | 
					                },
 | 
				
			||||||
                itemStyle: { color: "transparent" },
 | 
					                itemStyle: { color: "transparent" },
 | 
				
			||||||
                label: { show: false },
 | 
					                label: { show: false },
 | 
				
			||||||
@@ -223,40 +249,80 @@ export default {
 | 
				
			|||||||
    actualOptions() {
 | 
					    actualOptions() {
 | 
				
			||||||
      console.log('this.output.current / this.output.target', this.output.current/this.output.target);
 | 
					      console.log('this.output.current / this.output.target', this.output.current/this.output.target);
 | 
				
			||||||
      const year = new Date().getFullYear()
 | 
					      const year = new Date().getFullYear()
 | 
				
			||||||
      const options = JSON.parse(JSON.stringify(this.options));
 | 
					      const options = this.options
 | 
				
			||||||
      // console.log('options', options);
 | 
					      // console.log('options', options);
 | 
				
			||||||
      // 标题
 | 
					      // 标题
 | 
				
			||||||
      if (!this.output.target) options.title.text = "0%";
 | 
					      if (!this.output.target && !this.output.current) options.title.text = "0%";
 | 
				
			||||||
      else
 | 
					      else if (!this.output.target && this.output.current) options.title.text = "100%";
 | 
				
			||||||
        options.title.text =
 | 
					      else options.title.text =
 | 
				
			||||||
          ((this.output.current / this.output.target).toFixed(2)) * 100 + "%";
 | 
					        ((this.output.current / this.output.target).toFixed(2)) * 100 + "%";
 | 
				
			||||||
      // 外环
 | 
					      // 外环
 | 
				
			||||||
      if (
 | 
					      if (
 | 
				
			||||||
        this.output.current == this.output.target &&
 | 
					        this.output.current == this.output.target &&
 | 
				
			||||||
        this.output.current == 0
 | 
					        this.output.current == 0
 | 
				
			||||||
      ) {
 | 
					      ) {
 | 
				
			||||||
        options.series[1].data[0].value = 0;
 | 
					        this.options.series[1].data[0].value = 0;
 | 
				
			||||||
        options.series[1].data[1].value = 1;
 | 
					        this.options.series[1].data[1].value = 1;
 | 
				
			||||||
        options.series[1].data[0].tooltip.formatter = year + '累计完成:0';
 | 
					        this.options.series[1].data[0].tooltip.formatter =
 | 
				
			||||||
        options.series[1].data[1].tooltip.formatter = year + '累计完成:0';
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
 | 
				
			||||||
 | 
					             <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
 | 
					        this.options.series[1].data[1].tooltip.formatter =
 | 
				
			||||||
 | 
					            `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
 | 
				
			||||||
 | 
					                <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0 }</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        options.series[1].data[0].value = this.output.current;
 | 
					        this.options.series[1].data[0].value = this.output.current;
 | 
				
			||||||
        options.series[1].data[1].value =
 | 
					        this.options.series[1].data[1].value =
 | 
				
			||||||
          this.output.target - this.output.current;
 | 
					          this.output.target - this.output.current;
 | 
				
			||||||
        options.series[1].data[0].tooltip.formatter = year + '累计完成:' + this.output.current;
 | 
					        this.options.series[1].data[0].tooltip.formatter =
 | 
				
			||||||
        options.series[1].data[1].tooltip.formatter = year + '累计完成:' + this.output.current;
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					           <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
 | 
				
			||||||
 | 
					           <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.current}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
 | 
					        this.options.series[1].data[1].tooltip.formatter =
 | 
				
			||||||
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#4CF0E8'></span>
 | 
				
			||||||
 | 
					            <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year + '累计完成'}</span>
 | 
				
			||||||
 | 
					            <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.current}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // 内环
 | 
					      // 内环
 | 
				
			||||||
      if (this.output.previous == 0) {
 | 
					      if (this.output.previous == 0) {
 | 
				
			||||||
        options.series[2].data[0].value = 0;
 | 
					        this.options.series[2].data[0].value = 0;
 | 
				
			||||||
        options.series[2].data[1].value = 1;
 | 
					        this.options.series[2].data[1].value = 1;
 | 
				
			||||||
        options.series[2].data[0].tooltip.formatter = year-1 + '累计完成:' + 0;
 | 
					        this.options.series[2].data[0].tooltip.formatter =
 | 
				
			||||||
        options.series[2].data[1].tooltip.formatter = year-1 + '累计完成:' + 0;
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					            <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
 | 
				
			||||||
 | 
					            <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
 | 
					        this.options.series[2].data[1].tooltip.formatter =
 | 
				
			||||||
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					         <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
 | 
				
			||||||
 | 
					          <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${0}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        options.series[2].data[0].value = this.output.previous;
 | 
					        this.options.series[2].data[0].value = this.output.previous;
 | 
				
			||||||
        options.series[2].data[1].value = 0;
 | 
					        this.options.series[2].data[1].value = 0;
 | 
				
			||||||
        options.series[2].data[0].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous;
 | 
					        this.options.series[2].data[0].tooltip.formatter =
 | 
				
			||||||
        options.series[2].data[1].tooltip.formatter = year - 1 + '累计完成:' + this.output.previous;
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					      <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span>
 | 
				
			||||||
 | 
					        <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.previous}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
 | 
					        this.options.series[2].data[1].tooltip.formatter =
 | 
				
			||||||
 | 
					          `<div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					          <span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:#1065ff'></span>
 | 
				
			||||||
 | 
					              <span style='display:inline-block;width:150px;color:rgba(255,255,255,0855);font-size:16px;letter-spacing: 2px;'>${year - 1 + '累计完成'}</span> +
 | 
				
			||||||
 | 
					              <span style='color:rgba(255,255,255,0.65);font-size:16px;letter-spacing: 2px;'>${this.output.previous}</span>
 | 
				
			||||||
 | 
					              </div>`;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      console.log('options', options);
 | 
					      console.log('options', options);
 | 
				
			||||||
      return options;
 | 
					      return options;
 | 
				
			||||||
@@ -274,6 +340,9 @@ export default {
 | 
				
			|||||||
    factory(val) {
 | 
					    factory(val) {
 | 
				
			||||||
      this.initOptions(this.actualOptions);
 | 
					      this.initOptions(this.actualOptions);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    actualOptions() {
 | 
				
			||||||
 | 
					      this.initOptions(this.actualOptions);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
    console.log("mounted", this.actualOptions);
 | 
					    console.log("mounted", this.actualOptions);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,10 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-28 13:42:51
 | 
					 * @Date: 2024-04-28 13:42:51
 | 
				
			||||||
 * @LastEditTime: 2024-05-31 16:11:06
 | 
					 * @LastEditTime: 2024-06-27 16:30:58
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<!--
 | 
					 | 
				
			||||||
    filename: fto.vue
 | 
					 | 
				
			||||||
    author: liubin
 | 
					 | 
				
			||||||
    date: 2024-04-10 08:59:28
 | 
					 | 
				
			||||||
    description:
 | 
					 | 
				
			||||||
-->
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <left-chart-base
 | 
					  <left-chart-base
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,19 +8,10 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <chart-container class="left-chart-base">
 | 
					  <chart-container class="left-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span
 | 
					      <span style="color: rgba(223,241,254,.8);" v-for="item in legend" :key="item.label" class="legend-item"
 | 
				
			||||||
        v-for="item in legend"
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
        :key="item.label"
 | 
					 | 
				
			||||||
        class="legend-item"
 | 
					 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
 | 
					 | 
				
			||||||
        >{{ item.label }}</span
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div ref="chart" style="max-width: 22vw" :style="{ height: vHeight + 'vh' }"></div>
 | 
				
			||||||
      ref="chart"
 | 
					 | 
				
			||||||
      style="max-width: 22vw"
 | 
					 | 
				
			||||||
      :style="{ height: vHeight + 'vh' }"
 | 
					 | 
				
			||||||
    ></div>
 | 
					 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,8 +56,40 @@ export default {
 | 
				
			|||||||
          top: "15%",
 | 
					          top: "15%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(0,0,0,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					                `<span style='width:60px;display:inline-block;color:rgba(255,255,255,0.65);font-size:16px;text-align: right;letter-spacing: 2px;'>${params[i].value ? params[i].value: 0}</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					            // return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type:'category',
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
@@ -76,24 +99,27 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            textStyle: {
 | 
				
			||||||
            fontSize: 12,
 | 
					              color: "rgba(223,241,254,.8)",
 | 
				
			||||||
 | 
					              fontSize: 16,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/片",
 | 
					          name: "单位/片",
 | 
				
			||||||
 | 
					          // position:'left',
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            align:'right'
 | 
					            align:'right'
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -111,14 +137,14 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: '', // this.series[0].name,
 | 
					            name: '', // this.series[0].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true, //开启显示
 | 
					              show: true, //开启显示
 | 
				
			||||||
              align: 'right', //在上方显示
 | 
					              align: 'right', //在上方显示
 | 
				
			||||||
              position: 'top', //在上方显示
 | 
					              position: 'top', //在上方显示
 | 
				
			||||||
              textStyle: { //数值样式
 | 
					              textStyle: { //数值样式
 | 
				
			||||||
                color: '#DFF1FE',
 | 
					                color: "rgba(223,241,254,.8)",
 | 
				
			||||||
                fontSize: 12
 | 
					                fontSize: 14
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
@@ -155,14 +181,14 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: '', // this.series[1].name,
 | 
					            name: '', // this.series[1].name,
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true, //开启显示
 | 
					              show: true, //开启显示
 | 
				
			||||||
              align: 'left', //在上方显示
 | 
					              align: 'left', //在上方显示
 | 
				
			||||||
              position: 'top', //在上方显示
 | 
					              position: 'top', //在上方显示
 | 
				
			||||||
              textStyle: { //数值样式
 | 
					              textStyle: { //数值样式
 | 
				
			||||||
                color: '#DFF1FE',
 | 
					                color: "rgba(223,241,254,.8)",
 | 
				
			||||||
                fontSize: 12
 | 
					                fontSize: 16
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
@@ -201,9 +227,9 @@ export default {
 | 
				
			|||||||
      this.actualOptions.series.map((item) => {
 | 
					      this.actualOptions.series.map((item) => {
 | 
				
			||||||
        item.barWidth = val ? 18 : 12;
 | 
					        item.barWidth = val ? 18 : 12;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 14;
 | 
				
			||||||
      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 14;
 | 
				
			||||||
      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 14;
 | 
				
			||||||
      this.initOptions(this.actualOptions);
 | 
					      this.initOptions(this.actualOptions);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    series(val) {
 | 
					    series(val) {
 | 
				
			||||||
@@ -234,9 +260,25 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
.left-chart-base {
 | 
					.echarts-tooltip{
 | 
				
			||||||
  // position: relative;
 | 
					  background: #001829;
 | 
				
			||||||
 | 
					  // background-color: ;
 | 
				
			||||||
 | 
					    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);
 | 
				
			||||||
 | 
					    opacity: 0.6;
 | 
				
			||||||
 | 
					    border-radius: 4px;
 | 
				
			||||||
 | 
					    .content {
 | 
				
			||||||
 | 
					        content: "";
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        top: 0;
 | 
				
			||||||
 | 
					        left: 0;
 | 
				
			||||||
 | 
					        bottom: 0;
 | 
				
			||||||
 | 
					        right: 0;
 | 
				
			||||||
 | 
					        backdrop-filter: blur(6px);
 | 
				
			||||||
 | 
					        // transition: .3s transform;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.left-chart-base {
 | 
				
			||||||
  .legend {
 | 
					  .legend {
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 5.2vh;
 | 
					    top: 5.2vh;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-28 13:42:51
 | 
					 * @Date: 2024-04-28 13:42:51
 | 
				
			||||||
 * @LastEditTime: 2024-06-14 09:16:09
 | 
					 * @LastEditTime: 2024-07-19 15:25:37
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -15,19 +15,10 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <chart-container class="right-chart-base">
 | 
					  <chart-container class="right-chart-base">
 | 
				
			||||||
    <div class="legend">
 | 
					    <div class="legend">
 | 
				
			||||||
      <span
 | 
					      <span style="color: rgba(223,241,254,.8);" v-for="item in legend" :key="item.label" class="legend-item"
 | 
				
			||||||
        v-for="item in legend"
 | 
					        :style="{ fontSize: isFullscreen ? '0.72vw' : '0.7vw' }">{{ item.label }}</span>
 | 
				
			||||||
        :key="item.label"
 | 
					 | 
				
			||||||
        class="legend-item"
 | 
					 | 
				
			||||||
        :style="{ fontSize: isFullscreen ? '0.58vw' : '0.54vw' }"
 | 
					 | 
				
			||||||
        >{{ item.label }}</span
 | 
					 | 
				
			||||||
      >
 | 
					 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div ref="chart" style="max-width: 22vw" :style="{ height: vHeight + 'vh' }"></div>
 | 
				
			||||||
      ref="chart"
 | 
					 | 
				
			||||||
      style="max-width: 22vw"
 | 
					 | 
				
			||||||
      :style="{ height: vHeight + 'vh' }"
 | 
					 | 
				
			||||||
    ></div>
 | 
					 | 
				
			||||||
  </chart-container>
 | 
					  </chart-container>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -65,13 +56,50 @@ export default {
 | 
				
			|||||||
      isFullscreen: false,
 | 
					      isFullscreen: false,
 | 
				
			||||||
      options: {
 | 
					      options: {
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          left: "5%",
 | 
					          left: "6%",
 | 
				
			||||||
          right: "4%",
 | 
					          right: "4%",
 | 
				
			||||||
          bottom: "0",
 | 
					          bottom: "0",
 | 
				
			||||||
          top: "18%",
 | 
					          top: "18%",
 | 
				
			||||||
          containLabel: true,
 | 
					          containLabel: true,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {},
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          confine:true,
 | 
				
			||||||
 | 
					          backgroundColor: 'rgba(50,50,50,0)', // tooltip默认背景为白色,手动置为透明
 | 
				
			||||||
 | 
					          extraCssText: 'padding:0;border-width:0',
 | 
				
			||||||
 | 
					          formatter: params => {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='display:inline-block;color:rgba(255,255,255,0.85);margin-bottom:8px;font-size:16px;letter-spacing: 2px;'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              let color = Object.prototype.toString.call(params[i].color) == "[object String]" ? params[i].color : params[i].color.colorStops ? params[i].color.colorStops[0].color : ''
 | 
				
			||||||
 | 
					              // console.log(item.color, color);
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					              `${params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                ? `<span style='display:inline-block; width: 20px;height: 2px;background-color: #f3c000;position: absolute;top:42.3%;left:4%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width: 10px;height: 10px;border-radius: 100%;background-color: #f3c000;position: absolute;top:38.82%;left:5%;'></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;margin-left:20px;letter-spacing: 2px;'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					                : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:12px;height:12px;background-color:${color}"></span>
 | 
				
			||||||
 | 
					                <span style='display:inline-block;width:150px;color:rgba(255,255,255,.85);font-size:16px;letter-spacing: 2px;'>${params[i].seriesName}</span>`
 | 
				
			||||||
 | 
					              }` +
 | 
				
			||||||
 | 
					                `<span style='width:180px;display:inline-block;color:rgba(255,255,255,0.65);font-size:16px;text-align: right;letter-spacing: 2px;'>${params[i].value ? params[i].value : 0 }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            const htmlContent = `
 | 
				
			||||||
 | 
					              <div style="padding: 12px 16px;background:rgba(0,24,41,.5);box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.38);backdrop-filter: blur(10px);">
 | 
				
			||||||
 | 
					                ${res}
 | 
				
			||||||
 | 
					              </div>
 | 
				
			||||||
 | 
					              `;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            return htmlContent;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
@@ -82,24 +110,25 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          data: this.xAxis,
 | 
					          data: this.xAxis,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          name: "单位/片",
 | 
					          name: "单位/片",
 | 
				
			||||||
 | 
					          // position: 'left',
 | 
				
			||||||
          nameTextStyle: {
 | 
					          nameTextStyle: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
            align: 'right'
 | 
					            align: 'right'
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisTick: {
 | 
					          axisTick: {
 | 
				
			||||||
            show: false,
 | 
					            show: false,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            color: "#fff",
 | 
					            color: "rgba(223,241,254,.8)",
 | 
				
			||||||
            fontSize: 12,
 | 
					            fontSize: 16,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          axisLine: {
 | 
					          axisLine: {
 | 
				
			||||||
            show: true,
 | 
					            show: true,
 | 
				
			||||||
@@ -123,36 +152,36 @@ export default {
 | 
				
			|||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              color: "#f3c000",
 | 
					              color: "#f3c000",
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            areaStyle: {
 | 
					            // areaStyle: {
 | 
				
			||||||
              color: {
 | 
					            //   color: {
 | 
				
			||||||
                type: "linear",
 | 
					            //     type: "linear",
 | 
				
			||||||
                x: 0,
 | 
					            //     x: 0,
 | 
				
			||||||
                y: 0,
 | 
					            //     y: 0,
 | 
				
			||||||
                x2: 0,
 | 
					            //     x2: 0,
 | 
				
			||||||
                y2: 1,
 | 
					            //     y2: 1,
 | 
				
			||||||
                colorStops: [
 | 
					            //     colorStops: [
 | 
				
			||||||
                  {
 | 
					            //       {
 | 
				
			||||||
                    offset: 0,
 | 
					            //         offset: 0,
 | 
				
			||||||
                    color: "#f3c000", // 0% 处的颜色
 | 
					            //         color: "#f3c000", // 0% 处的颜色
 | 
				
			||||||
                  },
 | 
					            //       },
 | 
				
			||||||
                  {
 | 
					            //       {
 | 
				
			||||||
                    offset: 0.55,
 | 
					            //         offset: 0.55,
 | 
				
			||||||
                    color: "#f3c00033",
 | 
					            //         color: "#f3c00033",
 | 
				
			||||||
                  },
 | 
					            //       },
 | 
				
			||||||
                  {
 | 
					            //       {
 | 
				
			||||||
                    offset: 1,
 | 
					            //         offset: 1,
 | 
				
			||||||
                    color: "transparent", // 100% 处的颜色
 | 
					            //         color: "transparent", // 100% 处的颜色
 | 
				
			||||||
                  },
 | 
					            //       },
 | 
				
			||||||
                ],
 | 
					            //     ],
 | 
				
			||||||
                global: false, // 缺省为 false
 | 
					            //     global: false, // 缺省为 false
 | 
				
			||||||
              },
 | 
					            //   },
 | 
				
			||||||
            },
 | 
					            // },
 | 
				
			||||||
            data: [], // this.series[0].data,
 | 
					            data: [], // this.series[0].data,
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // "2023年",
 | 
					            name: "", // "2023年",
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            itemStyle: {
 | 
					            itemStyle: {
 | 
				
			||||||
              borderRadius: [10, 10, 0, 0],
 | 
					              borderRadius: [10, 10, 0, 0],
 | 
				
			||||||
              color: {
 | 
					              color: {
 | 
				
			||||||
@@ -187,7 +216,7 @@ export default {
 | 
				
			|||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "", // "2024年",
 | 
					            name: "", // "2024年",
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 12,
 | 
					            barWidth: 16,
 | 
				
			||||||
            // tooltip: {
 | 
					            // tooltip: {
 | 
				
			||||||
            //   valueFormatter: function (value) {
 | 
					            //   valueFormatter: function (value) {
 | 
				
			||||||
            //     return value + " ml";
 | 
					            //     return value + " ml";
 | 
				
			||||||
@@ -227,9 +256,9 @@ export default {
 | 
				
			|||||||
      this.actualOptions.series.map((item) => {
 | 
					      this.actualOptions.series.map((item) => {
 | 
				
			||||||
        item.barWidth = val ? 18 : 12;
 | 
					        item.barWidth = val ? 18 : 12;
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
 | 
					      this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 16;
 | 
				
			||||||
      this.initOptions(this.actualOptions);
 | 
					      this.initOptions(this.actualOptions);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    series(val) {
 | 
					    series(val) {
 | 
				
			||||||
@@ -292,13 +321,13 @@ export default {
 | 
				
			|||||||
  .legend-item:nth-child(1):before {
 | 
					  .legend-item:nth-child(1):before {
 | 
				
			||||||
    // width: 12px;
 | 
					    // width: 12px;
 | 
				
			||||||
    // height: 2px;
 | 
					    // height: 2px;
 | 
				
			||||||
    width: 0.638vw;
 | 
					    width: 1vw;
 | 
				
			||||||
    height: 0.1064vw;
 | 
					    height: 0.1064vw;
 | 
				
			||||||
    background-color: #f3c000;
 | 
					    background-color: #f3c000;
 | 
				
			||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    top: 50%;
 | 
					    top: 50%;
 | 
				
			||||||
    // left: -16px;
 | 
					    // left: -16px;
 | 
				
			||||||
    left: -0.851vw;
 | 
					    left: -1.2vw;
 | 
				
			||||||
    transform: translateY(-50%);
 | 
					    transform: translateY(-50%);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  .legend-item:nth-child(1):after {
 | 
					  .legend-item:nth-child(1):after {
 | 
				
			||||||
@@ -308,11 +337,11 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 6px;
 | 
					    // width: 6px;
 | 
				
			||||||
    // height: 6px;
 | 
					    // height: 6px;
 | 
				
			||||||
    width: 0.3191vw;
 | 
					    width: 0.4vw;
 | 
				
			||||||
    height: 0.3191vw;
 | 
					    height: 0.4vw;
 | 
				
			||||||
    border-radius: 100%;
 | 
					    border-radius: 100%;
 | 
				
			||||||
    top: 50%;
 | 
					    top: 50%;
 | 
				
			||||||
    left: -0.851vw;
 | 
					    left: -1.1vw;
 | 
				
			||||||
    // left: -16px;
 | 
					    // left: -16px;
 | 
				
			||||||
    transform: translateY(-50%) translateX(50%);
 | 
					    transform: translateY(-50%) translateX(50%);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -83,7 +83,7 @@ export default {
 | 
				
			|||||||
  // backdrop-filter: blur(2px);
 | 
					  // backdrop-filter: blur(2px);
 | 
				
			||||||
  // border-radius: 4px;
 | 
					  // border-radius: 4px;
 | 
				
			||||||
  transform: translate(-50%, -100%);
 | 
					  transform: translate(-50%, -100%);
 | 
				
			||||||
  box-shadow: inset 0 0 12px 2px #fff3;
 | 
					  // box-shadow: inset 0 0 12px 2px #fff3;
 | 
				
			||||||
  background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%;
 | 
					  background: url(../../../assets/images/homeindex/info.png) no-repeat 0 0 / 100% 100%;
 | 
				
			||||||
    // background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7)  10%, #021842 30%);
 | 
					    // background: radial-gradient(circle farthest-corner at bottom center,rgba(255,239,162,.7)  10%, #021842 30%);
 | 
				
			||||||
  // 在这里设置一个总的字体大小 不失为一个好的选择
 | 
					  // 在这里设置一个总的字体大小 不失为一个好的选择
 | 
				
			||||||
@@ -92,11 +92,12 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
h2 {
 | 
					h2 {
 | 
				
			||||||
  padding: 0 1vw;
 | 
					  // padding: 0 1vw;
 | 
				
			||||||
  margin: 6px 0;
 | 
					  margin: 6px 0;
 | 
				
			||||||
  font-family: 优设标题黑;
 | 
					  font-family: 优设标题黑;
 | 
				
			||||||
  color: #fff;
 | 
					  color: #fff;
 | 
				
			||||||
  letter-spacing:5px;
 | 
					  letter-spacing:4px;
 | 
				
			||||||
 | 
					  text-align: left;
 | 
				
			||||||
  // font-size: 24px;
 | 
					  // font-size: 24px;
 | 
				
			||||||
  font-size: 1.276em;
 | 
					  font-size: 1.276em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -115,7 +116,7 @@ ul {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
li {
 | 
					li {
 | 
				
			||||||
  font-size: 0.851em;
 | 
					  font-size: 0.77em;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.corner {
 | 
					.corner {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -38,7 +38,7 @@
 | 
				
			|||||||
      class="container-head"
 | 
					      class="container-head"
 | 
				
			||||||
      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
					      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
				
			||||||
    >
 | 
					    >
 | 
				
			||||||
      <Icon :icon="icon"></Icon>
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
      <h2 class="container-title">{{ title }}</h2>
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div
 | 
					    <div
 | 
				
			||||||
@@ -82,6 +82,7 @@ export default {
 | 
				
			|||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped lang="scss">
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.dashboard-container {
 | 
					.dashboard-container {
 | 
				
			||||||
  height: 0;
 | 
					  height: 0;
 | 
				
			||||||
  flex: 1;
 | 
					  flex: 1;
 | 
				
			||||||
@@ -90,29 +91,29 @@ export default {
 | 
				
			|||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
  box-shadow: inset 0 0 20px 1px #fff1;
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // &::after {
 | 
					  &::after {
 | 
				
			||||||
  //   content: "";
 | 
					    content: "";
 | 
				
			||||||
  //   position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
  //   display: inline-block;
 | 
					    display: inline-block;
 | 
				
			||||||
  //   width: 60%;
 | 
					    width: 85%;
 | 
				
			||||||
  //   height: 0.31415vh;
 | 
					    height: 0.31415vh;
 | 
				
			||||||
  //   border-radius: 2px;
 | 
					    border-radius: 2px;
 | 
				
			||||||
  //   left: 8%;
 | 
					    left: 8%;
 | 
				
			||||||
  //   bottom: 0;
 | 
					    bottom: 0;
 | 
				
			||||||
  //   background: linear-gradient(to right, #024798, transparent);
 | 
					    background: linear-gradient(to left, #024798, transparent);
 | 
				
			||||||
  //   z-index: 0;
 | 
					    z-index: 0;
 | 
				
			||||||
  // }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .container-head {
 | 
					  .container-head {
 | 
				
			||||||
    // height: 40px;
 | 
					    // height: 40px;
 | 
				
			||||||
    height: 3.8vh;
 | 
					    height:4vh;
 | 
				
			||||||
    padding: 8px;
 | 
					    padding: 8px;
 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
    align-items: center;
 | 
					    align-items: center;
 | 
				
			||||||
    gap: 8px;
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .container-title {
 | 
					    .container-title {
 | 
				
			||||||
      font-size: 1.18vw;
 | 
					      font-size: 1vw;
 | 
				
			||||||
      line-height: 1.39vw;
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
      font-weight: normal;
 | 
					      font-weight: normal;
 | 
				
			||||||
      letter-spacing: 2px;
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
@@ -132,8 +133,8 @@ export default {
 | 
				
			|||||||
    position: absolute;
 | 
					    position: absolute;
 | 
				
			||||||
    // width: 16px;
 | 
					    // width: 16px;
 | 
				
			||||||
    // height: 16px;
 | 
					    // height: 16px;
 | 
				
			||||||
    width: 0.95vw;
 | 
					    width: 0.7vw;
 | 
				
			||||||
    height: 0.95vw;
 | 
					    height: 0.7vw;
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .corner.tl {
 | 
					  .corner.tl {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -51,8 +51,8 @@ export default {
 | 
				
			|||||||
.container-icon {
 | 
					.container-icon {
 | 
				
			||||||
  //   width: 32px;
 | 
					  //   width: 32px;
 | 
				
			||||||
  //   height: 32px;
 | 
					  //   height: 32px;
 | 
				
			||||||
  width: 1.701vw;
 | 
					  width: 1.4vw;
 | 
				
			||||||
  height: 1.701vw;
 | 
					  height: 1.4vw;
 | 
				
			||||||
  background: #ccc2;
 | 
					  background: #ccc2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -153,7 +153,7 @@ h1 {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
.side {
 | 
					.side {
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
  font-size: 1.18vw;
 | 
					  font-size: 1vw;
 | 
				
			||||||
  // line-height: 24px;
 | 
					  // line-height: 24px;
 | 
				
			||||||
  line-height: 1.277vw;
 | 
					  line-height: 1.277vw;
 | 
				
			||||||
  letter-spacing: 2px;
 | 
					  letter-spacing: 2px;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										204
									
								
								src/views/dashboard/components/leftContainer.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										204
									
								
								src/views/dashboard/components/leftContainer.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,204 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-08 13:51:30
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-19 10:43:18
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="dashboard-container">
 | 
				
			||||||
 | 
					    <!-- refresh btn  -->
 | 
				
			||||||
 | 
					    <button
 | 
				
			||||||
 | 
					      v-if="0"
 | 
				
			||||||
 | 
					      style="appearance: none; outline: none; border: none; background: none; color:#fff; cursor: pointer; position: absolute; top: 8px; right: 8px"
 | 
				
			||||||
 | 
					      @click="$emit('refresh')"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <svg
 | 
				
			||||||
 | 
					        xmlns="http://www.w3.org/2000/svg"
 | 
				
			||||||
 | 
					        fill="none"
 | 
				
			||||||
 | 
					        viewBox="0 0 24 24"
 | 
				
			||||||
 | 
					        stroke-width="1.5"
 | 
				
			||||||
 | 
					        stroke="currentColor"
 | 
				
			||||||
 | 
					        style="width: 24px; height: 24px"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <path
 | 
				
			||||||
 | 
					          stroke-linecap="round"
 | 
				
			||||||
 | 
					          stroke-linejoin="round"
 | 
				
			||||||
 | 
					          d="M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					      </svg>
 | 
				
			||||||
 | 
					    </button>
 | 
				
			||||||
 | 
					    <!-- decoration  -->
 | 
				
			||||||
 | 
					    <div class="corner tl"></div>
 | 
				
			||||||
 | 
					    <div class="corner tr"></div>
 | 
				
			||||||
 | 
					    <div v-if="side == 'left'" class="corner bl"></div>
 | 
				
			||||||
 | 
					    <div v-if="side == 'right'" class="corner br"></div>
 | 
				
			||||||
 | 
					    <!-- content  -->
 | 
				
			||||||
 | 
					    <div
 | 
				
			||||||
 | 
					      class="container-head"
 | 
				
			||||||
 | 
					      :class="[side == 'left' ? 'gradient-to-right' : 'gradient-to-left']"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <Icon style="margin-left: 16px;" :icon="icon"></Icon>
 | 
				
			||||||
 | 
					      <h2 class="container-title">{{ title }}</h2>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <div
 | 
				
			||||||
 | 
					      class="container-body"
 | 
				
			||||||
 | 
					      :class="[
 | 
				
			||||||
 | 
					        side == 'left' ? 'body-gradient-to-right' : 'body-gradient-to-left',
 | 
				
			||||||
 | 
					      ]"
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <slot />
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import ContainerIconVue from "./ContainerIcon.vue";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "DashboardContainer",
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    Icon: ContainerIconVue,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    side: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "left",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    icon: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "cube",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    title: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "Default Title",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {};
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {},
 | 
				
			||||||
 | 
					  methods: {},
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style scoped lang="scss">
 | 
				
			||||||
 | 
					.dashboard-container {
 | 
				
			||||||
 | 
					  height: 0;
 | 
				
			||||||
 | 
					  flex: 1;
 | 
				
			||||||
 | 
					  display: flex;
 | 
				
			||||||
 | 
					  flex-direction: column;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  box-shadow: inset 0 0 20px 1px #fff1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  &::after {
 | 
				
			||||||
 | 
					    content: "";
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    width: 85%;
 | 
				
			||||||
 | 
					    height: 0.31415vh;
 | 
				
			||||||
 | 
					    border-radius: 2px;
 | 
				
			||||||
 | 
					    left: 8%;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #024798, transparent);
 | 
				
			||||||
 | 
					    z-index: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-head {
 | 
				
			||||||
 | 
					    // height: 40px;
 | 
				
			||||||
 | 
					    height:4vh;
 | 
				
			||||||
 | 
					    padding: 8px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    align-items: center;
 | 
				
			||||||
 | 
					    gap: 8px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    .container-title {
 | 
				
			||||||
 | 
					      font-size: 1vw;
 | 
				
			||||||
 | 
					      line-height: 1.39vw;
 | 
				
			||||||
 | 
					      font-weight: normal;
 | 
				
			||||||
 | 
					      letter-spacing: 2px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .container-body {
 | 
				
			||||||
 | 
					    padding: 12px;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: column;
 | 
				
			||||||
 | 
					    flex: 1;
 | 
				
			||||||
 | 
					    height: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner {
 | 
				
			||||||
 | 
					    z-index: 1;
 | 
				
			||||||
 | 
					    position: absolute;
 | 
				
			||||||
 | 
					    // width: 16px;
 | 
				
			||||||
 | 
					    // height: 16px;
 | 
				
			||||||
 | 
					    width: 0.7vw;
 | 
				
			||||||
 | 
					    height: 0.7vw;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tl {
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.tr {
 | 
				
			||||||
 | 
					    top: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    border-top: 2px solid #0175dc;
 | 
				
			||||||
 | 
					    border-right: 2px solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.bl {
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    left: 0;
 | 
				
			||||||
 | 
					    // border-left: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid transparent;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .corner.br {
 | 
				
			||||||
 | 
					    bottom: 0;
 | 
				
			||||||
 | 
					    right: 0;
 | 
				
			||||||
 | 
					    // width: 20px;
 | 
				
			||||||
 | 
					    // height: 20px;
 | 
				
			||||||
 | 
					    width: 1.064vw;
 | 
				
			||||||
 | 
					    height: 1.064vw;
 | 
				
			||||||
 | 
					    // border-left: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-bottom: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    // border-top: 10px solid transparent;
 | 
				
			||||||
 | 
					    // border-right: 10px solid #0175dc;
 | 
				
			||||||
 | 
					    border-left: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-bottom: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					    border-top: 0.532vw solid transparent;
 | 
				
			||||||
 | 
					    border-right: 0.532vw solid #0175dc;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0c3f68cc, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-right {
 | 
				
			||||||
 | 
					    background: linear-gradient(to right, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  .body-gradient-to-left {
 | 
				
			||||||
 | 
					    background: linear-gradient(to left, #0003, transparent);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -17,12 +17,12 @@
 | 
				
			|||||||
        <db-header class="db-header"></db-header>
 | 
					        <db-header class="db-header"></db-header>
 | 
				
			||||||
        <div class="db-body">
 | 
					        <div class="db-body">
 | 
				
			||||||
          <div class="db-left">
 | 
					          <div class="db-left">
 | 
				
			||||||
            <db-container icon="cube" title="FTO投入" @refresh="() => (ftoKey = Math.random())">
 | 
					            <left-container icon="cube" title="FTO投入" @refresh="() => (ftoKey = Math.random())">
 | 
				
			||||||
              <fto-chart :key="ftoKey" />
 | 
					              <fto-chart :key="ftoKey" />
 | 
				
			||||||
            </db-container>
 | 
					            </left-container>
 | 
				
			||||||
            <db-container icon="chip2" title="芯片投入" @refresh="() => (chipInvestKey = Math.random())">
 | 
					            <left-container icon="chip2" title="芯片投入" @refresh="() => (chipInvestKey = Math.random())">
 | 
				
			||||||
              <chip-invest-chart :key="chipInvestKey" />
 | 
					              <chip-invest-chart :key="chipInvestKey" />
 | 
				
			||||||
            </db-container>
 | 
					            </left-container>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
          <div class="db-right">
 | 
					          <div class="db-right">
 | 
				
			||||||
            <db-container side="right" icon="chip" title="芯片产出" @refresh="() => (chipYieldKey = Math.random())">
 | 
					            <db-container side="right" icon="chip" title="芯片产出" @refresh="() => (chipYieldKey = Math.random())">
 | 
				
			||||||
@@ -53,6 +53,7 @@ import store from "@/store";
 | 
				
			|||||||
import DashboardHeader from "./dashboard/components/Header.vue";
 | 
					import DashboardHeader from "./dashboard/components/Header.vue";
 | 
				
			||||||
import CompanyInfo from "./dashboard/components/CompanyInfo.vue";
 | 
					import CompanyInfo from "./dashboard/components/CompanyInfo.vue";
 | 
				
			||||||
import Container from "./dashboard/components/Container.vue";
 | 
					import Container from "./dashboard/components/Container.vue";
 | 
				
			||||||
 | 
					import leftContainer from "./dashboard/components/leftContainer.vue";
 | 
				
			||||||
import FtoChart from "./dashboard/charts/Fto.vue";
 | 
					import FtoChart from "./dashboard/charts/Fto.vue";
 | 
				
			||||||
import ChipInvestChart from "./dashboard/charts/ChipInvest.vue";
 | 
					import ChipInvestChart from "./dashboard/charts/ChipInvest.vue";
 | 
				
			||||||
import BipvChart from "./dashboard/charts/Bipv.vue";
 | 
					import BipvChart from "./dashboard/charts/Bipv.vue";
 | 
				
			||||||
@@ -69,11 +70,11 @@ const LOCATIONS = [
 | 
				
			|||||||
  // 蚌埠2
 | 
					  // 蚌埠2
 | 
				
			||||||
  // { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' },
 | 
					  // { x: 61, y: 53, tx: 39, ty: 68, path: 'factoryData/ksIndex' },
 | 
				
			||||||
  // 江西 瑞昌
 | 
					  // 江西 瑞昌
 | 
				
			||||||
  { x: 60, y: 58, tx: 68, ty: 52,lx:61,ly:61.5,ltx:69.5,lty:52, path: 'factoryData/factory-data' },
 | 
					  { x: 60, y: 58, tx: 68, ty: 51,lx:61,ly:61.5,ltx:69.3,lty:51.4, path: 'factoryData/factory-data' },
 | 
				
			||||||
  // 湖南 株洲
 | 
					  // 湖南 株洲
 | 
				
			||||||
  // { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' },
 | 
					  // { x: 56, y: 60, tx: 60, ty: 95, path: 'factoryData/zzIndex' },
 | 
				
			||||||
  // 邯郸
 | 
					  // 邯郸
 | 
				
			||||||
  { x: 58, y: 45, tx: 47.4, ty: 34.3, lx: 58.7, ly: 34, ltx: 53.2, lty: 34, path: 'factoryData/hdIndex' },
 | 
					  { x: 58, y: 45, tx: 48.5, ty: 34.3, lx: 58.7, ly: 34, ltx: 53.2, lty: 34, path: 'factoryData/hdIndex' },
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
// rcLine.style.left = `66.8%`;
 | 
					// rcLine.style.left = `66.8%`;
 | 
				
			||||||
// rcLine.style.top = `52%`;
 | 
					// rcLine.style.top = `52%`;
 | 
				
			||||||
@@ -84,6 +85,7 @@ export default {
 | 
				
			|||||||
  name: "Index",
 | 
					  name: "Index",
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    CompanyInfo,
 | 
					    CompanyInfo,
 | 
				
			||||||
 | 
					    leftContainer,
 | 
				
			||||||
    ksCompanyInfo: CompanyInfo,
 | 
					    ksCompanyInfo: CompanyInfo,
 | 
				
			||||||
    hdCompanyInfo: CompanyInfo,
 | 
					    hdCompanyInfo: CompanyInfo,
 | 
				
			||||||
    bbCompanyInfo: CompanyInfo,
 | 
					    bbCompanyInfo: CompanyInfo,
 | 
				
			||||||
@@ -340,7 +342,7 @@ export default {
 | 
				
			|||||||
  .db-left,
 | 
					  .db-left,
 | 
				
			||||||
  .db-right {
 | 
					  .db-right {
 | 
				
			||||||
    // width: 420px;
 | 
					    // width: 420px;
 | 
				
			||||||
    width: 24vw;
 | 
					    width: 24.5vw;
 | 
				
			||||||
    padding: 20px;
 | 
					    padding: 20px;
 | 
				
			||||||
    display: flex;
 | 
					    display: flex;
 | 
				
			||||||
    flex-direction: column;
 | 
					    flex-direction: column;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,12 +1,12 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-11-06 15:15:30
 | 
					 * @Date: 2023-11-06 15:15:30
 | 
				
			||||||
 * @LastEditTime: 2024-06-07 10:28:51
 | 
					 * @LastEditTime: 2024-07-05 13:28:38
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-drawer class="drawer" :visible.sync="visible" size="60%" @closed="$emit('destroy')">
 | 
					  <el-drawer class="drawer" :visible.sync="visible" size="65%" @closed="$emit('destroy')">
 | 
				
			||||||
    <small-title slot="title" :no-padding="true">
 | 
					    <small-title slot="title" :no-padding="true">
 | 
				
			||||||
      {{ '碲化镉工厂生产数据详情' }}
 | 
					      {{ '碲化镉工厂生产数据详情' }}
 | 
				
			||||||
    </small-title>
 | 
					    </small-title>
 | 
				
			||||||
@@ -14,142 +14,160 @@
 | 
				
			|||||||
      <el-row :gutter="24">
 | 
					      <el-row :gutter="24">
 | 
				
			||||||
        <el-col :span="8">
 | 
					        <el-col :span="8">
 | 
				
			||||||
          <p class="title">工厂名称</p>
 | 
					          <p class="title">工厂名称</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.factory }}</p>
 | 
					          <p class="text">{{ factoryList[dataForm.factory] }}</p>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
        <el-col :span="8">
 | 
					        <el-col :span="8">
 | 
				
			||||||
          <p class="title">时间维度</p>
 | 
					          <p class="title">时间维度</p>
 | 
				
			||||||
          <p class="text">{{ date }}</p>
 | 
					          <p class="text">{{ ['日', '周', '月', '年'][date] }}</p>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
        <el-col :span="8">
 | 
					        <el-col :span="8">
 | 
				
			||||||
          <p class="title">时间</p>
 | 
					          <p class="title">时间</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.reportDate?.length > 0 ? dataForm.reportDate[0] + '年' + dataForm.reportDate[1] + '月' + dataForm.reportDate[2] + '日' : '' }}</p>
 | 
					          <p class="text">{{ dataForm.datestr }}</p>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
      </el-row>
 | 
					      </el-row>
 | 
				
			||||||
      <el-divider></el-divider>
 | 
					      <el-divider></el-divider>
 | 
				
			||||||
      <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
					      <div v-if="glass === 0">
 | 
				
			||||||
        {{ '芯片' }}
 | 
					        <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
				
			||||||
      </small-title>
 | 
					          {{ '芯片' }}
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					        </small-title>
 | 
				
			||||||
        <el-col :span="6">
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <p class="title">芯片产量(片)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ }}</p>
 | 
					            <p class="title">芯片产量(片)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipYieldSum }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片良率(%)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.yieldRate }}</p>
 | 
					            <p class="title">芯片良率(%)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipYieldRate }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片BOM</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.bom }}</p>
 | 
					            <p class="title">芯片BOM</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipBom }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片总功率(MW)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.totalPower }}</p>
 | 
					            <p class="title">芯片总功率(MW)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipTotalPower.toFixed(2) }}</p>
 | 
				
			||||||
      </el-row>
 | 
					          </el-col>
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					        </el-row>
 | 
				
			||||||
        <el-col :span="6">
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <p class="title">FTO投入量(片)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.chipInput }}</p>
 | 
					            <p class="title">FTO投入量(片)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.ftoInput }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">CSS稼动率(%)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.marriageRate }}</p>
 | 
					            <p class="title">CSS稼动率(%)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipCssMarriageRate }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片段OEE</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.oee }}</p>
 | 
					            <p class="title">芯片段OEE(%)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipOee }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片平均功率(W)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.averagePower }}</p>
 | 
					            <p class="title">芯片平均功率(W)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipAveragePower }}</p>
 | 
				
			||||||
      </el-row>
 | 
					          </el-col>
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					        </el-row>
 | 
				
			||||||
        <el-col :span="6">
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <p class="title">芯片人均产量(片/人)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.annualAverageProduction }}</p>
 | 
					            <p class="title">芯片人均产量(片/人)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ dataForm.chipAnnualAverageProduction }}</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          </el-col>
 | 
				
			||||||
          <p class="title">芯片产能利用率(%)</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="text">{{ dataForm.capacityUtilizationRate }}</p>
 | 
					            <p class="title">芯片产能利用率(%)</p>
 | 
				
			||||||
        </el-col>
 | 
					            <p class="text">{{ parseFloat(dataForm.chipCapacityUtilizationRate.toFixed(2)) }}</p>
 | 
				
			||||||
      </el-row>
 | 
					          </el-col>
 | 
				
			||||||
      <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
					        </el-row>
 | 
				
			||||||
        {{ '标准组件' }}
 | 
					      </div>
 | 
				
			||||||
      </small-title>
 | 
					      <div v-if="glass === 1">
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					        <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
				
			||||||
        <el-col :span="6">
 | 
					          {{ '标准组件' }}
 | 
				
			||||||
          <p class="title">封装BOM</p>
 | 
					        </small-title>
 | 
				
			||||||
          <!-- 没参数 -->
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.bom }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">封装BOM</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ dataForm.componentBom }}</p>
 | 
				
			||||||
          <p class="title">封装线OEE(%)</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.code }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">封装线OEE(%)</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ dataForm.componentOee }}</p>
 | 
				
			||||||
          <p class="title">标准组件良率(%)</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.productName }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">标准组件良率(%)</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ dataForm.componentYieldRate }}</p>
 | 
				
			||||||
          <p class="title">标准组件产量(片)</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.productName }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">标准组件产量(片)</p>
 | 
				
			||||||
      </el-row>
 | 
					            <p class="text">{{ dataForm.componentYield }}</p>
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					          </el-col>
 | 
				
			||||||
        <el-col :span="6">
 | 
					        </el-row>
 | 
				
			||||||
          <p class="title">标准组件总功率(MW)</p>
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <p class="text">{{ }}</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">标准组件总功率(MW)</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ parseFloat(dataForm.componentTotalPower.toFixed(2)) }}</p>
 | 
				
			||||||
          <p class="title">封装产能利用率(%)</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.code }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">封装产能利用率(%)</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ parseFloat(dataForm.componentCapacityUtilizationRate.toFixed(2)) }}</p>
 | 
				
			||||||
          <p class="title">标准组件人均产量</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.productName }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">标准组件人均产量(片/人)</p>
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="text">{{ dataForm.componentAnnualAverageProduction }}</p>
 | 
				
			||||||
          <p class="title">标准组件平均功率</p>
 | 
					          </el-col>
 | 
				
			||||||
          <!-- <p class="text">{{ dataForm.productName }}</p> -->
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">标准组件平均功率(W)</p>
 | 
				
			||||||
      </el-row>
 | 
					            <p class="text">{{ dataForm.componentAveragePower }}</p>
 | 
				
			||||||
      <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
					          </el-col>
 | 
				
			||||||
        {{ 'BIPV产品' }}
 | 
					        </el-row>
 | 
				
			||||||
      </small-title>
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					          <el-col :span="6">
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="title">标准组件转化效率</p>
 | 
				
			||||||
          <p class="title">产品产量</p>
 | 
					            <p class="text">{{ dataForm.componentTransRate }}</p>
 | 
				
			||||||
          <p class="text">{{ }}</p>
 | 
					          </el-col>
 | 
				
			||||||
        </el-col>
 | 
					          <el-col :span="6">
 | 
				
			||||||
        <el-col :span="6">
 | 
					            <p class="title">芯片投入</p>
 | 
				
			||||||
          <p class="title">人均产量</p>
 | 
					            <p class="text">{{ dataForm.chipInput }}</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.code }}</p>
 | 
					          </el-col>
 | 
				
			||||||
        </el-col>
 | 
					        </el-row>
 | 
				
			||||||
        <el-col :span="6">
 | 
					      </div>
 | 
				
			||||||
          <p class="title">芯片使用量</p>
 | 
					      <div v-if="glass === 2">
 | 
				
			||||||
          <p class="text">{{ dataForm.productName }}</p>
 | 
					        <small-title style=" margin: 0;padding: 26px 32px 24px;margin-bottom: 22px;" :no-padding="false">
 | 
				
			||||||
        </el-col>
 | 
					          {{ 'BIPV产品' }}
 | 
				
			||||||
        <el-col :span="6">
 | 
					        </small-title>
 | 
				
			||||||
          <p class="title">芯片使用量</p>
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
          <p class="text">{{ dataForm.productName }}</p>
 | 
					          <el-col :span="6">
 | 
				
			||||||
        </el-col>
 | 
					            <p class="title">产品产量(㎡)</p>
 | 
				
			||||||
      </el-row>
 | 
					            <p class="text">{{ dataForm.bipvProductOutput }}</p>
 | 
				
			||||||
      <el-row :gutter="24">
 | 
					          </el-col>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="title">内部材料成本</p>
 | 
					            <p class="title">人均产量(㎡/人)</p>
 | 
				
			||||||
          <p class="text">{{ }}</p>
 | 
					            <p class="text">{{ dataForm.bipvAnnualAverageProduction }}</p>
 | 
				
			||||||
        </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="title">内部材料成本</p>
 | 
					            <p class="title">芯片使用量(片)</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.code }}</p>
 | 
					            <p class="text">{{ dataForm.bipvChipUsage }}</p>
 | 
				
			||||||
        </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        <el-col :span="6">
 | 
					          <el-col :span="6">
 | 
				
			||||||
          <p class="title">内部材料成本</p>
 | 
					            <p class="title">芯片利用率(%)</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.productName }}</p>
 | 
					            <p class="text">{{ dataForm.bipvChipUtilizationRate }}</p>
 | 
				
			||||||
        </el-col>
 | 
					          </el-col>
 | 
				
			||||||
      </el-row>
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <el-row :gutter="24">
 | 
				
			||||||
 | 
					          <el-col :span="6">
 | 
				
			||||||
 | 
					            <p class="title">内部材料成本(元/㎡)</p>
 | 
				
			||||||
 | 
					            <p class="text">{{ dataForm.bipvInsideMaterialCost }}</p>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="6">
 | 
				
			||||||
 | 
					            <p class="title">OEM及委外材料成本(元/㎡)</p>
 | 
				
			||||||
 | 
					            <p class="text">{{ dataForm.code }}</p>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="6">
 | 
				
			||||||
 | 
					            <p class="title">综合材料成本(元/㎡)</p>
 | 
				
			||||||
 | 
					            <p class="text">{{ dataForm.bipvComprehensiveMaterialCost }}</p>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div v-if="glass === 4">
 | 
				
			||||||
 | 
					        <!-- 铜铟镓硒待完成 -->
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </el-drawer>
 | 
					  </el-drawer>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -157,24 +175,18 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// import basicAdd from './basic-add';
 | 
					// import basicAdd from './basic-add';
 | 
				
			||||||
import {
 | 
					import { getProduceDataDetail } from "@/api/produceData";
 | 
				
			||||||
  getProduceDataDetail
 | 
					 | 
				
			||||||
} from "@/api/produceData";
 | 
					 | 
				
			||||||
// import { getList, } from "@/api/base/qualityScrapType";
 | 
					// import { getList, } from "@/api/base/qualityScrapType";
 | 
				
			||||||
import SmallTitle from './SmallTitle';
 | 
					import SmallTitle from './SmallTitle';
 | 
				
			||||||
 | 
					import { factoryList } from "@/utils/constants";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    SmallTitle,
 | 
					    SmallTitle,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  // mixins: [basicAdd],
 | 
					 | 
				
			||||||
  props: {
 | 
					 | 
				
			||||||
    date: {
 | 
					 | 
				
			||||||
      type: Number,
 | 
					 | 
				
			||||||
      default: 0
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
					      factoryList,
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        isGetCode: false,
 | 
					        isGetCode: false,
 | 
				
			||||||
        // codeURL: getCode,
 | 
					        // codeURL: getCode,
 | 
				
			||||||
@@ -198,6 +210,8 @@ export default {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      sectionList: [],
 | 
					      sectionList: [],
 | 
				
			||||||
 | 
					      glass: 0,
 | 
				
			||||||
 | 
					      date: 0,
 | 
				
			||||||
      visible: false,
 | 
					      visible: false,
 | 
				
			||||||
      dataForm: {
 | 
					      dataForm: {
 | 
				
			||||||
        id: undefined,
 | 
					        id: undefined,
 | 
				
			||||||
@@ -229,11 +243,16 @@ export default {
 | 
				
			|||||||
    // this.getCurrentTime()
 | 
					    // this.getCurrentTime()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    init(id) {
 | 
					    init(id, type, glass) {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      console.log('打印', id)
 | 
					      this.glass = glass
 | 
				
			||||||
 | 
					      this.date = type
 | 
				
			||||||
 | 
					      console.log('打印', id, glass)
 | 
				
			||||||
      if (id) {
 | 
					      if (id) {
 | 
				
			||||||
        getProduceDataDetail(id).then(res => {
 | 
					        getProduceDataDetail({
 | 
				
			||||||
 | 
					          id: id,
 | 
				
			||||||
 | 
					          type: type
 | 
				
			||||||
 | 
					        }).then(res => {
 | 
				
			||||||
          this.dataForm = res.data
 | 
					          this.dataForm = res.data
 | 
				
			||||||
          console.log('你好', res.data)
 | 
					          console.log('你好', res.data)
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,53 +1,53 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-15 10:49:13
 | 
					 * @Date: 2024-04-15 10:49:13
 | 
				
			||||||
 * @LastEditTime: 2024-06-07 09:41:56
 | 
					 * @LastEditTime: 2024-07-24 14:48:25
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div style="display: flex; flex-direction: column; min-height: calc(100vh - 96px - 31px)">
 | 
					  <div style="display: flex; flex-direction: column; min-height: calc(100vh - 200px - 31px)">
 | 
				
			||||||
    <div class="app-container" style="padding: 16px 24px 0;height: auto; flex-grow: 1;">
 | 
					    <div class="app-container" style="padding: 16px 24px 0; height: auto; flex-grow: 1;">
 | 
				
			||||||
      <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
					      <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
				
			||||||
        <el-form-item label="时间维度" prop="date">
 | 
					        <el-form-item label="时间维度" prop="type">
 | 
				
			||||||
          <el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
 | 
					          <el-select @change="changType" v-model="listQuery.type" size="small" clearable placeholder="请选择">
 | 
				
			||||||
            <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
 | 
					            <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
 | 
				
			||||||
            </el-option>
 | 
					            </el-option>
 | 
				
			||||||
          </el-select>
 | 
					          </el-select>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.date === 0 || listQuery.date === ''" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="datetimerange" range-separator="至"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
 | 
				
			||||||
            start-placeholder="开始日期" value-format="timestamp" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期">
 | 
					            start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd" @change="changeDayTime" end-placeholder="结束日期" :picker-options="{ firstDayOfWeek: 1 }">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy-MM-dd" placeholder="选择周" :picker-options="{ firstDayOfWeek: 1 }"
 | 
				
			||||||
            style="width: 180px" @change="onValueChange">
 | 
					            style="width: 180px" @change="onValueChange">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
          至
 | 
					          至
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy 第 WW 周" placeholder="选择周"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy-MM-dd" placeholder="选择周" :picker-options="{ firstDayOfWeek: 1 }"
 | 
				
			||||||
            style="width: 180px" @change="onValueChange">
 | 
					            style="width: 180px" @change="onValueChange">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
          <span v-if="listQuery.start && listQuery.end" style="margin-left: 10px">
 | 
					          <!-- <span v-if="listQuery.start && listQuery.end" style="margin-left: 10px">
 | 
				
			||||||
            {{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
 | 
					            {{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
 | 
				
			||||||
          </span>
 | 
					          </span> -->
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.date === 2" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 2" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="timestamp" range-separator="至"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange" value-format="yyyy-MM-dd" range-separator="至"
 | 
				
			||||||
            start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
 | 
					            start-placeholder="开始月份" end-placeholder="结束月份" @change="changeTime">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.date === 3" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 3" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.start" format="yyyy-MM-dd" value-format="timestamp" type="year"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.start" value-format="yyyy-MM-dd" type="year"
 | 
				
			||||||
            placeholder="开始时间">
 | 
					            placeholder="开始时间" @change="getYear">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
          ~
 | 
					          ~
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.end" format="yyyy-MM-dd" value-format="timestamp" type="year" placeholder="结束时间"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.end" value-format="yyyy-MM-dd" type="year" placeholder="结束时间"
 | 
				
			||||||
            @change="getYear">
 | 
					            @change="getYear">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item label="工厂名称" prop="factorys">
 | 
					        <el-form-item label="工厂名称" prop="factory">
 | 
				
			||||||
          <el-select size="small" clearable v-model="listQuery.factorys" placeholder="请选择工厂名称" multiple >
 | 
					          <el-select size="small" clearable v-model="listQuery.factory" placeholder="请选择工厂名称" multiple >
 | 
				
			||||||
            <el-option v-for="item in factoryArray" :key="item.id" :label="item.name" :value="item.id">
 | 
					            <el-option v-for="item in factoryArray" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
            </el-option>
 | 
					            </el-option>
 | 
				
			||||||
          </el-select>
 | 
					          </el-select>
 | 
				
			||||||
@@ -58,8 +58,8 @@
 | 
				
			|||||||
            </el-option>
 | 
					            </el-option>
 | 
				
			||||||
          </el-select>
 | 
					          </el-select>
 | 
				
			||||||
        </el-form-item> -->
 | 
					        </el-form-item> -->
 | 
				
			||||||
        <el-form-item label="玻璃类型" prop="type">
 | 
					        <el-form-item label="玻璃类型" prop="glass">
 | 
				
			||||||
          <el-select size="small" clearable v-model="listQuery.type" multiple placeholder="请选择玻璃类型">
 | 
					          <el-select size="small" clearable v-model="listQuery.glass" multiple placeholder="请选择玻璃类型">
 | 
				
			||||||
            <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
 | 
					            <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
            </el-option>
 | 
					            </el-option>
 | 
				
			||||||
          </el-select>
 | 
					          </el-select>
 | 
				
			||||||
@@ -74,7 +74,7 @@
 | 
				
			|||||||
      <!-- <el-row :gutter="24"> -->
 | 
					      <!-- <el-row :gutter="24"> -->
 | 
				
			||||||
      <!-- <el-col :span="12" v-for="item in  dataList" :key="item.id"> -->
 | 
					      <!-- <el-col :span="12" v-for="item in  dataList" :key="item.id"> -->
 | 
				
			||||||
      <search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" />
 | 
					      <search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" />
 | 
				
			||||||
      <line-chart class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
 | 
					      <line-chart ref="lineChart" class="yearChart" style="height: 45vh;width: 100%"></line-chart>
 | 
				
			||||||
      <!-- </el-col> -->
 | 
					      <!-- </el-col> -->
 | 
				
			||||||
      <!-- <el-col :span="12">
 | 
					      <!-- <el-col :span="12">
 | 
				
			||||||
            <line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
 | 
					            <line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
 | 
				
			||||||
@@ -82,19 +82,19 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;">
 | 
					    <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto; padding: 16px;">
 | 
				
			||||||
      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" style="margin-bottom: 0" />
 | 
					      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" style="margin-bottom: 0" />
 | 
				
			||||||
      <base-table :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size"
 | 
					      <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
 | 
				
			||||||
        :table-data="tableData">
 | 
					        :table-data="tableData" :max-height="tableH">
 | 
				
			||||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
 | 
				
			||||||
          :method-list="tableBtn" @clickBtn="handleClick" />
 | 
					          :method-list="tableBtn" @clickBtn="handleClick" />
 | 
				
			||||||
      </base-table>
 | 
					      </base-table>
 | 
				
			||||||
      <pagination
 | 
					      <pagination
 | 
				
			||||||
        :limit.sync="listQuery.size"
 | 
					        :limit.sync="listQuery.pageSize"
 | 
				
			||||||
        :page.sync="listQuery.current"
 | 
					        :page.sync="listQuery.pageNo"
 | 
				
			||||||
        :total="listQuery.total"
 | 
					        :total="listQuery.total"
 | 
				
			||||||
        @pagination="getDataList"
 | 
					        @pagination="getDataList"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.date" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
 | 
					    <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
 | 
				
			||||||
    <!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
 | 
					    <!-- <inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
 | 
				
			||||||
      :type="listQuery.reportType" @refreshDataList="getDataList" /> -->
 | 
					      :type="listQuery.reportType" @refreshDataList="getDataList" /> -->
 | 
				
			||||||
    <!-- <pagination
 | 
					    <!-- <pagination
 | 
				
			||||||
@@ -106,37 +106,38 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// import { parseTime } from '../../core/mixins/code-filter';
 | 
					// import { parseTime } from "@/utils/ruoyi";
 | 
				
			||||||
import { getProduceDataPage, prodOutputDataList, exportOutPutExcel } from '@/api/produceData';
 | 
					import tableHeightMixin from "@/mixins/tableHeightMixin";
 | 
				
			||||||
 | 
					import { getProduceDataPage, getproddata, exportOutPutExcel } from '@/api/produceData';
 | 
				
			||||||
// import inputTable from './inputTable.vue';
 | 
					// import inputTable from './inputTable.vue';
 | 
				
			||||||
import lineChart from './lineChart';
 | 
					import lineChart from './lineChart';
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
import ButtonNav from '@/components/ButtonNav'
 | 
					import ButtonNav from '@/components/ButtonNav'
 | 
				
			||||||
import basicPage from '@/mixins/basic-page'
 | 
					import basicPage from '@/mixins/basic-page'
 | 
				
			||||||
import AddOrUpdate from './add-or-updata'
 | 
					import AddOrUpdate from './add-or-updata'
 | 
				
			||||||
import { factoryList, factoryArray, factoryArray1 } from "@/utils/constants";
 | 
					import { factoryList, factoryArray, factoryListabbr } from "@/utils/constants";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { lineChart, ButtonNav, AddOrUpdate },
 | 
					  components: { lineChart, ButtonNav, AddOrUpdate },
 | 
				
			||||||
  mixins: [basicPage],
 | 
					  mixins: [basicPage, tableHeightMixin],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      factoryList,
 | 
					      factoryList,
 | 
				
			||||||
      factoryArray,
 | 
					      factoryArray,
 | 
				
			||||||
      factoryArray1,
 | 
					      factoryListabbr,
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        size: 20,
 | 
					        pageSize: 20,
 | 
				
			||||||
        current: 1,
 | 
					        pageNo: 1,
 | 
				
			||||||
        factorys: undefined,
 | 
					        factory: undefined,
 | 
				
			||||||
        total: 0,
 | 
					        total: 0,
 | 
				
			||||||
        date: 0,
 | 
					        type: 0, // 时间维度
 | 
				
			||||||
        type:undefined,
 | 
					        glass: undefined, // 玻璃类型
 | 
				
			||||||
        // reportType: 2,
 | 
					        // reportType: 2,
 | 
				
			||||||
        beginTime: undefined,
 | 
					        startDate: undefined,
 | 
				
			||||||
        endTime:undefined,
 | 
					        endDate:undefined,
 | 
				
			||||||
        reportTime: [],
 | 
					        reportTime: null,
 | 
				
			||||||
        start: undefined,
 | 
					        start: null,
 | 
				
			||||||
        end: undefined
 | 
					        end: null
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      detailOrUpdateVisible:false,
 | 
					      detailOrUpdateVisible:false,
 | 
				
			||||||
      date1: undefined,
 | 
					      date1: undefined,
 | 
				
			||||||
@@ -153,7 +154,7 @@ export default {
 | 
				
			|||||||
      ].filter((v) => v),
 | 
					      ].filter((v) => v),
 | 
				
			||||||
      typeList: [
 | 
					      typeList: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          name: '芯片',
 | 
					          name: '玻璃芯片',
 | 
				
			||||||
          id: 0,
 | 
					          id: 0,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -164,6 +165,10 @@ export default {
 | 
				
			|||||||
          name: 'BIPV产品',
 | 
					          name: 'BIPV产品',
 | 
				
			||||||
          id: 2,
 | 
					          id: 2,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   name: '定制组件',
 | 
				
			||||||
 | 
					        //   id: 3,
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -197,16 +202,16 @@ export default {
 | 
				
			|||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableProps: [
 | 
					      tableProps: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'groupTime',
 | 
					          prop: 'datestr',
 | 
				
			||||||
          label: '日期',
 | 
					          label: '日期',
 | 
				
			||||||
          minWidth: 100,
 | 
					          minWidth: 120,
 | 
				
			||||||
          showOverflowtooltip: true
 | 
					          showOverflowtooltip: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'factory',
 | 
					          prop: 'factory',
 | 
				
			||||||
          label: '工厂名称',
 | 
					          label: '工厂名称',
 | 
				
			||||||
          filter: (val) => factoryList[val],
 | 
					          filter: (val) =>  factoryList[val],
 | 
				
			||||||
          minWidth: 200,
 | 
					          minWidth: 180,
 | 
				
			||||||
          showOverflowtooltip: true
 | 
					          showOverflowtooltip: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -215,51 +220,59 @@ export default {
 | 
				
			|||||||
          filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
					          filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'inputNumber',
 | 
					          prop: 'inputNum',
 | 
				
			||||||
          label: '投入数量',
 | 
					          label: '投入数量',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'outputNumber',
 | 
					          prop: 'outputNum',
 | 
				
			||||||
          label: '产出数量',
 | 
					          label: '产出数量',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'goodNumber',
 | 
					          prop: 'goodNum',
 | 
				
			||||||
          label: '良品数量',
 | 
					          label: '良品数量',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'yieldRate',
 | 
					          prop: 'goodRatio',
 | 
				
			||||||
          label: '良品率%',
 | 
					          label: '良品率%',
 | 
				
			||||||
          filter: (val) => (val * 100) + '%'
 | 
					          filter: (val) => val.toFixed(2) + '%'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      lineData: [],
 | 
					      lineData: [],
 | 
				
			||||||
      chart: null,
 | 
					      chart: null,
 | 
				
			||||||
      seriesList: []
 | 
					      seriesList: [],
 | 
				
			||||||
 | 
					      colorList: ['#7164FF',  '#63BDFF', '#8EF0AB', '#FFCE6A']
 | 
				
			||||||
			// proLineList: [],
 | 
								// proLineList: [],
 | 
				
			||||||
			// all: {}
 | 
								// all: {}
 | 
				
			||||||
		};
 | 
							};
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  // computed: {
 | 
				
			||||||
    weekNum() {
 | 
					  //   weekNum() {
 | 
				
			||||||
      return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
 | 
					  //     return Math.round((this.listQuery.end - this.listQuery.start) / (24 * 60 * 60 * 1000 * 7)) + 1
 | 
				
			||||||
    },
 | 
					  //   },
 | 
				
			||||||
  },
 | 
					  // },
 | 
				
			||||||
  created() {
 | 
					  created() {
 | 
				
			||||||
    const today = new Date()
 | 
					    const today = new Date()
 | 
				
			||||||
    const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
 | 
					    const sevenDaysAgo = new Date(today.getTime() - (6 * 24 * 60 * 60 * 1000))
 | 
				
			||||||
    this.listQuery.beginTime = sevenDaysAgo.getTime()
 | 
					    this.listQuery.startDate = moment(sevenDaysAgo).format('yyyy-MM-DD')
 | 
				
			||||||
    this.listQuery.endTime = today.getTime()
 | 
					    this.listQuery.endDate = moment(today).format('yyyy-MM-DD')
 | 
				
			||||||
    this.listQuery.reportTime = [this.listQuery.beginTime, this.listQuery.endTime]
 | 
					    this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    changType() {
 | 
				
			||||||
 | 
					      this.listQuery.endDate = null
 | 
				
			||||||
 | 
					      this.listQuery.startDate = null
 | 
				
			||||||
 | 
					      this.listQuery.reportTime = null
 | 
				
			||||||
 | 
					      this.listQuery.start = null
 | 
				
			||||||
 | 
					      this.listQuery.end = null
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    otherMethods(val) {
 | 
					    otherMethods(val) {
 | 
				
			||||||
      this.detailOrUpdateVisible = true;
 | 
					      this.detailOrUpdateVisible = true;
 | 
				
			||||||
      this.addOrEditTitle = "详情";
 | 
					      this.addOrEditTitle = "详情";
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
        this.$refs.detailOrUpdate.init(val.data.id);
 | 
					        this.$refs.detailOrUpdate.init(val.data.id, this.listQuery.type, val.data.glassType);
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getYear(e) {
 | 
					    getYear(e) {
 | 
				
			||||||
@@ -271,17 +284,14 @@ export default {
 | 
				
			|||||||
        this.listQuery.reportTime = []
 | 
					        this.listQuery.reportTime = []
 | 
				
			||||||
        this.listQuery.start = undefined
 | 
					        this.listQuery.start = undefined
 | 
				
			||||||
        this.listQuery.end = undefined
 | 
					        this.listQuery.end = undefined
 | 
				
			||||||
        // console.log();
 | 
					 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        this.listQuery.beginTime = this.listQuery.start
 | 
					        this.listQuery.startDate = this.listQuery.start
 | 
				
			||||||
        this.listQuery.endTime = this.listQuery.end
 | 
					        this.listQuery.endDate = this.listQuery.end
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // console.log(e);
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    onValueChange(picker, k) { // 选中近k周后触发的操作
 | 
					    onValueChange(picker, k) { // 选中近k周后触发的操作
 | 
				
			||||||
      // console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
 | 
					 | 
				
			||||||
      if (this.listQuery.start && this.listQuery.end) {
 | 
					      if (this.listQuery.start && this.listQuery.end) {
 | 
				
			||||||
        console.log(this.listQuery.reportTime)
 | 
					        // console.log(this.listQuery.start, this.listQuery.end - this.listQuery.start)
 | 
				
			||||||
        this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
					        this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
        this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
					        this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
        const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
 | 
					        const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
 | 
				
			||||||
@@ -292,10 +302,18 @@ export default {
 | 
				
			|||||||
            type: 'warning'
 | 
					            type: 'warning'
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.listQuery.beginTime = this.listQuery.start.getTime() - 24 * 60 * 60 * 1000
 | 
					          this.listQuery.startDate = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
 | 
				
			||||||
          this.listQuery.endTime = this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000
 | 
					          this.listQuery.endDate = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					        console.log(this.listQuery.startDate, this.listQuery.endDate)
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      // if (!this.listQuery.start && !this.listQuery.end) {
 | 
				
			||||||
 | 
					      //   this.listQuery.startDate = undefined
 | 
				
			||||||
 | 
					      //   this.listQuery.endDate = undefined
 | 
				
			||||||
 | 
					      // }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeDayTime() {
 | 
					    changeDayTime() {
 | 
				
			||||||
      if (this.listQuery.reportTime) {
 | 
					      if (this.listQuery.reportTime) {
 | 
				
			||||||
@@ -310,10 +328,12 @@ export default {
 | 
				
			|||||||
          });
 | 
					          });
 | 
				
			||||||
          this.listQuery.reportTime = [];
 | 
					          this.listQuery.reportTime = [];
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.listQuery.beginTime = this.listQuery.reportTime[0]
 | 
					          this.listQuery.startDate = this.listQuery.reportTime[0]
 | 
				
			||||||
          this.listQuery.endTime = this.listQuery.reportTime[1]
 | 
					          this.listQuery.endDate = this.listQuery.reportTime[1]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeTime(value) {
 | 
					    changeTime(value) {
 | 
				
			||||||
@@ -326,114 +346,117 @@ export default {
 | 
				
			|||||||
          });
 | 
					          });
 | 
				
			||||||
          this.listQuery.reportTime = [];
 | 
					          this.listQuery.reportTime = [];
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.listQuery.beginTime = this.listQuery.reportTime[0]
 | 
					          this.listQuery.startDate = this.listQuery.reportTime[0]
 | 
				
			||||||
          this.listQuery.endTime = this.listQuery.reportTime[1]
 | 
					          this.listQuery.endDate = this.listQuery.reportTime[1]
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        console.log(this.listQuery.reportTime[0])
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    async getDataList() {
 | 
					    async getDataList() {
 | 
				
			||||||
      const res = await getProduceDataPage(this.listQuery)
 | 
					      if (this.listQuery.type === '') {
 | 
				
			||||||
      console.log(res)
 | 
					        this.$message.warning('请选择时间维度!')
 | 
				
			||||||
      if (res.code === 0) {
 | 
					        return
 | 
				
			||||||
        this.tableData = res.data.records
 | 
					 | 
				
			||||||
        this.listQuery.total = res.data.total
 | 
					 | 
				
			||||||
        // if (this.listQuery.total > 0) {
 | 
					 | 
				
			||||||
        //   this.tableData.forEach(item => {
 | 
					 | 
				
			||||||
        //     item.tableTime = item?.reportDate?.length > 0 ? item.reportDate[0] + '-' + item.reportDate[1] + '-' + item.reportDate[2] : '--'
 | 
					 | 
				
			||||||
        //   })
 | 
					 | 
				
			||||||
        // }
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (!this.listQuery.startDate || !this.listQuery.endDate) {
 | 
				
			||||||
      // 图表
 | 
					        this.$message.warning('请选择时间范围!')
 | 
				
			||||||
      await prodOutputDataList({
 | 
					      } else {
 | 
				
			||||||
        current: 1,
 | 
					        await getProduceDataPage(this.listQuery).then(res => {
 | 
				
			||||||
        size: 99,
 | 
					          console.log(res)
 | 
				
			||||||
        beginTime: this.listQuery.beginTime,
 | 
					          if (res.code === 0) {
 | 
				
			||||||
        endTime: this.listQuery.endTime,
 | 
					            this.tableData = res.data.records
 | 
				
			||||||
        factorys: this.listQuery.factorys,
 | 
					            this.listQuery.total = res.data.total
 | 
				
			||||||
        date: this.listQuery.date,
 | 
					 | 
				
			||||||
        type: this.listQuery.type
 | 
					 | 
				
			||||||
      }).then(resp => {
 | 
					 | 
				
			||||||
        console.log('Aaa', resp.data)
 | 
					 | 
				
			||||||
        this.lineData = resp?.data || []
 | 
					 | 
				
			||||||
        if (this.lineData.length > 0) {
 | 
					 | 
				
			||||||
          this.buildChart(this.lineData)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      // this.buildChart(this.tableData)
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    buildChart(list) {
 | 
					 | 
				
			||||||
      let temp = []
 | 
					 | 
				
			||||||
      let xAxisData = []
 | 
					 | 
				
			||||||
      list.forEach(item => {
 | 
					 | 
				
			||||||
        temp.push(item.groupTime)
 | 
					 | 
				
			||||||
      })
 | 
					 | 
				
			||||||
      // x轴数据
 | 
					 | 
				
			||||||
      xAxisData = Array.from(new Set(temp))
 | 
					 | 
				
			||||||
      
 | 
					 | 
				
			||||||
      // y轴数据
 | 
					 | 
				
			||||||
      for (const y of this.factoryArray1) {
 | 
					 | 
				
			||||||
        for (const type of this.typeList) {
 | 
					 | 
				
			||||||
          const seriesItem = {
 | 
					 | 
				
			||||||
            name: y.name,
 | 
					 | 
				
			||||||
            record: type.name,
 | 
					 | 
				
			||||||
            type: 'bar',
 | 
					 | 
				
			||||||
            emphasis: {
 | 
					 | 
				
			||||||
              focus: 'series'
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            data: Array(xAxisData.length).fill(0)
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          list.forEach(data => {
 | 
					        })
 | 
				
			||||||
            xAxisData.forEach((x, index) => {
 | 
					        // 图表
 | 
				
			||||||
              if (x === data.groupTime && y.id === data.factory && type.id === data.glassType) {
 | 
					        await getproddata(this.listQuery).then(resp => {
 | 
				
			||||||
                seriesItem.data[index] = data.goodNumber
 | 
					          if (resp.data?.length > 0) {
 | 
				
			||||||
 | 
					            const chartData = Object.groupBy(resp.data, (member) => member.datestr)
 | 
				
			||||||
 | 
					            this.buildChart(chartData, resp.data)
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            this.$refs.lineChart.initChart([], [])
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buildChart(data, dataList) {
 | 
				
			||||||
 | 
					      let xAxisData = []
 | 
				
			||||||
 | 
					      this.seriesList = []
 | 
				
			||||||
 | 
					      // x轴数据
 | 
				
			||||||
 | 
					      xAxisData = Object.keys(data)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // 构造series
 | 
				
			||||||
 | 
					      // 玻璃类型 ['chipYield', 'componentYield', 'bipvProductOutput']
 | 
				
			||||||
 | 
					      const typeArray = (this.listQuery.glass.length === 0 || this.listQuery.glass.length === 3) ? [0, 1, 2] : this.listQuery.glass
 | 
				
			||||||
 | 
					      // 工厂名称 this.factoryListabbr
 | 
				
			||||||
 | 
					      const factoryNameArray = (this.listQuery.factory.length === 0 || this.listQuery.factory.length === this.factoryListabbr.length) ? [0, 1] : this.listQuery.factory
 | 
				
			||||||
 | 
					      const seriesArray = []
 | 
				
			||||||
 | 
					      factoryNameArray.forEach((fac, facIndex) => {
 | 
				
			||||||
 | 
					        typeArray.forEach((type, typeIndex) => {  
 | 
				
			||||||
 | 
					          const series = {
 | 
				
			||||||
 | 
					            data: Array(xAxisData.length).fill(0),
 | 
				
			||||||
 | 
					            type: 'bar',
 | 
				
			||||||
 | 
					            stack: String(fac),
 | 
				
			||||||
 | 
					            barWidth: 16,
 | 
				
			||||||
 | 
					            itemStyle: {
 | 
				
			||||||
 | 
					              color: this.colorList[type]
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            name: this.factoryListabbr[fac] + '-' + type
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          seriesArray.push(series)
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // 按工厂分
 | 
				
			||||||
 | 
					      const arrayByFacArray = Object.groupBy(dataList, (member) => member.factory)
 | 
				
			||||||
 | 
					      // const seriesDataArray = []
 | 
				
			||||||
 | 
					      let n = 0
 | 
				
			||||||
 | 
					      Object.values(arrayByFacArray).forEach((item) => {
 | 
				
			||||||
 | 
					        typeArray.forEach(type => {
 | 
				
			||||||
 | 
					          const typeName = ['chipYield', 'componentYield', 'bipvProductOutput'][type]
 | 
				
			||||||
 | 
					          let seriesData = Array(xAxisData.length).fill(0)
 | 
				
			||||||
 | 
					          item.forEach(it => {
 | 
				
			||||||
 | 
					            xAxisData.forEach((x, xindex) => {
 | 
				
			||||||
 | 
					              if (x === it['datestr']) {
 | 
				
			||||||
 | 
					                seriesData[xindex] = it[typeName]
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
          this.seriesList.push(seriesItem)
 | 
					          seriesArray[n].data = seriesData
 | 
				
			||||||
 | 
					          n ++
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // 添加工厂
 | 
				
			||||||
 | 
					      const validSeriesArray = []
 | 
				
			||||||
 | 
					      factoryNameArray.forEach(f => {
 | 
				
			||||||
 | 
					        const s = {
 | 
				
			||||||
 | 
					          name: '显示工厂',
 | 
				
			||||||
 | 
					          data: Array(xAxisData.length).fill(0),
 | 
				
			||||||
 | 
					          type: 'bar',
 | 
				
			||||||
 | 
					          stack: String(f),
 | 
				
			||||||
 | 
					          barWidth: 16,
 | 
				
			||||||
 | 
					          label: {
 | 
				
			||||||
 | 
					            show: true,
 | 
				
			||||||
 | 
					            position: 'top',
 | 
				
			||||||
 | 
					            // position: f > 0 ?  [2, -16] : [-10, -16],
 | 
				
			||||||
 | 
					            formatter(params) {
 | 
				
			||||||
 | 
					              return factoryListabbr[f]
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					        validSeriesArray.push(s)
 | 
				
			||||||
      console.log('啊啊', this.seriesList)
 | 
					      })
 | 
				
			||||||
      this.$refs.lineChart.initChart(xAxisData, this.seriesList)
 | 
					      this.seriesList = [...seriesArray, ...validSeriesArray]
 | 
				
			||||||
      // const chartList = Object.groupBy(list, (item) => item.tableTime)
 | 
					      this.$refs.lineChart.initChart(xAxisData, this.seriesList, factoryNameArray)
 | 
				
			||||||
      // this.xAxis = []
 | 
					 | 
				
			||||||
      // this.seriesList = []
 | 
					 | 
				
			||||||
      // for (const keyIndex in chartList) {
 | 
					 | 
				
			||||||
      //   // X坐标轴数据
 | 
					 | 
				
			||||||
      //   this.xAxis.push(keyIndex)
 | 
					 | 
				
			||||||
      // }
 | 
					 | 
				
			||||||
      // // y轴数据
 | 
					 | 
				
			||||||
      // for (const y of this.factoryArray) {
 | 
					 | 
				
			||||||
      //   // y: {name: , id: }
 | 
					 | 
				
			||||||
      //   const seriesItem = {
 | 
					 | 
				
			||||||
      //     name: y.name,
 | 
					 | 
				
			||||||
      //       type: 'bar',
 | 
					 | 
				
			||||||
      //       emphasis: {
 | 
					 | 
				
			||||||
      //         focus: 'series'
 | 
					 | 
				
			||||||
      //       },
 | 
					 | 
				
			||||||
      //     data: Array(this.xAxis.length).fill(0)
 | 
					 | 
				
			||||||
      //   }
 | 
					 | 
				
			||||||
      //   for (const a in chartList) {
 | 
					 | 
				
			||||||
      //     for (const z of chartList[a]) {
 | 
					 | 
				
			||||||
      //       this.xAxis.forEach((item, index) => {
 | 
					 | 
				
			||||||
      //         if (z.factory === y.id && a === item) {
 | 
					 | 
				
			||||||
      //           seriesItem.data[index] = z.goodNumber
 | 
					 | 
				
			||||||
      //         }
 | 
					 | 
				
			||||||
      //       })
 | 
					 | 
				
			||||||
      //     }
 | 
					 | 
				
			||||||
      //   }
 | 
					 | 
				
			||||||
      //   this.seriesList.push(seriesItem)
 | 
					 | 
				
			||||||
      // }
 | 
					 | 
				
			||||||
      // this.$refs.lineChart.initChart(this.xAxis, this.seriesList)
 | 
					 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
		buttonClick(val) {
 | 
							buttonClick(val) {
 | 
				
			||||||
			this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
 | 
								this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
 | 
				
			||||||
			switch (val.btnName) {
 | 
								switch (val.btnName) {
 | 
				
			||||||
				case 'search':
 | 
									case 'search':
 | 
				
			||||||
					this.listQuery.current = 1;
 | 
										this.listQuery.pageNo = 1;
 | 
				
			||||||
					this.listQuery.size = 20;
 | 
										this.listQuery.pageSize = 20;
 | 
				
			||||||
					this.getDataList();
 | 
										this.getDataList();
 | 
				
			||||||
					break;
 | 
										break;
 | 
				
			||||||
				case 'export':
 | 
									case 'export':
 | 
				
			||||||
@@ -448,8 +471,8 @@ export default {
 | 
				
			|||||||
      this.$modal.confirm('是否确认导出生产数据?').then(() => {
 | 
					      this.$modal.confirm('是否确认导出生产数据?').then(() => {
 | 
				
			||||||
        // 处理查询参数
 | 
					        // 处理查询参数
 | 
				
			||||||
        let params = {...this.listQuery};
 | 
					        let params = {...this.listQuery};
 | 
				
			||||||
        params.current = 1;
 | 
					        params.pageNo = 1;
 | 
				
			||||||
        params.size = 999;
 | 
					        params.pageSize = 999;
 | 
				
			||||||
        this.exportLoading = true;
 | 
					        this.exportLoading = true;
 | 
				
			||||||
        return exportOutPutExcel(params);
 | 
					        return exportOutPutExcel(params);
 | 
				
			||||||
      }).then(response => {
 | 
					      }).then(response => {
 | 
				
			||||||
@@ -492,11 +515,23 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style>
 | 
				
			||||||
/* .blueTip { */
 | 
					/* .blueTip { */
 | 
				
			||||||
	/* padding-bottom: 10px; */
 | 
						/* padding-bottom: 10px; */
 | 
				
			||||||
/* } */
 | 
					/* } */
 | 
				
			||||||
/* .blueTi */
 | 
					/* .blueTi */
 | 
				
			||||||
 | 
					.blueTip .el-date-editor .el-range__icon {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.blueTip .el-input__prefix .el-icon-date {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.blueTip .el-input__prefix .el-icon-time {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.blueTip::before{
 | 
					.blueTip::before{
 | 
				
			||||||
  display: inline-block;
 | 
					  display: inline-block;
 | 
				
			||||||
  content: '';
 | 
					  content: '';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-01-21 14:43:06
 | 
					 * @Date: 2022-01-21 14:43:06
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @LastEditTime: 2024-05-30 14:52:05
 | 
					 * @LastEditTime: 2024-07-16 18:41:27
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -16,6 +16,8 @@
 | 
				
			|||||||
import * as echarts from 'echarts'
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
import 'echarts/theme/macarons' // echarts theme
 | 
					import 'echarts/theme/macarons' // echarts theme
 | 
				
			||||||
import resize from '@/mixins/resize'
 | 
					import resize from '@/mixins/resize'
 | 
				
			||||||
 | 
					import { factoryListabbr } from "@/utils/constants";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: 'OverviewBar',
 | 
					  name: 'OverviewBar',
 | 
				
			||||||
  mixins: [resize],
 | 
					  mixins: [resize],
 | 
				
			||||||
@@ -38,7 +40,7 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    height: {
 | 
					    height: {
 | 
				
			||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
      default: '30vh'
 | 
					      default: '35vh'
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    legendPosition: {
 | 
					    legendPosition: {
 | 
				
			||||||
      type: String,
 | 
					      type: String,
 | 
				
			||||||
@@ -71,64 +73,112 @@ export default {
 | 
				
			|||||||
    this.chart = null
 | 
					    this.chart = null
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    initChart(xAxis, seriesList) {
 | 
					    initChart(xAxis, seriesList, facs) {
 | 
				
			||||||
      this.chart = echarts.init(document.getElementById(this.id))
 | 
					      if (xAxis.length === 0) {
 | 
				
			||||||
      console.log(this.$parent);
 | 
					        this.chart.clear()
 | 
				
			||||||
      this.chart.setOption({
 | 
					      }
 | 
				
			||||||
 | 
					      else {
 | 
				
			||||||
 | 
					        this.chart = echarts.init(document.getElementById(this.id))
 | 
				
			||||||
 | 
					        console.log(this.$parent);
 | 
				
			||||||
 | 
					        this.chart.setOption({
 | 
				
			||||||
        title: {
 | 
					        title: {
 | 
				
			||||||
          text: '',
 | 
					          text: '',
 | 
				
			||||||
          // subtext: 'Fake Data'
 | 
					          // subtext: 'Fake Data'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        tooltip: {
 | 
					 | 
				
			||||||
          trigger: 'axis'
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
					 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          // data: ['工厂1', '工厂2'],
 | 
					 | 
				
			||||||
          right: '90px',
 | 
					          right: '90px',
 | 
				
			||||||
          top: '0%',
 | 
					          top: '0%',
 | 
				
			||||||
          icon: 'rect',
 | 
					          icon: 'rect',
 | 
				
			||||||
          itemWidth: 10,
 | 
					          itemWidth: 10,
 | 
				
			||||||
          itemHeight: 10,
 | 
					          itemHeight: 10,
 | 
				
			||||||
          itemGap: 40,
 | 
					          itemGap: 40,
 | 
				
			||||||
 | 
					          formatter(name) {
 | 
				
			||||||
 | 
					            return ['玻璃芯片', '标准组件', 'BIPV'][name.split('-')[1]]
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          data: ['瑞昌-0', '瑞昌-1', '瑞昌-2']
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        // toolbox: {
 | 
					        tooltip: {
 | 
				
			||||||
        //   show: true,
 | 
					          trigger: 'axis',
 | 
				
			||||||
        //   feature: {
 | 
					          axisPointer: {
 | 
				
			||||||
        //     dataView: { show: true, readOnly: false },
 | 
					            type: 'shadow',
 | 
				
			||||||
        //     magicType: { show: true, type: ['line', 'bar'] },
 | 
					            color: "rgba(237,237,237,0.5)"
 | 
				
			||||||
        //     restore: { show: true },
 | 
					          },
 | 
				
			||||||
        //     saveAsImage: { show: true }
 | 
					          formatter(params) {
 | 
				
			||||||
        //   }
 | 
					            let str = ''
 | 
				
			||||||
        // },
 | 
					            facs.forEach(ele => {
 | 
				
			||||||
 | 
					              str += `<div style="width: 60px; text-align: right">${ factoryListabbr[ele] }</div>`
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            let result = `
 | 
				
			||||||
 | 
					            <div style="width: 270px; display: flex">
 | 
				
			||||||
 | 
					              <div style="width: 150px">${params[0].name}</div>
 | 
				
			||||||
 | 
					              ${ str }
 | 
				
			||||||
 | 
					            </div>`
 | 
				
			||||||
 | 
					            const analyzeArray = params.filter(p => p.seriesName !== '显示工厂').map(item => {
 | 
				
			||||||
 | 
					              const obj = {
 | 
				
			||||||
 | 
					                glass: ['玻璃芯片', '标准组件', 'BIPV'][item.seriesName.split('-')[1]], // 玻璃类型
 | 
				
			||||||
 | 
					                factoryName: item.seriesName.split('-')[0], // 工厂名称
 | 
				
			||||||
 | 
					                value: item.value,
 | 
				
			||||||
 | 
					                name: item.name,
 | 
				
			||||||
 | 
					                marker: item.marker,
 | 
				
			||||||
 | 
					                color: item.color
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              return obj
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            const analyzeList = Object.groupBy(analyzeArray, (member) => member.glass)
 | 
				
			||||||
 | 
					            for (let g in analyzeList) {
 | 
				
			||||||
 | 
					              // date => 玻璃类型
 | 
				
			||||||
 | 
					              let oneData = `<div style="width: 270px; display: flex">
 | 
				
			||||||
 | 
					              <div style="width: 150px; display: flex; align-items: center">
 | 
				
			||||||
 | 
					              <div style="background-color: ${analyzeList[g][0].color}; width: 10px; height: 10px; margin-right: 5px"></div>
 | 
				
			||||||
 | 
					              <div>${g}</div></div>`
 | 
				
			||||||
 | 
					                let goodNum = 0
 | 
				
			||||||
 | 
					              for (let ana of analyzeList[g]) {
 | 
				
			||||||
 | 
					                goodNum = ana.value
 | 
				
			||||||
 | 
					                oneData += `<div style="width: 60px; text-align: right">${goodNum}</div>`
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              result = result + oneData + '</div>'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return result
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
        calculable: true,
 | 
					        calculable: true,
 | 
				
			||||||
        xAxis: [
 | 
					        xAxis: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            type: 'category',
 | 
					            type: 'category',
 | 
				
			||||||
            // prettier-ignore
 | 
					            name: '日期',
 | 
				
			||||||
            data: xAxis
 | 
					            data: xAxis,
 | 
				
			||||||
 | 
					            axisLabel: {
 | 
				
			||||||
 | 
					              rotate: 25
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        yAxis: [
 | 
					        yAxis: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            type: 'value'
 | 
					            type: 'value',
 | 
				
			||||||
 | 
					            name: '单位:片'
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: '20%',
 | 
					          top: '10%',
 | 
				
			||||||
          left: "1%",
 | 
					          left: "2%",
 | 
				
			||||||
          right: "3%",
 | 
					          right: "5%",
 | 
				
			||||||
          bottom: "1%",
 | 
					          bottom: "0%",
 | 
				
			||||||
          containLabel: true
 | 
					          containLabel: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        series: seriesList
 | 
					        series: seriesList
 | 
				
			||||||
      }, true)
 | 
					      }, true)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.chartTooltipSpan {
 | 
				
			||||||
 | 
					  width: 50px;
 | 
				
			||||||
 | 
					  background: #787878;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
/* .reportChart {
 | 
					/* .reportChart {
 | 
				
			||||||
  position: absolute;
 | 
					  position: absolute;
 | 
				
			||||||
  height: 100%;
 | 
					  height: 100%;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-17 16:31:51
 | 
					 * @Date: 2024-04-17 16:31:51
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 16:55:04
 | 
					 * @LastEditTime: 2024-06-24 15:43:50
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -375,7 +375,12 @@ export default {
 | 
				
			|||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      if (this.dataForm.id) {
 | 
					      if (this.dataForm.id) {
 | 
				
			||||||
        getProduceTargetDetail(this.dataForm.id).then(res => {
 | 
					        getProduceTargetDetail(this.dataForm.id).then(res => {
 | 
				
			||||||
          this.dataForm = res.data
 | 
					          // this.dataForm = res.data
 | 
				
			||||||
 | 
					          for (const i in res.data) {
 | 
				
			||||||
 | 
					            if (res.data[i] !== null) {
 | 
				
			||||||
 | 
					              this.dataForm[i] = res.data[i]
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
          if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) {
 | 
					          if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) {
 | 
				
			||||||
            // this.dataForm.reportTime = String(this.dataForm.targetTime)
 | 
					            // this.dataForm.reportTime = String(this.dataForm.targetTime)
 | 
				
			||||||
            this.$set(this.dataForm, 'reportTime', String(this.dataForm.targetTime))
 | 
					            this.$set(this.dataForm, 'reportTime', String(this.dataForm.targetTime))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-15 10:49:13
 | 
					 * @Date: 2024-04-15 10:49:13
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 09:49:15
 | 
					 * @LastEditTime: 2024-07-02 16:35:01
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: DY
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -144,7 +144,6 @@
 | 
				
			|||||||
import { parseTime } from '@/utils/ruoyi';
 | 
					import { parseTime } from '@/utils/ruoyi';
 | 
				
			||||||
import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData';
 | 
					import { prodTargetDiPage, prodTargetToPage, exportDiTargetExcel, exportToTargetExcel, delTarget, importToTarget, importDiTarget } from '@/api/produceData';
 | 
				
			||||||
// import inputTable from './inputTable.vue';
 | 
					// import inputTable from './inputTable.vue';
 | 
				
			||||||
import lineChart from './lineChart';
 | 
					 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
import ButtonNav from '@/components/ButtonNav'
 | 
					import ButtonNav from '@/components/ButtonNav'
 | 
				
			||||||
import basicPage from '@/mixins/basic-page'
 | 
					import basicPage from '@/mixins/basic-page'
 | 
				
			||||||
@@ -157,7 +156,7 @@ import {getBaseHeader} from "@/utils/request";
 | 
				
			|||||||
// import FileSaver from 'file-saver'
 | 
					// import FileSaver from 'file-saver'
 | 
				
			||||||
// import * as XLSX from 'xlsx'
 | 
					// import * as XLSX from 'xlsx'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { lineChart, ButtonNav, detailOrUpdate, addOrUpdate },
 | 
					  components: { ButtonNav, detailOrUpdate, addOrUpdate },
 | 
				
			||||||
  mixins: [basicPage],
 | 
					  mixins: [basicPage],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -414,12 +413,12 @@ export default {
 | 
				
			|||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      // timeSelect:'month',
 | 
					      // timeSelect:'month',
 | 
				
			||||||
      startTimeStamp:null, //开始时间
 | 
					      // startTimeStamp:null, //开始时间
 | 
				
			||||||
      endTimeStamp:null, //结束时间
 | 
					      // endTimeStamp:null, //结束时间
 | 
				
			||||||
      // date:'凯盛玻璃控股成员企业2024生产数据',
 | 
					      // date:'凯盛玻璃控股成员企业2024生产数据',
 | 
				
			||||||
			// reportTime: '',
 | 
								// reportTime: '',
 | 
				
			||||||
			startTimeStamp: '',
 | 
								// startTimeStamp: '',
 | 
				
			||||||
			endTimeStamp: '',
 | 
								// endTimeStamp: '',
 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      facType: 0
 | 
					      facType: 0
 | 
				
			||||||
			// proLineList: [],
 | 
								// proLineList: [],
 | 
				
			||||||
@@ -458,13 +457,13 @@ export default {
 | 
				
			|||||||
    this.changeTime()
 | 
					    this.changeTime()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
  clearTime() {
 | 
					    clearTime() {
 | 
				
			||||||
    this.listQuery.beginTime = undefined
 | 
					      this.listQuery.beginTime = undefined
 | 
				
			||||||
    this.listQuery.endTime = undefined
 | 
					      this.listQuery.endTime = undefined
 | 
				
			||||||
    this.listQuery.reportTime = []
 | 
					      this.listQuery.reportTime = []
 | 
				
			||||||
    this.start = undefined
 | 
					      this.start = undefined
 | 
				
			||||||
    this.end = undefined
 | 
					      this.end = undefined
 | 
				
			||||||
  },
 | 
					    },
 | 
				
			||||||
    handleImport() {
 | 
					    handleImport() {
 | 
				
			||||||
      this.upload.title = "生产目标导入";
 | 
					      this.upload.title = "生产目标导入";
 | 
				
			||||||
      this.upload.open = true;
 | 
					      this.upload.open = true;
 | 
				
			||||||
@@ -692,11 +691,22 @@ export default {
 | 
				
			|||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style>
 | 
				
			||||||
/* .blueTip { */
 | 
					/* .blueTip { */
 | 
				
			||||||
	/* padding-bottom: 10px; */
 | 
						/* padding-bottom: 10px; */
 | 
				
			||||||
/* } */
 | 
					/* } */
 | 
				
			||||||
/* .blueTi */
 | 
					.blueTip .el-date-editor .el-range__icon {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.blueTip .el-input__prefix .el-icon-date {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.blueTip .el-input__prefix .el-icon-time {
 | 
				
			||||||
 | 
					  font-size: 16px;
 | 
				
			||||||
 | 
					  color: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
.blueTip::before{
 | 
					.blueTip::before{
 | 
				
			||||||
  display: inline-block;
 | 
					  display: inline-block;
 | 
				
			||||||
  content: '';
 | 
					  content: '';
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,15 +1,15 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-11-06 15:15:30
 | 
					 * @Date: 2023-11-06 15:15:30
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 17:03:17
 | 
					 * @LastEditTime: 2024-07-08 15:06:49
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-drawer class="drawer" :visible.sync="visible" size="85%" @closed="$emit('destroy')">
 | 
					  <el-drawer class="drawer" :visible.sync="visible" size="85%" @closed="$emit('destroy')">
 | 
				
			||||||
    <small-title slot="title" :no-padding="true">
 | 
					    <small-title slot="title" :no-padding="true">
 | 
				
			||||||
      {{ '详情' }}
 | 
					      {{ '详情' }}
 | 
				
			||||||
      <el-button type="primary" plain size="small" style="float: right" @click="exportDetail">导出</el-button>
 | 
					      <!-- <el-button type="primary" plain size="small" style="float: right" @click="exportDetail">导出</el-button> -->
 | 
				
			||||||
    </small-title>
 | 
					    </small-title>
 | 
				
			||||||
    <div ref="detail" class="detailBox">
 | 
					    <div ref="detail" class="detailBox">
 | 
				
			||||||
      <el-row :gutter="20">
 | 
					      <el-row :gutter="20">
 | 
				
			||||||
@@ -69,21 +69,59 @@
 | 
				
			|||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
        <el-col :span="3">
 | 
					        <el-col :span="3">
 | 
				
			||||||
          <p class="title">开始时间</p>
 | 
					          <p class="title">开始时间</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-' + dataForm.startDate[2] : '' }}</p>
 | 
					          <p class="text">{{ dataForm.startDate?.length > 0 ? dataForm.startDate[0] + '-' + dataForm.startDate[1] + '-'
 | 
				
			||||||
 | 
					            + dataForm.startDate[2] : '' }}</p>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
        <el-col :span="3">
 | 
					        <el-col :span="3">
 | 
				
			||||||
          <p class="title">完成时间</p>
 | 
					          <p class="title">完成时间</p>
 | 
				
			||||||
          <p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' + dataForm.endDate[2] : '' }}</p>
 | 
					          <p class="text">{{ dataForm.endDate?.length > 0 ? dataForm.endDate[0] + '-' + dataForm.endDate[1] + '-' +
 | 
				
			||||||
 | 
					            dataForm.endDate[2] : '' }}</p>
 | 
				
			||||||
        </el-col>
 | 
					        </el-col>
 | 
				
			||||||
      </el-row>
 | 
					      </el-row>
 | 
				
			||||||
      <el-divider></el-divider>
 | 
					      <div v-loading="loading">
 | 
				
			||||||
      <div class="chartDiv">
 | 
					        <div style="width: 100%; padding: 0 32px">
 | 
				
			||||||
        <div ref="bar" :style="{ height: '30vh', width: '40vw' }" />
 | 
					          <el-divider style="margin: 0"></el-divider>
 | 
				
			||||||
        <div ref="pie" :style="{ height: '30vh', width: '40vw' }" />
 | 
					        </div>
 | 
				
			||||||
      </div>
 | 
					        <el-row :gutter="0" style="margin: 20px 32px">
 | 
				
			||||||
      <div class="chartDiv">
 | 
					          <el-col :span="8">
 | 
				
			||||||
        <div ref="equipmentLine" :style="{ height: '30vh', width: '40vw' }" />
 | 
					            <div>
 | 
				
			||||||
        <div ref="line" v-show="dataForm.orderStatus === 2" :style="{ height: '30vh', width: '40vw' }" />
 | 
					              <small-title slot="title" :no-padding="true">
 | 
				
			||||||
 | 
					                产品良率
 | 
				
			||||||
 | 
					              </small-title>
 | 
				
			||||||
 | 
					              <div ref="pie" :style="{ height: '40vh', width: '100%' }" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="16">
 | 
				
			||||||
 | 
					            <div style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
 | 
				
			||||||
 | 
					              <small-title slot="title" :no-padding="true">
 | 
				
			||||||
 | 
					                待制品分布
 | 
				
			||||||
 | 
					              </small-title>
 | 
				
			||||||
 | 
					              <div ref="equipmentLine" :style="{ height: '40vh', width: '50vw' }" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					        <div style="width: 100%; padding: 0 32px">
 | 
				
			||||||
 | 
					          <el-divider style="margin: 0"></el-divider>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					        <el-row :gutter="0" style="margin: 20px 32px">
 | 
				
			||||||
 | 
					          <el-col :span="8">
 | 
				
			||||||
 | 
					            <div>
 | 
				
			||||||
 | 
					              <small-title slot="title" :no-padding="true">
 | 
				
			||||||
 | 
					                生产明细
 | 
				
			||||||
 | 
					              </small-title>
 | 
				
			||||||
 | 
					              <div ref="bar" :style="{ height: '40vh', width: '100%' }" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					          <el-col :span="16">
 | 
				
			||||||
 | 
					            <div v-show="dataForm.orderStatus === 2"
 | 
				
			||||||
 | 
					              style="border-left: 1px solid #d1d3d8; width: 100%; padding-left: 32px">
 | 
				
			||||||
 | 
					              <small-title slot="title" :no-padding="true">
 | 
				
			||||||
 | 
					                历史趋势
 | 
				
			||||||
 | 
					              </small-title>
 | 
				
			||||||
 | 
					              <div ref="line" :style="{ height: '40vh', width: '50vw' }" />
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
      </div>
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </el-drawer>
 | 
					  </el-drawer>
 | 
				
			||||||
@@ -118,7 +156,9 @@ export default {
 | 
				
			|||||||
      barChart: null,
 | 
					      barChart: null,
 | 
				
			||||||
      equipmentLineChart: null,
 | 
					      equipmentLineChart: null,
 | 
				
			||||||
      visible: false,
 | 
					      visible: false,
 | 
				
			||||||
      dataForm: {}
 | 
					      loading:true,
 | 
				
			||||||
 | 
					      dataForm: {},
 | 
				
			||||||
 | 
					      colorList: ['#3E8EF7', '#69E6D8', '#F7C739'] // pie颜色
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  beforeDestroy() {
 | 
					  beforeDestroy() {
 | 
				
			||||||
@@ -163,12 +203,13 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    init(id) {
 | 
					    init(id) {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      // this.$nextTick(() => {
 | 
				
			||||||
        this.initLineChart()
 | 
					      //   this.initLineChart()
 | 
				
			||||||
      })
 | 
					      // })
 | 
				
			||||||
      if (id) {
 | 
					      if (id) {
 | 
				
			||||||
        getWorkOrderDetail(id).then(res => {
 | 
					        getWorkOrderDetail(id).then(res => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            this.loading = false
 | 
				
			||||||
            this.dataForm = res.data.prodWorkOrderDO
 | 
					            this.dataForm = res.data.prodWorkOrderDO
 | 
				
			||||||
            this.buildChart(this.dataForm)
 | 
					            this.buildChart(this.dataForm)
 | 
				
			||||||
            // 在制品
 | 
					            // 在制品
 | 
				
			||||||
@@ -218,47 +259,56 @@ export default {
 | 
				
			|||||||
      this.initChart(barList)
 | 
					      this.initChart(barList)
 | 
				
			||||||
      // 良品率
 | 
					      // 良品率
 | 
				
			||||||
      const pieList = [
 | 
					      const pieList = [
 | 
				
			||||||
        { value: data.actualProduction, name: '实际产出' },
 | 
					        { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' },
 | 
				
			||||||
        { value: data.wasteNum, name: '废品数量' },
 | 
					        { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' },
 | 
				
			||||||
        { value: data.reworkNum, name: '待再加工数量' }
 | 
					        { value: data.reworkNum ? data.reworkNum :0, name: '待再加工数量' }
 | 
				
			||||||
      ]
 | 
					      ]
 | 
				
			||||||
      this.initPieChart(pieList)
 | 
					      this.initPieChart(pieList)
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    initChart(barData) {
 | 
					    initChart(barData) {
 | 
				
			||||||
      this.barChart = echarts.init(this.$refs['bar'])
 | 
					      this.barChart = echarts.init(this.$refs['bar'])
 | 
				
			||||||
      this.barChart.setOption({
 | 
					      this.barChart.setOption({
 | 
				
			||||||
        title: {
 | 
					        // title: {
 | 
				
			||||||
          text: '生产明细',
 | 
					        //   text: '生产明细',
 | 
				
			||||||
          left: 'center'
 | 
					        //   left: 'center'
 | 
				
			||||||
          // subtext: 'Fake Data'
 | 
					        //   // subtext: 'Fake Data'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis'
 | 
					          trigger: 'axis'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
					        // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
        calculable: true,
 | 
					        calculable: true,
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: '20%',
 | 
					          top: '15%',
 | 
				
			||||||
          left: "1%",
 | 
					          left: 20,
 | 
				
			||||||
          right: "3%",
 | 
					          right: '10%',
 | 
				
			||||||
          bottom: "1%",
 | 
					          bottom: 0,
 | 
				
			||||||
          containLabel: true
 | 
					          containLabel: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          type: 'category',
 | 
					          type: 'category',
 | 
				
			||||||
          data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
 | 
					          data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            rotate:45
 | 
					            rotate: 25
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          type: 'value'
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            data: barData,
 | 
					            data: barData,
 | 
				
			||||||
            type: 'bar',
 | 
					            type: 'bar',
 | 
				
			||||||
            barWidth: '40%'
 | 
					            barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      }, true)
 | 
					      }, true)
 | 
				
			||||||
@@ -266,8 +316,9 @@ export default {
 | 
				
			|||||||
    initPieChart(pieData) {
 | 
					    initPieChart(pieData) {
 | 
				
			||||||
      this.pieChart = echarts.init(this.$refs['pie'])
 | 
					      this.pieChart = echarts.init(this.$refs['pie'])
 | 
				
			||||||
      this.pieChart.setOption({
 | 
					      this.pieChart.setOption({
 | 
				
			||||||
 | 
					        color: ['#3E8EF7', '#69E6D8', '#F7C739'],
 | 
				
			||||||
        title: {
 | 
					        title: {
 | 
				
			||||||
          text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
 | 
					          // text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
 | 
				
			||||||
          left: 'center'
 | 
					          left: 'center'
 | 
				
			||||||
          // subtext: 'Fake Data'
 | 
					          // subtext: 'Fake Data'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -275,31 +326,38 @@ export default {
 | 
				
			|||||||
          trigger: 'item'
 | 
					          trigger: 'item'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        legend: {
 | 
					        legend: {
 | 
				
			||||||
          top: '5%',
 | 
					          bottom: 0,
 | 
				
			||||||
          left: 'right',
 | 
					          left: 'center'
 | 
				
			||||||
          orient: 'vertical'
 | 
					 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            // name: 'Access From',
 | 
					            // name: 'Access From',
 | 
				
			||||||
            type: 'pie',
 | 
					            type: 'pie',
 | 
				
			||||||
            radius: ['40%', '70%'],
 | 
					            radius: ['50%', '70%'],
 | 
				
			||||||
            avoidLabelOverlap: false,
 | 
					            avoidLabelOverlap: false,
 | 
				
			||||||
 | 
					            data: pieData,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: false,
 | 
					              show: true,
 | 
				
			||||||
              position: 'center'
 | 
					              position: 'outside',
 | 
				
			||||||
            },
 | 
					              formatter: (params) => {
 | 
				
			||||||
            emphasis: {
 | 
					                console.log(params)
 | 
				
			||||||
              label: {
 | 
					                let res = ''
 | 
				
			||||||
                show: false,
 | 
					                // for (let i in params) {
 | 
				
			||||||
                fontSize: 40,
 | 
					                  res += `${params.percent ? params.percent : 0}% \n ${params.name}`
 | 
				
			||||||
                fontWeight: 'bold'
 | 
					                // }
 | 
				
			||||||
 | 
					                return res
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              rich: {
 | 
				
			||||||
 | 
					                d: {
 | 
				
			||||||
 | 
					                  color: 'inherit', // 系列色
 | 
				
			||||||
 | 
					                  verticalAlign: 'top'
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                b: {
 | 
				
			||||||
 | 
					                  color: '#8C8C8C',
 | 
				
			||||||
 | 
					                  verticalAlign: 'top'
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
              }
 | 
					              }
 | 
				
			||||||
            },
 | 
					            }
 | 
				
			||||||
            labelLine: {
 | 
					 | 
				
			||||||
              show: false
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
            data: pieData
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      }, true)
 | 
					      }, true)
 | 
				
			||||||
@@ -307,39 +365,48 @@ export default {
 | 
				
			|||||||
    initEqLineChart(xAxisList, yAxisList) {
 | 
					    initEqLineChart(xAxisList, yAxisList) {
 | 
				
			||||||
      this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
 | 
					      this.equipmentLineChart = echarts.init(this.$refs['equipmentLine'])
 | 
				
			||||||
      this.equipmentLineChart.setOption({
 | 
					      this.equipmentLineChart.setOption({
 | 
				
			||||||
        title: {
 | 
					        // title: {
 | 
				
			||||||
          text: '待制品分布',
 | 
					        //   text: '待制品分布',
 | 
				
			||||||
          left: 'center'
 | 
					        //   left: 'center'
 | 
				
			||||||
          // subtext: 'Fake Data'
 | 
					        //   // subtext: 'Fake Data'
 | 
				
			||||||
        },
 | 
					        // },
 | 
				
			||||||
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'axis'
 | 
					          trigger: 'axis'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
					        // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
        calculable: true,
 | 
					        calculable: true,
 | 
				
			||||||
        grid: {
 | 
					        grid: {
 | 
				
			||||||
          top: '20%',
 | 
					          top: '15%',
 | 
				
			||||||
          left: "1%",
 | 
					          left: 30,
 | 
				
			||||||
          right: "3%",
 | 
					          right: 0,
 | 
				
			||||||
          bottom: "1%",
 | 
					          bottom: 0,
 | 
				
			||||||
          containLabel: true
 | 
					          containLabel: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          type: 'category',
 | 
					          type: 'category',
 | 
				
			||||||
          data: xAxisList,
 | 
					          data: xAxisList,
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            rotate:45,
 | 
					            rotate: 25
 | 
				
			||||||
            // width: '10%'
 | 
					            // width: '10%'
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          type: 'value'
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            data: yAxisList,
 | 
					            data: yAxisList,
 | 
				
			||||||
            type: 'bar',
 | 
					            type: 'bar',
 | 
				
			||||||
            barWidth: '50%'
 | 
					            barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      }, true)
 | 
					      }, true)
 | 
				
			||||||
@@ -347,27 +414,39 @@ export default {
 | 
				
			|||||||
    initLineChart(xAxisList, seriesList) {
 | 
					    initLineChart(xAxisList, seriesList) {
 | 
				
			||||||
      this.lineChart = echarts.init(this.$refs['line'])
 | 
					      this.lineChart = echarts.init(this.$refs['line'])
 | 
				
			||||||
      this.lineChart.setOption({
 | 
					      this.lineChart.setOption({
 | 
				
			||||||
        title: {
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
          text: '历史趋势',
 | 
					 | 
				
			||||||
          left: 'center' // 设置标题居中
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        tooltip: {
 | 
					        tooltip: {
 | 
				
			||||||
          trigger: 'item'
 | 
					          trigger: 'item'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          top: '15%',
 | 
				
			||||||
 | 
					          left: 0,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 0,
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        xAxis: {
 | 
					        xAxis: {
 | 
				
			||||||
          type: 'category',
 | 
					          type: 'category',
 | 
				
			||||||
          data: xAxisList,
 | 
					          data: xAxisList,
 | 
				
			||||||
          axisLabel: {
 | 
					          axisLabel: {
 | 
				
			||||||
            rotate:45
 | 
					            rotate: 25
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        yAxis: {
 | 
					        yAxis: {
 | 
				
			||||||
          type: 'value'
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            data: seriesList,
 | 
					            data: seriesList,
 | 
				
			||||||
            type: 'line'
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        ]
 | 
					        ]
 | 
				
			||||||
      }, true)
 | 
					      }, true)
 | 
				
			||||||
@@ -381,14 +460,8 @@ export default {
 | 
				
			|||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<style scoped>
 | 
					<style scoped>
 | 
				
			||||||
.chartDiv {
 | 
					 | 
				
			||||||
  display: flex;
 | 
					 | 
				
			||||||
  justify-content: space-between;
 | 
					 | 
				
			||||||
  width: 100%;
 | 
					 | 
				
			||||||
  padding: 5px;
 | 
					 | 
				
			||||||
  padding-left: 30px;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
  .drawer >>> .el-drawer {
 | 
					  .drawer >>> .el-drawer {
 | 
				
			||||||
  border-radius: 8px 0 0 8px;
 | 
					  border-radius: 8px 0 0 8px;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -405,7 +478,8 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
.detailBox p {
 | 
					.detailBox p {
 | 
				
			||||||
  margin: 0;
 | 
					  margin: 0;
 | 
				
			||||||
  padding: 0 32px;
 | 
					  padding-left: 32px;
 | 
				
			||||||
 | 
					  /* padding: 0 32px; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
.detailBox .title {
 | 
					.detailBox .title {
 | 
				
			||||||
  /* width: 56px; */
 | 
					  /* width: 56px; */
 | 
				
			||||||
@@ -427,6 +501,8 @@ export default {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
.detailBox {
 | 
					.detailBox {
 | 
				
			||||||
  padding-top: 30px;
 | 
					  padding-top: 30px;
 | 
				
			||||||
  width: 99%;
 | 
					  overflow-x: hidden;
 | 
				
			||||||
 | 
					  overflow-y: auto;
 | 
				
			||||||
 | 
					  /* width: 99%; */
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</style>
 | 
					</style>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,127 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div class="dayRepExpBox">
 | 
				
			||||||
 | 
					    <el-row>
 | 
				
			||||||
 | 
					      <el-col :span="24">
 | 
				
			||||||
 | 
					        <div class="chartTitle" style="text-align: center;">产品良率</div>
 | 
				
			||||||
 | 
					        <div class="box2">
 | 
				
			||||||
 | 
					          <productYield ref="productYield" :pieList="pieList" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <el-row>
 | 
				
			||||||
 | 
					      <el-col :span="24">
 | 
				
			||||||
 | 
					        <div class="chartTitle" style="text-align: center;">待制品分布</div>
 | 
				
			||||||
 | 
					        <div class="box2">
 | 
				
			||||||
 | 
					          <beProcessed ref="beProcess" :beProcessObj="beProcessObj" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <el-row>
 | 
				
			||||||
 | 
					      <el-col :span="24">
 | 
				
			||||||
 | 
					        <div class="chartTitle" style="text-align: center;">生产明细</div>
 | 
				
			||||||
 | 
					        <div class="box2">
 | 
				
			||||||
 | 
					          <produceDetail ref="produceDetail" :produceData="produceData" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <el-row>
 | 
				
			||||||
 | 
					      <el-col :span="24">
 | 
				
			||||||
 | 
					        <div class="chartTitle" style="text-align: center;">历史趋势</div>
 | 
				
			||||||
 | 
					        <div class="box2">
 | 
				
			||||||
 | 
					          <hisChart ref="hisChart" :hisObj="hisObj" />
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import hisChart from './dayReportExportChart/hisChart'
 | 
				
			||||||
 | 
					import produceDetail from './dayReportExportChart/produceDetail'
 | 
				
			||||||
 | 
					import productYield from './dayReportExportChart/productYield'
 | 
				
			||||||
 | 
					import beProcessed from './dayReportExportChart/beProcessed.vue'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'ExportDayReport',
 | 
				
			||||||
 | 
					  components: { hisChart, produceDetail, productYield, beProcessed },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    produceData: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => []
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    hisObj: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    pieList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => []
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    beProcessObj: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => {}
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    beProcessObj: {
 | 
				
			||||||
 | 
					      handler(newValue, oldValue) {
 | 
				
			||||||
 | 
					        this.$refs.beProcess.canvasReset()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.getData()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      // console.log('beProcessObj', this.beProcessObj);
 | 
				
			||||||
 | 
					      // this.$refs.beProcess.canvasReset()
 | 
				
			||||||
 | 
					      // this.$refs.productYield.canvasReset()
 | 
				
			||||||
 | 
					      // this.$refs.produceDetail.canvasReset()
 | 
				
			||||||
 | 
					      // this.$refs.hisChart.canvasReset()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang='scss' scoped>
 | 
				
			||||||
 | 
					.dayRepExpBox {
 | 
				
			||||||
 | 
					  width: 595px;
 | 
				
			||||||
 | 
					  height: 842px;
 | 
				
			||||||
 | 
					  padding: 15px 20px 0;
 | 
				
			||||||
 | 
					  background-color: #fff;
 | 
				
			||||||
 | 
					  z-index: 2000;
 | 
				
			||||||
 | 
					  .box2{
 | 
				
			||||||
 | 
					    width: 555px;
 | 
				
			||||||
 | 
					    height: 200px;
 | 
				
			||||||
 | 
					    border: 2px solid #ECECEC;
 | 
				
			||||||
 | 
					    border-left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .box3{
 | 
				
			||||||
 | 
					    width: 555px;
 | 
				
			||||||
 | 
					    height: 200px;
 | 
				
			||||||
 | 
					    border: 2px solid #ECECEC;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .box5{
 | 
				
			||||||
 | 
					    width: 555px;
 | 
				
			||||||
 | 
					    height: 200px;
 | 
				
			||||||
 | 
					    border: 2px solid #ECECEC;
 | 
				
			||||||
 | 
					    border-left: 0;
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					  .box6{
 | 
				
			||||||
 | 
					    width: 555px;
 | 
				
			||||||
 | 
					    height: 200px;
 | 
				
			||||||
 | 
					    border: 2px solid #ECECEC;
 | 
				
			||||||
 | 
					    position: relative;
 | 
				
			||||||
 | 
					    .rightTitle{
 | 
				
			||||||
 | 
					      position: absolute;
 | 
				
			||||||
 | 
					      right: 5px;
 | 
				
			||||||
 | 
					      top:2px;
 | 
				
			||||||
 | 
					      font-size: 8px;
 | 
				
			||||||
 | 
					      color: #383838;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -0,0 +1,103 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div id="chipPowerExpChart" style="width:552px;height:200px;" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
 | 
					// import resize from './../../../mixins/resize'
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'ChipPowerExp',
 | 
				
			||||||
 | 
					  // mixins: [resize],
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    beProcessObj: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      chart: null
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    beProcessObj: {
 | 
				
			||||||
 | 
					      handler(val) {
 | 
				
			||||||
 | 
					        console.log(val);
 | 
				
			||||||
 | 
					        this.canvasReset()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true //对象内部属性的监听,关键。
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.updateChart();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    updateChart() {
 | 
				
			||||||
 | 
					      if (
 | 
				
			||||||
 | 
					        this.chart !== null &&
 | 
				
			||||||
 | 
					        this.chart !== '' &&
 | 
				
			||||||
 | 
					        this.chart !== undefined
 | 
				
			||||||
 | 
					      ) {
 | 
				
			||||||
 | 
					        this.chart.dispose()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      console.log(this.beProcessObj);
 | 
				
			||||||
 | 
					      this.chart = echarts.init(document.getElementById('chipPowerExpChart'))
 | 
				
			||||||
 | 
					      // const legendName = Object.keys(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					      let xAxisList = this.beProcessObj.xAxisList
 | 
				
			||||||
 | 
					      let yAxisList = this.beProcessObj.yAxisList
 | 
				
			||||||
 | 
					      var option = {
 | 
				
			||||||
 | 
					        // title: {
 | 
				
			||||||
 | 
					        //   text: '待制品分布',
 | 
				
			||||||
 | 
					        //   left: 'center'
 | 
				
			||||||
 | 
					        //   // subtext: 'Fake Data'
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'axis'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
 | 
					        calculable: true,
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          top: '15%',
 | 
				
			||||||
 | 
					          left: 0,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 0,
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: 'category',
 | 
				
			||||||
 | 
					          data: xAxisList,
 | 
				
			||||||
 | 
					          axisLabel: {
 | 
				
			||||||
 | 
					            rotate: 45
 | 
				
			||||||
 | 
					            // width: '10%'
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            data: yAxisList,
 | 
				
			||||||
 | 
					            type: 'bar',
 | 
				
			||||||
 | 
					            barWidth: 10,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      option && this.chart.setOption(option)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,108 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-08 14:51:47
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 09:55:27
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div id="hisChart" style="width:552px;height:200px;" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
 | 
					// import resize from './../../../mixins/resize'
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'ChipPowerExp',
 | 
				
			||||||
 | 
					  // mixins: [resize],
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    hisObj: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      chart: null
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    hisObj: {
 | 
				
			||||||
 | 
					      handler(newValue, oldValue) {
 | 
				
			||||||
 | 
					        this.canvasReset()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep:true,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.updateChart();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    updateChart() {
 | 
				
			||||||
 | 
					      if (
 | 
				
			||||||
 | 
					        this.chart !== null &&
 | 
				
			||||||
 | 
					        this.chart !== '' &&
 | 
				
			||||||
 | 
					        this.chart !== undefined
 | 
				
			||||||
 | 
					      ) {
 | 
				
			||||||
 | 
					        this.chart.dispose()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chart = echarts.init(document.getElementById('hisChart'))
 | 
				
			||||||
 | 
					      // const legendName = Object.keys(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					      // const values = Object.values(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					      let dateList = this.hisObj.dateList
 | 
				
			||||||
 | 
					      let seriesList = this.hisObj.seriesList
 | 
				
			||||||
 | 
					      var option = {
 | 
				
			||||||
 | 
					        // title: {
 | 
				
			||||||
 | 
					        //   text: '待制品分布',
 | 
				
			||||||
 | 
					        //   left: 'center'
 | 
				
			||||||
 | 
					        //   // subtext: 'Fake Data'
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'axis'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
 | 
					        calculable: true,
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          top: '15%',
 | 
				
			||||||
 | 
					          left: 0,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 0,
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: 'category',
 | 
				
			||||||
 | 
					          data: dateList,
 | 
				
			||||||
 | 
					          axisLabel: {
 | 
				
			||||||
 | 
					            rotate: 45
 | 
				
			||||||
 | 
					            // width: '10%'
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            data: seriesList,
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      option && this.chart.setOption(option)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,107 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-08 14:51:47
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 09:56:13
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div id="produceDetail" style="width:552px;height:200px;" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
 | 
					// import resize from './../../../mixins/resize'
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'ChipPowerExp',
 | 
				
			||||||
 | 
					  // mixins: [resize],
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    produceData: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => []
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      chart: null
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    produceData: {
 | 
				
			||||||
 | 
					      handler(newValue, oldValue) {
 | 
				
			||||||
 | 
					        this.canvasReset()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep:true,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.updateChart();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    updateChart() {
 | 
				
			||||||
 | 
					      if (
 | 
				
			||||||
 | 
					        this.chart !== null &&
 | 
				
			||||||
 | 
					        this.chart !== '' &&
 | 
				
			||||||
 | 
					        this.chart !== undefined
 | 
				
			||||||
 | 
					      ) {
 | 
				
			||||||
 | 
					        this.chart.dispose()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chart = echarts.init(document.getElementById('produceDetail'), null, { devicePixelRatio: 2 })
 | 
				
			||||||
 | 
					      // const legendName = Object.keys(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // const values = Object.values(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					      var option = {
 | 
				
			||||||
 | 
					        // title: {
 | 
				
			||||||
 | 
					        //   text: '生产明细',
 | 
				
			||||||
 | 
					        //   left: 'center'
 | 
				
			||||||
 | 
					        //   // subtext: 'Fake Data'
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        color: ['#3E8EF7'],
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'axis'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // grid: { top: 100, right: 90, bottom: 10, left: 10, containLabel: true },
 | 
				
			||||||
 | 
					        calculable: true,
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          top: '15%',
 | 
				
			||||||
 | 
					          left: 0,
 | 
				
			||||||
 | 
					          right: '10%',
 | 
				
			||||||
 | 
					          bottom: 0,
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: 'category',
 | 
				
			||||||
 | 
					          data: ['目标产量', '计划投入量', '实际投入', '实际产出', '废品数量', '待再加工数量'],
 | 
				
			||||||
 | 
					          axisLabel: {
 | 
				
			||||||
 | 
					            rotate: 45
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: 'value',
 | 
				
			||||||
 | 
					          name: '单位/片',
 | 
				
			||||||
 | 
					          axisLine: {
 | 
				
			||||||
 | 
					            show: true
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            data: this.produceData,
 | 
				
			||||||
 | 
					            type: 'bar',
 | 
				
			||||||
 | 
					            barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'top'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      option && this.chart.setOption(option)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,109 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-08 14:51:47
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-11 14:48:15
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div id="productYield" style="width:552px;height:200px;" />
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
 | 
					// import resize from './../../../mixins/resize'
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: 'ChipPowerExp',
 | 
				
			||||||
 | 
					  // mixins: [resize],
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    pieList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => []
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      chart: null
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    pieList: {
 | 
				
			||||||
 | 
					      handler(newValue, oldValue) {
 | 
				
			||||||
 | 
					        this.canvasReset()
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep:true
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.updateChart();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    updateChart() {
 | 
				
			||||||
 | 
					      if (
 | 
				
			||||||
 | 
					        this.chart !== null &&
 | 
				
			||||||
 | 
					        this.chart !== '' &&
 | 
				
			||||||
 | 
					        this.chart !== undefined
 | 
				
			||||||
 | 
					      ) {
 | 
				
			||||||
 | 
					        this.chart.dispose()
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      console.log(this.beProcessObj);
 | 
				
			||||||
 | 
					      this.chart = echarts.init(document.getElementById('productYield'), null, { devicePixelRatio: 2 })
 | 
				
			||||||
 | 
					      // const values = Object.values(this.chipPowerDistributionVo)
 | 
				
			||||||
 | 
					      var option = {
 | 
				
			||||||
 | 
					        color: ['#3E8EF7', '#69E6D8', '#F7C739'],
 | 
				
			||||||
 | 
					        title: {
 | 
				
			||||||
 | 
					          // text: !isNaN((pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100) ? ( '产品良率 ' + (pieData[0].value / (pieData[0].value + pieData[1].value)).toFixed(4) * 100 + '%') : '产品良率 -',
 | 
				
			||||||
 | 
					          left: 'center'
 | 
				
			||||||
 | 
					          // subtext: 'Fake Data'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'item'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        legend: {
 | 
				
			||||||
 | 
					          bottom: 0,
 | 
				
			||||||
 | 
					          left: 'center',
 | 
				
			||||||
 | 
					          itemGap:60,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            // name: 'Access From',
 | 
				
			||||||
 | 
					            type: 'pie',
 | 
				
			||||||
 | 
					            center: ['50%', '45%'],
 | 
				
			||||||
 | 
					            radius: ['50%', '70%'],
 | 
				
			||||||
 | 
					            avoidLabelOverlap: false,
 | 
				
			||||||
 | 
					            data: this.pieList,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: 'outside',
 | 
				
			||||||
 | 
					              formatter: (params) => {
 | 
				
			||||||
 | 
					                console.log(params)
 | 
				
			||||||
 | 
					                let res = ''
 | 
				
			||||||
 | 
					                // for (let i in params) {
 | 
				
			||||||
 | 
					                res += `${params.percent ? params.percent : 0}% \n ${params.name}`
 | 
				
			||||||
 | 
					                // }
 | 
				
			||||||
 | 
					                return res
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              rich: {
 | 
				
			||||||
 | 
					                d: {
 | 
				
			||||||
 | 
					                  color: 'inherit', // 系列色
 | 
				
			||||||
 | 
					                  verticalAlign: 'top'
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					                b: {
 | 
				
			||||||
 | 
					                  color: '#8C8C8C',
 | 
				
			||||||
 | 
					                  verticalAlign: 'top'
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      option && this.chart.setOption(option)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-15 10:49:13
 | 
					 * @Date: 2024-04-15 10:49:13
 | 
				
			||||||
 * @LastEditTime: 2024-06-17 16:32:02
 | 
					 * @LastEditTime: 2024-07-09 11:08:43
 | 
				
			||||||
 * @LastEditors: DY
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -10,7 +10,7 @@
 | 
				
			|||||||
    <el-row :gutter="10">
 | 
					    <el-row :gutter="10">
 | 
				
			||||||
      <el-col :span="4">
 | 
					      <el-col :span="4">
 | 
				
			||||||
        <div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
 | 
					        <div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
 | 
				
			||||||
        <!-- <p style="margin-bottom: 0">数据概览</p> -->
 | 
					          <!-- <p style="margin-bottom: 0">数据概览</p> -->
 | 
				
			||||||
          <div class="view">
 | 
					          <div class="view">
 | 
				
			||||||
            <div style="padding: 10px 0; width: 100%">
 | 
					            <div style="padding: 10px 0; width: 100%">
 | 
				
			||||||
              <div class="topDiv">
 | 
					              <div class="topDiv">
 | 
				
			||||||
@@ -27,13 +27,14 @@
 | 
				
			|||||||
      </el-col>
 | 
					      </el-col>
 | 
				
			||||||
      <el-col :span="20">
 | 
					      <el-col :span="20">
 | 
				
			||||||
        <div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
 | 
					        <div class="app-container" style="padding: 16px; height: auto; text-align: left; border-radius: 8px;">
 | 
				
			||||||
        <!-- <p style="margin-bottom: 0">数据概览</p> -->
 | 
					          <!-- <p style="margin-bottom: 0">数据概览</p> -->
 | 
				
			||||||
          <div class="view">
 | 
					          <div class="view">
 | 
				
			||||||
            <div style="padding: 10px 0; width: 100%" v-for="(item, index) in factorys" :key="index">
 | 
					            <div style="padding: 10px 0; width: 100%" v-for="(item, index) in factorys" :key="index">
 | 
				
			||||||
              <div class="topDiv">
 | 
					              <div class="topDiv">
 | 
				
			||||||
                <div style="width: 4px; height: 52px; background: #3A79FF; border-radius: 2px;"></div>
 | 
					                <div style="width: 4px; height: 52px; background: #3A79FF; border-radius: 2px;"></div>
 | 
				
			||||||
                <div class="centerDiv">
 | 
					                <div class="centerDiv">
 | 
				
			||||||
                  <span style="font-size: 30px; line-height: 30px; color: rgba(0,0,0,0.85);">{{ factoryNum[index] }}</span>
 | 
					                  <span style="font-size: 30px; line-height: 30px; color: rgba(0,0,0,0.85);">{{ factoryNum[index]
 | 
				
			||||||
 | 
					                    }}</span>
 | 
				
			||||||
                  <span style="font-size: 14px; color: rgba(0,0,0,0.85);">{{item}}</span>
 | 
					                  <span style="font-size: 14px; color: rgba(0,0,0,0.85);">{{item}}</span>
 | 
				
			||||||
                </div>
 | 
					                </div>
 | 
				
			||||||
                <svg-icon icon-class="factoryWorkOrder" style="width: 26px; height: 26px" />
 | 
					                <svg-icon icon-class="factoryWorkOrder" style="width: 26px; height: 26px" />
 | 
				
			||||||
@@ -49,39 +50,42 @@
 | 
				
			|||||||
    <div class="app-container" style="margin-top: 8px;flex-grow: 1;">
 | 
					    <div class="app-container" style="margin-top: 8px;flex-grow: 1;">
 | 
				
			||||||
      <!-- <search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" /> -->
 | 
					      <!-- <search-bar :formConfigs="formConfig2" ref="searchBarForm" style="margin-bottom: 0" /> -->
 | 
				
			||||||
      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
					      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
				
			||||||
      <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
 | 
					      <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="tableData"
 | 
				
			||||||
        :table-data="tableData" :max-height="tableH">
 | 
					        :max-height="tableH">
 | 
				
			||||||
        <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" label="操作" :width="120" fixed="right"
 | 
				
			||||||
          :method-list="tableBtn" @clickBtn="handleClick" />
 | 
					          :method-list="tableBtn" @clickBtn="handleClick" />
 | 
				
			||||||
      </base-table>
 | 
					      </base-table>
 | 
				
			||||||
      <pagination
 | 
					      <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
 | 
				
			||||||
        :limit.sync="listQuery.pageSize"
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
        :page.sync="listQuery.pageNo"
 | 
					    </div>
 | 
				
			||||||
        :total="listQuery.total"
 | 
					    <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.date"
 | 
				
			||||||
        @pagination="getDataList"
 | 
					      @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
 | 
				
			||||||
      />
 | 
					    <div id="dayRepDom" style="position: absolute;top:0;display: none;">
 | 
				
			||||||
 | 
					      <ExportDayReport :beProcessObj="beProcessObj" :produceData="produceData" :hisObj="hisObj" :pieList="pieList" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <add-or-update v-if="detailOrUpdateVisible" ref="detailOrUpdate" :date="listQuery.date" @refreshDataList="successSubmit" @destroy="detailOrUpdateVisible = false" />
 | 
					 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// import { parseTime } from '../../core/mixins/code-filter';
 | 
					// import { parseTime } from '../../core/mixins/code-filter';
 | 
				
			||||||
import { getWorkOrderPage, exportExcel, getOverView } from '@/api/produceData/order';
 | 
					import { getWorkOrderPage, exportExcel, getOverView, getWorkOrderDetail } from '@/api/produceData/order';
 | 
				
			||||||
// import inputTable from './inputTable.vue';
 | 
					// import inputTable from './inputTable.vue';
 | 
				
			||||||
import lineChart from './lineChart';
 | 
					import lineChart from './lineChart';
 | 
				
			||||||
 | 
					import ExportDayReport from './dayReportComponents/ExportDayReport'
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
import tableHeightMixin from "@/mixins/tableHeightMixin";
 | 
					import tableHeightMixin from "@/mixins/tableHeightMixin";
 | 
				
			||||||
// import ButtonNav from '@/components/ButtonNav'
 | 
					// import ButtonNav from '@/components/ButtonNav'
 | 
				
			||||||
import basicPage from '@/mixins/basic-page'
 | 
					import basicPage from '@/mixins/basic-page'
 | 
				
			||||||
import AddOrUpdate from './add-or-updata';
 | 
					import AddOrUpdate from './add-or-updata';
 | 
				
			||||||
import { factoryList, factoryArray } from "@/utils/constants";
 | 
					import { factoryList, factoryArray } from "@/utils/constants";
 | 
				
			||||||
import { publicFormatter } from "@/utils/dict";
 | 
					// import { publicFormatter } from "@/utils/dict";
 | 
				
			||||||
 | 
					import statusChart from "./statusChart.vue";
 | 
				
			||||||
 | 
					import html2canvas from 'html2canvas'
 | 
				
			||||||
 | 
					import JsPDF from 'jspdf'
 | 
				
			||||||
// import FileSaver from 'file-saver'
 | 
					// import FileSaver from 'file-saver'
 | 
				
			||||||
// import * as XLSX from 'xlsx'
 | 
					// import * as XLSX from 'xlsx'
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  components: { lineChart, AddOrUpdate },
 | 
					  components: { lineChart, AddOrUpdate, ExportDayReport },
 | 
				
			||||||
  mixins: [basicPage, tableHeightMixin],
 | 
					  mixins: [basicPage, tableHeightMixin],
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -90,6 +94,16 @@ export default {
 | 
				
			|||||||
      inputNum: 0,
 | 
					      inputNum: 0,
 | 
				
			||||||
      heightNum: 180,
 | 
					      heightNum: 180,
 | 
				
			||||||
      factoryList,
 | 
					      factoryList,
 | 
				
			||||||
 | 
					      produceData: [],
 | 
				
			||||||
 | 
					      pieList:[],
 | 
				
			||||||
 | 
					      hisObj: {
 | 
				
			||||||
 | 
					        seriesList: [],
 | 
				
			||||||
 | 
					        dateList:[],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      beProcessObj: {
 | 
				
			||||||
 | 
					        xAxisList: [],
 | 
				
			||||||
 | 
					        yAxisList:[]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      factoryArray,
 | 
					      factoryArray,
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        pageSize: 20,
 | 
					        pageSize: 20,
 | 
				
			||||||
@@ -105,6 +119,10 @@ export default {
 | 
				
			|||||||
            type: 'detail',
 | 
					            type: 'detail',
 | 
				
			||||||
            btnName: '详情',
 | 
					            btnName: '详情',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'export',
 | 
				
			||||||
 | 
					          btnName: '导出',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
        // {
 | 
					        // {
 | 
				
			||||||
        //     type: 'delete',
 | 
					        //     type: 'delete',
 | 
				
			||||||
        //     btnName: '删除',
 | 
					        //     btnName: '删除',
 | 
				
			||||||
@@ -141,15 +159,15 @@ export default {
 | 
				
			|||||||
          selectOptions: [
 | 
					          selectOptions: [
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              label: '未开始',
 | 
					              label: '未开始',
 | 
				
			||||||
              value: 1
 | 
					              value: 0
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              label: '生产中',
 | 
					              label: '生产中',
 | 
				
			||||||
              value: 2
 | 
					              value: 1
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              label: '已完成',
 | 
					              label: '已完成',
 | 
				
			||||||
              value: 3
 | 
					              value: 2
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          ],
 | 
					          ],
 | 
				
			||||||
          labelField: "label",
 | 
					          labelField: "label",
 | 
				
			||||||
@@ -206,13 +224,13 @@ export default {
 | 
				
			|||||||
          prop: 'factory',
 | 
					          prop: 'factory',
 | 
				
			||||||
          label: '工厂名称',
 | 
					          label: '工厂名称',
 | 
				
			||||||
          filter: (val) => factoryList[val],
 | 
					          filter: (val) => factoryList[val],
 | 
				
			||||||
          minWidth: 200,
 | 
					          minWidth: 220,
 | 
				
			||||||
          showOverflowtooltip: true
 | 
					          showOverflowtooltip: true
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'workOrderNumber',
 | 
					          prop: 'workOrderNumber',
 | 
				
			||||||
          label: '工单号',
 | 
					          label: '工单号',
 | 
				
			||||||
          minWidth: 120,
 | 
					          minWidth: 130,
 | 
				
			||||||
          showOverflowtooltip: true
 | 
					          showOverflowtooltip: true
 | 
				
			||||||
          // filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
					          // filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
@@ -241,13 +259,13 @@ export default {
 | 
				
			|||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'productionProgress',
 | 
					          prop: 'productionProgress',
 | 
				
			||||||
          label: '生产进度',
 | 
					          label: '生产进度',
 | 
				
			||||||
          filter: (val) => (val * 100) + '%'
 | 
					          filter: (val) => (val * 100).toFixed(2) + '%'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'orderStatus',
 | 
					          prop: 'orderStatus',
 | 
				
			||||||
          label: '工单状态',
 | 
					          label: '工单状态',
 | 
				
			||||||
          // filter: publicFormatter('workorder_status')
 | 
					          subcomponent: statusChart
 | 
				
			||||||
          filter: (val) => ['', '未开始', '生产中', '已完成'][val],
 | 
					          // filter: (val) => ['', '未开始', '生产中', '已完成'][val],
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          prop: 'startTime',
 | 
					          prop: 'startTime',
 | 
				
			||||||
@@ -280,6 +298,29 @@ export default {
 | 
				
			|||||||
    this.getOverView()
 | 
					    this.getOverView()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    exportPDF() {
 | 
				
			||||||
 | 
					      setTimeout(() => {
 | 
				
			||||||
 | 
					        this.$message.success('正在导出,请稍等!')
 | 
				
			||||||
 | 
					        const element = document.getElementById('dayRepDom')
 | 
				
			||||||
 | 
					        element.style.display = 'block'
 | 
				
			||||||
 | 
					        const fileName = '工单数据' + moment().format('yyMMDD') + '.pdf'
 | 
				
			||||||
 | 
					        html2canvas(element, {
 | 
				
			||||||
 | 
					          dpi: 300, // Set to 300 DPI
 | 
				
			||||||
 | 
					          scale: 3 // Adjusts your resolution
 | 
				
			||||||
 | 
					        }).then(function (canvas) {
 | 
				
			||||||
 | 
					          const imgWidth = 595.28
 | 
				
			||||||
 | 
					          const imgHeight = 841.89
 | 
				
			||||||
 | 
					          const pageData = canvas.toDataURL('image/jpeg', 1.0)
 | 
				
			||||||
 | 
					          const PDF = new JsPDF('', 'pt', [imgWidth, imgHeight])
 | 
				
			||||||
 | 
					          PDF.addImage(pageData, 'JPEG', 0, 0, imgWidth, imgHeight)
 | 
				
			||||||
 | 
					          setTimeout(() => {
 | 
				
			||||||
 | 
					            PDF.save(fileName) // 导出文件名
 | 
				
			||||||
 | 
					          }, 1000)
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        element.style.display = 'none'
 | 
				
			||||||
 | 
					      }, 3000)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getOverView() {
 | 
					    getOverView() {
 | 
				
			||||||
      getOverView().then(res => {
 | 
					      getOverView().then(res => {
 | 
				
			||||||
        // this.data = res.data
 | 
					        // this.data = res.data
 | 
				
			||||||
@@ -298,11 +339,46 @@ export default {
 | 
				
			|||||||
      })
 | 
					      })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    otherMethods(val) {
 | 
					    otherMethods(val) {
 | 
				
			||||||
      this.detailOrUpdateVisible = true;
 | 
					      console.log(val)
 | 
				
			||||||
      // this.addOrEditTitle = "详情";
 | 
					      if (val.type === 'detail') {
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					        this.detailOrUpdateVisible = true;
 | 
				
			||||||
        this.$refs.detailOrUpdate.init(val.data.id);
 | 
					        // this.addOrEditTitle = "详情";
 | 
				
			||||||
      });
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.detailOrUpdate.init(val.data.id);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        getWorkOrderDetail(val.data.id).then((res) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            // this.loading = false
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					            const xAxisList = Object.keys(res.data.inProcessDis)
 | 
				
			||||||
 | 
					            const yAxisList = Object.values(res.data.inProcessDis)
 | 
				
			||||||
 | 
					            this.beProcessObj.xAxisList = xAxisList
 | 
				
			||||||
 | 
					            this.beProcessObj.yAxisList = yAxisList
 | 
				
			||||||
 | 
					            // console.log(this.beProcessObj)
 | 
				
			||||||
 | 
					              ; const data = res.data.prodWorkOrderDO
 | 
				
			||||||
 | 
					            const barList = [data.targetProduction, data.plannedInvestment, data.actualInvestment, data.actualProduction, data.wasteNum, data.reworkNum]
 | 
				
			||||||
 | 
					            const seriesList = []
 | 
				
			||||||
 | 
					            const dateList = []
 | 
				
			||||||
 | 
					            res.data.his.forEach(element => {
 | 
				
			||||||
 | 
					              seriesList.push(element.actualProduction)
 | 
				
			||||||
 | 
					              dateList.push(element.recordTime[0] + '-' + element.recordTime[1] + '-' + element.recordTime[2])
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            this.hisObj.seriesList = seriesList
 | 
				
			||||||
 | 
					            this.hisObj.dateList = dateList
 | 
				
			||||||
 | 
					            this.produceData = barList
 | 
				
			||||||
 | 
					            this.pieList = [
 | 
				
			||||||
 | 
					              { value: data.actualProduction ? data.actualProduction : 0, name: '实际产出' },
 | 
				
			||||||
 | 
					              { value: data.wasteNum ? data.wasteNum : 0, name: '废品数量' },
 | 
				
			||||||
 | 
					              { value: data.reworkNum ? data.reworkNum : 0, name: '待再加工数量' }
 | 
				
			||||||
 | 
					            ]
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$nextTick(() => {
 | 
				
			||||||
 | 
					            this.exportPDF()
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    async getDataList() {
 | 
					    async getDataList() {
 | 
				
			||||||
      const res = await getWorkOrderPage(this.listQuery)
 | 
					      const res = await getWorkOrderPage(this.listQuery)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										51
									
								
								src/views/produce/workOrder/statusChart.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								src/views/produce/workOrder/statusChart.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: Do not edit
 | 
				
			||||||
 | 
					 * @Date: 2024-06-24 15:03:19
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-08 08:48:58
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <span class="dot" :class="myClass"></span>
 | 
				
			||||||
 | 
					    <span>{{ state }}</span>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "statusChart",
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    state() {
 | 
				
			||||||
 | 
					      return ['未开始', '生产中', '已完成'][this.injectData.orderStatus]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    myClass() {
 | 
				
			||||||
 | 
					      return ['yellow', 'blue', 'green'][this.injectData.orderStatus]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style scoped>
 | 
				
			||||||
 | 
					.dot {
 | 
				
			||||||
 | 
					  display: inline-block;
 | 
				
			||||||
 | 
					  width: 6px;
 | 
				
			||||||
 | 
					  height: 6px;
 | 
				
			||||||
 | 
					  border-radius: 3px;
 | 
				
			||||||
 | 
					  vertical-align: middle;
 | 
				
			||||||
 | 
					  margin-right: 8px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.green {
 | 
				
			||||||
 | 
					  background: #10DC76;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.yellow {
 | 
				
			||||||
 | 
					  background: #FFBD02;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.blue {
 | 
				
			||||||
 | 
					  background: #3B79FF;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -96,7 +96,7 @@ export default {
 | 
				
			|||||||
            name: "",
 | 
					            name: "",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -110,7 +110,7 @@ export default {
 | 
				
			|||||||
            name: "",
 | 
					            name: "",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -187,16 +187,19 @@ export default {
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "yoy",
 | 
					              prop: "yoy",
 | 
				
			||||||
              label: msg.yoyColumn,
 | 
					              label: msg.yoyColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "queryValue",
 | 
					              prop: "queryValue",
 | 
				
			||||||
              label: msg.queryColumn,
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "target",
 | 
					              prop: "target",
 | 
				
			||||||
              label: msg.targetColumn,
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
@@ -270,7 +273,7 @@ export default {
 | 
				
			|||||||
            name: "2",
 | 
					            name: "2",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -284,7 +287,7 @@ export default {
 | 
				
			|||||||
            name: "3",
 | 
					            name: "3",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
					      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="containerBottom">
 | 
					    <div class="containerBottom">
 | 
				
			||||||
      <div class="smallTitle">4月芯片产量</div>
 | 
					      <div class="smallTitle">芯片产量</div>
 | 
				
			||||||
      <bm-line-bar
 | 
					      <bm-line-bar
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
@@ -26,101 +26,61 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import bmSearchBar from "../components/bmSearchBar.vue";
 | 
					import bmSearchBar from "../components/bmSearchBar.vue";
 | 
				
			||||||
import BmLineBar from "../components/bmLineBar.vue";
 | 
					import BmLineBar from "../components/bmLineBar.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  cPReportByDateRangePage,
 | 
				
			||||||
    prop: "factory",
 | 
					  cPReportByDateRangeExport,
 | 
				
			||||||
    label: "工厂名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
    minWidth: 200,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "name",
 | 
					 | 
				
			||||||
    label: "科目",
 | 
					 | 
				
			||||||
    minWidth: 120,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
    minWidth: 80,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "mubiao",
 | 
					 | 
				
			||||||
    label: "目标值",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "ChipOutputBM",
 | 
					  name: "ChipOutputBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      factoryList: [
 | 
				
			||||||
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "factory",
 | 
				
			||||||
 | 
					          label: "工厂名称",
 | 
				
			||||||
 | 
					          filter: (val) => this.factoryList[val].name,
 | 
				
			||||||
 | 
					          minWidth: 150,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "科目",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
 | 
					        { id: 1, name: "", type: 2, color: "#FFCE6A" },
 | 
				
			||||||
        { id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
 | 
					        { id: 2, name: "", type: 1, color: "#8EF0AB" },
 | 
				
			||||||
        { id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 3, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg: {
 | 
				
			||||||
        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/片",
 | 
					        yName: "单位/片",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月目标值",
 | 
					            name: "1",
 | 
				
			||||||
            // data: [3000, 2000, 3000],
 | 
					            data: [],
 | 
				
			||||||
            // data: [6800, 5000, 8900],
 | 
					 | 
				
			||||||
            // data: [12000, 17000, 19000],
 | 
					 | 
				
			||||||
            data: [560000, 540000, 600000],
 | 
					 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            symbol: "circle",
 | 
					            symbol: "circle",
 | 
				
			||||||
            symbolSize: 6,
 | 
					            symbolSize: 6,
 | 
				
			||||||
@@ -130,30 +90,24 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "2",
 | 
				
			||||||
            // data: [2100, 800, 1500],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9500, 7200, 9901],
 | 
					 | 
				
			||||||
            // data: [14666, 15000, 17888],
 | 
					 | 
				
			||||||
            data: [550000, 456666, 590000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-10, -16],
 | 
					              position: [-10, -16],
 | 
				
			||||||
              position: [-17, -16],
 | 
					              // position: [-17, -16],
 | 
				
			||||||
              color: "#68C483",
 | 
					              color: "#68C483",
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "3",
 | 
				
			||||||
            // data: [2100, 900, 1300],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9100, 7300, 9700],
 | 
					 | 
				
			||||||
            // data: [14666, 15300, 18000],
 | 
					 | 
				
			||||||
            data: [556666, 456666, 650000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -188,6 +142,13 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.date = 2;
 | 
				
			||||||
 | 
					    this.listQuery.queryTime = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.listQuery.factorys = [];
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -206,11 +167,159 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.date = val.type;
 | 
				
			||||||
      console.log("=========================");
 | 
					      this.listQuery.queryTime = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factorys = val.factory;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出");
 | 
					      this.tableProps = [];
 | 
				
			||||||
 | 
					      cPReportByDateRangePage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.data && res.data.length > 0) {
 | 
				
			||||||
 | 
					          // 设置表头
 | 
				
			||||||
 | 
					          let msg = res.data[0];
 | 
				
			||||||
 | 
					          let arr = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "lastone",
 | 
				
			||||||
 | 
					              label: msg.lastone.reportTime,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "currentone",
 | 
				
			||||||
 | 
					              label: msg.currentone.reportTime,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "targetone",
 | 
				
			||||||
 | 
					              label: msg.targetone.reportTime,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          // 整理表格数据
 | 
				
			||||||
 | 
					          let tableArr = [];
 | 
				
			||||||
 | 
					          res.data.forEach((item) => {
 | 
				
			||||||
 | 
					            let obj = {};
 | 
				
			||||||
 | 
					            obj.factory = item.factory;
 | 
				
			||||||
 | 
					            obj.item = "芯片产量";
 | 
				
			||||||
 | 
					            obj.unit = "片";
 | 
				
			||||||
 | 
					            obj.lastone = item.lastone.total;
 | 
				
			||||||
 | 
					            obj.currentone = item.currentone.total;
 | 
				
			||||||
 | 
					            obj.targetone = item.targetone.total;
 | 
				
			||||||
 | 
					            tableArr.push(obj);
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					          this.tableData = tableArr;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetone.reportTime;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.lastone.reportTime;
 | 
				
			||||||
 | 
					          this.legendList[2].name = msg.currentone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[0].name = msg.targetone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[1].name = msg.lastone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[2].name = msg.currentone.reportTime;
 | 
				
			||||||
 | 
					          // 设置偏移量
 | 
				
			||||||
 | 
					          switch (this.listQuery.type) {
 | 
				
			||||||
 | 
					            case 0:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 1:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 2:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-10, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-17, -16];
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      let xData = [];
 | 
				
			||||||
 | 
					      let lineData = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        this.factoryList.map((item) => {
 | 
				
			||||||
 | 
					          if (item.id === val[i].factory) {
 | 
				
			||||||
 | 
					            xData.push(item.name);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        lineData.push(val[i].targetone.total || 0);
 | 
				
			||||||
 | 
					        barData1.push(val[i].lastone.total || 0);
 | 
				
			||||||
 | 
					        barData2.push(val[i].currentone.total || 0);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[0].data = lineData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[1].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg.series[2].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg = {
 | 
				
			||||||
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/片",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "line",
 | 
				
			||||||
 | 
					            symbol: "circle",
 | 
				
			||||||
 | 
					            symbolSize: 6,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              color: "#FFAE17",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					             barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              // position: [-5, -16],
 | 
				
			||||||
 | 
					              // position: [-5, -16],
 | 
				
			||||||
 | 
					              position: [-10, -16],
 | 
				
			||||||
 | 
					              // position: [-17, -16],
 | 
				
			||||||
 | 
					              color: "#68C483",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "3",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					             barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [0, -16],
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      let fileName = "芯片产量.xls";
 | 
				
			||||||
 | 
					      cPReportByDateRangeExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
					      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="containerBottom">
 | 
					    <div class="containerBottom">
 | 
				
			||||||
      <div class="smallTitle">4月芯片人均产量</div>
 | 
					      <div class="smallTitle">芯片人均产量</div>
 | 
				
			||||||
      <bm-line-bar
 | 
					      <bm-line-bar
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
@@ -26,101 +26,61 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import bmSearchBar from "../components/bmSearchBar.vue";
 | 
					import bmSearchBar from "../components/bmSearchBar.vue";
 | 
				
			||||||
import BmLineBar from "../components/bmLineBar.vue";
 | 
					import BmLineBar from "../components/bmLineBar.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  chipAnnualAverageProductionPage,
 | 
				
			||||||
    prop: "factory",
 | 
					  chipAnnualAverageProductionExport,
 | 
				
			||||||
    label: "工厂名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
    minWidth: 200,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "name",
 | 
					 | 
				
			||||||
    label: "科目",
 | 
					 | 
				
			||||||
    minWidth: 120,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
    minWidth: 80,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "mubiao",
 | 
					 | 
				
			||||||
    label: "目标值",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "ChipPerCapitaBM",
 | 
					  name: "ChipPerCapitaBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      factoryList: [
 | 
				
			||||||
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "factory",
 | 
				
			||||||
 | 
					          label: "工厂名称",
 | 
				
			||||||
 | 
					          filter: (val) => this.factoryList[val].name,
 | 
				
			||||||
 | 
					          minWidth: 150,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "科目",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
 | 
					        { id: 1, name: "", type: 2, color: "#FFCE6A" },
 | 
				
			||||||
        { id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
 | 
					        { id: 2, name: "", type: 1, color: "#8EF0AB" },
 | 
				
			||||||
        { id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 3, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg: {
 | 
				
			||||||
        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/片",
 | 
					        yName: "单位:片/人",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月目标值",
 | 
					            name: "1",
 | 
				
			||||||
            // data: [3000, 2000, 3000],
 | 
					            data: [],
 | 
				
			||||||
            // data: [6800, 5000, 8900],
 | 
					 | 
				
			||||||
            // data: [12000, 17000, 19000],
 | 
					 | 
				
			||||||
            data: [560000, 540000, 600000],
 | 
					 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            symbol: "circle",
 | 
					            symbol: "circle",
 | 
				
			||||||
            symbolSize: 6,
 | 
					            symbolSize: 6,
 | 
				
			||||||
@@ -130,30 +90,24 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "2",
 | 
				
			||||||
            // data: [2100, 800, 1500],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9500, 7200, 9901],
 | 
					 | 
				
			||||||
            // data: [14666, 15000, 17888],
 | 
					 | 
				
			||||||
            data: [550000, 456666, 590000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-10, -16],
 | 
					              position: [-10, -16],
 | 
				
			||||||
              position: [-17, -16],
 | 
					              // position: [-17, -16],
 | 
				
			||||||
              color: "#68C483",
 | 
					              color: "#68C483",
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "3",
 | 
				
			||||||
            // data: [2100, 900, 1300],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9100, 7300, 9700],
 | 
					 | 
				
			||||||
            // data: [14666, 15300, 18000],
 | 
					 | 
				
			||||||
            data: [556666, 456666, 650000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					             barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -188,6 +142,13 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.type = 2;
 | 
				
			||||||
 | 
					    this.listQuery.startDate = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.listQuery.factory = [];
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -206,11 +167,146 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
      console.log("=========================");
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出");
 | 
					      this.tableProps = [];
 | 
				
			||||||
 | 
					      chipAnnualAverageProductionPage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.data && res.data.records.length > 0) {
 | 
				
			||||||
 | 
					          let msg = res.data.records[0];
 | 
				
			||||||
 | 
					          let arr = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "yoy",
 | 
				
			||||||
 | 
					              label: msg.yoyColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "queryValue",
 | 
				
			||||||
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "target",
 | 
				
			||||||
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          this.tableData = res.data.records;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.legendList[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          // 设置偏移量
 | 
				
			||||||
 | 
					          switch (this.listQuery.type) {
 | 
				
			||||||
 | 
					            case 0:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 1:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 2:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-10, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-17, -16];
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data.records);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      let xData = [];
 | 
				
			||||||
 | 
					      let lineData = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        this.factoryList.map((item) => {
 | 
				
			||||||
 | 
					          if (item.id === val[i].factory) {
 | 
				
			||||||
 | 
					            xData.push(item.name);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        lineData.push(val[i].target || 0);
 | 
				
			||||||
 | 
					        barData1.push(val[i].yoy || 0);
 | 
				
			||||||
 | 
					        barData2.push(val[i].queryValue || 0);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[0].data = lineData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[1].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg.series[2].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg = {
 | 
				
			||||||
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/片",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "line",
 | 
				
			||||||
 | 
					            symbol: "circle",
 | 
				
			||||||
 | 
					            symbolSize: 6,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              color: "#FFAE17",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					             barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              // position: [-5, -16],
 | 
				
			||||||
 | 
					              // position: [-5, -16],
 | 
				
			||||||
 | 
					              position: [-10, -16],
 | 
				
			||||||
 | 
					              // position: [-17, -16],
 | 
				
			||||||
 | 
					              color: "#68C483",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "3",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					             barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [0, -16],
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      let fileName = "芯片人均产量对标.xls";
 | 
				
			||||||
 | 
					      chipAnnualAverageProductionExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
					      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="containerBottom">
 | 
					    <div class="containerBottom">
 | 
				
			||||||
      <div class="smallTitle">4月芯片良率</div>
 | 
					      <div class="smallTitle">芯片良率</div>
 | 
				
			||||||
      <bm-line-bar
 | 
					      <bm-line-bar
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
@@ -26,102 +26,61 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import bmSearchBar from "../components/bmSearchBar.vue";
 | 
					import bmSearchBar from "../components/bmSearchBar.vue";
 | 
				
			||||||
import BmLineBar from "../components/bmLineBar.vue";
 | 
					import BmLineBar from "../components/bmLineBar.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  chipyieldRatePage,
 | 
				
			||||||
    prop: "factory",
 | 
					  chipyieldRateExport,
 | 
				
			||||||
    label: "工厂名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
    minWidth: 200,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "name",
 | 
					 | 
				
			||||||
    label: "科目",
 | 
					 | 
				
			||||||
    minWidth: 120,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
    minWidth: 80,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "mubiao",
 | 
					 | 
				
			||||||
    label: "目标值",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "ChipYieldBM",
 | 
					  name: "ChipYieldBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      factoryList: [
 | 
				
			||||||
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "factory",
 | 
				
			||||||
 | 
					          label: "工厂名称",
 | 
				
			||||||
 | 
					          filter: (val) => this.factoryList[val].name,
 | 
				
			||||||
 | 
					          minWidth: 150,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "科目",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
 | 
					        { id: 1, name: "", type: 2, color: "#FFCE6A" },
 | 
				
			||||||
        { id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
 | 
					        { id: 2, name: "", type: 1, color: "#8EF0AB" },
 | 
				
			||||||
        { id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 3, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg: {
 | 
				
			||||||
        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/%",
 | 
					        yName: "单位/%",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月目标值",
 | 
					            name: "1",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            symbol: "circle",
 | 
					            symbol: "circle",
 | 
				
			||||||
            symbolSize: 6,
 | 
					            symbolSize: 6,
 | 
				
			||||||
@@ -134,14 +93,10 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "2",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 57.5 },
 | 
					 | 
				
			||||||
              { name: "%", value: 21.66 },
 | 
					 | 
				
			||||||
              { name: "%", value: 18.4 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -152,14 +107,10 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "3",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 23.33 },
 | 
					 | 
				
			||||||
              { name: "%", value: 7.02 },
 | 
					 | 
				
			||||||
              { name: "%", value: 80.2 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -197,6 +148,13 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.type = 2;
 | 
				
			||||||
 | 
					    this.listQuery.startDate = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.listQuery.factory = [];
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -215,11 +173,144 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
      console.log("=========================");
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出");
 | 
					      this.tableProps = [];
 | 
				
			||||||
 | 
					      chipyieldRatePage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.data && res.data.records.length > 0) {
 | 
				
			||||||
 | 
					          let msg = res.data.records[0];
 | 
				
			||||||
 | 
					          let arr = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "yoy",
 | 
				
			||||||
 | 
					              label: msg.yoyColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "queryValue",
 | 
				
			||||||
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "target",
 | 
				
			||||||
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          this.tableData = res.data.records;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.legendList[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data.records);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      let xData = [];
 | 
				
			||||||
 | 
					      let lineData = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        this.factoryList.map((item) => {
 | 
				
			||||||
 | 
					          if (item.id === val[i].factory) {
 | 
				
			||||||
 | 
					            xData.push(item.name);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        lineData.push({
 | 
				
			||||||
 | 
					          name: "%",
 | 
				
			||||||
 | 
					          value: val[i].target || 0,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        barData1.push({ name: "%", value: val[i].yoy || 0 });
 | 
				
			||||||
 | 
					        barData2.push({
 | 
				
			||||||
 | 
					          name: "%",
 | 
				
			||||||
 | 
					          value: val[i].queryValue || 0,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[0].data = lineData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[1].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg.series[2].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg = {
 | 
				
			||||||
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/%",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "line",
 | 
				
			||||||
 | 
					            symbol: "circle",
 | 
				
			||||||
 | 
					            symbolSize: 6,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              color: "#FFAE17",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [-18, -16],
 | 
				
			||||||
 | 
					              color: "#68C483",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "3",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [0, -16],
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      let fileName = "芯片良率对标.xls";
 | 
				
			||||||
 | 
					      chipyieldRateExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										157
									
								
								src/views/report/completionStatusIntrBM/components/baseChart.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								src/views/report/completionStatusIntrBM/components/baseChart.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div
 | 
				
			||||||
 | 
					    :id="chartId"
 | 
				
			||||||
 | 
					    :style="{ width: '100%', height: chartHeight + 'px' }"
 | 
				
			||||||
 | 
					  ></div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "BaseChart",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 70,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 30,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `${
 | 
				
			||||||
 | 
					                  params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                    ? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
				
			||||||
 | 
					                    : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
				
			||||||
 | 
					                }` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					                `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${
 | 
				
			||||||
 | 
					                  params[i].name === "%"
 | 
				
			||||||
 | 
					                    ? (params[i].value ? params[i].value.toFixed(2) : "0.00") +
 | 
				
			||||||
 | 
					                      params[i].name
 | 
				
			||||||
 | 
					                    : String(params[i].value).replace(
 | 
				
			||||||
 | 
					                        /\B(?=(\d{3})+(?!\d))/g,
 | 
				
			||||||
 | 
					                        ","
 | 
				
			||||||
 | 
					                      )
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: "value",
 | 
				
			||||||
 | 
					          name: "",
 | 
				
			||||||
 | 
					          nameTextStyle: {
 | 
				
			||||||
 | 
					            fontSize: 12,
 | 
				
			||||||
 | 
					            align: "right",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisLabel: {},
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => {},
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData;
 | 
				
			||||||
 | 
					      this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					      if (
 | 
				
			||||||
 | 
					        this.chartMsg.series.length > 0 &&
 | 
				
			||||||
 | 
					        this.chartMsg.series[0].data[0].name === "%"
 | 
				
			||||||
 | 
					      ) {
 | 
				
			||||||
 | 
					        this.option.yAxis.axisLabel = {
 | 
				
			||||||
 | 
					          formatter: function (value) {
 | 
				
			||||||
 | 
					            return value + ".00%";
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.option.yAxis.axisLabel = {
 | 
				
			||||||
 | 
					          formatter: function (value) {
 | 
				
			||||||
 | 
					            return value;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,115 +1,98 @@
 | 
				
			|||||||
<!-- 只适用于指标完成情况对标 -->
 | 
					<!-- 只适用于指标完成情况对标 -->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <div>
 | 
					  <div>
 | 
				
			||||||
    <!-- 暂无数据 -->
 | 
					 | 
				
			||||||
    <div
 | 
					 | 
				
			||||||
      :style="{ height: chartHeight + 'px' }"
 | 
					 | 
				
			||||||
      v-show="this.chartMsg.series[0].data.length === 0"
 | 
					 | 
				
			||||||
    >
 | 
					 | 
				
			||||||
      <div
 | 
					 | 
				
			||||||
        class="no-data-bg"
 | 
					 | 
				
			||||||
        style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
					 | 
				
			||||||
      ></div>
 | 
					 | 
				
			||||||
    </div>
 | 
					 | 
				
			||||||
    <!-- 图例 -->
 | 
					    <!-- 图例 -->
 | 
				
			||||||
    <div v-show="this.chartMsg.series[0].data.length > 0">
 | 
					    <div
 | 
				
			||||||
      <div class="legend">
 | 
					      class="legend"
 | 
				
			||||||
        <span class="item" v-for="item in legendList" :key="item.id">
 | 
					      v-show="
 | 
				
			||||||
 | 
					        this.chartMsg1.series[0].data.length > 0 ||
 | 
				
			||||||
 | 
					        this.chartMsg2.series[0].data.length > 0
 | 
				
			||||||
 | 
					      "
 | 
				
			||||||
 | 
					    >
 | 
				
			||||||
 | 
					      <span class="item" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					        <span
 | 
				
			||||||
 | 
					          v-if="item.type === 1"
 | 
				
			||||||
 | 
					          class="block"
 | 
				
			||||||
 | 
					          :style="{ backgroundColor: item.color }"
 | 
				
			||||||
 | 
					        ></span>
 | 
				
			||||||
 | 
					        <span
 | 
				
			||||||
 | 
					          v-if="item.type === 2"
 | 
				
			||||||
 | 
					          class="line"
 | 
				
			||||||
 | 
					          :style="{ backgroundColor: item.color }"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
          <span
 | 
					          <span
 | 
				
			||||||
            v-if="item.type === 1"
 | 
					            class="line-block"
 | 
				
			||||||
            class="block"
 | 
					 | 
				
			||||||
            :style="{ backgroundColor: item.color }"
 | 
					            :style="{ backgroundColor: item.color }"
 | 
				
			||||||
          ></span>
 | 
					          ></span>
 | 
				
			||||||
          <span
 | 
					        </span>
 | 
				
			||||||
            v-if="item.type === 2"
 | 
					        {{ item.name }}</span
 | 
				
			||||||
            class="line"
 | 
					      >
 | 
				
			||||||
            :style="{ backgroundColor: item.color }"
 | 
					    </div>
 | 
				
			||||||
          >
 | 
					    <!-- 图 -->
 | 
				
			||||||
            <span
 | 
					    <div>
 | 
				
			||||||
              class="line-block"
 | 
					 | 
				
			||||||
              :style="{ backgroundColor: item.color }"
 | 
					 | 
				
			||||||
            ></span>
 | 
					 | 
				
			||||||
          </span>
 | 
					 | 
				
			||||||
          {{ item.name }}</span
 | 
					 | 
				
			||||||
        >
 | 
					 | 
				
			||||||
      </div>
 | 
					 | 
				
			||||||
      <div
 | 
					      <div
 | 
				
			||||||
        :id="chartId"
 | 
					        style="
 | 
				
			||||||
        :style="{ width: '100%', height: chartHeight + 'px' }"
 | 
					          display: inline-block;
 | 
				
			||||||
      ></div>
 | 
					          width: 79%;
 | 
				
			||||||
 | 
					          vertical-align: top;
 | 
				
			||||||
 | 
					          padding-right: 20px;
 | 
				
			||||||
 | 
					        "
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <base-chart
 | 
				
			||||||
 | 
					          v-show="this.chartMsg1.series[0].data.length > 0"
 | 
				
			||||||
 | 
					          :chartHeight="chartHeight"
 | 
				
			||||||
 | 
					          :chartWidth="chartWidth1"
 | 
				
			||||||
 | 
					          :chartMsg="chartMsg1"
 | 
				
			||||||
 | 
					          chartId="targetChartLeft"
 | 
				
			||||||
 | 
					          :chartNum="chartNum"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					        <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					        <div
 | 
				
			||||||
 | 
					          :style="{ height: chartHeight + 'px' }"
 | 
				
			||||||
 | 
					          v-show="this.chartMsg1.series[0].data.length === 0"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					          <div
 | 
				
			||||||
 | 
					            class="no-data-bg"
 | 
				
			||||||
 | 
					            style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					          ></div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div style="display: inline-block; width: 20%; vertical-align: top">
 | 
				
			||||||
 | 
					        <base-chart
 | 
				
			||||||
 | 
					          v-show="this.chartMsg2.series[0].data.length > 0"
 | 
				
			||||||
 | 
					          :chartHeight="chartHeight"
 | 
				
			||||||
 | 
					          :chartWidth="chartWidth2"
 | 
				
			||||||
 | 
					          :chartMsg="chartMsg2"
 | 
				
			||||||
 | 
					          chartId="targetChartRight"
 | 
				
			||||||
 | 
					          :chartNum="chartNum"
 | 
				
			||||||
 | 
					        />
 | 
				
			||||||
 | 
					        <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					        <div
 | 
				
			||||||
 | 
					          :style="{ height: chartHeight + 'px' }"
 | 
				
			||||||
 | 
					          v-show="this.chartMsg2.series[0].data.length === 0"
 | 
				
			||||||
 | 
					        >
 | 
				
			||||||
 | 
					          <div
 | 
				
			||||||
 | 
					            class="no-data-bg"
 | 
				
			||||||
 | 
					            style="
 | 
				
			||||||
 | 
					              position: relative;
 | 
				
			||||||
 | 
					              left: 50%;
 | 
				
			||||||
 | 
					              transform: translateX(-50%);
 | 
				
			||||||
 | 
					              width: 80%;
 | 
				
			||||||
 | 
					            "
 | 
				
			||||||
 | 
					          ></div>
 | 
				
			||||||
 | 
					        </div>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import * as echarts from "echarts";
 | 
					import baseChart from "./baseChart.vue";
 | 
				
			||||||
import { debounce } from "@/utils/debounce";
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "bmBarComplete",
 | 
					  name: "bmBarComplete",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      myChart: "",
 | 
					      chartWidth1: "60%",
 | 
				
			||||||
      option: {
 | 
					      chartWidth2: "20%",
 | 
				
			||||||
        color: [],
 | 
					 | 
				
			||||||
        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
					 | 
				
			||||||
        grid: {
 | 
					 | 
				
			||||||
          left: 70,
 | 
					 | 
				
			||||||
          right: 10,
 | 
					 | 
				
			||||||
          bottom: 30,
 | 
					 | 
				
			||||||
          top: 30,
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        tooltip: {
 | 
					 | 
				
			||||||
          trigger: "axis",
 | 
					 | 
				
			||||||
          axisPointer: {
 | 
					 | 
				
			||||||
            // type: "cross",
 | 
					 | 
				
			||||||
            crossStyle: {
 | 
					 | 
				
			||||||
              color: "rgba(237,237,237,0.5)",
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          formatter: function (params) {
 | 
					 | 
				
			||||||
            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
					 | 
				
			||||||
            for (var i = 0, l = params.length; i < l; i++) {
 | 
					 | 
				
			||||||
              res +=
 | 
					 | 
				
			||||||
                "<br/>" +
 | 
					 | 
				
			||||||
                `${
 | 
					 | 
				
			||||||
                  params[i].seriesType === "line"
 | 
					 | 
				
			||||||
                    ? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
					 | 
				
			||||||
                    : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
					 | 
				
			||||||
                }` +
 | 
					 | 
				
			||||||
                `<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
					 | 
				
			||||||
                `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${
 | 
					 | 
				
			||||||
                  params[i].name === "%"
 | 
					 | 
				
			||||||
                    ? (params[i].value ? params[i].value.toFixed(2) : "0.00") +
 | 
					 | 
				
			||||||
                      params[i].name
 | 
					 | 
				
			||||||
                    : String(params[i].value).replace(
 | 
					 | 
				
			||||||
                        /\B(?=(\d{3})+(?!\d))/g,
 | 
					 | 
				
			||||||
                        ","
 | 
					 | 
				
			||||||
                      )
 | 
					 | 
				
			||||||
                }</span>`;
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            return res;
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        xAxis: {
 | 
					 | 
				
			||||||
          type: "category",
 | 
					 | 
				
			||||||
          data: [],
 | 
					 | 
				
			||||||
          axisTick: {
 | 
					 | 
				
			||||||
            show: false,
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          axisPointer: {
 | 
					 | 
				
			||||||
            type: "shadow",
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        yAxis: {
 | 
					 | 
				
			||||||
          type: "value",
 | 
					 | 
				
			||||||
          name: "",
 | 
					 | 
				
			||||||
          nameTextStyle: {
 | 
					 | 
				
			||||||
            fontSize: 12,
 | 
					 | 
				
			||||||
            align: "right",
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
          axisLabel: {},
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        series: [],
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  props: {
 | 
					  props: {
 | 
				
			||||||
@@ -121,74 +104,20 @@ export default {
 | 
				
			|||||||
      type: Array,
 | 
					      type: Array,
 | 
				
			||||||
      default: () => [],
 | 
					      default: () => [],
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    chartMsg: {
 | 
					    chartMsg1: {
 | 
				
			||||||
      type: Object,
 | 
					      type: Object,
 | 
				
			||||||
      default: () => {},
 | 
					      default: () => {},
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    chartId: {
 | 
					    chartMsg2: {
 | 
				
			||||||
      type: String,
 | 
					      type: Object,
 | 
				
			||||||
      default: "bmChart",
 | 
					      default: () => {},
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    chartNum: {
 | 
					    chartNum: {
 | 
				
			||||||
      type: Number,
 | 
					      type: Number,
 | 
				
			||||||
      default: 1,
 | 
					      default: 1,
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  watch: {
 | 
					  components: { baseChart },
 | 
				
			||||||
    chartHeight: {
 | 
					 | 
				
			||||||
      handler(newVal) {
 | 
					 | 
				
			||||||
        this.chartHeight = newVal;
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    chartNum(val) {
 | 
					 | 
				
			||||||
      this.canvasReset();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    chartMsg: {
 | 
					 | 
				
			||||||
      handler(newVal) {
 | 
					 | 
				
			||||||
        this.canvasReset();
 | 
					 | 
				
			||||||
      },
 | 
					 | 
				
			||||||
      deep: true,
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  mounted() {
 | 
					 | 
				
			||||||
    this.canvasReset();
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  methods: {
 | 
					 | 
				
			||||||
    canvasReset() {
 | 
					 | 
				
			||||||
      debounce(() => {
 | 
					 | 
				
			||||||
        this.getMes();
 | 
					 | 
				
			||||||
      }, 500)();
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    getMes() {
 | 
					 | 
				
			||||||
      if (this.myChart) {
 | 
					 | 
				
			||||||
        this.myChart.dispose();
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      var chartDom = document.getElementById(this.chartId);
 | 
					 | 
				
			||||||
      this.myChart = echarts.init(chartDom);
 | 
					 | 
				
			||||||
      this.option.color = this.chartMsg.color;
 | 
					 | 
				
			||||||
      this.option.xAxis.data = this.chartMsg.xData;
 | 
					 | 
				
			||||||
      this.option.yAxis.name = this.chartMsg.yName;
 | 
					 | 
				
			||||||
      if (
 | 
					 | 
				
			||||||
        this.chartMsg.series.length > 0 &&
 | 
					 | 
				
			||||||
        this.chartMsg.series[0].data[0].name === "%"
 | 
					 | 
				
			||||||
      ) {
 | 
					 | 
				
			||||||
        this.option.yAxis.axisLabel = {
 | 
					 | 
				
			||||||
          formatter: function (value) {
 | 
					 | 
				
			||||||
            return value + ".00%";
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.option.yAxis.axisLabel = {
 | 
					 | 
				
			||||||
          formatter: function (value) {
 | 
					 | 
				
			||||||
            return value;
 | 
					 | 
				
			||||||
          },
 | 
					 | 
				
			||||||
        };
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
					 | 
				
			||||||
      this.option.series = this.chartMsg.series;
 | 
					 | 
				
			||||||
      this.myChart.setOption(this.option);
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
<style lang="scss" scoped>
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,29 +20,33 @@
 | 
				
			|||||||
    <el-form-item v-show="form.type === 0" label="时间" prop="dayTime">
 | 
					    <el-form-item v-show="form.type === 0" label="时间" prop="dayTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        size="small"
 | 
					        size="small"
 | 
				
			||||||
        clearable
 | 
					        :clearable="false"
 | 
				
			||||||
        v-model="form.dayTime"
 | 
					        v-model="form.dayTime"
 | 
				
			||||||
        type="date"
 | 
					        type="date"
 | 
				
			||||||
        placeholder="选择日期"
 | 
					        placeholder="选择日期"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
        style="width: 150px"
 | 
					        style="width: 150px"
 | 
				
			||||||
 | 
					        :picker-options="pickerOptions"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
      </el-date-picker>
 | 
					      </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item v-show="form.type === 1" label="时间" prop="weekTime">
 | 
					    <el-form-item v-show="form.type === 1" label="时间" prop="weekTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.weekTime"
 | 
					        v-model="form.weekTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="week"
 | 
					        type="week"
 | 
				
			||||||
        format="yyyy-MM-dd"
 | 
					        format="yyyy-MM-dd"
 | 
				
			||||||
        placeholder="选择周"
 | 
					        placeholder="选择周"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
        style="width: 150px"
 | 
					        style="width: 150px"
 | 
				
			||||||
 | 
					        :picker-options="pickerOptions"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
      </el-date-picker>
 | 
					      </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item v-show="form.type === 2" label="时间" prop="monthTime">
 | 
					    <el-form-item v-show="form.type === 2" label="时间" prop="monthTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.monthTime"
 | 
					        v-model="form.monthTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="month"
 | 
					        type="month"
 | 
				
			||||||
        placeholder="选择月份"
 | 
					        placeholder="选择月份"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
@@ -53,6 +57,7 @@
 | 
				
			|||||||
    <el-form-item v-show="form.type === 3" label="时间" prop="yearTime">
 | 
					    <el-form-item v-show="form.type === 3" label="时间" prop="yearTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.yearTime"
 | 
					        v-model="form.yearTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="year"
 | 
					        type="year"
 | 
				
			||||||
        placeholder="选择年份"
 | 
					        placeholder="选择年份"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
@@ -61,11 +66,15 @@
 | 
				
			|||||||
      </el-date-picker>
 | 
					      </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item>
 | 
					    <el-form-item>
 | 
				
			||||||
      <el-button type="primary" size="small" @click="getDataList"
 | 
					      <el-button type="primary" size="small" @click="getDataList('search')"
 | 
				
			||||||
        >查询</el-button
 | 
					        >查询</el-button
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
      <el-divider direction="vertical"></el-divider>
 | 
					      <el-divider direction="vertical"></el-divider>
 | 
				
			||||||
      <el-button type="primary" size="small" plain @click="handleExport"
 | 
					      <el-button
 | 
				
			||||||
 | 
					        type="primary"
 | 
				
			||||||
 | 
					        size="small"
 | 
				
			||||||
 | 
					        plain
 | 
				
			||||||
 | 
					        @click="getDataList('export')"
 | 
				
			||||||
        >导出</el-button
 | 
					        >导出</el-button
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
@@ -90,11 +99,13 @@ export default {
 | 
				
			|||||||
        { id: 2, name: "月" },
 | 
					        { id: 2, name: "月" },
 | 
				
			||||||
        { id: 3, name: "年" },
 | 
					        { id: 3, name: "年" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
 | 
					      pickerOptions: {
 | 
				
			||||||
 | 
					        firstDayOfWeek: 1,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDataList() {
 | 
					    getDataList(val) {
 | 
				
			||||||
      console.log(this.form);
 | 
					 | 
				
			||||||
      let params = {};
 | 
					      let params = {};
 | 
				
			||||||
      switch (this.form.type) {
 | 
					      switch (this.form.type) {
 | 
				
			||||||
        case 0:
 | 
					        case 0:
 | 
				
			||||||
@@ -113,10 +124,15 @@ export default {
 | 
				
			|||||||
          break;
 | 
					          break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      params.type = this.form.type;
 | 
					      params.type = this.form.type;
 | 
				
			||||||
      this.$emit("getSearch", params);
 | 
					      if (!params.startDate) {
 | 
				
			||||||
    },
 | 
					        this.$message.warning("时间不能为空");
 | 
				
			||||||
    handleExport() {
 | 
					        return;
 | 
				
			||||||
      this.$emit("handleExport");
 | 
					      }
 | 
				
			||||||
 | 
					      if (val === "search") {
 | 
				
			||||||
 | 
					        this.$emit("getSearch", params);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.$emit("handleExport", params);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,8 +11,8 @@
 | 
				
			|||||||
      <bm-bar-complete
 | 
					      <bm-bar-complete
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
        :chartMsg="chartMsg"
 | 
					        :chartMsg1="chartMsg1"
 | 
				
			||||||
        :chartId="chartId"
 | 
					        :chartMsg2="chartMsg2"
 | 
				
			||||||
        :chartNum="chartNum"
 | 
					        :chartNum="chartNum"
 | 
				
			||||||
      />
 | 
					      />
 | 
				
			||||||
      <base-table
 | 
					      <base-table
 | 
				
			||||||
@@ -29,90 +29,82 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import BmSearchBarComplete from "./components/bmSearchBarComplete.vue";
 | 
					import BmSearchBarComplete from "./components/bmSearchBarComplete.vue";
 | 
				
			||||||
import BmBarComplete from "./components/bmBarComplete.vue";
 | 
					import BmBarComplete from "./components/bmBarComplete.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  targetCompletionPage,
 | 
				
			||||||
    prop: "factory",
 | 
					  targetCompletionExport,
 | 
				
			||||||
    label: "指标名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "CompletionStatusIntrBM",
 | 
					  name: "CompletionStatusIntrBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "指标名称",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2023年4月", type: 1, color: "#288AFF33" },
 | 
					        { id: 1, name: "", type: 1, color: "#288AFF33" },
 | 
				
			||||||
        { id: 2, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 2, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg1: {
 | 
				
			||||||
        color: ["#288AFF33", "#288AFF"],
 | 
					        color: ["#288AFF33", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/MW",
 | 
					        yName: "单位/MW",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "1",
 | 
				
			||||||
            data: [5505, 6578, 5500],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					 | 
				
			||||||
              show: true,
 | 
					 | 
				
			||||||
              position: "top",
 | 
					 | 
				
			||||||
              color: "#2789FF",
 | 
					 | 
				
			||||||
            },
 | 
					 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "2",
 | 
				
			||||||
            data: [3503, 3456, 4500],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            barGap: "-100%",
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: "top",
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      chartMsg2: {
 | 
				
			||||||
 | 
					        color: ["#288AFF33", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/㎡",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
            barGap: "-100%",
 | 
					            barGap: "-100%",
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
@@ -122,7 +114,6 @@ export default {
 | 
				
			|||||||
          },
 | 
					          },
 | 
				
			||||||
        ],
 | 
					        ],
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      chartId: "completionStatusIntrBMChart",
 | 
					 | 
				
			||||||
      chartNum: 1,
 | 
					      chartNum: 1,
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -148,6 +139,12 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.type = 2;
 | 
				
			||||||
 | 
					    this.listQuery.startDate = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -166,11 +163,154 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
      console.log("=========================");
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出");
 | 
					      this.tableProps = [];
 | 
				
			||||||
 | 
					      targetCompletionPage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.data && res.data.records.length > 0) {
 | 
				
			||||||
 | 
					          let msg = res.data.records[0];
 | 
				
			||||||
 | 
					          let arr = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "queryValue",
 | 
				
			||||||
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "target",
 | 
				
			||||||
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          this.tableData = res.data.records;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          this.chartMsg1.series[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.chartMsg1.series[1].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          this.chartMsg2.series[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.chartMsg2.series[1].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          // 设置偏移量
 | 
				
			||||||
 | 
					          switch (this.listQuery.type) {
 | 
				
			||||||
 | 
					            case 0:
 | 
				
			||||||
 | 
					              this.chartMsg1.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              this.chartMsg2.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 1:
 | 
				
			||||||
 | 
					              this.chartMsg1.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              this.chartMsg2.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 2:
 | 
				
			||||||
 | 
					              this.chartMsg1.series[1].label.position = [-10, -16];
 | 
				
			||||||
 | 
					              this.chartMsg2.series[1].label.position = [-10, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					              this.chartMsg1.series[1].label.position = [-17, -16];
 | 
				
			||||||
 | 
					              this.chartMsg2.series[1].label.position = [-17, -16];
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data.records);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      let xData1 = [];
 | 
				
			||||||
 | 
					      let xData2 = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      let barData3 = [];
 | 
				
			||||||
 | 
					      let barData4 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        if (val[i].unit !== "㎡") {
 | 
				
			||||||
 | 
					          xData1.push(val[i].item);
 | 
				
			||||||
 | 
					          barData1.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0);
 | 
				
			||||||
 | 
					          barData2.push(val[i].queryValue ?  parseFloat(val[i].queryValue.toFixed(2)) : 0);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          xData2.push(val[i].item);
 | 
				
			||||||
 | 
					          barData3.push(val[i].target ? parseFloat(val[i].target.toFixed(2)) : 0);
 | 
				
			||||||
 | 
					          barData4.push(val[i].queryValue ? parseFloat(val[i].queryValue.toFixed(2)) : 0);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg1.xData = xData1;
 | 
				
			||||||
 | 
					      this.chartMsg2.xData = xData2;
 | 
				
			||||||
 | 
					      this.chartMsg1.series[0].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg1.series[1].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg2.series[0].data = barData3;
 | 
				
			||||||
 | 
					      this.chartMsg2.series[1].data = barData4;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg1 = {
 | 
				
			||||||
 | 
					        color: ["#288AFF33", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/MW",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            barGap: "-100%",
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: "top",
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      this.chartMsg2 = {
 | 
				
			||||||
 | 
					        color: ["#288AFF33", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/㎡",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            barGap: "-100%",
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: "top",
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      let fileName = "指标完成情况对标.xls";
 | 
				
			||||||
 | 
					      targetCompletionExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -71,7 +71,7 @@ export default {
 | 
				
			|||||||
                "<br/>" +
 | 
					                "<br/>" +
 | 
				
			||||||
                `${
 | 
					                `${
 | 
				
			||||||
                  params[i].seriesType === "line"
 | 
					                  params[i].seriesType === "line"
 | 
				
			||||||
                    ? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
					                    ? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
				
			||||||
                    : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
					                    : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
				
			||||||
                }` +
 | 
					                }` +
 | 
				
			||||||
                `<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
					                `<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -19,29 +19,33 @@
 | 
				
			|||||||
    <el-form-item v-show="form.type === 0" label="时间" prop="dayTime">
 | 
					    <el-form-item v-show="form.type === 0" label="时间" prop="dayTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        size="small"
 | 
					        size="small"
 | 
				
			||||||
        clearable
 | 
					        :clearable="false"
 | 
				
			||||||
        v-model="form.dayTime"
 | 
					        v-model="form.dayTime"
 | 
				
			||||||
        type="date"
 | 
					        type="date"
 | 
				
			||||||
        placeholder="选择日期"
 | 
					        placeholder="选择日期"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
        style="width: 150px"
 | 
					        style="width: 150px"
 | 
				
			||||||
 | 
					        :picker-options="pickerOptions"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
      </el-date-picker>
 | 
					      </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item v-show="form.type === 1" label="时间" prop="weekTime">
 | 
					    <el-form-item v-show="form.type === 1" label="时间" prop="weekTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.weekTime"
 | 
					        v-model="form.weekTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="week"
 | 
					        type="week"
 | 
				
			||||||
        format="yyyy-MM-dd"
 | 
					        format="yyyy-MM-dd"
 | 
				
			||||||
        placeholder="选择周"
 | 
					        placeholder="选择周"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
        style="width: 150px"
 | 
					        style="width: 150px"
 | 
				
			||||||
 | 
					        :picker-options="pickerOptions"
 | 
				
			||||||
      >
 | 
					      >
 | 
				
			||||||
      </el-date-picker>
 | 
					      </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item v-show="form.type === 2" label="时间" prop="monthTime">
 | 
					    <el-form-item v-show="form.type === 2" label="时间" prop="monthTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.monthTime"
 | 
					        v-model="form.monthTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="month"
 | 
					        type="month"
 | 
				
			||||||
        placeholder="选择月份"
 | 
					        placeholder="选择月份"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
@@ -52,6 +56,7 @@
 | 
				
			|||||||
    <el-form-item v-show="form.type === 3" label="时间" prop="yearTime">
 | 
					    <el-form-item v-show="form.type === 3" label="时间" prop="yearTime">
 | 
				
			||||||
      <el-date-picker
 | 
					      <el-date-picker
 | 
				
			||||||
        v-model="form.yearTime"
 | 
					        v-model="form.yearTime"
 | 
				
			||||||
 | 
					        :clearable="false"
 | 
				
			||||||
        type="year"
 | 
					        type="year"
 | 
				
			||||||
        placeholder="选择年份"
 | 
					        placeholder="选择年份"
 | 
				
			||||||
        value-format="yyyy-MM-dd"
 | 
					        value-format="yyyy-MM-dd"
 | 
				
			||||||
@@ -115,11 +120,13 @@ export default {
 | 
				
			|||||||
        { id: 0, name: "瑞昌" },
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
        { id: 1, name: "邯郸" },
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
 | 
					      pickerOptions: {
 | 
				
			||||||
 | 
					        firstDayOfWeek: 1,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    getDataList(val) {
 | 
					    getDataList(val) {
 | 
				
			||||||
      console.log(this.form);
 | 
					 | 
				
			||||||
      let params = {};
 | 
					      let params = {};
 | 
				
			||||||
      params.factory = this.form.factory;
 | 
					      params.factory = this.form.factory;
 | 
				
			||||||
      switch (this.form.type) {
 | 
					      switch (this.form.type) {
 | 
				
			||||||
@@ -139,6 +146,10 @@ export default {
 | 
				
			|||||||
          break;
 | 
					          break;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      params.type = this.form.type;
 | 
					      params.type = this.form.type;
 | 
				
			||||||
 | 
					      if (!params.startDate) {
 | 
				
			||||||
 | 
					        this.$message.warning("时间不能为空");
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      if (val === "search") {
 | 
					      if (val === "search") {
 | 
				
			||||||
        this.$emit("getSearch", params);
 | 
					        this.$emit("getSearch", params);
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										270
									
								
								src/views/report/components/produceLineBar.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										270
									
								
								src/views/report/components/produceLineBar.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,270 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-19 15:28:34
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-12 09:12:10
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					    <div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					      v-show="this.chartMsg.series[0].data.length === 0"></div>
 | 
				
			||||||
 | 
					    <!-- 图例 -->
 | 
				
			||||||
 | 
					    <div v-show="this.chartMsg.series[0].data.length > 0 ">
 | 
				
			||||||
 | 
					      <div class="legendData" v-if="show">
 | 
				
			||||||
 | 
					        <span class="itemData" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					          <span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          <span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
 | 
				
			||||||
 | 
					            <span class="line-block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          {{ item.name }}</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "bmLineBar",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 30,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 30,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          containLabel:true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					              `${params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                ? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
				
			||||||
 | 
					                : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
				
			||||||
 | 
					              }` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
 | 
				
			||||||
 | 
					                  ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[i].seriesName === "转化效率"
 | 
				
			||||||
 | 
					                    ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
 | 
				
			||||||
 | 
					                  : params[i].seriesName.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : params[i].seriesName.search('BIPV') != -1
 | 
				
			||||||
 | 
					                      ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡" : (params[i].value ? params[i].value : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        dataZoom: [//滚动条
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            // 设置滚动条的隐藏与显示
 | 
				
			||||||
 | 
					            show: true,
 | 
				
			||||||
 | 
					            // 设置滚动条类型
 | 
				
			||||||
 | 
					            type: "slider",
 | 
				
			||||||
 | 
					            // 设置背景颜色
 | 
				
			||||||
 | 
					            backgroundColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // handleStyle: {
 | 
				
			||||||
 | 
					            //   color: '#D6D6D6'
 | 
				
			||||||
 | 
					            // },
 | 
				
			||||||
 | 
					            handleStyle: {
 | 
				
			||||||
 | 
					              borderColor: '#EBEBEB',
 | 
				
			||||||
 | 
					              color: '#EBEBEB'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            moveHandleStyle: {
 | 
				
			||||||
 | 
					              borderColor: '#EBEBEB',
 | 
				
			||||||
 | 
					              color: '#EBEBEB'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            emphasis: {
 | 
				
			||||||
 | 
					              handleStyle: {
 | 
				
			||||||
 | 
					                borderColor: '#D6D6D6',
 | 
				
			||||||
 | 
					                color: '#D6D6D6'
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              moveHandleStyle: {
 | 
				
			||||||
 | 
					                borderColor: '#D6D6D6',
 | 
				
			||||||
 | 
					                color: '#D6D6D6'
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            // 设置选中范围的填充颜色
 | 
				
			||||||
 | 
					            fillerColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // 设置边框颜色
 | 
				
			||||||
 | 
					            borderColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // 是否显示detail,即拖拽时候显示详细数值信息
 | 
				
			||||||
 | 
					            showDetail: false,
 | 
				
			||||||
 | 
					            // 数据窗口范围的起始数值
 | 
				
			||||||
 | 
					            startValue: 0,
 | 
				
			||||||
 | 
					            // 数据窗口范围的结束数值(一页显示多少条数据)
 | 
				
			||||||
 | 
					            endValue: 5,
 | 
				
			||||||
 | 
					            // empty:当前数据窗口外的数据,被设置为空。
 | 
				
			||||||
 | 
					            // 即不会影响其他轴的数据范围
 | 
				
			||||||
 | 
					            filterMode: "empty",
 | 
				
			||||||
 | 
					            // 设置滚动条宽度,相对于盒子宽度
 | 
				
			||||||
 | 
					            width: "100%",
 | 
				
			||||||
 | 
					            // 设置滚动条高度
 | 
				
			||||||
 | 
					            height: 3,
 | 
				
			||||||
 | 
					            // 设置滚动条显示位置
 | 
				
			||||||
 | 
					            left: "center",
 | 
				
			||||||
 | 
					            // 是否锁定选择区域(或叫做数据窗口)的大小
 | 
				
			||||||
 | 
					            zoomLoxk: true,
 | 
				
			||||||
 | 
					            // 控制手柄的尺寸
 | 
				
			||||||
 | 
					            handleSize: 0,
 | 
				
			||||||
 | 
					            // dataZoom-slider组件离容器下侧的距离
 | 
				
			||||||
 | 
					            bottom: 14,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            // 没有下面这块的话,只能拖动滚动条,
 | 
				
			||||||
 | 
					            // 鼠标滚轮在区域内不能控制外部滚动条
 | 
				
			||||||
 | 
					            type: "inside",
 | 
				
			||||||
 | 
					            // 滚轮是否触发缩放
 | 
				
			||||||
 | 
					            zoomOnMouseWheel: false,
 | 
				
			||||||
 | 
					            // 鼠标滚轮触发滚动
 | 
				
			||||||
 | 
					            moveOnMouseMove: true,
 | 
				
			||||||
 | 
					            moveOnMouseWheel: true,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        yAxis:undefined,
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 2,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => {},
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type() {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      console.log('222222', this.chartMsg.series);
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData;
 | 
				
			||||||
 | 
					      // this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.option.yAxis = this.chartMsg.yAxis;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.legendData {
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  // right: 30;
 | 
				
			||||||
 | 
					  top: 0px;
 | 
				
			||||||
 | 
					  .itemData {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    margin-right: 10px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    color: #8c8c8c;
 | 
				
			||||||
 | 
					    .block {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .line {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      border-radius: 5px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      .line-block {
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 20px;
 | 
				
			||||||
 | 
					        height: 2px;
 | 
				
			||||||
 | 
					        left: -5px;
 | 
				
			||||||
 | 
					        top: 4px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										269
									
								
								src/views/report/components/produceLineBarTarget.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										269
									
								
								src/views/report/components/produceLineBarTarget.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,269 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-20 16:13:36
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 16:15:10
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					    <div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					      v-show="this.chartMsg.series.length === 0"></div>
 | 
				
			||||||
 | 
					    <!-- 图例 -->
 | 
				
			||||||
 | 
					    <div v-show="this.chartMsg.series.length > 0">
 | 
				
			||||||
 | 
					      <div class="legendData" v-if="show">
 | 
				
			||||||
 | 
					        <span class="itemData" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					          <span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          <span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
 | 
				
			||||||
 | 
					            <span class="line-block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          {{ item.name }}</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "bmLineBar",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 50,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 31,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          containLabel:true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            // console.log('params', params.data)
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
 | 
				
			||||||
 | 
					                ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[i].seriesName === "转化效率"
 | 
				
			||||||
 | 
					                  ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                  : params[i].seriesName.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[i].data.titleValue ? parseFloat(params[i].data.titleValue.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : params[i].seriesName.search('BIPV') != -1
 | 
				
			||||||
 | 
					                      ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡" : (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // dataZoom: [//滚动条
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 设置滚动条的隐藏与显示
 | 
				
			||||||
 | 
					        //     show: true,
 | 
				
			||||||
 | 
					        //     // 设置滚动条类型
 | 
				
			||||||
 | 
					        //     type: "slider",
 | 
				
			||||||
 | 
					        //     // 设置背景颜色
 | 
				
			||||||
 | 
					        //     backgroundColor: "rgb(19, 63, 100)",
 | 
				
			||||||
 | 
					        //     // 设置选中范围的填充颜色
 | 
				
			||||||
 | 
					        //     fillerColor: "rgb(16, 171, 198)",
 | 
				
			||||||
 | 
					        //     // 设置边框颜色
 | 
				
			||||||
 | 
					        //     borderColor: "rgb(19, 63, 100)",
 | 
				
			||||||
 | 
					        //     // 是否显示detail,即拖拽时候显示详细数值信息
 | 
				
			||||||
 | 
					        //     showDetail: false,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的起始数值
 | 
				
			||||||
 | 
					        //     startValue: 0,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的结束数值(一页显示多少条数据)
 | 
				
			||||||
 | 
					        //     endValue: 5,
 | 
				
			||||||
 | 
					        //     // empty:当前数据窗口外的数据,被设置为空。
 | 
				
			||||||
 | 
					        //     // 即不会影响其他轴的数据范围
 | 
				
			||||||
 | 
					        //     filterMode: "empty",
 | 
				
			||||||
 | 
					        //     // 设置滚动条宽度,相对于盒子宽度
 | 
				
			||||||
 | 
					        //     width: "50%",
 | 
				
			||||||
 | 
					        //     // 设置滚动条高度
 | 
				
			||||||
 | 
					        //     height: 8,
 | 
				
			||||||
 | 
					        //     // 设置滚动条显示位置
 | 
				
			||||||
 | 
					        //     left: "center",
 | 
				
			||||||
 | 
					        //     // 是否锁定选择区域(或叫做数据窗口)的大小
 | 
				
			||||||
 | 
					        //     zoomLoxk: true,
 | 
				
			||||||
 | 
					        //     // 控制手柄的尺寸
 | 
				
			||||||
 | 
					        //     handleSize: 0,
 | 
				
			||||||
 | 
					        //     // dataZoom-slider组件离容器下侧的距离
 | 
				
			||||||
 | 
					        //     bottom: 3,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 没有下面这块的话,只能拖动滚动条,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮在区域内不能控制外部滚动条
 | 
				
			||||||
 | 
					        //     type: "inside",
 | 
				
			||||||
 | 
					        //     // 滚轮是否触发缩放
 | 
				
			||||||
 | 
					        //     zoomOnMouseWheel: false,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮触发滚动
 | 
				
			||||||
 | 
					        //     moveOnMouseMove: true,
 | 
				
			||||||
 | 
					        //     moveOnMouseWheel: true,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        yAxis:undefined,
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    gridLeft: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 2,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // gridLeft(val) {
 | 
				
			||||||
 | 
					    //   if (val === false) {
 | 
				
			||||||
 | 
					    //     this.option.grid.left = 100
 | 
				
			||||||
 | 
					    //   } else {
 | 
				
			||||||
 | 
					    //     this.option.grid.left = -80
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   this.canvasReset()
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    type() {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      console.log(this.gridLeft)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // console.log('222222', this.chartMsg);
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData
 | 
				
			||||||
 | 
					      if (this.gridLeft === false) {
 | 
				
			||||||
 | 
					        this.option.grid.left = 50
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.option.grid.left = -80
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      // this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.option.yAxis = this.chartMsg.yAxis;
 | 
				
			||||||
 | 
					      console.log(this.option.grid);
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" >
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.legendData {
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  // right: 30;
 | 
				
			||||||
 | 
					  // top: 10px;
 | 
				
			||||||
 | 
					  top: 0px;
 | 
				
			||||||
 | 
					  .itemData {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    margin-right: 10px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    color: #8c8c8c;
 | 
				
			||||||
 | 
					    .block {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .line {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      border-radius: 5px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      .line-block {
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 20px;
 | 
				
			||||||
 | 
					        height: 2px;
 | 
				
			||||||
 | 
					        left: -5px;
 | 
				
			||||||
 | 
					        top: 4px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										247
									
								
								src/views/report/components/produceLineBarYearTarget.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										247
									
								
								src/views/report/components/produceLineBarYearTarget.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,247 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-20 16:13:52
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-11 16:45:08
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					    <div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					      v-show="this.chartMsg.series[0].data.length === 0"></div>
 | 
				
			||||||
 | 
					    <!-- 图例 -->
 | 
				
			||||||
 | 
					    <div v-show="this.chartMsg.series[0].data.length > 0">
 | 
				
			||||||
 | 
					      <div class="legendData" v-if="show">
 | 
				
			||||||
 | 
					        <span class="itemData" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					          <span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          <span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
 | 
				
			||||||
 | 
					            <span class="line-block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          {{ item.name }}</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "bmLineBar",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 60,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 31,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          containLabel:true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
 | 
				
			||||||
 | 
					                  ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[i].seriesName === "转化效率"
 | 
				
			||||||
 | 
					                  ? parseFloat(params[i].value.toFixed(2)) + "%"
 | 
				
			||||||
 | 
					                  : params[i].seriesName.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : params[i].seriesName.search('BIPV') != -1
 | 
				
			||||||
 | 
					                      ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡":(params[i].value ? params[i].value : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // dataZoom: [//滚动条
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 设置滚动条的隐藏与显示
 | 
				
			||||||
 | 
					        //     show: true,
 | 
				
			||||||
 | 
					        //     // 设置滚动条类型
 | 
				
			||||||
 | 
					        //     type: "slider",
 | 
				
			||||||
 | 
					        //     // 设置背景颜色
 | 
				
			||||||
 | 
					        //     backgroundColor: "rgb(19, 63, 100)",
 | 
				
			||||||
 | 
					        //     // 设置选中范围的填充颜色
 | 
				
			||||||
 | 
					        //     fillerColor: "rgb(16, 171, 198)",
 | 
				
			||||||
 | 
					        //     // 设置边框颜色
 | 
				
			||||||
 | 
					        //     borderColor: "rgb(19, 63, 100)",
 | 
				
			||||||
 | 
					        //     // 是否显示detail,即拖拽时候显示详细数值信息
 | 
				
			||||||
 | 
					        //     showDetail: false,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的起始数值
 | 
				
			||||||
 | 
					        //     startValue: 0,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的结束数值(一页显示多少条数据)
 | 
				
			||||||
 | 
					        //     endValue: 5,
 | 
				
			||||||
 | 
					        //     // empty:当前数据窗口外的数据,被设置为空。
 | 
				
			||||||
 | 
					        //     // 即不会影响其他轴的数据范围
 | 
				
			||||||
 | 
					        //     filterMode: "empty",
 | 
				
			||||||
 | 
					        //     // 设置滚动条宽度,相对于盒子宽度
 | 
				
			||||||
 | 
					        //     width: "50%",
 | 
				
			||||||
 | 
					        //     // 设置滚动条高度
 | 
				
			||||||
 | 
					        //     height: 8,
 | 
				
			||||||
 | 
					        //     // 设置滚动条显示位置
 | 
				
			||||||
 | 
					        //     left: "center",
 | 
				
			||||||
 | 
					        //     // 是否锁定选择区域(或叫做数据窗口)的大小
 | 
				
			||||||
 | 
					        //     zoomLoxk: true,
 | 
				
			||||||
 | 
					        //     // 控制手柄的尺寸
 | 
				
			||||||
 | 
					        //     handleSize: 0,
 | 
				
			||||||
 | 
					        //     // dataZoom-slider组件离容器下侧的距离
 | 
				
			||||||
 | 
					        //     bottom: 3,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 没有下面这块的话,只能拖动滚动条,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮在区域内不能控制外部滚动条
 | 
				
			||||||
 | 
					        //     type: "inside",
 | 
				
			||||||
 | 
					        //     // 滚轮是否触发缩放
 | 
				
			||||||
 | 
					        //     zoomOnMouseWheel: false,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮触发滚动
 | 
				
			||||||
 | 
					        //     moveOnMouseMove: true,
 | 
				
			||||||
 | 
					        //     moveOnMouseWheel: true,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        yAxis:undefined,
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 2,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type() {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData;
 | 
				
			||||||
 | 
					      // this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.option.yAxis = this.chartMsg.yAxis;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.legendData {
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  // right: 30;
 | 
				
			||||||
 | 
					  top: 0px;
 | 
				
			||||||
 | 
					  // top: -10px;
 | 
				
			||||||
 | 
					  .itemData {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    margin-right: 10px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    color: #8c8c8c;
 | 
				
			||||||
 | 
					    .block {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .line {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      border-radius: 5px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      .line-block {
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 20px;
 | 
				
			||||||
 | 
					        height: 2px;
 | 
				
			||||||
 | 
					        left: -5px;
 | 
				
			||||||
 | 
					        top: 4px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										277
									
								
								src/views/report/components/produceLineYieldBar.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										277
									
								
								src/views/report/components/produceLineYieldBar.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,277 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-07-09 16:06:13
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 16:14:54
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-19 15:28:34
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-08 14:19:57
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					    <div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					      v-show="this.chartMsg.series[0].data.length === 0"></div>
 | 
				
			||||||
 | 
					    <!-- 图例 -->
 | 
				
			||||||
 | 
					    <div v-show="this.chartMsg.series[0].data.length > 0 ">
 | 
				
			||||||
 | 
					      <div class="legendData" v-if="show">
 | 
				
			||||||
 | 
					        <span class="itemData" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					          <span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          <span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
 | 
				
			||||||
 | 
					            <span class="line-block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          {{ item.name }}</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "bmLineBar",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 30,
 | 
				
			||||||
 | 
					          right: 50,
 | 
				
			||||||
 | 
					          bottom: 30,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          containLabel:true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
 | 
				
			||||||
 | 
					            for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                "<br/>" +
 | 
				
			||||||
 | 
					              `${params[i].seriesType === "line"
 | 
				
			||||||
 | 
					                ? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
 | 
				
			||||||
 | 
					                : `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
 | 
				
			||||||
 | 
					              }` +
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
 | 
				
			||||||
 | 
					                  ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[i].seriesName === "转化效率"
 | 
				
			||||||
 | 
					                    ? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
 | 
				
			||||||
 | 
					                  : params[i].seriesName.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : params[i].seriesName.search('BIPV') != -1
 | 
				
			||||||
 | 
					                      ? (params[i].value ? parseFloat(params[i].value.toFixed(2)) : 0) + "㎡" : (params[i].value ? params[i].value : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        dataZoom: [//滚动条
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            // 设置滚动条的隐藏与显示
 | 
				
			||||||
 | 
					            show: true,
 | 
				
			||||||
 | 
					            // 设置滚动条类型
 | 
				
			||||||
 | 
					            type: "slider",
 | 
				
			||||||
 | 
					            // 设置背景颜色
 | 
				
			||||||
 | 
					            backgroundColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // handleStyle: {
 | 
				
			||||||
 | 
					            //   color: '#D6D6D6'
 | 
				
			||||||
 | 
					            // },
 | 
				
			||||||
 | 
					            handleStyle: {
 | 
				
			||||||
 | 
					              borderColor: '#EBEBEB',
 | 
				
			||||||
 | 
					              color: '#EBEBEB'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            moveHandleStyle: {
 | 
				
			||||||
 | 
					              borderColor: '#EBEBEB',
 | 
				
			||||||
 | 
					              color: '#EBEBEB'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            emphasis: {
 | 
				
			||||||
 | 
					              handleStyle: {
 | 
				
			||||||
 | 
					                borderColor: '#D6D6D6',
 | 
				
			||||||
 | 
					                color: '#D6D6D6'
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					              moveHandleStyle: {
 | 
				
			||||||
 | 
					                borderColor: '#D6D6D6',
 | 
				
			||||||
 | 
					                color: '#D6D6D6'
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            // 设置选中范围的填充颜色
 | 
				
			||||||
 | 
					            fillerColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // 设置边框颜色
 | 
				
			||||||
 | 
					            borderColor: "#F7F7F7",
 | 
				
			||||||
 | 
					            // 是否显示detail,即拖拽时候显示详细数值信息
 | 
				
			||||||
 | 
					            showDetail: false,
 | 
				
			||||||
 | 
					            // 数据窗口范围的起始数值
 | 
				
			||||||
 | 
					            startValue: 0,
 | 
				
			||||||
 | 
					            // 数据窗口范围的结束数值(一页显示多少条数据)
 | 
				
			||||||
 | 
					            endValue: 5,
 | 
				
			||||||
 | 
					            // empty:当前数据窗口外的数据,被设置为空。
 | 
				
			||||||
 | 
					            // 即不会影响其他轴的数据范围
 | 
				
			||||||
 | 
					            filterMode: "empty",
 | 
				
			||||||
 | 
					            // 设置滚动条宽度,相对于盒子宽度
 | 
				
			||||||
 | 
					            width: "100%",
 | 
				
			||||||
 | 
					            // 设置滚动条高度
 | 
				
			||||||
 | 
					            height: 3,
 | 
				
			||||||
 | 
					            // 设置滚动条显示位置
 | 
				
			||||||
 | 
					            left: "center",
 | 
				
			||||||
 | 
					            // 是否锁定选择区域(或叫做数据窗口)的大小
 | 
				
			||||||
 | 
					            zoomLoxk: true,
 | 
				
			||||||
 | 
					            // 控制手柄的尺寸
 | 
				
			||||||
 | 
					            handleSize: 0,
 | 
				
			||||||
 | 
					            // dataZoom-slider组件离容器下侧的距离
 | 
				
			||||||
 | 
					            bottom: 14,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            // 没有下面这块的话,只能拖动滚动条,
 | 
				
			||||||
 | 
					            // 鼠标滚轮在区域内不能控制外部滚动条
 | 
				
			||||||
 | 
					            type: "inside",
 | 
				
			||||||
 | 
					            // 滚轮是否触发缩放
 | 
				
			||||||
 | 
					            zoomOnMouseWheel: false,
 | 
				
			||||||
 | 
					            // 鼠标滚轮触发滚动
 | 
				
			||||||
 | 
					            moveOnMouseMove: true,
 | 
				
			||||||
 | 
					            moveOnMouseWheel: true,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					        yAxis:undefined,
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 2,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => {},
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type() {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      console.log('222222', this.chartMsg.series);
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData;
 | 
				
			||||||
 | 
					      // this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.option.yAxis = this.chartMsg.yAxis;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.legendData {
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  // right: 30;
 | 
				
			||||||
 | 
					  top: 0px;
 | 
				
			||||||
 | 
					  .itemData {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    margin-right: 10px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    color: #8c8c8c;
 | 
				
			||||||
 | 
					    .block {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .line {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      border-radius: 5px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      .line-block {
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 20px;
 | 
				
			||||||
 | 
					        height: 2px;
 | 
				
			||||||
 | 
					        left: -5px;
 | 
				
			||||||
 | 
					        top: 4px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
							
								
								
									
										261
									
								
								src/views/report/components/produceLineYieldBarTarget.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										261
									
								
								src/views/report/components/produceLineYieldBarTarget.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,261 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2024-06-21 09:05:14
 | 
				
			||||||
 | 
					 * @LastEditTime: 2024-07-09 16:15:04
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description:
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <div>
 | 
				
			||||||
 | 
					    <!-- 暂无数据 -->
 | 
				
			||||||
 | 
					    <div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
 | 
				
			||||||
 | 
					      v-show="this.chartMsg.series[0].data.length === 0"></div>
 | 
				
			||||||
 | 
					    <!-- 图例 -->
 | 
				
			||||||
 | 
					    <div v-show="this.chartMsg.series[0].data.length > 0">
 | 
				
			||||||
 | 
					      <div class="legendData" v-if="show">
 | 
				
			||||||
 | 
					        <span class="itemData" v-for="item in legendList" :key="item.id">
 | 
				
			||||||
 | 
					          <span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          <span v-if="item.type === 2" class="line" :style="{ backgroundColor: item.color }">
 | 
				
			||||||
 | 
					            <span class="line-block" :style="{ backgroundColor: item.color }"></span>
 | 
				
			||||||
 | 
					          </span>
 | 
				
			||||||
 | 
					          {{ item.name }}</span>
 | 
				
			||||||
 | 
					      </div>
 | 
				
			||||||
 | 
					      <div :id="chartId" :style="{ width: '100%', height: chartHeight + 'px' }"></div>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import * as echarts from "echarts";
 | 
				
			||||||
 | 
					import { debounce } from "@/utils/debounce";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  name: "bmLineBar",
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      myChart: "",
 | 
				
			||||||
 | 
					      option: {
 | 
				
			||||||
 | 
					        color: [],
 | 
				
			||||||
 | 
					        // color: ["#8EF0AB", "#63BDFF", "#288AFF"],
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: 60,
 | 
				
			||||||
 | 
					          right: 0,
 | 
				
			||||||
 | 
					          bottom: 30,
 | 
				
			||||||
 | 
					          top: 30,
 | 
				
			||||||
 | 
					          containLabel:true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: "axis",
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            // type: "cross",
 | 
				
			||||||
 | 
					            crossStyle: {
 | 
				
			||||||
 | 
					              color: "rgba(237,237,237,0.5)",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          formatter: function (params) {
 | 
				
			||||||
 | 
					            console.log('params', params)
 | 
				
			||||||
 | 
					            let arr = []
 | 
				
			||||||
 | 
					            var res = ``;
 | 
				
			||||||
 | 
					            // for (var i = 0, l = params.length; i < l; i++) {
 | 
				
			||||||
 | 
					            // console.log()
 | 
				
			||||||
 | 
					            if (params[0].axisValue === 'FTO投入' || params[0].axisValue === '芯片产量' || params[0].axisValue === '标准组件产量' || params[0].axisValue === '芯片总功率' || params[0].axisValue === '标准组件总功率') {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[0].color}'></span>` +
 | 
				
			||||||
 | 
					              `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[0].axisValueLabel}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[0].name === "综合良率"
 | 
				
			||||||
 | 
					                ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[0].name === "转化效率"
 | 
				
			||||||
 | 
					                  ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                  : params[0].axisValueLabel.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[0].value ? parseFloat(params[0].value.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : (params[0].value ? params[0].value : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					              // }
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            if (params[1].axisValue === '综合良率' || params[1].axisValue === '转化效率') {
 | 
				
			||||||
 | 
					              res +=
 | 
				
			||||||
 | 
					                `<span style='display:inline-block;margin-right:4px;width:10px;height:10px;background-color:${params[1].color}'></span>` +
 | 
				
			||||||
 | 
					              `<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[1].axisValueLabel}</span>` +
 | 
				
			||||||
 | 
					              `<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[1].name === "综合良率"
 | 
				
			||||||
 | 
					                ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                : params[1].name === "转化效率"
 | 
				
			||||||
 | 
					                  ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0.0) + "%"
 | 
				
			||||||
 | 
					                  : params[1].axisValueLabel.search('总功率') != -1
 | 
				
			||||||
 | 
					                    ? (params[1].value ? parseFloat(params[1].value.toFixed(2)) : 0) + "MW"
 | 
				
			||||||
 | 
					                    : (params[1].value ? params[1].value : 0) + "片"
 | 
				
			||||||
 | 
					                }</span>`;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            return res;
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: "category",
 | 
				
			||||||
 | 
					          data: [],
 | 
				
			||||||
 | 
					          axisTick: {
 | 
				
			||||||
 | 
					            show: false,
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          axisPointer: {
 | 
				
			||||||
 | 
					            type: "shadow",
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        // dataZoom: [//滚动条
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 设置滚动条的隐藏与显示
 | 
				
			||||||
 | 
					        //     show: true,
 | 
				
			||||||
 | 
					        //     // 设置滚动条类型
 | 
				
			||||||
 | 
					        //     type: "slider",
 | 
				
			||||||
 | 
					        //     // 设置背景颜色
 | 
				
			||||||
 | 
					        //     backgroundColor: "#F7F7F7",
 | 
				
			||||||
 | 
					        //     // 设置选中范围的填充颜色
 | 
				
			||||||
 | 
					        //     fillerColor: "#EBEBEB",
 | 
				
			||||||
 | 
					        //     // 设置边框颜色
 | 
				
			||||||
 | 
					        //     borderColor: "#F7F7F7",
 | 
				
			||||||
 | 
					        //     // 是否显示detail,即拖拽时候显示详细数值信息
 | 
				
			||||||
 | 
					        //     showDetail: false,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的起始数值
 | 
				
			||||||
 | 
					        //     startValue: 0,
 | 
				
			||||||
 | 
					        //     // 数据窗口范围的结束数值(一页显示多少条数据)
 | 
				
			||||||
 | 
					        //     endValue: 5,
 | 
				
			||||||
 | 
					        //     // empty:当前数据窗口外的数据,被设置为空。
 | 
				
			||||||
 | 
					        //     // 即不会影响其他轴的数据范围
 | 
				
			||||||
 | 
					        //     filterMode: "empty",
 | 
				
			||||||
 | 
					        //     // 设置滚动条宽度,相对于盒子宽度
 | 
				
			||||||
 | 
					        //     width: "100%",
 | 
				
			||||||
 | 
					        //     // 设置滚动条高度
 | 
				
			||||||
 | 
					        //     height: 8,
 | 
				
			||||||
 | 
					        //     // 设置滚动条显示位置
 | 
				
			||||||
 | 
					        //     left: "center",
 | 
				
			||||||
 | 
					        //     // 是否锁定选择区域(或叫做数据窗口)的大小
 | 
				
			||||||
 | 
					        //     zoomLoxk: true,
 | 
				
			||||||
 | 
					        //     // 控制手柄的尺寸
 | 
				
			||||||
 | 
					        //     handleSize: 0,
 | 
				
			||||||
 | 
					        //     // dataZoom-slider组件离容器下侧的距离
 | 
				
			||||||
 | 
					        //     bottom: 3,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     // 没有下面这块的话,只能拖动滚动条,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮在区域内不能控制外部滚动条
 | 
				
			||||||
 | 
					        //     type: "inside",
 | 
				
			||||||
 | 
					        //     // 滚轮是否触发缩放
 | 
				
			||||||
 | 
					        //     zoomOnMouseWheel: false,
 | 
				
			||||||
 | 
					        //     // 鼠标滚轮触发滚动
 | 
				
			||||||
 | 
					        //     moveOnMouseMove: true,
 | 
				
			||||||
 | 
					        //     moveOnMouseWheel: true,
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        yAxis:undefined,
 | 
				
			||||||
 | 
					        series: [],
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 300,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 2,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    show: {
 | 
				
			||||||
 | 
					      type: Boolean,
 | 
				
			||||||
 | 
					      default: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    legendList: {
 | 
				
			||||||
 | 
					      type: Array,
 | 
				
			||||||
 | 
					      default: () => [],
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => { },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartId: {
 | 
				
			||||||
 | 
					      type: String,
 | 
				
			||||||
 | 
					      default: "bmChart",
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum: {
 | 
				
			||||||
 | 
					      type: Number,
 | 
				
			||||||
 | 
					      default: 1,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    chartHeight: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.chartHeight = newVal;
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    type() {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartNum(val) {
 | 
				
			||||||
 | 
					      this.canvasReset();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    chartMsg: {
 | 
				
			||||||
 | 
					      handler(newVal) {
 | 
				
			||||||
 | 
					        this.canvasReset();
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      deep: true,
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.canvasReset();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    canvasReset() {
 | 
				
			||||||
 | 
					      debounce(() => {
 | 
				
			||||||
 | 
					        this.getMes();
 | 
				
			||||||
 | 
					      }, 500)();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getMes() {
 | 
				
			||||||
 | 
					      if (this.myChart) {
 | 
				
			||||||
 | 
					        this.myChart.dispose();
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById(this.chartId);
 | 
				
			||||||
 | 
					      this.myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      this.option.color = this.chartMsg.color;
 | 
				
			||||||
 | 
					      this.option.xAxis.data = this.chartMsg.xData;
 | 
				
			||||||
 | 
					      // this.option.yAxis.name = this.chartMsg.yName;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      // this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;
 | 
				
			||||||
 | 
					      this.option.series = this.chartMsg.series;
 | 
				
			||||||
 | 
					      this.option.yAxis = this.chartMsg.yAxis;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.myChart.setOption(this.option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					<style lang="scss" scoped>
 | 
				
			||||||
 | 
					.legendData {
 | 
				
			||||||
 | 
					  text-align: right;
 | 
				
			||||||
 | 
					  position: relative;
 | 
				
			||||||
 | 
					  top: 0px;
 | 
				
			||||||
 | 
					  // right: 30;
 | 
				
			||||||
 | 
					  // top: 10px;
 | 
				
			||||||
 | 
					  .itemData {
 | 
				
			||||||
 | 
					    display: inline-block;
 | 
				
			||||||
 | 
					    margin-right: 10px;
 | 
				
			||||||
 | 
					    font-size: 14px;
 | 
				
			||||||
 | 
					    color: #8c8c8c;
 | 
				
			||||||
 | 
					    .block {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    .line {
 | 
				
			||||||
 | 
					      width: 10px;
 | 
				
			||||||
 | 
					      height: 10px;
 | 
				
			||||||
 | 
					      border-radius: 5px;
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
 | 
					      margin-right: 4px;
 | 
				
			||||||
 | 
					      position: relative;
 | 
				
			||||||
 | 
					      .line-block {
 | 
				
			||||||
 | 
					        position: absolute;
 | 
				
			||||||
 | 
					        width: 20px;
 | 
				
			||||||
 | 
					        height: 2px;
 | 
				
			||||||
 | 
					        left: -5px;
 | 
				
			||||||
 | 
					        top: 4px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2024-04-15 10:49:13
 | 
					 * @Date: 2024-04-15 10:49:13
 | 
				
			||||||
 * @LastEditTime: 2024-06-18 13:41:03
 | 
					 * @LastEditTime: 2024-07-10 15:45:28
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -13,63 +13,52 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
 | 
					    <div class="app-container" style="margin-top: 8px;flex-grow: 1; height: auto;">
 | 
				
			||||||
      <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
					      <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
 | 
				
			||||||
        <el-form-item label="时间维度" prop="date">
 | 
					        <el-form-item label="时间维度" prop="type">
 | 
				
			||||||
          <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
 | 
					          <el-select size="small" clearable v-model="listQuery.type" placeholder="请选择" @change="handleChange">
 | 
				
			||||||
            <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
 | 
					            <el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
 | 
				
			||||||
            </el-option>
 | 
					            </el-option>
 | 
				
			||||||
          </el-select>
 | 
					          </el-select>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator="至"
 | 
					          <el-date-picker prefix-icon="el-icon-date" size="small" clearable v-model="listQuery.reportTime"
 | 
				
			||||||
            start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" @change="changeDayTime" end-placeholder="结束日期">
 | 
					            type="daterange" range-separator="至" start-placeholder="开始日期" value-format="yyyy-MM-dd" format="yyyy-MM-dd"
 | 
				
			||||||
 | 
					            @change="changeDayTime" end-placeholder="结束日期">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.start" type="week" format="yyyy 第 WW 周"
 | 
				
			||||||
            style="width: 180px" @change="onValueChange">
 | 
					            placeholder="选择周" style="width: 180px" @change="onValueChange" :picker-options="{'firstDayOfWeek': 1}">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
          至
 | 
					          至
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="end" type="week" format="yyyy 第 WW 周" placeholder="选择周"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.end" type="week" format="yyyy 第 WW 周"
 | 
				
			||||||
            style="width: 180px" @change="onValueChange">
 | 
					            placeholder="选择周" style="width: 180px" @change="onValueChange" :picker-options="{'firstDayOfWeek': 1}">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
 | 
					          <!-- <span v-if="listQuery.start && listQuery.end" style="margin-left: 10px">
 | 
				
			||||||
 | 
					            {{ date1 }} 至 {{ date2 }},共 {{ weekNum }} 周
 | 
				
			||||||
 | 
					          </span> -->
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.type === 2" label="时间值" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 2" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.reportTime" type="monthrange"
 | 
				
			||||||
            value-format="yyyy-MM-DD HH:mm:ss" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"
 | 
					            value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"
 | 
				
			||||||
            @change="changeTime">
 | 
					            @change="changeTime">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <el-form-item v-show="listQuery.type === 3" label="时间值" prop="reportTime">
 | 
					        <el-form-item v-show="listQuery.type === 3" label="时间范围" prop="reportTime">
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.start" value-format="yyyy-MM-dd" type="year"
 | 
				
			||||||
            placeholder="开始时间">
 | 
					            placeholder="开始时间">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
          ~
 | 
					          ~
 | 
				
			||||||
          <el-date-picker size="small" clearable v-model="listQuery.reportTime[1]" value-format="yyyy" type="year"
 | 
					          <el-date-picker size="small" clearable v-model="listQuery.end" value-format="yyyy-MM-dd" type="year"
 | 
				
			||||||
            placeholder="结束时间" @change="getYear">
 | 
					            placeholder="结束时间" @change="getYear">
 | 
				
			||||||
          </el-date-picker>
 | 
					          </el-date-picker>
 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
        <!-- <el-form-item label="玻璃类型" prop="type">
 | 
					 | 
				
			||||||
          <el-select v-model="listQuery.type" placeholder="请选择玻璃类型">
 | 
					 | 
				
			||||||
            <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
 | 
					 | 
				
			||||||
            </el-option>
 | 
					 | 
				
			||||||
          </el-select>
 | 
					 | 
				
			||||||
        </el-form-item> -->
 | 
					 | 
				
			||||||
        <!-- <el-form-item label="玻璃类型" prop="type">
 | 
					 | 
				
			||||||
          <el-select v-model="listQuery.type" placeholder="请选择玻璃类型">
 | 
					 | 
				
			||||||
            <el-option v-for="item in typeList" :key="item.id" :label="item.name" :value="item.id">
 | 
					 | 
				
			||||||
            </el-option>
 | 
					 | 
				
			||||||
          </el-select>
 | 
					 | 
				
			||||||
        </el-form-item> -->
 | 
					 | 
				
			||||||
        <el-form-item>
 | 
					        <el-form-item>
 | 
				
			||||||
          <el-button type="primary" size="small" @click="getDataList">查询</el-button>
 | 
					          <el-button type="primary" size="small" @click="getDataList">查询</el-button>
 | 
				
			||||||
          <el-divider direction="vertical"></el-divider>
 | 
					 | 
				
			||||||
          <!-- <el-button type="primary" size="small" plain @click="handleImport">导入</el-button> -->
 | 
					 | 
				
			||||||
          <el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
 | 
					          <el-button type="primary" size="small" plain @click="handleExport">导出</el-button>
 | 
				
			||||||
          <!-- <el-button type="success" size="small" plain @click="addFactory">新增</el-button> -->
 | 
					 | 
				
			||||||
        </el-form-item>
 | 
					        </el-form-item>
 | 
				
			||||||
      </el-form>
 | 
					      </el-form>
 | 
				
			||||||
      <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize"
 | 
					      <base-table :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.pageNo"
 | 
				
			||||||
        :table-data="tableData">
 | 
					        :limit="listQuery.pageSize" :table-data="tableData" :max-height="tableH">
 | 
				
			||||||
      </base-table>
 | 
					      </base-table>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
@@ -77,7 +66,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// import { parseTime } from '../../core/mixins/code-filter';
 | 
					// import { parseTime } from '../../core/mixins/code-filter';
 | 
				
			||||||
import { getComprehensiveDataPage } from '@/api/report';
 | 
					import { getComprehensiveDataPage, exportComprehensiveDataPage } from '@/api/report';
 | 
				
			||||||
// import { getWorkOrderPage, exportExcel, getOverView } from '@/components/buttonNav'
 | 
					// import { getWorkOrderPage, exportExcel, getOverView } from '@/components/buttonNav'
 | 
				
			||||||
// import inputTable from './inputTable.vue';
 | 
					// import inputTable from './inputTable.vue';
 | 
				
			||||||
// import lineChart from './lineChart';
 | 
					// import lineChart from './lineChart';
 | 
				
			||||||
@@ -97,18 +86,22 @@ export default {
 | 
				
			|||||||
    return {
 | 
					    return {
 | 
				
			||||||
      factoryList,
 | 
					      factoryList,
 | 
				
			||||||
      factoryArray,
 | 
					      factoryArray,
 | 
				
			||||||
      start: undefined,
 | 
					      currentMenu:'邯郸',
 | 
				
			||||||
      end: undefined,
 | 
					 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        pageNo: 1,
 | 
				
			||||||
 | 
					        pageSize: 999,
 | 
				
			||||||
        // size: 10,
 | 
					        // size: 10,
 | 
				
			||||||
        // current: 1,
 | 
					        // current: 1,
 | 
				
			||||||
        factory: null,
 | 
					        factory: undefined,
 | 
				
			||||||
        // total: 0,
 | 
					        // total: 0,
 | 
				
			||||||
        type: 2,
 | 
					        type: 2,
 | 
				
			||||||
        startDate: undefined,
 | 
					        startDate: undefined,
 | 
				
			||||||
        endDate: undefined,
 | 
					        endDate: undefined,
 | 
				
			||||||
 | 
					        start: undefined,
 | 
				
			||||||
 | 
					        end: undefined,
 | 
				
			||||||
        reportTime: []
 | 
					        reportTime: []
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
 | 
					      tableH: this.tableHeight(269),
 | 
				
			||||||
      timeList: [
 | 
					      timeList: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          value: 0,
 | 
					          value: 0,
 | 
				
			||||||
@@ -152,81 +145,51 @@ export default {
 | 
				
			|||||||
          id: 2,
 | 
					          id: 2,
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      tableProps: [
 | 
					      otherProps:[],
 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          prop: 'factory',
 | 
					 | 
				
			||||||
          label: '玻璃类型',
 | 
					 | 
				
			||||||
          fixed:true,
 | 
					 | 
				
			||||||
          // filter: (val) => factoryList[val],
 | 
					 | 
				
			||||||
          // minWidth: 200,
 | 
					 | 
				
			||||||
          // showOverflowtooltip: true
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          prop: 'workOrderNumber',
 | 
					 | 
				
			||||||
          label: '科目/日期',
 | 
					 | 
				
			||||||
          fixed: true,
 | 
					 | 
				
			||||||
          // filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
          prop: 'workOrderType',
 | 
					 | 
				
			||||||
          label: '单位',
 | 
					 | 
				
			||||||
          fixed: true,
 | 
					 | 
				
			||||||
          // filter: publicFormatter('workorder_status')
 | 
					 | 
				
			||||||
          // filter: (val) => ['', '芯片工单', '组件类型', 'bipv类型'][val],
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'plannedInvestment',
 | 
					 | 
				
			||||||
        //   label: '计划投入',
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'actualInvestment',
 | 
					 | 
				
			||||||
        //   label: '实际投入',
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'targetProduction',
 | 
					 | 
				
			||||||
        //   label: '目标产量',
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'actualProduction',
 | 
					 | 
				
			||||||
        //   label: '实际产量',
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'productionProgress',
 | 
					 | 
				
			||||||
        //   label: '生产进度',
 | 
					 | 
				
			||||||
        //   filter: (val) => (val * 100) + '%'
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'orderStatus',
 | 
					 | 
				
			||||||
        //   label: '工单状态',
 | 
					 | 
				
			||||||
        //   filter: publicFormatter('workorder_status')
 | 
					 | 
				
			||||||
        //   // filter: (val) => ['未开始', '生产中', '已完成'][val],
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'startTime',
 | 
					 | 
				
			||||||
        //   label: '开始时间',
 | 
					 | 
				
			||||||
        //   minWidth: 100,
 | 
					 | 
				
			||||||
        //   showOverflowtooltip: true
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   prop: 'endTime',
 | 
					 | 
				
			||||||
        //   label: '完成时间',
 | 
					 | 
				
			||||||
        //   minWidth: 100,
 | 
					 | 
				
			||||||
        //   showOverflowtooltip: true
 | 
					 | 
				
			||||||
        // }
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      tableData: [],
 | 
					      tableData: [],
 | 
				
			||||||
      xAxis: [],
 | 
					      xAxis: [],
 | 
				
			||||||
      currentMenu:null,
 | 
					      // currentMenu:null,
 | 
				
			||||||
      lineData: {},
 | 
					      lineData: {},
 | 
				
			||||||
      data: {}
 | 
					      data: {}
 | 
				
			||||||
      // proLineList: [],
 | 
					      // proLineList: [],
 | 
				
			||||||
      // all: {}
 | 
					      // all: {}
 | 
				
			||||||
    };
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  watch: {
 | 
				
			||||||
 | 
					    currentMenu() {
 | 
				
			||||||
 | 
					      this.getDataList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  computed: {
 | 
					  computed: {
 | 
				
			||||||
    weekNum() {
 | 
					    weekNum() {
 | 
				
			||||||
      return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
 | 
					      return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    tableProps() {
 | 
				
			||||||
 | 
					      return [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: 'type',
 | 
				
			||||||
 | 
					          label: '玻璃类型',
 | 
				
			||||||
 | 
					          fixed: true,
 | 
				
			||||||
 | 
					          // filter: (val) => factoryList[val],
 | 
				
			||||||
 | 
					          // minWidth: 200,
 | 
				
			||||||
 | 
					          // showOverflowtooltip: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: 'item',
 | 
				
			||||||
 | 
					          label: '科目/日期',
 | 
				
			||||||
 | 
					          fixed: true,
 | 
				
			||||||
 | 
					          // filter: (val) => ['玻璃芯片', '标准组件', 'BIPV', '定制组件'][val]
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: 'unit',
 | 
				
			||||||
 | 
					          label: '单位',
 | 
				
			||||||
 | 
					          fixed: true,
 | 
				
			||||||
 | 
					          // filter: publicFormatter('workorder_status')
 | 
				
			||||||
 | 
					          // filter: (val) => ['', '芯片工单', '组件类型', 'bipv类型'][val],
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        ...this.otherProps
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  // created() {
 | 
					  // created() {
 | 
				
			||||||
  //   const currentMonth = new Date()
 | 
					  //   const currentMonth = new Date()
 | 
				
			||||||
@@ -234,68 +197,95 @@ export default {
 | 
				
			|||||||
  //   this.changeTime()
 | 
					  //   this.changeTime()
 | 
				
			||||||
  // },
 | 
					  // },
 | 
				
			||||||
  mounted() {
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableH = this.tableHeight(269);
 | 
				
			||||||
    // this.getOverView()
 | 
					    // this.getOverView()
 | 
				
			||||||
    const currentMonth = new Date()
 | 
					    const today = new Date()
 | 
				
			||||||
    this.listQuery.reportTime = [moment(currentMonth).format('yyyy-MM-DD HH:mm:ss'), moment(currentMonth).format('yyyy-MM-DD HH:mm:ss')]
 | 
					    const sevenDaysAgo = new Date(today.getTime() - (7 * 24 * 60 * 60 * 1000))
 | 
				
			||||||
    this.changeTime()
 | 
					    this.listQuery.startDate = this.getFirstDay()
 | 
				
			||||||
 | 
					    this.listQuery.endDate = this.getLastDay()
 | 
				
			||||||
 | 
					    this.listQuery.reportTime = [this.listQuery.startDate, this.listQuery.endDate]
 | 
				
			||||||
    this.getDataList()
 | 
					    this.getDataList()
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getFirstDay() {
 | 
				
			||||||
 | 
					      //当前月第一天
 | 
				
			||||||
 | 
					      var y = new Date().getFullYear(); //获取年份
 | 
				
			||||||
 | 
					      var m = new Date().getMonth() + 1; //获取月份
 | 
				
			||||||
 | 
					      var d = "01";
 | 
				
			||||||
 | 
					      m = m < 10 ? "0" + m : m; //月份补 0
 | 
				
			||||||
 | 
					      return [y, m, d].join("-");
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getLastDay() {
 | 
				
			||||||
 | 
					      //当前月最后一天
 | 
				
			||||||
 | 
					      var y = new Date().getFullYear(); //获取年份
 | 
				
			||||||
 | 
					      var m = new Date().getMonth() + 1; //获取月份
 | 
				
			||||||
 | 
					      var d = new Date(y, m, 0).getDate(); //获取当月最后一日
 | 
				
			||||||
 | 
					      m = m < 10 ? "0" + m : m; //月份补 0
 | 
				
			||||||
 | 
					      d = d < 10 ? "0" + d : d; //日数补 0
 | 
				
			||||||
 | 
					      return [y, m, d].join("-");
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleChange() {
 | 
				
			||||||
 | 
					      this.listQuery.reportTime = []
 | 
				
			||||||
 | 
					      this.listQuery.end = null
 | 
				
			||||||
 | 
					      this.listQuery.start = null
 | 
				
			||||||
 | 
					      this.listQuery.startDate = null
 | 
				
			||||||
 | 
					      this.listQuery.endDate = null
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    objectSpanMethod({ row, column, rowIndex, columnIndex }) {
 | 
				
			||||||
 | 
					      let spanOneArr = [], concatOne = 0;
 | 
				
			||||||
 | 
					      // let spanTwoArr = [], concatTwo = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      this.tableData.map((item, index) => {
 | 
				
			||||||
 | 
					        // console.log(inde);
 | 
				
			||||||
 | 
					        if (index === 0) {
 | 
				
			||||||
 | 
					          spanOneArr.push(1);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          //第一列需合并相同内容的判断条件
 | 
				
			||||||
 | 
					          if (item.type === this.tableData[index - 1].type) {
 | 
				
			||||||
 | 
					            spanOneArr[concatOne] += 1;
 | 
				
			||||||
 | 
					            spanOneArr.push(0);
 | 
				
			||||||
 | 
					          } else {
 | 
				
			||||||
 | 
					            spanOneArr.push(1);
 | 
				
			||||||
 | 
					            concatOne = index;
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (columnIndex === 1) {
 | 
				
			||||||
 | 
					        const _row = spanOneArr[rowIndex];
 | 
				
			||||||
 | 
					        const _col = _row > 0 ? 1 : 0;
 | 
				
			||||||
 | 
					        return {
 | 
				
			||||||
 | 
					          rowspan: _row,
 | 
				
			||||||
 | 
					          colspan: _col
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    getYear(e) {
 | 
					    getYear(e) {
 | 
				
			||||||
      if (this.end && Number(this.end) - Number(this.start) > 10) {
 | 
					      if (this.listQuery.end - this.listQuery.start > 10 * 365 * 24 * 60 * 60 * 1000) {
 | 
				
			||||||
        this.$message({
 | 
					        this.$message({
 | 
				
			||||||
          message: '年份起止时间不能超过十年',
 | 
					          message: '年份起止时间不能超过十年',
 | 
				
			||||||
          type: 'warning'
 | 
					          type: 'warning'
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
        this.start = undefined
 | 
					        this.listQuery.reportTime = []
 | 
				
			||||||
        this.end = undefined
 | 
					        this.listQuery.start = undefined
 | 
				
			||||||
 | 
					        this.listQuery.end = undefined
 | 
				
			||||||
        // console.log();
 | 
					        // console.log();
 | 
				
			||||||
      } else {
 | 
					      } else {
 | 
				
			||||||
        if (Number(this.end) < Number(this.start)) {
 | 
					        this.listQuery.startDate = this.listQuery.start
 | 
				
			||||||
          this.$message({
 | 
					        this.listQuery.endDate = this.listQuery.end
 | 
				
			||||||
            message: '结束年份不能小于开始年份',
 | 
					 | 
				
			||||||
            type: 'warning'
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
          this.start = undefined
 | 
					 | 
				
			||||||
          this.end = undefined
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          this.listQuery.startDate = Number(this.start)
 | 
					 | 
				
			||||||
          this.listQuery.endDate = Number(this.end)
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (!this.start && !this.end) {
 | 
					      if (!this.listQuery.start && !this.listQuery.end) {
 | 
				
			||||||
        this.listQuery.startDate = undefined
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
        this.listQuery.endDate = undefined
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      // console.log(e);
 | 
					      // console.log(e);
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeTime() {
 | 
					 | 
				
			||||||
      if (this.listQuery.reportTime) {
 | 
					 | 
				
			||||||
        console.log(this.listQuery.reportTime)
 | 
					 | 
				
			||||||
        let start = new Date(this.listQuery.reportTime[0])
 | 
					 | 
				
			||||||
        let end = new Date(this.listQuery.reportTime[1])
 | 
					 | 
				
			||||||
        // const years = Number(this.listQuery.reportTime[1].slice(0, 4)) - Number(this.listQuery.reportTime[0].slice(0, 4))
 | 
					 | 
				
			||||||
        // const months = Number(this.listQuery.reportTime[1].slice(4)) - Number(this.listQuery.reportTime[0].slice(4))
 | 
					 | 
				
			||||||
        // console.log(years);
 | 
					 | 
				
			||||||
        if ((end - start) > 31104000000) {
 | 
					 | 
				
			||||||
          this.$message({
 | 
					 | 
				
			||||||
            message: '时间范围不能超过24个月',
 | 
					 | 
				
			||||||
            type: 'warning'
 | 
					 | 
				
			||||||
          });
 | 
					 | 
				
			||||||
          this.listQuery.reportTime = [];
 | 
					 | 
				
			||||||
        } else {
 | 
					 | 
				
			||||||
          this.listQuery.startDate = this.listQuery.reportTime[0]
 | 
					 | 
				
			||||||
          this.listQuery.endDate = this.listQuery.reportTime[1]
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
      } else {
 | 
					 | 
				
			||||||
        this.listQuery.startDate = undefined
 | 
					 | 
				
			||||||
        this.listQuery.endDate = undefined
 | 
					 | 
				
			||||||
      }
 | 
					 | 
				
			||||||
    },
 | 
					 | 
				
			||||||
    onValueChange(picker, k) { // 选中近k周后触发的操作
 | 
					    onValueChange(picker, k) { // 选中近k周后触发的操作
 | 
				
			||||||
      if (this.start && this.end) {
 | 
					      // console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
 | 
				
			||||||
        this.date1 = moment(this.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
					      if (this.listQuery.start && this.listQuery.end) {
 | 
				
			||||||
        this.date2 = moment(this.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
					        console.log(this.listQuery.reportTime)
 | 
				
			||||||
 | 
					        this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
 | 
					        this.date2 = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
        const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
 | 
					        const numDays = (new Date(this.date2).getTime() - new Date(this.date1).getTime()) / (24 * 3600 * 1000);
 | 
				
			||||||
        if (numDays > 168) {
 | 
					        if (numDays > 168) {
 | 
				
			||||||
          console.log(numDays)
 | 
					          console.log(numDays)
 | 
				
			||||||
@@ -304,20 +294,21 @@ export default {
 | 
				
			|||||||
            type: 'warning'
 | 
					            type: 'warning'
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.listQuery.startDate = this.date1
 | 
					          this.listQuery.startDate = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
 | 
				
			||||||
          this.listQuery.endDate = this.date2
 | 
					          this.listQuery.endDate = moment(this.listQuery.end.getTime() + 5 * 24 * 60 * 60 * 1000).format('YYYY-MM-DD')
 | 
				
			||||||
          // this.listQuery.startDate = Number(moment(this.start.getTime()).format('YYYYWW'))
 | 
					 | 
				
			||||||
          // this.listQuery.endDate = Number(moment(this.end.getTime()).format('YYYYWW'))
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      if (!this.start && !this.end) {
 | 
					      if (!this.listQuery.start && !this.listQuery.end) {
 | 
				
			||||||
        this.listQuery.startDate = undefined
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
        this.listQuery.endDate = undefined
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    changeDayTime() {
 | 
					    changeDayTime() {
 | 
				
			||||||
      if (this.listQuery.reportTime) {
 | 
					      if (this.listQuery.reportTime) {
 | 
				
			||||||
        const numDays = Number(this.listQuery.reportTime[1]) - Number(this.listQuery.reportTime[0])
 | 
					        // this.createStartDate = moment(new Date(this.listQuery.reportTime[0]), 'yyyy-MM-dd hh:mm:ss');
 | 
				
			||||||
 | 
					        // this.createEndDate = moment(new Date(this.listQuery.reportTime[1]), 'yyyy-MM-dd hh:mm:ss');
 | 
				
			||||||
 | 
					        console.log(this.listQuery.reportTime[1])
 | 
				
			||||||
 | 
					        const numDays = (this.listQuery.reportTime[1] - this.listQuery.reportTime[0]) / (24 * 3600 * 1000);
 | 
				
			||||||
        if (numDays > 30) {
 | 
					        if (numDays > 30) {
 | 
				
			||||||
          this.$message({
 | 
					          this.$message({
 | 
				
			||||||
            message: '时间范围不能超过30天',
 | 
					            message: '时间范围不能超过30天',
 | 
				
			||||||
@@ -333,36 +324,213 @@ export default {
 | 
				
			|||||||
        this.listQuery.endDate = undefined
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getOverView() {
 | 
					    changeTime(value) {
 | 
				
			||||||
      // getOverView().then(res => {
 | 
					      if (this.listQuery.reportTime) {
 | 
				
			||||||
      //   this.data = res.data
 | 
					        const numDays = this.listQuery.reportTime[1] - this.listQuery.reportTime[0];
 | 
				
			||||||
      //   console.log('aa', res.data)
 | 
					        if (numDays > 2 * 365 * 24 * 60 * 60 * 1000) {
 | 
				
			||||||
      // })
 | 
					          this.$message({
 | 
				
			||||||
    },
 | 
					            message: '时间范围不能超过24个月',
 | 
				
			||||||
    otherMethods(val) {
 | 
					            type: 'warning'
 | 
				
			||||||
      this.detailOrUpdateVisible = true;
 | 
					          });
 | 
				
			||||||
      // this.addOrEditTitle = "详情";
 | 
					          this.listQuery.reportTime = [];
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					        } else {
 | 
				
			||||||
        // this.$refs.detailOrUpdate.init(val.data.id);
 | 
					          this.listQuery.startDate = this.listQuery.reportTime[0]
 | 
				
			||||||
      });
 | 
					          this.listQuery.endDate = this.listQuery.reportTime[1]
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.listQuery.startDate = undefined
 | 
				
			||||||
 | 
					        this.listQuery.endDate = undefined
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    async getDataList() {
 | 
					    async getDataList() {
 | 
				
			||||||
      console.log(this.listQuery);
 | 
					      console.log(this.listQuery.type);
 | 
				
			||||||
      if (this.listQuery.type == 3) {
 | 
					      if (this.listQuery.type === '') {
 | 
				
			||||||
        this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
 | 
					        this.$message.warning('请选择时间维度!')
 | 
				
			||||||
        this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
 | 
					        return
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
 | 
					      if (!this.listQuery.startDate && !this.listQuery.endDate) {
 | 
				
			||||||
 | 
					        this.$message.warning('请选择起止时间')
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.otherProps = []
 | 
				
			||||||
      let arr  = []
 | 
					      let arr  = []
 | 
				
			||||||
      this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
 | 
					      this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
 | 
				
			||||||
      this.listQuery.factory = arr
 | 
					      this.listQuery.factory = arr
 | 
				
			||||||
      const res = await getComprehensiveDataPage(this.listQuery)
 | 
					      const res = await getComprehensiveDataPage(this.listQuery)
 | 
				
			||||||
      this.tableData = res.data.list
 | 
					      // this.tableData = res.data.list
 | 
				
			||||||
      this.listQuery.total = res.data.total
 | 
					      let dataArr = [{
 | 
				
			||||||
      if (this.listQuery.total > 0) {
 | 
					        type: '芯片',
 | 
				
			||||||
        this.tableData.forEach(item => {
 | 
					        item: 'FTO投入',
 | 
				
			||||||
          item.startTime = item.startDate ? item.startDate[0] + '-' + item.startDate[1] + '-' + item.startDate[2] : '--'
 | 
					        unit: '片'
 | 
				
			||||||
          item.endTime = item.endDate ? item.endDate[0] + '-' + item.endDate[1] + '-' + item.endDate[2] : '--'
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        type: '芯片',
 | 
				
			||||||
 | 
					        item: '芯片产量',
 | 
				
			||||||
 | 
					        unit: '片'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					        type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片平均功率',
 | 
				
			||||||
 | 
					          unit: 'W'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片良率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片总功率',
 | 
				
			||||||
 | 
					          unit: 'MW'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: 'CSS稼动率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片段OEE',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片产能利用率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片人均产量',
 | 
				
			||||||
 | 
					          unit: '片/人'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '芯片',
 | 
				
			||||||
 | 
					          item: '芯片BOM',
 | 
				
			||||||
 | 
					          unit: '元/片'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '标准组件产量',
 | 
				
			||||||
 | 
					          unit: '片'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '标准组件平均功率',
 | 
				
			||||||
 | 
					          unit: 'W'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '标准组件良率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '标准组件总功率',
 | 
				
			||||||
 | 
					          unit: 'MW'
 | 
				
			||||||
 | 
					        }, {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '封装线OEE',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '封装线产能利用率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '标准组件人均产量',
 | 
				
			||||||
 | 
					          unit: '片/人'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: '标准组件',
 | 
				
			||||||
 | 
					          item: '封装BOM',
 | 
				
			||||||
 | 
					          unit: '元/片'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: '芯片使用量',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: 'BIPV产量',
 | 
				
			||||||
 | 
					          unit: '㎡'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: '芯片使用率',
 | 
				
			||||||
 | 
					          unit: '%'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: '人均产量',
 | 
				
			||||||
 | 
					          unit: '㎡/人'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: 'OEM及委外材料成本',
 | 
				
			||||||
 | 
					          unit: '元/片'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: '内部材料成本',
 | 
				
			||||||
 | 
					          unit: '元/片'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'BIPV',
 | 
				
			||||||
 | 
					          item: '综合材料成本',
 | 
				
			||||||
 | 
					          unit: '元/片'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					      res.data.forEach((ele, index) => {
 | 
				
			||||||
 | 
					        let i = index + 1
 | 
				
			||||||
 | 
					        // this.chartMsg.xData.push(ele.titleValue)
 | 
				
			||||||
 | 
					        this.otherProps.push({
 | 
				
			||||||
 | 
					          label: ele.titleValue,
 | 
				
			||||||
 | 
					          filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					          prop: 'value' + i
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      console.log(this.otherProps)
 | 
				
			||||||
 | 
					      res.data.forEach((item, index) => {
 | 
				
			||||||
 | 
					        let i = index + 1
 | 
				
			||||||
 | 
					        let m = 'value' + i
 | 
				
			||||||
 | 
					        // ele.productYieldDataVOList.forEach((item) => {
 | 
				
			||||||
 | 
					          dataArr[0]['' + m + ''] = item.ftoInput
 | 
				
			||||||
 | 
					        dataArr[1]['' + m + ''] = item.chipYield
 | 
				
			||||||
 | 
					        dataArr[2]['' + m + ''] = item.chipAveragePower
 | 
				
			||||||
 | 
					        dataArr[3]['' + m + ''] = item.chipYieldRate
 | 
				
			||||||
 | 
					        dataArr[4]['' + m + ''] = item.chipTotalPower
 | 
				
			||||||
 | 
					        dataArr[5]['' + m + ''] = item.chipCssMarriageRate
 | 
				
			||||||
 | 
					        dataArr[6]['' + m + ''] = item.chipOee
 | 
				
			||||||
 | 
					        dataArr[7]['' + m + ''] = item.chipCapacityUtilizationRate
 | 
				
			||||||
 | 
					        dataArr[8]['' + m + ''] = item.chipAnnualAverageProduction
 | 
				
			||||||
 | 
					        dataArr[9]['' + m + ''] = item.chipBom
 | 
				
			||||||
 | 
					        dataArr[10]['' + m + ''] = item.componentYield
 | 
				
			||||||
 | 
					        dataArr[11]['' + m + ''] = item.componentAveragePower
 | 
				
			||||||
 | 
					        dataArr[12]['' + m + ''] = item.componentYieldRate
 | 
				
			||||||
 | 
					        dataArr[13]['' + m + ''] = item.componentTotalPower
 | 
				
			||||||
 | 
					        dataArr[14]['' + m + ''] = item.componentOee
 | 
				
			||||||
 | 
					        dataArr[15]['' + m + ''] = item.componentCapacityUtilizationRate
 | 
				
			||||||
 | 
					        dataArr[16]['' + m + ''] = item.componentAnnualAverageProduction
 | 
				
			||||||
 | 
					        dataArr[17]['' + m + ''] = item.componentBom
 | 
				
			||||||
 | 
					        dataArr[18]['' + m + ''] = item.bipvChipUsage
 | 
				
			||||||
 | 
					        dataArr[19]['' + m + ''] = item.bipvProductOutput
 | 
				
			||||||
 | 
					        dataArr[20]['' + m + ''] = item.bipvChipUtilizationRate
 | 
				
			||||||
 | 
					        dataArr[21]['' + m + ''] = item.bipvAnnualAverageProduction
 | 
				
			||||||
 | 
					        dataArr[22]['' + m + ''] = item.bipvOeeMaterialCost
 | 
				
			||||||
 | 
					        dataArr[23]['' + m + ''] = item.bipvInsideMaterialCost
 | 
				
			||||||
 | 
					        dataArr[24]['' + m + ''] = item.bipvComprehensiveMaterialCost
 | 
				
			||||||
 | 
					          // dataArr[25]['' + m + ''] = item.bipvComprehensiveMaterialCost
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        // })
 | 
				
			||||||
 | 
					        // ele.titleValue
 | 
				
			||||||
 | 
					        // .push({
 | 
				
			||||||
 | 
					        //   label: ele.titleValue,
 | 
				
			||||||
 | 
					        //   props: 'value' + index + 1,
 | 
				
			||||||
 | 
					        // })
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					      console.log(dataArr);
 | 
				
			||||||
 | 
					      if (res.data.length === 0) {
 | 
				
			||||||
 | 
					        this.tableData = []
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        if (this.currentMenu != '瑞昌') {
 | 
				
			||||||
 | 
					          this.tableData = dataArr
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.tableData = dataArr.filter(function (item) {
 | 
				
			||||||
 | 
					            return item.type !== "BIPV"
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
@@ -392,6 +560,14 @@ export default {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    /** 导出按钮操作 */
 | 
					    /** 导出按钮操作 */
 | 
				
			||||||
    handleExport() {
 | 
					    handleExport() {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      let fileName = "综合数据.xls";
 | 
				
			||||||
 | 
					      exportComprehensiveDataPage(this.listQuery)
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { });
 | 
				
			||||||
      // this.$modal.confirm('是否确认导出工单数据?').then(() => {
 | 
					      // this.$modal.confirm('是否确认导出工单数据?').then(() => {
 | 
				
			||||||
      //   // 处理查询参数
 | 
					      //   // 处理查询参数
 | 
				
			||||||
      //   // let params = {...this.listQuery};
 | 
					      //   // let params = {...this.listQuery};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -96,7 +96,7 @@ export default {
 | 
				
			|||||||
            name: "2",
 | 
					            name: "2",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -110,7 +110,7 @@ export default {
 | 
				
			|||||||
            name: "3",
 | 
					            name: "3",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -187,16 +187,19 @@ export default {
 | 
				
			|||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "yoy",
 | 
					              prop: "yoy",
 | 
				
			||||||
              label: msg.yoyColumn,
 | 
					              label: msg.yoyColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "queryValue",
 | 
					              prop: "queryValue",
 | 
				
			||||||
              label: msg.queryColumn,
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              prop: "target",
 | 
					              prop: "target",
 | 
				
			||||||
              label: msg.targetColumn,
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
              minWidth: 150,
 | 
					              minWidth: 150,
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          ];
 | 
					          ];
 | 
				
			||||||
@@ -270,7 +273,7 @@ export default {
 | 
				
			|||||||
            name: "2",
 | 
					            name: "2",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -284,7 +287,7 @@ export default {
 | 
				
			|||||||
            name: "3",
 | 
					            name: "3",
 | 
				
			||||||
            data: [],
 | 
					            data: [],
 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
					      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="containerBottom">
 | 
					    <div class="containerBottom">
 | 
				
			||||||
      <div class="smallTitle">4月FTO/基片投入</div>
 | 
					      <div class="smallTitle">FTO/基片投入</div>
 | 
				
			||||||
      <bm-line-bar
 | 
					      <bm-line-bar
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
@@ -26,101 +26,61 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import bmSearchBar from "../components/bmSearchBar.vue";
 | 
					import bmSearchBar from "../components/bmSearchBar.vue";
 | 
				
			||||||
import BmLineBar from "../components/bmLineBar.vue";
 | 
					import BmLineBar from "../components/bmLineBar.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  fTOReportByDateRangePage,
 | 
				
			||||||
    prop: "factory",
 | 
					  fTOReportByDateRangeExport,
 | 
				
			||||||
    label: "工厂名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
    minWidth: 200,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "name",
 | 
					 | 
				
			||||||
    label: "科目",
 | 
					 | 
				
			||||||
    minWidth: 120,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
    minWidth: 80,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "mubiao",
 | 
					 | 
				
			||||||
    label: "目标值",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "FtoOutputBM",
 | 
					  name: "FtoOutputBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      factoryList: [
 | 
				
			||||||
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "factory",
 | 
				
			||||||
 | 
					          label: "工厂名称",
 | 
				
			||||||
 | 
					          filter: (val) => this.factoryList[val].name,
 | 
				
			||||||
 | 
					          minWidth: 150,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "科目",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
 | 
					        { id: 1, name: "", type: 2, color: "#FFCE6A" },
 | 
				
			||||||
        { id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
 | 
					        { id: 2, name: "", type: 1, color: "#8EF0AB" },
 | 
				
			||||||
        { id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 3, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg: {
 | 
				
			||||||
        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/片",
 | 
					        yName: "单位/片",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月目标值",
 | 
					            name: "1",
 | 
				
			||||||
            // data: [3000, 2000, 3000],
 | 
					            data: [],
 | 
				
			||||||
            // data: [6800, 5000, 8900],
 | 
					 | 
				
			||||||
            // data: [12000, 17000, 19000],
 | 
					 | 
				
			||||||
            data: [560000, 540000, 600000],
 | 
					 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            symbol: "circle",
 | 
					            symbol: "circle",
 | 
				
			||||||
            symbolSize: 6,
 | 
					            symbolSize: 6,
 | 
				
			||||||
@@ -130,30 +90,24 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "2",
 | 
				
			||||||
            // data: [2100, 800, 1500],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9500, 7200, 9901],
 | 
					 | 
				
			||||||
            // data: [14666, 15000, 17888],
 | 
					 | 
				
			||||||
            data: [550000, 456666, 590000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-5, -16],
 | 
					              // position: [-5, -16],
 | 
				
			||||||
              // position: [-10, -16],
 | 
					              position: [-10, -16],
 | 
				
			||||||
              position: [-17, -16],
 | 
					              // position: [-17, -16],
 | 
				
			||||||
              color: "#68C483",
 | 
					              color: "#68C483",
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "3",
 | 
				
			||||||
            // data: [2100, 900, 1300],
 | 
					            data: [],
 | 
				
			||||||
            // data: [9100, 7300, 9700],
 | 
					 | 
				
			||||||
            // data: [14666, 15300, 18000],
 | 
					 | 
				
			||||||
            data: [556666, 456666, 650000],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -188,6 +142,13 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.date = 2;
 | 
				
			||||||
 | 
					    this.listQuery.queryTime = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.listQuery.factorys = [];
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -206,59 +167,159 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.date = val.type;
 | 
				
			||||||
      console.log("==========下面是测试代码,需删除");
 | 
					      this.listQuery.queryTime = val.startDate;
 | 
				
			||||||
      this.chartMsg.series = [];
 | 
					      this.listQuery.factorys = val.factory;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出=====下面是测试代码,需删除");
 | 
					      this.tableProps = [];
 | 
				
			||||||
      this.chartMsg.series = [
 | 
					      fTOReportByDateRangePage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
        {
 | 
					        if (res.data && res.data.length > 0) {
 | 
				
			||||||
          name: "2024年4月目标值1",
 | 
					          // 设置表头
 | 
				
			||||||
          // data: [3000, 2000, 3000],
 | 
					          let msg = res.data[0];
 | 
				
			||||||
          // data: [6800, 5000, 8900],
 | 
					          let arr = [
 | 
				
			||||||
          // data: [12000, 17000, 19000],
 | 
					            {
 | 
				
			||||||
          data: [560000, 540000, 600000],
 | 
					              prop: "lastone",
 | 
				
			||||||
          type: "line",
 | 
					              label: msg.lastone.reportTime,
 | 
				
			||||||
          symbol: "circle",
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
          symbolSize: 6,
 | 
					              minWidth: 150,
 | 
				
			||||||
          label: {
 | 
					            },
 | 
				
			||||||
            show: true,
 | 
					            {
 | 
				
			||||||
            color: "#FFAE17",
 | 
					              prop: "currentone",
 | 
				
			||||||
 | 
					              label: msg.currentone.reportTime,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "targetone",
 | 
				
			||||||
 | 
					              label: msg.targetone.reportTime,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? val : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          // 整理表格数据
 | 
				
			||||||
 | 
					          let tableArr = [];
 | 
				
			||||||
 | 
					          res.data.forEach((item) => {
 | 
				
			||||||
 | 
					            let obj = {};
 | 
				
			||||||
 | 
					            obj.factory = item.factory;
 | 
				
			||||||
 | 
					            obj.item = "FTO投入";
 | 
				
			||||||
 | 
					            obj.unit = "片";
 | 
				
			||||||
 | 
					            obj.lastone = item.lastone.total;
 | 
				
			||||||
 | 
					            obj.currentone = item.currentone.total;
 | 
				
			||||||
 | 
					            obj.targetone = item.targetone.total;
 | 
				
			||||||
 | 
					            tableArr.push(obj);
 | 
				
			||||||
 | 
					          });
 | 
				
			||||||
 | 
					          this.tableData = tableArr;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetone.reportTime;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.lastone.reportTime;
 | 
				
			||||||
 | 
					          this.legendList[2].name = msg.currentone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[0].name = msg.targetone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[1].name = msg.lastone.reportTime;
 | 
				
			||||||
 | 
					          this.chartMsg.series[2].name = msg.currentone.reportTime;
 | 
				
			||||||
 | 
					          // 设置偏移量
 | 
				
			||||||
 | 
					          switch (this.listQuery.type) {
 | 
				
			||||||
 | 
					            case 0:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 1:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-5, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            case 2:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-10, -16];
 | 
				
			||||||
 | 
					              break;
 | 
				
			||||||
 | 
					            default:
 | 
				
			||||||
 | 
					              this.chartMsg.series[1].label.position = [-17, -16];
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      let xData = [];
 | 
				
			||||||
 | 
					      let lineData = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        this.factoryList.map((item) => {
 | 
				
			||||||
 | 
					          if (item.id === val[i].factory) {
 | 
				
			||||||
 | 
					            xData.push(item.name);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        lineData.push(val[i].targetone.total || 0);
 | 
				
			||||||
 | 
					        barData1.push(val[i].lastone.total || 0);
 | 
				
			||||||
 | 
					        barData2.push(val[i].currentone.total || 0);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[0].data = lineData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[1].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg.series[2].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg = {
 | 
				
			||||||
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/片",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "line",
 | 
				
			||||||
 | 
					            symbol: "circle",
 | 
				
			||||||
 | 
					            symbolSize: 6,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              color: "#FFAE17",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					          {
 | 
				
			||||||
        {
 | 
					            name: "2",
 | 
				
			||||||
          name: "2023年4月",
 | 
					            data: [],
 | 
				
			||||||
          // data: [2100, 800, 1500],
 | 
					            type: "bar",
 | 
				
			||||||
          // data: [9500, 7200, 9901],
 | 
					              barWidth: 16,
 | 
				
			||||||
          // data: [14666, 15000, 17888],
 | 
					            label: {
 | 
				
			||||||
          data: [550000, 456666, 590000],
 | 
					              show: true,
 | 
				
			||||||
          type: "bar",
 | 
					              // position: [-5, -16],
 | 
				
			||||||
          barWidth: 20,
 | 
					              // position: [-5, -16],
 | 
				
			||||||
          label: {
 | 
					              position: [-10, -16],
 | 
				
			||||||
            show: true,
 | 
					              // position: [-17, -16],
 | 
				
			||||||
            // position: [-5, -16],
 | 
					              color: "#68C483",
 | 
				
			||||||
            // position: [-5, -16],
 | 
					            },
 | 
				
			||||||
            // position: [-10, -16],
 | 
					 | 
				
			||||||
            position: [-17, -16],
 | 
					 | 
				
			||||||
            color: "#68C483",
 | 
					 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					          {
 | 
				
			||||||
        {
 | 
					            name: "3",
 | 
				
			||||||
          name: "2024年4月",
 | 
					            data: [],
 | 
				
			||||||
          // data: [2100, 900, 1300],
 | 
					            type: "bar",
 | 
				
			||||||
          // data: [9100, 7300, 9700],
 | 
					              barWidth: 16,
 | 
				
			||||||
          // data: [14666, 15300, 18000],
 | 
					            label: {
 | 
				
			||||||
          data: [556666, 456666, 650000],
 | 
					              show: true,
 | 
				
			||||||
          type: "bar",
 | 
					              position: [0, -16],
 | 
				
			||||||
          barWidth: 20,
 | 
					              color: "#288AFF",
 | 
				
			||||||
          label: {
 | 
					            },
 | 
				
			||||||
            show: true,
 | 
					 | 
				
			||||||
            position: [0, -16],
 | 
					 | 
				
			||||||
            color: "#288AFF",
 | 
					 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
        },
 | 
					        ],
 | 
				
			||||||
      ];
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      let fileName = "产量对标FTO.xls";
 | 
				
			||||||
 | 
					      fTOReportByDateRangeExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,7 +4,7 @@
 | 
				
			|||||||
      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
					      <bmSearchBar @getSearch="getSearch" @handleExport="handleExport" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="containerBottom">
 | 
					    <div class="containerBottom">
 | 
				
			||||||
      <div class="smallTitle">4月封装OEE</div>
 | 
					      <div class="smallTitle">封装OEE</div>
 | 
				
			||||||
      <bm-line-bar
 | 
					      <bm-line-bar
 | 
				
			||||||
        :chartHeight="chartHeight"
 | 
					        :chartHeight="chartHeight"
 | 
				
			||||||
        :legendList="legendList"
 | 
					        :legendList="legendList"
 | 
				
			||||||
@@ -26,102 +26,61 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import bmSearchBar from "../components/bmSearchBar.vue";
 | 
					import bmSearchBar from "../components/bmSearchBar.vue";
 | 
				
			||||||
import BmLineBar from "../components/bmLineBar.vue";
 | 
					import BmLineBar from "../components/bmLineBar.vue";
 | 
				
			||||||
const tableProps = [
 | 
					import {
 | 
				
			||||||
  {
 | 
					  componentOEEPage,
 | 
				
			||||||
    prop: "factory",
 | 
					  componentOEEExport,
 | 
				
			||||||
    label: "工厂名称",
 | 
					} from "@/api/report/benchmarking.js";
 | 
				
			||||||
    // filter: (val) => factoryList[val],
 | 
					import moment from "moment";
 | 
				
			||||||
    minWidth: 200,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "name",
 | 
					 | 
				
			||||||
    label: "科目",
 | 
					 | 
				
			||||||
    minWidth: 120,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "unit",
 | 
					 | 
				
			||||||
    label: "单位",
 | 
					 | 
				
			||||||
    minWidth: 80,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time1",
 | 
					 | 
				
			||||||
    label: "时间1",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "time2",
 | 
					 | 
				
			||||||
    label: "时间2",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: "mubiao",
 | 
					 | 
				
			||||||
    label: "目标值",
 | 
					 | 
				
			||||||
    minWidth: 150,
 | 
					 | 
				
			||||||
    showOverflowtooltip: true,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
];
 | 
					 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  name: "PackageOEEBM",
 | 
					  name: "PackageOEEBM",
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      tableProps,
 | 
					      factoryList: [
 | 
				
			||||||
 | 
					        { id: 0, name: "瑞昌" },
 | 
				
			||||||
 | 
					        { id: 1, name: "邯郸" },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      tableProps: [],
 | 
				
			||||||
 | 
					      tableProps1: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "factory",
 | 
				
			||||||
 | 
					          label: "工厂名称",
 | 
				
			||||||
 | 
					          filter: (val) => this.factoryList[val].name,
 | 
				
			||||||
 | 
					          minWidth: 150,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "item",
 | 
				
			||||||
 | 
					          label: "科目",
 | 
				
			||||||
 | 
					          minWidth: 120,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          prop: "unit",
 | 
				
			||||||
 | 
					          label: "单位",
 | 
				
			||||||
 | 
					          minWidth: 80,
 | 
				
			||||||
 | 
					          showOverflowtooltip: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        current: 1,
 | 
					        current: 1,
 | 
				
			||||||
        size: 1000,
 | 
					        size: 100,
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableData: [
 | 
					      tableData: [],
 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
        { factory: "工厂1" },
 | 
					 | 
				
			||||||
      ],
 | 
					 | 
				
			||||||
      chartHeight: this.tableHeight(269) / 2,
 | 
					      chartHeight: this.tableHeight(269) / 2,
 | 
				
			||||||
      tableH: this.tableHeight(269) / 2,
 | 
					      tableH: this.tableHeight(269) / 2,
 | 
				
			||||||
      legendList: [
 | 
					      legendList: [
 | 
				
			||||||
        { id: 1, name: "2024年4月目标值", type: 2, color: "#FFCE6A" },
 | 
					        { id: 1, name: "", type: 2, color: "#FFCE6A" },
 | 
				
			||||||
        { id: 2, name: "2023年4月", type: 1, color: "#8EF0AB" },
 | 
					        { id: 2, name: "", type: 1, color: "#8EF0AB" },
 | 
				
			||||||
        { id: 3, name: "2024年4月", type: 1, color: "#288AFF" },
 | 
					        { id: 3, name: "", type: 1, color: "#288AFF" },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      chartMsg: {
 | 
					      chartMsg: {
 | 
				
			||||||
        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
        xData: ["成都", "邯郸", "瑞昌"],
 | 
					        xData: [],
 | 
				
			||||||
        yName: "单位/%",
 | 
					        yName: "单位/%",
 | 
				
			||||||
        series: [
 | 
					        series: [
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月目标值",
 | 
					            name: "1",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
              { name: "%", value: 85 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "line",
 | 
					            type: "line",
 | 
				
			||||||
            symbol: "circle",
 | 
					            symbol: "circle",
 | 
				
			||||||
            symbolSize: 6,
 | 
					            symbolSize: 6,
 | 
				
			||||||
@@ -134,14 +93,10 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2023年4月",
 | 
					            name: "2",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 57.5 },
 | 
					 | 
				
			||||||
              { name: "%", value: 21.66 },
 | 
					 | 
				
			||||||
              { name: "%", value: 18.4 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [-18, -16],
 | 
					              position: [-18, -16],
 | 
				
			||||||
@@ -152,14 +107,10 @@ export default {
 | 
				
			|||||||
            },
 | 
					            },
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            name: "2024年4月",
 | 
					            name: "3",
 | 
				
			||||||
            data: [
 | 
					            data: [],
 | 
				
			||||||
              { name: "%", value: 23.33 },
 | 
					 | 
				
			||||||
              { name: "%", value: 7.02 },
 | 
					 | 
				
			||||||
              { name: "%", value: 80.2 },
 | 
					 | 
				
			||||||
            ],
 | 
					 | 
				
			||||||
            type: "bar",
 | 
					            type: "bar",
 | 
				
			||||||
            barWidth: 20,
 | 
					              barWidth: 16,
 | 
				
			||||||
            label: {
 | 
					            label: {
 | 
				
			||||||
              show: true,
 | 
					              show: true,
 | 
				
			||||||
              position: [0, -16],
 | 
					              position: [0, -16],
 | 
				
			||||||
@@ -197,6 +148,13 @@ export default {
 | 
				
			|||||||
    this.chartHeight = this.tableHeight(269) / 2;
 | 
					    this.chartHeight = this.tableHeight(269) / 2;
 | 
				
			||||||
    window.addEventListener("resize", this._setTableHeight);
 | 
					    window.addEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    this.tableProp = this.tableProp1;
 | 
				
			||||||
 | 
					    this.listQuery.type = 2;
 | 
				
			||||||
 | 
					    this.listQuery.startDate = moment().format("yyyy-MM-DD");
 | 
				
			||||||
 | 
					    this.listQuery.factory = [];
 | 
				
			||||||
 | 
					    this.getList();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  destroyed() {
 | 
					  destroyed() {
 | 
				
			||||||
    window.removeEventListener("resize", this._setTableHeight);
 | 
					    window.removeEventListener("resize", this._setTableHeight);
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
@@ -215,11 +173,144 @@ export default {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    getSearch(val) {
 | 
					    getSearch(val) {
 | 
				
			||||||
      console.log(val);
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
      console.log("=========================");
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      this.getList();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    handleExport() {
 | 
					    getList() {
 | 
				
			||||||
      console.log("导出");
 | 
					      this.tableProps = [];
 | 
				
			||||||
 | 
					      componentOEEPage({ ...this.listQuery }).then((res) => {
 | 
				
			||||||
 | 
					        if (res.data && res.data.records.length > 0) {
 | 
				
			||||||
 | 
					          let msg = res.data.records[0];
 | 
				
			||||||
 | 
					          let arr = [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "yoy",
 | 
				
			||||||
 | 
					              label: msg.yoyColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "queryValue",
 | 
				
			||||||
 | 
					              label: msg.queryColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              prop: "target",
 | 
				
			||||||
 | 
					              label: msg.targetColumn,
 | 
				
			||||||
 | 
					              filter: (val) => (val || val === 0 ? parseFloat(val.toFixed(2)) : "-"),
 | 
				
			||||||
 | 
					              minWidth: 150,
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ];
 | 
				
			||||||
 | 
					          this.tableProps = this.tableProps1.concat(arr);
 | 
				
			||||||
 | 
					          this.tableData = res.data.records;
 | 
				
			||||||
 | 
					          // 设置图例
 | 
				
			||||||
 | 
					          this.legendList[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.legendList[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.legendList[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[0].name = msg.targetColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[1].name = msg.yoyColumn;
 | 
				
			||||||
 | 
					          this.chartMsg.series[2].name = msg.queryColumn;
 | 
				
			||||||
 | 
					          // 设置chartMsg的series的数据
 | 
				
			||||||
 | 
					          this.setChartMsg(res.data.records);
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // 重置
 | 
				
			||||||
 | 
					          this.resetMsg();
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    setChartMsg(val) {
 | 
				
			||||||
 | 
					      let xData = [];
 | 
				
			||||||
 | 
					      let lineData = [];
 | 
				
			||||||
 | 
					      let barData1 = [];
 | 
				
			||||||
 | 
					      let barData2 = [];
 | 
				
			||||||
 | 
					      for (let i = 0; i < val.length; i++) {
 | 
				
			||||||
 | 
					        this.factoryList.map((item) => {
 | 
				
			||||||
 | 
					          if (item.id === val[i].factory) {
 | 
				
			||||||
 | 
					            xData.push(item.name);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        lineData.push({
 | 
				
			||||||
 | 
					          name: "%",
 | 
				
			||||||
 | 
					          value: val[i].target || 0,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        barData1.push({ name: "%", value: val[i].yoy || 0 });
 | 
				
			||||||
 | 
					        barData2.push({
 | 
				
			||||||
 | 
					          name: "%",
 | 
				
			||||||
 | 
					          value: val[i].queryValue || 0,
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[0].data = lineData;
 | 
				
			||||||
 | 
					      this.chartMsg.series[1].data = barData1;
 | 
				
			||||||
 | 
					      this.chartMsg.series[2].data = barData2;
 | 
				
			||||||
 | 
					      this.chartMsg.xData = xData;
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    resetMsg() {
 | 
				
			||||||
 | 
					      this.tableProps = this.tableProps1;
 | 
				
			||||||
 | 
					      this.tableData = [];
 | 
				
			||||||
 | 
					      this.chartMsg = {
 | 
				
			||||||
 | 
					        color: ["#FFCE6A", "#8EF0AB", "#288AFF"],
 | 
				
			||||||
 | 
					        xData: [],
 | 
				
			||||||
 | 
					        yName: "单位/%",
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "1",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "line",
 | 
				
			||||||
 | 
					            symbol: "circle",
 | 
				
			||||||
 | 
					            symbolSize: 6,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              color: "#FFAE17",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "2",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [-18, -16],
 | 
				
			||||||
 | 
					              color: "#68C483",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: "3",
 | 
				
			||||||
 | 
					            data: [],
 | 
				
			||||||
 | 
					            type: "bar",
 | 
				
			||||||
 | 
					              barWidth: 16,
 | 
				
			||||||
 | 
					            label: {
 | 
				
			||||||
 | 
					              show: true,
 | 
				
			||||||
 | 
					              position: [0, -16],
 | 
				
			||||||
 | 
					              color: "#288AFF",
 | 
				
			||||||
 | 
					              formatter: function (params) {
 | 
				
			||||||
 | 
					                return params.value.toFixed(2) + "%";
 | 
				
			||||||
 | 
					              },
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleExport(val) {
 | 
				
			||||||
 | 
					      this.listQuery.type = val.type;
 | 
				
			||||||
 | 
					      this.listQuery.startDate = val.startDate;
 | 
				
			||||||
 | 
					      this.listQuery.factory = val.factory;
 | 
				
			||||||
 | 
					      let fileName = "封装OEE对标.xls";
 | 
				
			||||||
 | 
					      componentOEEExport({ ...this.listQuery })
 | 
				
			||||||
 | 
					        .then((response) => {
 | 
				
			||||||
 | 
					          this.$download.excel(response, fileName);
 | 
				
			||||||
 | 
					          this.$message.success("导出成功");
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 
 | 
				
			|||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user