Compare commits
	
		
			48 Commits
		
	
	
		
			projects/m
			...
			6b452dce36
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 6b452dce36 | |||
| 1b2c16fcdb | |||
| 475ec35ec5 | |||
| 1328da9616 | |||
| 92b9ec7da7 | |||
| c1af47db81 | |||
| 15afbcd612 | |||
|  | dabbc6b63a | ||
|  | cfab3353d3 | ||
|  | 2298fc56b6 | ||
| bb77d0f8c6 | |||
|  | e8938a62eb | ||
|  | 2a599d96b3 | ||
|  | 6050eb4df5 | ||
| 02c3b3db0d | |||
| 3308fcbef9 | |||
| cb7135bad5 | |||
| 4a56f92961 | |||
|  | 8f11c2f47c | ||
|  | b41dc9593c | ||
| 862fe20760 | |||
| 1ed409a98e | |||
| 68e738cf12 | |||
|  | 4866198a98 | ||
|  | 49df8a72bd | ||
|  | 087af452de | ||
|  | 63a753d7d6 | ||
| b1cdf083dd | |||
| 673ddcb996 | |||
| a9e60dbe82 | |||
|  | 92d197a513 | ||
|  | e7f440a142 | ||
| 5d3622bf62 | |||
| 5ccb9297e1 | |||
| ce528f18b6 | |||
|  | 024060182e | ||
|  | 4f111a95d6 | ||
| 8fc6b73179 | |||
| 7f504e5cdd | |||
| 7c5d8bde0b | |||
|  | 0b1761e83c | ||
|  | cafa156d72 | ||
| ed46ed7d09 | |||
|  | f89c6dfe14 | ||
|  | a3b2eae33f | ||
| e70ff40554 | |||
| 93236f9828 | |||
|  | fef8824844 | 
							
								
								
									
										34
									
								
								.env.dev
									
									
									
									
									
								
							
							
						
						
									
										34
									
								
								.env.dev
									
									
									
									
									
								
							| @@ -1,8 +1,8 @@ | ||||
| ### | ||||
|  # @Author: Do not edit | ||||
|  # @Date: 2023-08-29 09:40:39 | ||||
|  # @LastEditTime: 2024-04-08 16:46:49 | ||||
|  # @LastEditors: DY | ||||
|  # @Author: zhp | ||||
|  # @Date: 2024-04-12 14:30:48 | ||||
|  # @LastEditTime: 2024-04-12 14:31:16 | ||||
|  # @LastEditors: zhp | ||||
|  # @Description: | ||||
| ### | ||||
| # 开发环境配置 | ||||
| @@ -12,26 +12,18 @@ ENV = 'development' | ||||
| VUE_APP_TITLE = MES系统 | ||||
|  | ||||
| # 芋道管理系统/开发环境 | ||||
| # VUE_APP_BASE_API = 'http://100.64.0.26:48082' | ||||
| # VUE_APP_BASE_API = 'http://10.70.2.2:8080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.20:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.2.173:48080' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.49:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.8:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.4.173:9001' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.104:48082' | ||||
| VUE_APP_BASE_API = 'http://192.168.0.33:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.62:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.78:48082' | ||||
| # VUE_APP_BASE_API = 'http://192.168.1.47:48082' | ||||
| # socket地址 | ||||
| # VUE_APP_Socket_API = 'ws://10.70.2.2:8080' | ||||
| # VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' | ||||
| VUE_APP_Socket_API = 'ws://192.168.0.33:48082' | ||||
| VUE_APP_Socket_Dcs_API = 'ws://192.168.0.33:8080' | ||||
|  | ||||
| # 积木报表指向地址 | ||||
| VUE_APP_JIMU_API = 'http://10.70.2.22:8080' | ||||
| VUE_APP_JIMU_API = 'http://192.168.0.33:48082' | ||||
|  | ||||
| # socket地址(现场) | ||||
| # VUE_APP_Socket_API = 'ws://10.70.2.2:8080' | ||||
| # socket地址(公司线上) | ||||
| VUE_APP_Socket_API = 'ws://192.168.0.33:48082' | ||||
| # socket dcs地址(只有现场) | ||||
| VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' | ||||
|  | ||||
|  | ||||
| # 路由懒加载 | ||||
| VUE_CLI_BABEL_TRANSPILE_MODULES = true | ||||
|   | ||||
| @@ -1,11 +1,4 @@ | ||||
| ### | ||||
|  # @Author: zhp | ||||
|  # @Date: 2023-11-07 19:11:40 | ||||
|  # @LastEditTime: 2023-11-16 16:40:59 | ||||
|  # @LastEditors: zhp | ||||
|  # @Description: | ||||
| ### | ||||
| # 生产环境配置 | ||||
| # 生产环境配置(许昌现场) | ||||
| ENV = 'production' | ||||
|  | ||||
| # 页面标题 | ||||
|   | ||||
| @@ -1,4 +1,4 @@ | ||||
| # 生产环境配置 | ||||
| # 公司线上环境(33服务器) | ||||
| ENV = 'production' | ||||
|  | ||||
| # 页面标题 | ||||
| @@ -7,15 +7,12 @@ VUE_APP_TITLE = MES系统 | ||||
| # 芋道管理系统/生产环境 | ||||
| VUE_APP_BASE_API = '/prod-api' | ||||
|  | ||||
| # dcs地址 | ||||
| VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' | ||||
| # socket地址 | ||||
| VUE_APP_Socket_API = 'ws://10.70.2.2:8080' | ||||
|  | ||||
| # 积木报表指向地址 | ||||
| VUE_APP_JIMU_API = 'http://192.168.0.33:48082' | ||||
| # socket地址 | ||||
| VUE_APP_Socket_API = 'ws://192.168.0.33:48082' | ||||
| # dcs地址(只有现场的) | ||||
| VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' | ||||
|  | ||||
|  | ||||
| # 根据服务器或域名修改 | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-11-06 15:38:12 | ||||
|  * @LastEditTime: 2023-12-15 15:29:16 | ||||
|  * @LastEditTime: 2024-04-11 14:57:02 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
| @@ -94,7 +94,7 @@ export function getWorkerList(query) { | ||||
|  | ||||
| export function getMaterialCheckList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-hot-material-check/listByMaterial', | ||||
|     url: 'base/quality-hot-material-det/filterList', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
| @@ -102,7 +102,7 @@ export function getMaterialCheckList(query) { | ||||
|  | ||||
| export function createQualityHotMaterialDet(query){ | ||||
|    return request({ | ||||
|     url: '/base/quality-hot-material-det/create', | ||||
|     url: 'base/quality-hot-material-det/createBatch', | ||||
|     method: 'post', | ||||
|     data: query | ||||
|   }) | ||||
| @@ -110,7 +110,7 @@ export function createQualityHotMaterialDet(query){ | ||||
|  | ||||
| export function updateQualityHotMaterialDet(query){ | ||||
|    return request({ | ||||
|     url: '/base/quality-hot-material-det/listbyfilter', | ||||
|     url: 'base/quality-hot-material-det/updateBatch', | ||||
|     method: 'put', | ||||
|     data: query | ||||
|   }) | ||||
| @@ -118,7 +118,7 @@ export function updateQualityHotMaterialDet(query){ | ||||
|  | ||||
| export function getQualityHotMaterialDetList(query){ | ||||
|    return request({ | ||||
|     url: '/base/quality-hot-material-det/listbyfilter', | ||||
|     url: '/base/quality-hot-material-det/filterList', | ||||
|     method: 'get', | ||||
|     params: query | ||||
|   }) | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-11-07 15:02:37 | ||||
|  * @LastEditTime: 2023-11-07 18:32:07 | ||||
|  * @LastEditTime: 2024-04-09 15:14:42 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| /* | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-11-07 14:10:18 | ||||
|  * @LastEditTime: 2023-11-16 17:49:52 | ||||
|  * @LastEditTime: 2024-04-11 16:16:05 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
|  */ | ||||
| @@ -18,14 +18,14 @@ export function getStatisticalDataPage(query) { | ||||
|  | ||||
| export function getWorkOrderList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-work-order/listbyfilter', | ||||
|     url: 'base/core-work-order/listbyfilter', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
| } | ||||
| export function getProductList(query) { | ||||
|   return request({ | ||||
|     url: '/base/core-product/listAll', | ||||
|     url: 'base/core-product/listAll', | ||||
|     method: 'get', | ||||
|     params: query, | ||||
|   }) | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2024-01-29 16:50:26 | ||||
|  * @LastEditTime: 2024-04-07 16:05:59 | ||||
|  * @LastEditTime: 2024-04-11 09:55:04 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2024-01-29 13:45:56 | ||||
|  * @LastEditTime: 2024-03-13 08:58:01 | ||||
|  * @LastEditTime: 2024-04-11 11:02:53 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
| @@ -26,7 +26,7 @@ export default { | ||||
| 		return { | ||||
| 			chart: null, | ||||
| 			// notMsg:true, | ||||
| 			colors:['#2760ff', '#518eec', '#0ee8e4', '#ddb523'], | ||||
|       colors: ['#2760ff', '#518eec', '#49FBD6', '#ddb523'], | ||||
| 			chartData: [] | ||||
| 		}; | ||||
| 	}, | ||||
| @@ -45,7 +45,32 @@ export default { | ||||
| 				this.$emit('emitFun') | ||||
| 			} | ||||
| 		} | ||||
| 	}, | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.chartData = [ | ||||
|       { | ||||
|         name: '细长泡', | ||||
|         num: 1112, | ||||
|         yield: 0.97, | ||||
|       }, | ||||
|       { | ||||
|         name: '长泡', | ||||
|         num: 1112, | ||||
|         yield: 0.97, | ||||
|       }, | ||||
|        { | ||||
|          name: '开口泡', | ||||
|         num: 1112, | ||||
|         yield: 0.97, | ||||
|       }, | ||||
|        { | ||||
|          name: '结石', | ||||
|         num: 1112, | ||||
|         yield: 0.97, | ||||
|       } | ||||
|     ] | ||||
|     this.updateChart() | ||||
|   }, | ||||
| 	methods: { | ||||
| 		updateChart() { | ||||
| 			console.log('update') | ||||
| @@ -71,7 +96,7 @@ export default { | ||||
| 				color:this.colors, | ||||
| 				title:{ | ||||
| 					text: num, | ||||
| 					subtext: '总数', | ||||
| 					subtext: '总数/片', | ||||
| 					top: '32%', | ||||
| 					left: '49%', | ||||
| 					textAlign: 'center', | ||||
| @@ -89,7 +114,7 @@ export default { | ||||
| 					left: 'center', | ||||
| 					itemWidth: 12, | ||||
| 					itemHeight:12, | ||||
|           icon: 'rect', | ||||
|           icon: 'roundRect', | ||||
| 					textStyle: { | ||||
| 						color: '#fff' | ||||
| 					}, | ||||
| @@ -107,21 +132,36 @@ export default { | ||||
| 						radius: ['45%', '70%'], | ||||
| 						avoidLabelOverlap: true, | ||||
| 						label: { | ||||
| 							show: false | ||||
|               show: true, | ||||
|             normal: { | ||||
|               // 各分区的提示内容 | ||||
|               // params: 即下面传入的data数组,通过自定义函数,展示你想要的内容和格式 | ||||
|               formatter: function (params) { | ||||
|                 console.log(params); | ||||
|                 return params.value + " | " + params.percent.toFixed(0) + "%" + "\n\n" + params.name; | ||||
|               }, | ||||
|               textStyle: {            // 提示文字的样式 | ||||
|                 // color: '#595959', | ||||
|                 fontSize: 24.48 | ||||
|               } | ||||
|             } | ||||
| 						}, | ||||
| 						labelLine: { | ||||
| 							show: true, | ||||
| 						}, | ||||
| 						data: this.chartData && this.chartData.length > 0 && this.chartData.map((item, index) => ({ | ||||
| 						name:item.name, | ||||
| 						value: item.num, | ||||
|             value: item.num, | ||||
|             label: { | ||||
|               color: this.colors[index % 4] | ||||
|             }, | ||||
| 						itemStyle:{ | ||||
| 							color:{ | ||||
| 								type: 'linear', | ||||
| 								x: 1, | ||||
| 								y: 1, | ||||
| 								x: 0, | ||||
| 								y: 0, | ||||
| 								x2: 0, | ||||
| 								y2: 0, | ||||
| 								y2: 1, | ||||
| 								global: false, | ||||
| 								colorStops:[ | ||||
| 									{offset: 0,color: this.colors[index%4]}, | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-09-21 09:06:28 | ||||
|  * @LastEditTime: 2024-04-03 16:28:40 | ||||
|  * @LastEditTime: 2024-04-09 15:24:39 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
| @@ -225,6 +225,9 @@ export default { | ||||
|             scale: true, | ||||
|             type: 'value', | ||||
|             name: '良品率/%', | ||||
|             max: 100,//最大值 | ||||
|             min: 0,//最小值 | ||||
|             interval: 20,//间隔 | ||||
|             nameTextStyle: {// y轴上方单位的颜色 | ||||
|               color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色 | ||||
|               align: "left", | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-09-21 09:06:28 | ||||
|  * @LastEditTime: 2024-04-03 17:09:12 | ||||
|  * @LastEditTime: 2024-04-09 15:24:28 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
| @@ -224,6 +224,9 @@ export default { | ||||
|               scale: true, | ||||
|               type: 'value', | ||||
|               name: '良品率/%', | ||||
|               max: 100,//最大值 | ||||
|               min: 0,//最小值 | ||||
|               interval: 20,//间隔 | ||||
|               nameTextStyle: {// y轴上方单位的颜色 | ||||
|                 color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色 | ||||
|                 align: "left", | ||||
|   | ||||
| @@ -2,16 +2,16 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-07-19 15:18:30 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-04-03 17:14:03 | ||||
|  * @LastEditTime: 2024-04-10 16:10:11 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
|   <div id="container" ref="container" class="visual-container" :style="styles"> | ||||
|     <el-row class="container-title" :style="{ | ||||
| 				height: 88 + 'px', | ||||
| 				lineHeight: 88 + 'px', | ||||
| 				fontSize: 31 + 'px', | ||||
| 			}"> | ||||
|     	height: 88 + 'px', | ||||
|     	lineHeight: 88 + 'px', | ||||
|     	fontSize: 31 + 'px', | ||||
|     }"> | ||||
|       <img src="../../assets/img/logo.png" style="width: 1.1em; position: relative; top: 0.22em" alt="" /> | ||||
|       许昌安彩深加工看板 | ||||
|       <h3 class="unit">单位:河南汇融数字科技有限公司</h3> | ||||
| @@ -39,10 +39,23 @@ | ||||
|         <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%"> | ||||
|           <base-container :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'"> | ||||
|             <div class="order" style="width: 100%; overflow: hidden scroll; height: 350px"> | ||||
|               <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em"> | ||||
|               <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;"> | ||||
|                 <!-- <el-col :span="12"> --> | ||||
|  | ||||
|                 <p class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</p> | ||||
|                 <!-- <div style="height: 34px;"> --> | ||||
|                 <span class="now-secondary-title" style="font-size: 14px;opacity: calc(.6);">{{ op.name }}</span> | ||||
|                 <el-divider class="split" v-if="op.specifications" direction="vertical"></el-divider> | ||||
|                 <!-- <span v-if="op.size" class="split"></span> --> | ||||
|                 <span v-if="op.specifications" class="orderSize" style="font-size: 14px;opacity: calc(.6);">{{ | ||||
|                 op.specifications }}</span> | ||||
|                 <el-divider class="split" v-if="op.planQuantity" direction="vertical"></el-divider> | ||||
|                 <span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{ | ||||
|                 op.planQuantity }}</span> | ||||
|                 <span v-if="op.actualQuantity" class="orderFinish" | ||||
|                   style="font-size: 14px;opacity: calc(.6);margin-left: 130px;">{{ | ||||
|                   op.actualQuantity | ||||
|                   }}</span> | ||||
|                 <el-divider class="split" v-if="op.actualQuantity" direction="vertical"></el-divider> | ||||
|                 <!-- </div> --> | ||||
|                 <el-progress style="width: 620px;" text-color="rgba(255, 255, 255, .6)" :stroke-width="10" | ||||
|                   define-back-color="rgba(32, 57, 96, 1)" :percentage="op.progressRate" class="custom-progress-bar" /> | ||||
|               </el-row> | ||||
| @@ -67,7 +80,7 @@ | ||||
|         <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12"> | ||||
|           <base-container :show-time="true" :no-content-padding="true" :height="318 + 338 + 16" :size="'eqStatus'" | ||||
|             :title="'产线产量及良品率'" :title-icon="'productLine'"> | ||||
|             <div  class="myLegend"> | ||||
|             <div class="myLegend"> | ||||
|               <div class=" barCircleLegend"></div> | ||||
|               <div class=" barCircle"></div> | ||||
|               <h4 class="barText">产线良品率</h4> | ||||
| @@ -364,42 +377,66 @@ export default { | ||||
| 			{ | ||||
| 				id: '1', | ||||
| 				name: '测试工单', | ||||
| 				progressRate: 0.933333, | ||||
|         progressRate: 0.933333, | ||||
|         specifications: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish:111, | ||||
| 			}, | ||||
| 			{ | ||||
| 				id: '2', | ||||
| 				name: '测试工单2', | ||||
| 				progressRate: 0.932323, | ||||
|         progressRate: 0.932323, | ||||
|         size: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
| 			}, | ||||
| 			{ | ||||
| 				id: '3', | ||||
| 				name: '测试工单3', | ||||
| 				progressRate: 0.23232, | ||||
|         progressRate: 0.23232, | ||||
|         size: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
| 			}, | ||||
| 			{ | ||||
| 				id: '4', | ||||
| 				name: '测试工单4', | ||||
| 				progressRate: 0.32323, | ||||
|         progressRate: 0.32323, | ||||
|         size: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
|       }, | ||||
|       { | ||||
|         id: '4', | ||||
|         id: '5', | ||||
|         name: '测试工单4', | ||||
|         progressRate: 0.32323, | ||||
|         size: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
|       }, | ||||
|       { | ||||
|         id: '4', | ||||
|         id: '6', | ||||
|         name: '测试工单4', | ||||
|         size: '1100*5554*22', | ||||
|         progressRate: 0.32323, | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
|       }, | ||||
|       { | ||||
|         id: '4', | ||||
|         id: '7', | ||||
|         name: '测试工单4', | ||||
|         size: '1100*5554*22', | ||||
|         progressRate: 0.32323, | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
|       }, | ||||
|       { | ||||
|         id: '4', | ||||
|         id: '8', | ||||
|         name: '测试工单4', | ||||
|         progressRate: 0.32323, | ||||
|         size: '1100*5554*22', | ||||
|         plan: 11111, | ||||
|         finish: 111, | ||||
|       }, | ||||
| 			// { | ||||
| 			//   id: '5', | ||||
| @@ -416,7 +453,10 @@ export default { | ||||
| 				return { | ||||
| 					id: ele.id, | ||||
| 					name: ele.name, | ||||
| 					progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), | ||||
|           progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), | ||||
|           specifications: ele.specifications ?  '规格' + ele.specifications :null, | ||||
|           planQuantity: ele.plan ? '计划' + ele.plan + '片' : null, | ||||
|           finish: ele.finish + '片', | ||||
| 				}; | ||||
| 			} | ||||
| 		}); | ||||
| @@ -440,8 +480,8 @@ export default { | ||||
|           <span style="color:rgba(255,255,255,0.5)" >${item.name || ''} | ||||
|             </span>`, | ||||
| 			`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`, | ||||
| 			`<span style="color:rgba(255,255,255,0.5)">${item.status || ''}</span>`, | ||||
| 			`<span style="color:rgba(255,255,255,0.5)">${item.error || ''}</span>`, | ||||
|       `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '}"></div>  ${item.status || ''}</span>`, | ||||
|       `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == '是' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:13px 10px 0 0 '}"></div>  ${item.error || ''}</span>`, | ||||
| 		]); | ||||
|     this.eqConfig.data = eqArr; | ||||
|     let data = [ | ||||
| @@ -690,7 +730,10 @@ export default { | ||||
| 							return { | ||||
| 								id: ele.id, | ||||
| 								name: ele.name, | ||||
| 								progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), | ||||
|                 progressRate: parseFloat((ele.progressRate * 100).toFixed(0)), | ||||
|                 specifications: ele.specifications ?  '规格' + ele.specifications :null, | ||||
|                 planQuantity: ele.planQuantity  ? '计划' + ele.planQuantity + '片' : null, | ||||
|                 actualQuantity: ele.actualQuantity ? ele.actualQuantity + '片' : null, | ||||
| 							}; | ||||
| 						} | ||||
| 					}); | ||||
| @@ -704,12 +747,8 @@ export default { | ||||
| 						`<span style="color:rgba(255,255,255,0.5)">${ | ||||
| 							item.code || '' | ||||
| 						}</span>`, | ||||
| 						`<span style="color:rgba(255,255,255,0.5)"><span style="color:rgba(255,255,255,0.5)"></span>  ${ | ||||
| 							item.status || '' | ||||
| 						}</span>`, | ||||
| 						`<span style="color:rgba(255,255,255,0.5)">${ | ||||
| 							item.error || '' | ||||
| 						}</span>`, | ||||
|             `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '运行' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div>  ${item.status || ''}</span>`, | ||||
|             `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == '是' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%;  background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div>  ${item.error || ''}</span>`, | ||||
| 					]); | ||||
|           this.eqConfig.data = eqArr; | ||||
|           // this.$nextTick(() => { | ||||
| @@ -802,6 +841,18 @@ export default { | ||||
| </script> | ||||
|  | ||||
| <style lang="scss" scoped> | ||||
| .split{ | ||||
|   width: 1px; | ||||
|   // display: inline-block; | ||||
|   height: 14px; | ||||
|   // margin-top: 2px; | ||||
|   // line-height: 0; | ||||
|   margin-left: 8px; | ||||
|   opacity:calc(.6); | ||||
|   margin-right: 8px; | ||||
|   background-color: #C8CDD7; | ||||
|   // border: 1px solid #C8CDD7; | ||||
| } | ||||
| .myLegend { | ||||
|   position: absolute; | ||||
|   top: -28px; | ||||
| @@ -902,12 +953,39 @@ export default { | ||||
| } | ||||
|  | ||||
| .now-secondary-title { | ||||
|   display: inline-block; | ||||
|   width: 70px; | ||||
| 	margin: 0; | ||||
| 	font-size: 1em; | ||||
| 	font-size: 14px; | ||||
| 	line-height: 2em; | ||||
| 	color: #fff; | ||||
| } | ||||
|  | ||||
| .orderSize { | ||||
|   display: inline-block; | ||||
|   width: 120px; | ||||
|   margin: 0; | ||||
|   font-size: 14px; | ||||
|   line-height: 2em; | ||||
|   color: #fff; | ||||
| } | ||||
| .orderFinish { | ||||
|   display: inline-block; | ||||
|   width: 60px; | ||||
|   margin: 0; | ||||
|   font-size: 14px; | ||||
|   line-height: 2em; | ||||
|   text-align: right; | ||||
|   color: #fff; | ||||
| } | ||||
| .orderPlan { | ||||
|   display: inline-block; | ||||
|   width: 100px; | ||||
|   margin: 0; | ||||
|   font-size: 14px; | ||||
|   line-height: 2em; | ||||
|   color: #fff; | ||||
|   text-align: left; | ||||
| } | ||||
| .now-team-content { | ||||
| 	font-size: 3em; | ||||
| 	line-height: 1em; | ||||
|   | ||||
| @@ -138,7 +138,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-customer:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-customer:create') ? 'button' : '', | ||||
|   | ||||
| @@ -110,7 +110,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-department:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-department:create') ? 'button' : '', | ||||
|   | ||||
| @@ -156,11 +156,11 @@ export default { | ||||
| 					prop: 'createTime', | ||||
| 					label: '添加时间', | ||||
| 					fixed: true, | ||||
| 					width: 180, | ||||
| 					minWidth: 180, | ||||
| 					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), | ||||
| 				}, | ||||
| 				{ prop: 'name', label: '设备名称', width: 180, showOverflowtooltip: true }, | ||||
| 				{ width: 250, prop: 'code', label: '设备编码' }, | ||||
| 				{ prop: 'name', label: '设备名称', minWidth: 180, showOverflowtooltip: true }, | ||||
| 				{ minWidth: 250, prop: 'code', label: '设备编码' }, | ||||
| 				{ prop: 'equipmentTypeName', label: '设备类型' }, | ||||
| 				{ prop: 'enName', label: '英文名称' }, | ||||
| 				{ prop: 'abbr', label: '缩写' }, | ||||
| @@ -211,7 +211,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: (this.$auth.hasPermi('base:core-equipment:export') || this.$auth.hasPermi('base:core-equipment:create')) ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-equipment:export') | ||||
|   | ||||
| @@ -126,7 +126,8 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-equipment-bind-section:create') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-equipment-bind-section:create') | ||||
|   | ||||
| @@ -90,7 +90,7 @@ export default { | ||||
| 					prop: 'createTime', | ||||
| 					label: '添加时间', | ||||
| 					fixed: true, | ||||
| 					width: 180, | ||||
| 					minWidth: 180, | ||||
| 					filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'), | ||||
| 				}, | ||||
| 				{ prop: 'name', label: '类型名称' }, | ||||
| @@ -111,7 +111,8 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-equipment-type:create') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-equipment-type:create') | ||||
|   | ||||
| @@ -137,7 +137,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-hot-material-check:create') ? 'button' : '', | ||||
|   | ||||
| @@ -110,7 +110,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-major:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-major:create') ? 'button' : '', | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				:Width="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| @@ -48,45 +48,45 @@ const tableProps = [ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '产品名称', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '产品编码', | ||||
| 		width: 190, | ||||
| 		minWidth: 190, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'productType', | ||||
| 		label: '产品类型', | ||||
| 		filter: publicFormatter('product_type'), | ||||
| 		width: 180, | ||||
| 		minWidth: 180, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'specifications', | ||||
| 		label: '规格', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'unit', | ||||
| 		label: '单位', | ||||
| 		filter: publicFormatter('unit_dict'), | ||||
| 		width: 90, | ||||
| 		minWidth: 90, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| ]; | ||||
| @@ -141,7 +141,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-product:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-product:create') ? 'button' : '', | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				:minWidth="120" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| @@ -30,7 +30,7 @@ | ||||
| 			@cancel="handleCancel" | ||||
| 			@confirm="handleConfirm" | ||||
| 			:before-close="handleCancel" | ||||
| 			width="50%"> | ||||
| 			minWidth="50%"> | ||||
| 			<add-or-update | ||||
| 				ref="addOrUpdate" | ||||
| 				@refreshDataList="successSubmit"></add-or-update> | ||||
| @@ -56,39 +56,39 @@ const tableProps = [ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'factoryName', | ||||
| 		label: '工厂', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'roomNameDict', | ||||
| 		label: '车间名称', | ||||
| 		filter: publicFormatter('workshop'), | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '产线名称', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| 		label: '产线编码', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'enabled', | ||||
| 		label: '当前状态', | ||||
| 		filter: codeFilter('lineStatus'), | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	// { | ||||
| @@ -98,13 +98,13 @@ const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'description', | ||||
| 		label: '描述', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	} | ||||
| ]; | ||||
| @@ -147,7 +147,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-production-line:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-production-line:create') ? 'button' : '', | ||||
|   | ||||
| @@ -132,7 +132,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-supplier:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-supplier:create') ? 'button' : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2024-04-08 14:27:29 | ||||
|  * @LastEditTime: 2024-04-10 16:16:31 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -201,24 +201,26 @@ | ||||
| 					@pagination="getList" /> --> | ||||
| 			</div> | ||||
|  | ||||
| 			<div class="card" style="padding-bottom: 16px;"> | ||||
| 				<div class="boxTitle"> | ||||
| 					<span class="blueTitle"></span> | ||||
| 					<span>预计用料信息</span> | ||||
| 			<div v-if="$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])"> | ||||
| 				<div class="card" style="padding-bottom: 16px;"> | ||||
| 					<div class="boxTitle"> | ||||
| 						<span class="blueTitle"></span> | ||||
| 						<span>预计用料信息</span> | ||||
| 					</div> | ||||
| 					<base-table | ||||
| 						:table-props="tableProps1" | ||||
| 						:page="listQuery1.pageNo" | ||||
| 						:limit="listQuery1.pageSize" | ||||
| 						:table-data="materialList" | ||||
| 						:max-height="tableH" /> | ||||
| 					<!-- <pagination | ||||
| 						v-show="listQuery1.total > 0" | ||||
| 						:total="listQuery1.total" | ||||
| 						:page.sync="listQuery1.pageNo" | ||||
| 						:limit.sync="listQuery1.pageSize" | ||||
| 						:page-sizes="[5, 10, 15]" | ||||
| 						@pagination="getList" /> --> | ||||
| 				</div> | ||||
| 				<base-table | ||||
| 					:table-props="tableProps1" | ||||
| 					:page="listQuery1.pageNo" | ||||
| 					:limit="listQuery1.pageSize" | ||||
| 					:table-data="materialList" | ||||
| 					:max-height="tableH" /> | ||||
| 				<!-- <pagination | ||||
| 					v-show="listQuery1.total > 0" | ||||
| 					:total="listQuery1.total" | ||||
| 					:page.sync="listQuery1.pageNo" | ||||
| 					:limit.sync="listQuery1.pageSize" | ||||
| 					:page-sizes="[5, 10, 15]" | ||||
| 					@pagination="getList" /> --> | ||||
| 			</div> | ||||
|  | ||||
| 			<!-- <div class="drawer-body__footer"> | ||||
| @@ -461,7 +463,7 @@ export default { | ||||
| 			}); | ||||
| 			// 获取预使用原料列表 | ||||
| 			console.log('111我看看', this.dataForm.materialMethod) | ||||
| 			if (this.dataForm.id) { | ||||
| 			if (this.dataForm.id && this.$auth.hasPermiAnd(['base:material-product-bom-det:query', 'extend:process-flow:query'])) { | ||||
| 				if (this.dataForm.materialMethod === 1) { | ||||
| 					// 产品 | ||||
| 					getlistByProductId({ | ||||
|   | ||||
| @@ -157,92 +157,105 @@ export default { | ||||
| 				// 			showTip: '预使用原料信息' | ||||
| 				// 	  } | ||||
| 				// 	: undefined, | ||||
| 					{ | ||||
| 						type: 'active', | ||||
| 						btnName: '激活', | ||||
| 						showParam: { | ||||
| 							type: '|', | ||||
| 							data: [ | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 1 | ||||
| 								}, | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 3 | ||||
| 								} | ||||
| 							] | ||||
| 					this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'active', | ||||
| 							btnName: '激活', | ||||
| 							showParam: { | ||||
| 								type: '|', | ||||
| 								data: [ | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 1 | ||||
| 									}, | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 3 | ||||
| 									} | ||||
| 								] | ||||
| 							} | ||||
| 						} | ||||
| 					}, | ||||
| 					{ | ||||
| 						type: 'pause', | ||||
| 						btnName: '暂停', | ||||
| 						showParam: { | ||||
| 							type: '|', | ||||
| 							data: [ | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 2 | ||||
| 								} | ||||
| 							] | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'pause', | ||||
| 							btnName: '暂停', | ||||
| 							showParam: { | ||||
| 								type: '|', | ||||
| 								data: [ | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 2 | ||||
| 									} | ||||
| 								] | ||||
| 							} | ||||
| 						} | ||||
| 					}, | ||||
| 					{ | ||||
| 						type: 'nullify', | ||||
| 						btnName: '作废', | ||||
| 						showParam: { | ||||
| 							type: '|', | ||||
| 							data: [ | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 1 | ||||
| 								} | ||||
| 							] | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'nullify', | ||||
| 							btnName: '作废', | ||||
| 							showParam: { | ||||
| 								type: '|', | ||||
| 								data: [ | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 1 | ||||
| 									} | ||||
| 								] | ||||
| 							} | ||||
| 						} | ||||
| 					}, | ||||
| 					{ | ||||
| 						type: 'finish', | ||||
| 						btnName: '完成', | ||||
| 						showParam: { | ||||
| 							type: '|', | ||||
| 							data: [ | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 2 | ||||
| 								}, | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 3 | ||||
| 								} | ||||
| 							] | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'finish', | ||||
| 							btnName: '完成', | ||||
| 							showParam: { | ||||
| 								type: '|', | ||||
| 								data: [ | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 2 | ||||
| 									}, | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 3 | ||||
| 									} | ||||
| 								] | ||||
| 							} | ||||
| 						} | ||||
| 					}, | ||||
| 					{ | ||||
| 						type: 'stop', | ||||
| 						btnName: '终止', | ||||
| 						showParam: { | ||||
| 							type: '|', | ||||
| 							data: [ | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 2 | ||||
| 								}, | ||||
| 								{ | ||||
| 									name: 'status', | ||||
| 									type: 'equal', | ||||
| 									value: 3 | ||||
| 								} | ||||
| 							] | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:update`) | ||||
| 					? { | ||||
| 							type: 'stop', | ||||
| 							btnName: '终止', | ||||
| 							showParam: { | ||||
| 								type: '|', | ||||
| 								data: [ | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 2 | ||||
| 									}, | ||||
| 									{ | ||||
| 										name: 'status', | ||||
| 										type: 'equal', | ||||
| 										value: 3 | ||||
| 									} | ||||
| 								] | ||||
| 							} | ||||
| 						} | ||||
| 					}, | ||||
| 					this.$auth.hasPermi(`base:core-work-order:detail`) | ||||
| 					: undefined, | ||||
| 					this.$auth.hasPermiAnd([ | ||||
| 						'base:core-work-order:query', | ||||
| 						'base:order:query' | ||||
| 					]) | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看详情', | ||||
|   | ||||
| @@ -163,7 +163,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-worker:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-worker:create') ? 'button' : '', | ||||
|   | ||||
| @@ -52,8 +52,7 @@ const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| 		label: '添加时间', | ||||
| 		filter: parseTime, | ||||
|  | ||||
| 		filter: parseTime | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'code', | ||||
| @@ -116,7 +115,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-workshop-section:create') ? 'button' : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2024-03-21 15:21:32 | ||||
|  * @LastEditTime: 2024-04-11 16:22:19 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -121,15 +121,15 @@ | ||||
| 					</el-row> | ||||
| 				</el-form> | ||||
| 			</div> | ||||
| 			 | ||||
| 			<div class="attr-list" v-if="idAttrShow"> | ||||
|  | ||||
| 			<div class="attr-list" v-if="idAttrShow && this.$auth.hasPermi('base:material-attr:query')"> | ||||
| 				<small-title | ||||
| 					style="margin: 16px 0; padding-left: 8px" | ||||
| 					:no-padding="true"> | ||||
| 					物料属性 | ||||
| 				</small-title> | ||||
|  | ||||
| 				<div v-if="!isdetail" class="action_btn"> | ||||
| 				<div v-if="!isdetail && this.$auth.hasPermi('base:material-attr:create')" class="action_btn"> | ||||
|           <template> | ||||
|             <span style="display: inline-block;"> | ||||
|               <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button> | ||||
| @@ -182,16 +182,23 @@ import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| import { getDictDatas } from "@/utils/dict"; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| // const tableBtn = [ | ||||
| // 		this.$auth.hasPermiAnd([ | ||||
| // 			'base:material-attr:create', | ||||
| // 			'base:material-attr:update' | ||||
| // 		]) ? | ||||
| // 		{ | ||||
| // 			type: 'edit', | ||||
| // 			btnName: '编辑', | ||||
| // 		} | ||||
| // 		: undefined, | ||||
| // 	this.$auth.hasPermi('base:material-attr:delete') ?  | ||||
| // 		{ | ||||
| // 			type: 'delete', | ||||
| // 			btnName: '删除', | ||||
| // 		} | ||||
| // 	: undefined, | ||||
| // ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| @@ -213,7 +220,23 @@ export default { | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:material-attr:create', | ||||
| 					'base:material-attr:update' | ||||
| 				]) ? | ||||
| 				{ | ||||
| 					type: 'edit', | ||||
| 					btnName: '编辑', | ||||
| 				} | ||||
| 				: undefined, | ||||
| 			this.$auth.hasPermi('base:material-attr:delete') ?  | ||||
| 				{ | ||||
| 					type: 'delete', | ||||
| 					btnName: '删除', | ||||
| 				} | ||||
| 			: undefined, | ||||
| 			], | ||||
| 			tableProps, | ||||
| 			addOrUpdateVisible: false, | ||||
| 			urlOptions: { | ||||
|   | ||||
| @@ -134,7 +134,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:material:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:material:create') ? 'button' : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: DY | ||||
|  * @LastEditTime: 2024-03-21 14:39:52 | ||||
|  * @LastEditTime: 2024-04-11 16:44:41 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -56,14 +56,14 @@ | ||||
| 					</el-row> | ||||
| 				</el-form> | ||||
| 			</div> | ||||
| 			<div class="attr-list" v-if="idAttrShow"> | ||||
| 			<div class="attr-list" v-if="idAttrShow && $auth.hasPermiAnd(['base:material-product-bom:query', 'base:material-product-bom-det:query'])"> | ||||
| 				<small-title | ||||
| 					style="margin: 16px 0; padding-left: 8px" | ||||
| 					:no-padding="true"> | ||||
| 					BOM明细 | ||||
| 				</small-title> | ||||
|  | ||||
| 				<div v-if="!isdetail" class="action_btn"> | ||||
| 				<div v-if="!isdetail && $auth.hasPermi('base:material-product-bom:create')" class="action_btn"> | ||||
|           <template> | ||||
|             <span style="display: inline-block;"> | ||||
|               <el-button type="text" @click="addNew()" icon="el-icon-plus">添加</el-button> | ||||
| @@ -116,16 +116,16 @@ import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| import { publicFormatter } from '@/utils/dict'; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| // const tableBtn = [ | ||||
| // 	{ | ||||
| // 		type: 'edit', | ||||
| // 		btnName: '编辑', | ||||
| // 	}, | ||||
| // 	{ | ||||
| // 		type: 'delete', | ||||
| // 		btnName: '删除', | ||||
| // 	}, | ||||
| // ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'createTime', | ||||
| @@ -160,7 +160,24 @@ export default { | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:material-product-bom:update', | ||||
| 					'base:material-product-bom-det:create', | ||||
| 					'base:material-product-bom-det:update' | ||||
| 				]) ? | ||||
| 				{ | ||||
| 					type: 'edit', | ||||
| 					btnName: '编辑', | ||||
| 				} | ||||
| 				: undefined, | ||||
| 				this.$auth.hasPermi('base:material-product-bom:delete') ?  | ||||
| 					{ | ||||
| 						type: 'delete', | ||||
| 						btnName: '删除', | ||||
| 					} | ||||
| 				: undefined, | ||||
| 			], | ||||
| 			tableProps, | ||||
| 			addOrUpdateVisible: false, | ||||
| 			urlOptions: { | ||||
|   | ||||
| @@ -110,7 +110,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:material:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:material:create') ? 'button' : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 14:55:51 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-04-08 11:49:33 | ||||
|  * @LastEditTime: 2024-04-10 16:34:40 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -141,8 +141,8 @@ export default { | ||||
| 				// 	btnName: '重置', | ||||
| 				// 	name: 'reset', | ||||
| 				// }, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:packaging-print-log:create') ? 'button' : '', | ||||
|   | ||||
| @@ -1,348 +1,368 @@ | ||||
| <template> | ||||
|   <div class="choicepart-container"> | ||||
|     <navbar /> | ||||
|     <div class="choicepart-wrapper"> | ||||
|       <div class="choicepart-box" id="choicepartBox" :style="'transform:scale('+scale+');width:1710px;height:538px;'" v-show="showItem"> | ||||
|       <div class="choicepart-line1"> | ||||
|         <div | ||||
|           v-for="(item, index) in menuArr1" | ||||
|           :key="index" | ||||
|           class="choicepart-item" | ||||
|           @click="handelClick(item, item.choicepart)" | ||||
|           :style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}" | ||||
|         > | ||||
|           <div> | ||||
|             <img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt=""> | ||||
|           </div> | ||||
|           <div class="choicepart-item-title">{{item.meta.title}}</div> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class="choicepart-line2"> | ||||
|         <div | ||||
|           v-for="(item, index) in menuArr2" | ||||
|           :key="index" | ||||
|           class="choicepart-item" | ||||
|           @click="handelClick(item, item.choicepart)" | ||||
|           :style="{opacity: item.visible?1:0.4, pointerEvents:item.visible?'auto':'none'}" | ||||
|         > | ||||
|           <div> | ||||
|             <img :src="require(`../../assets/images/choicepart/${item.name}.png`)" alt=""> | ||||
|           </div> | ||||
|           <div class="choicepart-item-title">{{item.meta.title}}</div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     </div> | ||||
|     <div class="choicepart-footer">© 中建材智能自动化研究院有限公司</div> | ||||
|   </div> | ||||
| 	<div class="choicepart-container"> | ||||
| 		<navbar /> | ||||
| 		<div class="choicepart-wrapper"> | ||||
| 			<div | ||||
| 				class="choicepart-box" | ||||
| 				id="choicepartBox" | ||||
| 				:style="'transform:scale(' + scale + ')'" | ||||
| 				style="width: 1710px; height: 538px" | ||||
| 				v-show="showItem"> | ||||
| 				<div class="choicepart-line1"> | ||||
| 					<div | ||||
| 						v-for="(item, index) in menuArr1" | ||||
| 						:key="index" | ||||
| 						class="choicepart-item" | ||||
| 						@click="handelClick(item, item.choicepart)" | ||||
| 						:style="{ | ||||
| 							opacity: item.visible ? 1 : 0.4, | ||||
| 							pointerEvents: item.visible ? 'auto' : 'none', | ||||
| 						}"> | ||||
| 						<div> | ||||
| 							<img | ||||
| 								:src=" | ||||
| 									require(`../../assets/images/choicepart/${item.name}.png`) | ||||
| 								" | ||||
| 								alt="" /> | ||||
| 						</div> | ||||
| 						<div class="choicepart-item-title">{{ item.meta.title }}</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 				<div class="choicepart-line2"> | ||||
| 					<div | ||||
| 						v-for="(item, index) in menuArr2" | ||||
| 						:key="index" | ||||
| 						class="choicepart-item" | ||||
| 						@click="handelClick(item, item.choicepart)" | ||||
| 						:style="{ | ||||
| 							opacity: item.visible ? 1 : 0.4, | ||||
| 							pointerEvents: item.visible ? 'auto' : 'none', | ||||
| 						}"> | ||||
| 						<div> | ||||
| 							<img | ||||
| 								:src=" | ||||
| 									require(`../../assets/images/choicepart/${item.name}.png`) | ||||
| 								" | ||||
| 								alt="" /> | ||||
| 						</div> | ||||
| 						<div class="choicepart-item-title">{{ item.meta.title }}</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="choicepart-footer">© 中建材智能自动化研究院有限公司</div> | ||||
| 	</div> | ||||
| </template> | ||||
| <script> | ||||
| import Navbar from './components/Navbar' | ||||
| import { debounce } from '@/utils/debounce' | ||||
| import Navbar from './components/Navbar'; | ||||
| import { debounce } from '@/utils/debounce'; | ||||
| export default { | ||||
|   components: { Navbar }, | ||||
|   name: 'choicePart', | ||||
|   data() { | ||||
|     return { | ||||
|       boxReset: '', | ||||
|       scale: 1, | ||||
|       menuArr1: [ | ||||
|         { | ||||
|           name: 'Core', | ||||
|           title: '基础核心', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Order', | ||||
|           title: '订单管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Equipment', | ||||
|           title: '设备管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Group', | ||||
|           title: '班组管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Quality', | ||||
|           title: '质量管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Warehouse', | ||||
|           title: '仓库管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Energy', | ||||
|           title: '能源管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Packaging', | ||||
|           title: '包装管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         } | ||||
|       ], | ||||
|       menuArr2: [ | ||||
|         { | ||||
|           name: 'Material', | ||||
|           title: '物料管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Extend', | ||||
|           title: '工艺管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         // { | ||||
|         //   name: 'Delivery', | ||||
|         //   title: '成品发货', | ||||
|         //   visible: false, | ||||
|         //   meta: { | ||||
|         //     title: '' | ||||
|         //   } | ||||
|         // }, | ||||
|         { | ||||
|           name: 'Report', | ||||
|           title: '报表管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Cost', | ||||
|           title: '成本管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'SafetyEnvironmental', | ||||
|           title: '安环管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'Databoard', | ||||
|           title: '数据驾驶舱', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: 'System', | ||||
|           title: '系统管理', | ||||
|           visible: false, | ||||
|           meta: { | ||||
|             title: '' | ||||
|           } | ||||
|         } | ||||
|       ], | ||||
|       showItem: false | ||||
|     } | ||||
|   }, | ||||
|   // computed:{ | ||||
|   //   ...mapGetters(['sidebarRouters']) | ||||
|   // }, | ||||
|   mounted() { | ||||
|     this.getMsg() | ||||
|     this.boxReset = debounce(() => { | ||||
|       this.resetSize() | ||||
|     }, 300) | ||||
|     this.boxReset() | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.boxReset() | ||||
|     }) | ||||
|   }, | ||||
|   methods: { | ||||
|     getMsg() { | ||||
|       let menuList = this.$store.state.permission.sidebarRouters | ||||
|       console.log(menuList) | ||||
|       if (menuList.length > 0) { | ||||
|         for (let i = 0; i < menuList.length; i ++) { | ||||
|           for (let k = 0; k < 8; k++) { | ||||
|             if (menuList[i].name === this.menuArr1[k].name) { | ||||
|               this.menuArr1[k].visible = true | ||||
|               this.menuArr1[k].id = menuList[i].id | ||||
|               this.menuArr1[k].choicepart = i | ||||
|               this.menuArr1[k].children = menuList[i].children | ||||
|               this.menuArr1[k].meta = menuList[i].meta | ||||
|             } | ||||
|           } | ||||
|           for (let j = 0; j < 7; j++) { | ||||
|             if (menuList[i].name === this.menuArr2[j].name) { | ||||
|               this.menuArr2[j].visible = true | ||||
|               this.menuArr2[j].id = menuList[i].id | ||||
|               this.menuArr2[j].choicepart = i | ||||
|               this.menuArr2[j].children = menuList[i].children | ||||
|               this.menuArr2[j].meta = menuList[i].meta | ||||
|             } | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       console.log(this.menuArr1) | ||||
|       console.log(this.menuArr2) | ||||
|     }, | ||||
|     handelClick(item, index) { | ||||
|       // this.$router.push({name: 'SystemUser'}) | ||||
|       this.$store.dispatch('app/setChoicepart', index) | ||||
|       this.toRouter(item) | ||||
|       // if (item.meta.unuse) { | ||||
|       //   this.$message.warning(this.$t('暂无数据')) | ||||
|       // } else { | ||||
|       //   this.toRouter(item) | ||||
|       // } | ||||
|     }, | ||||
|     toRouter(item) { | ||||
|       console.log(item) | ||||
|       if (item.children) { | ||||
|         this.toRouter(item.children[0]) | ||||
|       } else { | ||||
|         this.$router.push({ name: item.name }) | ||||
|       } | ||||
|     }, | ||||
|     resetSize() { | ||||
|       let _this = this | ||||
|       _this.showItem = false | ||||
|       _this.loading = true | ||||
|       let choicepartBox = document.querySelector('#choicepartBox') | ||||
|       let rw = parseFloat(window.innerWidth) | ||||
|       let rh = parseFloat(window.innerHeight) | ||||
|       let bw = parseFloat(choicepartBox.style.width) | ||||
|       let bh = parseFloat(choicepartBox.style.height) | ||||
|       let wx = 0.82/(bw / rw) | ||||
|       let hx = 0.56/(bh / rh) | ||||
|       _this.scale = wx > hx ? hx : wx | ||||
|       setTimeout(_this.showItemFun, 700) | ||||
|     }, | ||||
|     showItemFun() { | ||||
|       this.loading = false | ||||
|       this.showItem = true | ||||
|     } | ||||
|   }, | ||||
|   beforeDestroy() { | ||||
|     this.showItem = false | ||||
|   } | ||||
| } | ||||
| 	components: { Navbar }, | ||||
| 	name: 'choicePart', | ||||
| 	data() { | ||||
| 		return { | ||||
| 			scale: 1, | ||||
| 			menuArr1: [ | ||||
| 				{ | ||||
| 					name: 'Core', | ||||
| 					title: '基础核心', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Order', | ||||
| 					title: '订单管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Equipment', | ||||
| 					title: '设备管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Group', | ||||
| 					title: '班组管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Quality', | ||||
| 					title: '质量管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Warehouse', | ||||
| 					title: '仓库管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Energy', | ||||
| 					title: '能源管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Packaging', | ||||
| 					title: '包装管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 			], | ||||
| 			menuArr2: [ | ||||
| 				{ | ||||
| 					name: 'Material', | ||||
| 					title: '物料管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Extend', | ||||
| 					title: '工艺管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				// { | ||||
| 				//   name: 'Delivery', | ||||
| 				//   title: '成品发货', | ||||
| 				//   visible: false, | ||||
| 				//   meta: { | ||||
| 				//     title: '' | ||||
| 				//   } | ||||
| 				// }, | ||||
| 				{ | ||||
| 					name: 'Report', | ||||
| 					title: '报表管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Cost', | ||||
| 					title: '成本管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'SafetyEnvironmental', | ||||
| 					title: '安环管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'Databoard', | ||||
| 					title: '数据驾驶舱', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: 'System', | ||||
| 					title: '系统管理', | ||||
| 					visible: false, | ||||
| 					meta: { | ||||
| 						title: '', | ||||
| 					}, | ||||
| 				}, | ||||
| 			], | ||||
| 			showItem: false, | ||||
| 		}; | ||||
| 	}, | ||||
| 	// computed:{ | ||||
| 	//   ...mapGetters(['sidebarRouters']) | ||||
| 	// }, | ||||
| 	mounted() { | ||||
| 		this.getMsg(); | ||||
| 		this.boxReset(); | ||||
| 		window.addEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	destroyed() { | ||||
| 		window.removeEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		boxReset() { | ||||
| 			debounce(() => { | ||||
| 				this.resetSize(); | ||||
| 			}, 300)(); | ||||
| 		}, | ||||
| 		getMsg() { | ||||
| 			let menuList = this.$store.state.permission.sidebarRouters; | ||||
| 			console.log(menuList); | ||||
| 			if (menuList.length > 0) { | ||||
| 				for (let i = 0; i < menuList.length; i++) { | ||||
| 					for (let k = 0; k < 8; k++) { | ||||
| 						if (menuList[i].name === this.menuArr1[k].name) { | ||||
| 							this.menuArr1[k].visible = true; | ||||
| 							this.menuArr1[k].id = menuList[i].id; | ||||
| 							this.menuArr1[k].choicepart = i; | ||||
| 							this.menuArr1[k].children = menuList[i].children; | ||||
| 							this.menuArr1[k].meta = menuList[i].meta; | ||||
| 						} | ||||
| 					} | ||||
| 					for (let j = 0; j < 7; j++) { | ||||
| 						if (menuList[i].name === this.menuArr2[j].name) { | ||||
| 							this.menuArr2[j].visible = true; | ||||
| 							this.menuArr2[j].id = menuList[i].id; | ||||
| 							this.menuArr2[j].choicepart = i; | ||||
| 							this.menuArr2[j].children = menuList[i].children; | ||||
| 							this.menuArr2[j].meta = menuList[i].meta; | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 			console.log(this.menuArr1); | ||||
| 			console.log(this.menuArr2); | ||||
| 		}, | ||||
| 		handelClick(item, index) { | ||||
| 			// this.$router.push({name: 'SystemUser'}) | ||||
| 			this.$store.dispatch('app/setChoicepart', index); | ||||
| 			this.toRouter(item); | ||||
| 			// if (item.meta.unuse) { | ||||
| 			//   this.$message.warning(this.$t('暂无数据')) | ||||
| 			// } else { | ||||
| 			//   this.toRouter(item) | ||||
| 			// } | ||||
| 		}, | ||||
| 		toRouter(item) { | ||||
| 			console.log(item); | ||||
| 			if (item.children) { | ||||
| 				this.toRouter(item.children[0]); | ||||
| 			} else { | ||||
| 				this.$router.push({ name: item.name }); | ||||
| 			} | ||||
| 		}, | ||||
| 		resetSize() { | ||||
| 			let _this = this; | ||||
| 			_this.showItem = false; | ||||
| 			_this.loading = true; | ||||
| 			let choicepartBox = document.querySelector('#choicepartBox'); | ||||
| 			let rw = parseFloat(window.innerWidth); | ||||
| 			let rh = parseFloat(window.innerHeight); | ||||
| 			let bw = parseFloat(choicepartBox.style.width); | ||||
| 			let bh = parseFloat(choicepartBox.style.height); | ||||
| 			let wx = 0.82 / (bw / rw); | ||||
| 			let hx = 0.56 / (bh / rh); | ||||
| 			_this.scale = wx > hx ? hx : wx; | ||||
| 			setTimeout(_this.showItemFun, 700); | ||||
| 		}, | ||||
| 		showItemFun() { | ||||
| 			this.loading = false; | ||||
| 			this.showItem = true; | ||||
| 		}, | ||||
| 	}, | ||||
| 	beforeDestroy() { | ||||
| 		this.showItem = false; | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| <style lang='scss' scoped> | ||||
| .choicepart-container { | ||||
|   position: relative; | ||||
|   width: 100%; | ||||
|   height: 100%; | ||||
|   background: url('../../assets/images/choicepart/choicepart-back.png') repeat; | ||||
|   background-size: 100% 100%; | ||||
|   .choicepart-wrapper { | ||||
|     width: 100vw; | ||||
|     height: calc(100vh - 94px); | ||||
|     display: flex; | ||||
|     justify-content: center; | ||||
|     align-items: center; | ||||
|   } | ||||
|   .choicepart-box { | ||||
|     // transition: all 0.3s linear; | ||||
|     .choicepart-line1 { | ||||
|       width: 100%; | ||||
|       margin-bottom: 80px; | ||||
|       display: flex; | ||||
|       flex-flow: row nowrap; | ||||
|     } | ||||
|     .choicepart-line2 { | ||||
|       width: 100%; | ||||
|       display: flex; | ||||
|       flex-flow: row nowrap; | ||||
|       justify-content: center; | ||||
|     } | ||||
|     .choicepart-item { | ||||
|       width: 184px; | ||||
|       height: 224px; | ||||
|       background: url('../../assets/images/choicepart/choice-item-back.png') no-repeat; | ||||
|       background-size: 100% 100%; | ||||
|       border-radius: 5px; | ||||
|       overflow: hidden; | ||||
|       cursor: pointer; | ||||
|       position: relative; | ||||
|       margin: 0 20px; | ||||
|       img { | ||||
|         width: 184px; | ||||
|         height: 224px; | ||||
|       } | ||||
|       .choicepart-item-title { | ||||
|         overflow: hidden; | ||||
|         padding: 0 10px; | ||||
|         text-overflow: ellipsis; | ||||
|         white-space: nowrap; | ||||
|         position: absolute; | ||||
|         bottom: 0; | ||||
|         left: 2px; | ||||
|         right: 2px; | ||||
|         text-align: center; | ||||
|         color: #fff; | ||||
|         font-size: 16px; | ||||
|         line-height: 40px; | ||||
|         height: 40px; | ||||
|         letter-spacing: 2px; | ||||
|         background-color: rgba($color: #0b58ff, $alpha: 0.45); | ||||
|       } | ||||
|     } | ||||
|     .choicepart-item:hover { | ||||
|       .choicepart-item-title { | ||||
|         background-color: rgba($color: #0b58ff, $alpha: 1); | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   .choicepart-footer { | ||||
|     position: absolute; | ||||
|     width: 100%; | ||||
|     color: #C7C7C7; | ||||
|     user-select: none; | ||||
|     font-size: 12px; | ||||
|     letter-spacing: 1px; | ||||
|     height: 30px; | ||||
|     display: grid; | ||||
|     place-content: center; | ||||
|     bottom: 0; | ||||
|     opacity: 0.5; | ||||
|   } | ||||
| 	position: relative; | ||||
| 	width: 100%; | ||||
| 	height: 100%; | ||||
| 	background: url('../../assets/images/choicepart/choicepart-back.png') repeat; | ||||
| 	background-size: 100% 100%; | ||||
| 	.choicepart-wrapper { | ||||
| 		width: 100vw; | ||||
| 		height: calc(100vh - 94px); | ||||
| 		display: flex; | ||||
| 		justify-content: center; | ||||
| 		align-items: center; | ||||
| 	} | ||||
| 	.choicepart-box { | ||||
| 		// transition: all 0.3s linear; | ||||
| 		.choicepart-line1 { | ||||
| 			width: 100%; | ||||
| 			margin-bottom: 80px; | ||||
| 			display: flex; | ||||
| 			flex-flow: row nowrap; | ||||
| 		} | ||||
| 		.choicepart-line2 { | ||||
| 			width: 100%; | ||||
| 			display: flex; | ||||
| 			flex-flow: row nowrap; | ||||
| 			justify-content: center; | ||||
| 		} | ||||
| 		.choicepart-item { | ||||
| 			width: 184px; | ||||
| 			height: 224px; | ||||
| 			background: url('../../assets/images/choicepart/choice-item-back.png') | ||||
| 				no-repeat; | ||||
| 			background-size: 100% 100%; | ||||
| 			border-radius: 5px; | ||||
| 			overflow: hidden; | ||||
| 			cursor: pointer; | ||||
| 			position: relative; | ||||
| 			margin: 0 20px; | ||||
| 			img { | ||||
| 				width: 184px; | ||||
| 				height: 224px; | ||||
| 			} | ||||
| 			.choicepart-item-title { | ||||
| 				overflow: hidden; | ||||
| 				padding: 0 10px; | ||||
| 				text-overflow: ellipsis; | ||||
| 				white-space: nowrap; | ||||
| 				position: absolute; | ||||
| 				bottom: 0; | ||||
| 				left: 2px; | ||||
| 				right: 2px; | ||||
| 				text-align: center; | ||||
| 				color: #fff; | ||||
| 				font-size: 16px; | ||||
| 				line-height: 40px; | ||||
| 				height: 40px; | ||||
| 				letter-spacing: 2px; | ||||
| 				background-color: rgba($color: #0b58ff, $alpha: 0.45); | ||||
| 			} | ||||
| 		} | ||||
| 		.choicepart-item:hover { | ||||
| 			.choicepart-item-title { | ||||
| 				background-color: rgba($color: #0b58ff, $alpha: 1); | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| 	.choicepart-footer { | ||||
| 		position: absolute; | ||||
| 		width: 100%; | ||||
| 		color: #c7c7c7; | ||||
| 		user-select: none; | ||||
| 		font-size: 12px; | ||||
| 		letter-spacing: 1px; | ||||
| 		height: 30px; | ||||
| 		display: grid; | ||||
| 		place-content: center; | ||||
| 		bottom: 0; | ||||
| 		opacity: 0.5; | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
| @@ -125,7 +125,7 @@ export default { | ||||
| 				// 	name: 'reset', | ||||
| 				// }, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:core-factory:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:core-factory:create') ? 'button' : '', | ||||
|   | ||||
| @@ -1,8 +1,11 @@ | ||||
| <template> | ||||
| 	<div id='deepProcessingContainerB' ref='deepProcessingContainerB' style="width: 100%;height: 100%;"> | ||||
| 	<div | ||||
| 		id="deepProcessingContainerB" | ||||
| 		ref="deepProcessingContainerB" | ||||
| 		style="width: 100%; height: 100%"> | ||||
| 		<div | ||||
| 			id='deepProcessingContainer' | ||||
| 			ref='deepProcessingContainer' | ||||
| 			id="deepProcessingContainer" | ||||
| 			ref="deepProcessingContainer" | ||||
| 			class="deepProcessingBoard" | ||||
| 			style=" | ||||
| 				position: absolute; | ||||
| @@ -16,15 +19,14 @@ | ||||
| 				flex-direction: column; | ||||
| 				gap: 24px; | ||||
| 			" | ||||
| 			:style="{transform:'scale('+scaleNum+')'}"> | ||||
| 			<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='深加工生产运行驾驶舱'/> | ||||
| 			:style="{ transform: 'scale(' + scaleNum + ')' }"> | ||||
| 			<KHeader | ||||
| 				:isFullScreen="isFullScreen" | ||||
| 				@screenfullChange="screenfullChange" | ||||
| 				topTitle="深加工生产运行驾驶舱" /> | ||||
| 			<div | ||||
| 				class="main-body" | ||||
| 				style=" | ||||
| 					display: grid; | ||||
| 					gap: 16px; | ||||
| 					grid-template-rows: 462px 462px; | ||||
| 				"> | ||||
| 				style="display: grid; gap: 16px; grid-template-rows: 462px 462px"> | ||||
| 				<TopThree /> | ||||
| 				<BottomTwo /> | ||||
| 			</div> | ||||
| @@ -47,16 +49,16 @@ | ||||
| import KHeader from '../components/Header'; | ||||
| import TopThree from './TopThree'; | ||||
| import BottomTwo from './BottomTwo'; | ||||
| import screenfull from 'screenfull' | ||||
| import { debounce } from '@/utils/debounce' | ||||
| import { getDcsMsg, getMesMsg } from './../utils/wsInterface' | ||||
| import screenfull from 'screenfull'; | ||||
| import { debounce } from '@/utils/debounce'; | ||||
| import { getDcsMsg, getMesMsg } from './../utils/wsInterface'; | ||||
|  | ||||
| export default { | ||||
| 	name: 'deepProcessingBoard', | ||||
| 	components: { | ||||
| 		KHeader, | ||||
| 		TopThree, | ||||
| 		BottomTwo | ||||
| 		BottomTwo, | ||||
| 	}, | ||||
| 	// provide() { | ||||
| 	// 	return { | ||||
| @@ -66,83 +68,90 @@ export default { | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isFullScreen: false, | ||||
| 			scaleNum: 0.8 | ||||
| 			scaleNum: 0.8, | ||||
| 		}; | ||||
| 	}, | ||||
| 	created() { | ||||
| 		this.init() | ||||
| 		this.init(); | ||||
| 	}, | ||||
| 	destroy() { | ||||
| 		this.destroy() | ||||
| 		this.destroy(); | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.boxReset = debounce(() => { | ||||
|       this.resetSize() | ||||
|     }, 300) | ||||
|     this.boxReset() | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.boxReset() | ||||
|     }) | ||||
| 			this.resetSize(); | ||||
| 		}, 300); | ||||
| 		this.boxReset(); | ||||
| 		window.addEventListener('resize', () => { | ||||
| 			this.boxReset(); | ||||
| 		}); | ||||
| 		// closeWebsocket() | ||||
| 		// getDcsMsg() | ||||
| 		// getMesMsg() | ||||
| 		console.log('mounted...........') | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.boxReset(); | ||||
| 		window.addEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	destroyed() { | ||||
| 		console.log('destroyed...........') | ||||
| 		window.removeEventListener('resize', this.boxReset); | ||||
| 		this.destroy(); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		boxReset() { | ||||
| 			debounce(() => { | ||||
| 				this.resetSize(); | ||||
| 			}, 300)(); | ||||
| 		}, | ||||
| 		change() { | ||||
|       this.isFullScreen = screenfull.isFullscreen | ||||
|     }, | ||||
|     init() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.on('change', this.change) | ||||
|       } | ||||
|     }, | ||||
|     destroy() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.off('change', this.change) | ||||
|       } | ||||
|     }, | ||||
| 			this.isFullScreen = screenfull.isFullscreen; | ||||
| 		}, | ||||
| 		init() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.on('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
| 		destroy() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.off('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
| 		// 全屏 | ||||
| 		screenfullChange() { | ||||
|       if (!screenfull.isEnabled) { | ||||
|         this.$message({ | ||||
|           message: 'you browser can not work', | ||||
|           type: 'warning' | ||||
|         }) | ||||
|         return false | ||||
|       } | ||||
|       screenfull.toggle(this.$refs.deepProcessingContainerB) | ||||
|     }, | ||||
| 			if (!screenfull.isEnabled) { | ||||
| 				this.$message({ | ||||
| 					message: 'you browser can not work', | ||||
| 					type: 'warning', | ||||
| 				}); | ||||
| 				return false; | ||||
| 			} | ||||
| 			screenfull.toggle(this.$refs.deepProcessingContainerB); | ||||
| 		}, | ||||
| 		resetSize() { | ||||
|       let deepProcessingContainer = document.getElementById('deepProcessingContainer') | ||||
|       let rw = parseFloat(window.innerWidth) | ||||
|       let rh = parseFloat(window.innerHeight) | ||||
|       let bw = parseFloat(deepProcessingContainer.style.width) | ||||
|       let bh = parseFloat(deepProcessingContainer.style.height) | ||||
| 			let wx = 0 | ||||
| 			let hx = 0 | ||||
| 			let deepProcessingContainer = document.getElementById( | ||||
| 				'deepProcessingContainer' | ||||
| 			); | ||||
| 			let rw = parseFloat(window.innerWidth); | ||||
| 			let rh = parseFloat(window.innerHeight); | ||||
| 			let bw = parseFloat(deepProcessingContainer.style.width); | ||||
| 			let bh = parseFloat(deepProcessingContainer.style.height); | ||||
| 			let wx = 0; | ||||
| 			let hx = 0; | ||||
| 			if (screenfull.isFullscreen) { | ||||
| 				console.log('全屏') | ||||
| 				wx = rw / bw | ||||
| 				hx = rh / bh | ||||
| 				console.log(this.scaleNum) | ||||
| 			}else{ | ||||
| 				console.log('非全屏') | ||||
| 				console.log(this.$store.state.app.sidebar.opened) | ||||
| 				wx = rw / bw; | ||||
| 				hx = rh / bh; | ||||
| 			} else { | ||||
| 				if (this.$store.state.app.sidebar.opened) { | ||||
| 					wx = (rw-280) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 				}else{ | ||||
| 					wx = (rw-85) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 					wx = (rw - 280) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} else { | ||||
| 					wx = (rw - 85) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} | ||||
| 			} | ||||
| 			this.scaleNum = wx | ||||
|     } | ||||
| 	} | ||||
| 			this.scaleNum = wx; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,11 @@ | ||||
| <template> | ||||
| 	<div id='kilnContainerB' ref='kilnContainerB' style="width: 100%;height: 100%;"> | ||||
| 	<div | ||||
| 		id="kilnContainerB" | ||||
| 		ref="kilnContainerB" | ||||
| 		style="width: 100%; height: 100%"> | ||||
| 		<div | ||||
| 			id='kilnContainer' | ||||
| 			ref='kilnContainer' | ||||
| 			id="kilnContainer" | ||||
| 			ref="kilnContainer" | ||||
| 			class="KilnDataBoard" | ||||
| 			style=" | ||||
| 				position: absolute; | ||||
| @@ -16,15 +19,22 @@ | ||||
| 				flex-direction: column; | ||||
| 				gap: 24px; | ||||
| 			" | ||||
| 			:style="{transform:'scale('+scaleNum+')'}"> | ||||
| 			<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='窑炉生产运行驾驶舱'/> | ||||
| 			:style="{ transform: 'scale(' + scaleNum + ')' }"> | ||||
| 			<KHeader | ||||
| 				:isFullScreen="isFullScreen" | ||||
| 				@screenfullChange="screenfullChange" | ||||
| 				topTitle="窑炉生产运行驾驶舱" /> | ||||
| 			<div | ||||
| 				class="main-body" | ||||
| 				style="flex: 1; display: flex; gap: 20px; padding: 0px 16px"> | ||||
| 				<div class="left-side" style="flex: 2"> | ||||
| 				<div | ||||
| 					class="left-side" | ||||
| 					style="flex: 2"> | ||||
| 					<LeftFour /> | ||||
| 				</div> | ||||
| 				<div class="right-side" style="flex: 1"> | ||||
| 				<div | ||||
| 					class="right-side" | ||||
| 					style="flex: 1"> | ||||
| 					<RightTwo /> | ||||
| 				</div> | ||||
| 			</div> | ||||
| @@ -36,8 +46,8 @@ | ||||
| import KHeader from '../components/Header'; | ||||
| import LeftFour from './LeftFour'; | ||||
| import RightTwo from './RightTwo.vue'; | ||||
| import screenfull from 'screenfull' | ||||
| import { debounce } from '@/utils/debounce' | ||||
| import screenfull from 'screenfull'; | ||||
| import { debounce } from '@/utils/debounce'; | ||||
|  | ||||
| export default { | ||||
| 	name: 'Kiln', | ||||
| @@ -46,10 +56,10 @@ export default { | ||||
| 		LeftFour, | ||||
| 		RightTwo, | ||||
| 	}, | ||||
| 	computed:{ | ||||
| 	computed: { | ||||
| 		sidebarStatus() { | ||||
| 			return this.$store.state.app.sidebar.opened; | ||||
| 		} | ||||
| 		}, | ||||
| 	}, | ||||
| 	// provide() { | ||||
| 	// 	return { | ||||
| @@ -59,84 +69,80 @@ export default { | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isFullScreen: false, | ||||
| 			scaleNum: 0.8 | ||||
| 			scaleNum: 0.8, | ||||
| 		}; | ||||
| 	}, | ||||
| 	watch: { | ||||
| 		sidebarStatus() { | ||||
| 			this.boxReset() | ||||
| 			this.boxReset(); | ||||
| 		}, | ||||
| 	}, | ||||
| 	created() { | ||||
| 		this.init() | ||||
| 	}, | ||||
| 	destroy() { | ||||
| 		this.destroy() | ||||
| 		this.init(); | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.boxReset = debounce(() => { | ||||
|       this.resetSize() | ||||
|     }, 300) | ||||
|     this.boxReset() | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.boxReset() | ||||
|     }) | ||||
| 		this.boxReset(); | ||||
| 		window.addEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	destroyed() { | ||||
| 		window.removeEventListener('resize', this.boxReset); | ||||
| 		this.destroy(); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		boxReset() { | ||||
| 			debounce(() => { | ||||
| 				this.resetSize(); | ||||
| 			}, 300)(); | ||||
| 		}, | ||||
| 		change() { | ||||
|       this.isFullScreen = screenfull.isFullscreen | ||||
|     }, | ||||
| 			this.isFullScreen = screenfull.isFullscreen; | ||||
| 		}, | ||||
|  | ||||
|     init() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.on('change', this.change) | ||||
|       } | ||||
|     }, | ||||
| 		init() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.on('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
|  | ||||
|     destroy() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.off('change', this.change) | ||||
|       } | ||||
|     }, | ||||
| 		destroy() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.off('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
| 		// 全屏 | ||||
| 		screenfullChange() { | ||||
|       if (!screenfull.isEnabled) { | ||||
|         this.$message({ | ||||
|           message: 'you browser can not work', | ||||
|           type: 'warning' | ||||
|         }) | ||||
|         return false | ||||
|       } | ||||
|       screenfull.toggle(this.$refs.kilnContainerB) | ||||
|     }, | ||||
| 			if (!screenfull.isEnabled) { | ||||
| 				this.$message({ | ||||
| 					message: 'you browser can not work', | ||||
| 					type: 'warning', | ||||
| 				}); | ||||
| 				return false; | ||||
| 			} | ||||
| 			screenfull.toggle(this.$refs.kilnContainerB); | ||||
| 		}, | ||||
| 		resetSize() { | ||||
|       let kilnContainerBox = document.getElementById('kilnContainer') | ||||
| 			console.log(kilnContainerBox) | ||||
|       let rw = parseFloat(window.innerWidth) | ||||
|       let rh = parseFloat(window.innerHeight) | ||||
|       let bw = parseFloat(kilnContainerBox.style.width) | ||||
|       let bh = parseFloat(kilnContainerBox.style.height) | ||||
| 			let wx = 0 | ||||
| 			let hx = 0 | ||||
| 			let kilnContainerBox = document.getElementById('kilnContainer'); | ||||
| 			let rw = parseFloat(window.innerWidth); | ||||
| 			let rh = parseFloat(window.innerHeight); | ||||
| 			let bw = parseFloat(kilnContainerBox.style.width); | ||||
| 			let bh = parseFloat(kilnContainerBox.style.height); | ||||
| 			let wx = 0; | ||||
| 			let hx = 0; | ||||
| 			if (screenfull.isFullscreen) { | ||||
| 				console.log('全屏') | ||||
| 				wx = rw / bw | ||||
| 				hx = rh / bh | ||||
| 				console.log(this.scaleNum) | ||||
| 			}else{ | ||||
| 				console.log('非全屏') | ||||
| 				console.log(this.$store.state.app.sidebar.opened) | ||||
| 				wx = rw / bw; | ||||
| 				hx = rh / bh; | ||||
| 			} else { | ||||
| 				if (this.$store.state.app.sidebar.opened) { | ||||
| 					wx = (rw-280) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 				}else{ | ||||
| 					wx = (rw-85) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 					wx = (rw - 280) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} else { | ||||
| 					wx = (rw - 85) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} | ||||
| 			} | ||||
| 			this.scaleNum = wx | ||||
|     } | ||||
| 	} | ||||
| 			this.scaleNum = wx; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,11 @@ | ||||
| <template> | ||||
| 	<div id='wholePlantContainerB' ref='wholePlantContainerB' style="width: 100%;height: 100%;"> | ||||
| 	<div | ||||
| 		id="wholePlantContainerB" | ||||
| 		ref="wholePlantContainerB" | ||||
| 		style="width: 100%; height: 100%"> | ||||
| 		<div | ||||
| 			id='wholePlantContainer' | ||||
| 			ref='wholePlantContainer' | ||||
| 			id="wholePlantContainer" | ||||
| 			ref="wholePlantContainer" | ||||
| 			class="wholePlantBoard" | ||||
| 			style=" | ||||
| 				position: absolute; | ||||
| @@ -16,18 +19,27 @@ | ||||
| 				flex-direction: column; | ||||
| 				gap: 24px; | ||||
| 			" | ||||
| 			:style="{transform:'scale('+scaleNum+')'}"> | ||||
| 			<KHeader :isFullScreen='isFullScreen' @screenfullChange='screenfullChange' topTitle='全厂总览驾驶舱'/> | ||||
| 			:style="{ transform: 'scale(' + scaleNum + ')' }"> | ||||
| 			<KHeader | ||||
| 				:isFullScreen="isFullScreen" | ||||
| 				@screenfullChange="screenfullChange" | ||||
| 				topTitle="全厂总览驾驶舱" /> | ||||
| 			<div | ||||
| 				class="main-body" | ||||
| 				style="flex: 1; display: flex; gap: 20px; padding: 0px 16px"> | ||||
| 				<div class="left-side" style="flex: 1"> | ||||
| 				<div | ||||
| 					class="left-side" | ||||
| 					style="flex: 1"> | ||||
| 					<LeftTwo /> | ||||
| 				</div> | ||||
| 				<div class="middle-side" style="flex: 1"> | ||||
| 				<div | ||||
| 					class="middle-side" | ||||
| 					style="flex: 1"> | ||||
| 					<MiddleTwo /> | ||||
| 				</div> | ||||
| 				<div class="right-side" style="flex: 1"> | ||||
| 				<div | ||||
| 					class="right-side" | ||||
| 					style="flex: 1"> | ||||
| 					<RightTwo /> | ||||
| 				</div> | ||||
| 			</div> | ||||
| @@ -40,8 +52,8 @@ import KHeader from '../components/Header'; | ||||
| import LeftTwo from './LeftTwo'; | ||||
| import MiddleTwo from './MiddleTwo'; | ||||
| import RightTwo from './RightTwo'; | ||||
| import screenfull from 'screenfull' | ||||
| import { debounce } from '@/utils/debounce' | ||||
| import screenfull from 'screenfull'; | ||||
| import { debounce } from '@/utils/debounce'; | ||||
|  | ||||
| export default { | ||||
| 	name: 'wholePlantBoard', | ||||
| @@ -49,7 +61,7 @@ export default { | ||||
| 		KHeader, | ||||
| 		LeftTwo, | ||||
| 		MiddleTwo, | ||||
| 		RightTwo | ||||
| 		RightTwo, | ||||
| 	}, | ||||
| 	// provide() { | ||||
| 	// 	return { | ||||
| @@ -59,80 +71,77 @@ export default { | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isFullScreen: false, | ||||
| 			scaleNum: 0.8 | ||||
| 			scaleNum: 0.8, | ||||
| 		}; | ||||
| 	}, | ||||
| 	created() { | ||||
| 		this.init() | ||||
| 		this.init(); | ||||
| 	}, | ||||
| 	destroy() { | ||||
| 		this.destroy() | ||||
| 		this.destroy(); | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.boxReset = debounce(() => { | ||||
|       this.resetSize() | ||||
|     }, 300) | ||||
|     this.boxReset() | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.boxReset() | ||||
|     }) | ||||
| 		console.log('mounted...........') | ||||
| 		this.boxReset(); | ||||
| 		window.addEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	destroyed() { | ||||
| 		console.log('destroyed...........') | ||||
| 		window.removeEventListener('resize', this.boxReset); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		boxReset() { | ||||
| 			debounce(() => { | ||||
| 				this.resetSize(); | ||||
| 			}, 300)(); | ||||
| 		}, | ||||
| 		change() { | ||||
|       this.isFullScreen = screenfull.isFullscreen | ||||
|     }, | ||||
|     init() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.on('change', this.change) | ||||
|       } | ||||
|     }, | ||||
|     destroy() { | ||||
|       if (screenfull.isEnabled) { | ||||
|         screenfull.off('change', this.change) | ||||
|       } | ||||
|     }, | ||||
| 			this.isFullScreen = screenfull.isFullscreen; | ||||
| 		}, | ||||
| 		init() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.on('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
| 		destroy() { | ||||
| 			if (screenfull.isEnabled) { | ||||
| 				screenfull.off('change', this.change); | ||||
| 			} | ||||
| 		}, | ||||
| 		// 全屏 | ||||
| 		screenfullChange() { | ||||
|       if (!screenfull.isEnabled) { | ||||
|         this.$message({ | ||||
|           message: 'you browser can not work', | ||||
|           type: 'warning' | ||||
|         }) | ||||
|         return false | ||||
|       } | ||||
|       screenfull.toggle(this.$refs.wholePlantContainerB) | ||||
|     }, | ||||
| 			if (!screenfull.isEnabled) { | ||||
| 				this.$message({ | ||||
| 					message: 'you browser can not work', | ||||
| 					type: 'warning', | ||||
| 				}); | ||||
| 				return false; | ||||
| 			} | ||||
| 			screenfull.toggle(this.$refs.wholePlantContainerB); | ||||
| 		}, | ||||
| 		resetSize() { | ||||
|       let wholePlantContainerBox = document.getElementById('wholePlantContainer') | ||||
|       let rw = parseFloat(window.innerWidth) | ||||
|       let rh = parseFloat(window.innerHeight) | ||||
|       let bw = parseFloat(wholePlantContainerBox.style.width) | ||||
|       let bh = parseFloat(wholePlantContainerBox.style.height) | ||||
| 			let wx = 0 | ||||
| 			let hx = 0 | ||||
| 			let wholePlantContainerBox = document.getElementById( | ||||
| 				'wholePlantContainer' | ||||
| 			); | ||||
| 			let rw = parseFloat(window.innerWidth); | ||||
| 			let rh = parseFloat(window.innerHeight); | ||||
| 			let bw = parseFloat(wholePlantContainerBox.style.width); | ||||
| 			let bh = parseFloat(wholePlantContainerBox.style.height); | ||||
| 			let wx = 0; | ||||
| 			let hx = 0; | ||||
| 			if (screenfull.isFullscreen) { | ||||
| 				console.log('全屏') | ||||
| 				wx = rw / bw | ||||
| 				hx = rh / bh | ||||
| 				console.log(this.scaleNum) | ||||
| 			}else{ | ||||
| 				console.log('非全屏') | ||||
| 				console.log(this.$store.state.app.sidebar.opened) | ||||
| 				wx = rw / bw; | ||||
| 				hx = rh / bh; | ||||
| 			} else { | ||||
| 				if (this.$store.state.app.sidebar.opened) { | ||||
| 					wx = (rw-280) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 				}else{ | ||||
| 					wx = (rw-85) / bw | ||||
| 					hx = (rh-116) / bh | ||||
| 					wx = (rw - 280) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} else { | ||||
| 					wx = (rw - 85) / bw; | ||||
| 					hx = (rh - 116) / bh; | ||||
| 				} | ||||
| 			} | ||||
| 			this.scaleNum = wx | ||||
|     } | ||||
| 	} | ||||
| 			this.scaleNum = wx; | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|  | ||||
|   | ||||
| @@ -76,10 +76,6 @@ export default { | ||||
| 					name: this.chartData[i].objName + this.chartData[i].objCode, | ||||
| 					type: 'bar', | ||||
| 					barMaxWidth: 20, | ||||
| 					label: { | ||||
| 						show: true, | ||||
| 						position: 'top', | ||||
| 					}, | ||||
| 					data: [], | ||||
| 				}; | ||||
| 				legendData.push(this.chartData[i].objName + this.chartData[i].objCode); | ||||
|   | ||||
| @@ -1,8 +1,7 @@ | ||||
| <template> | ||||
| 	<div | ||||
| 		class="searchBarBox divHeight" | ||||
| 		ref="searchBarRef" | ||||
| 		:style="{ paddingRight: isFold ? '55px' : '0px' }"> | ||||
| 		ref="searchBarRef"> | ||||
| 		<el-form | ||||
| 			:inline="true" | ||||
| 			class="demo-form-inline"> | ||||
| @@ -200,13 +199,6 @@ | ||||
| 				</el-button> | ||||
| 			</el-form-item> | ||||
| 		</el-form> | ||||
| 		<span | ||||
| 			v-if="isFold" | ||||
| 			class="foldClass" | ||||
| 			@click="switchMode"> | ||||
| 			{{ isExpand ? '收起' : '展开' }} | ||||
| 			<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" /> | ||||
| 		</span> | ||||
| 	</div> | ||||
| </template> | ||||
| <script> | ||||
| @@ -217,16 +209,8 @@ import { getFactoryList } from '@/api/core/base/factory'; | ||||
| import moment from 'moment'; | ||||
| export default { | ||||
| 	name: 'searchArea', | ||||
| 	props: { | ||||
| 		isFold: { | ||||
| 			// 多行模式(默认否) | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isExpand: false, // 展开收起 | ||||
| 			// 查询参数 | ||||
| 			queryParams: { | ||||
| 				energyTypeId: null, | ||||
| @@ -525,16 +509,6 @@ export default { | ||||
| 			let value = new Date(newData).getTime(); | ||||
| 			return value; | ||||
| 		}, | ||||
| 		switchMode() { | ||||
| 			// 展开和收起切换 | ||||
| 			this.isExpand = !this.isExpand; | ||||
| 			const element = this.$refs.searchBarRef; | ||||
| 			if (this.isExpand) { | ||||
| 				element.classList.remove('divHeight'); | ||||
| 			} else { | ||||
| 				element.classList.add('divHeight'); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -573,21 +547,6 @@ export default { | ||||
| 		margin-bottom: 4px; | ||||
| 	} | ||||
| } | ||||
| .searchBarBox .foldClass { | ||||
| 	position: absolute; | ||||
| 	top: 14px; | ||||
| 	right: 0; | ||||
| 	cursor: pointer; | ||||
| 	font-size: 12px; | ||||
| 	color: #0b58ff; | ||||
| } | ||||
| .searchBarBox .foldClass .iconfont { | ||||
| 	font-size: 14px; | ||||
| } | ||||
| .divHeight { | ||||
| 	height: 45px; | ||||
| 	overflow: hidden; | ||||
| } | ||||
| .separateStyle { | ||||
| 	display: inline-block; | ||||
| 	width: 1px; | ||||
|   | ||||
| @@ -4,7 +4,6 @@ | ||||
| 		id="contrastAnalysisBox"> | ||||
| 		<!-- 搜索工作栏 --> | ||||
| 		<search-area | ||||
| 			:isFold="isFold" | ||||
| 			@submit="getList" | ||||
| 			@export="exportExl" /> | ||||
| 		<div v-show="chartData.length"> | ||||
| @@ -38,7 +37,6 @@ export default { | ||||
| 	mixins: [tableHeightMixin], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isFold: false, | ||||
| 			chartData: [], | ||||
| 			timeDim: '', | ||||
| 			tableProps: [], | ||||
| @@ -46,13 +44,6 @@ export default { | ||||
| 			tableH: this.tableHeight(250) / 2, | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		window.addEventListener('resize', () => { | ||||
| 			this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437); | ||||
| 			// console.log(document.getElementById("contrastAnalysisBox").offsetWidth) | ||||
| 		}); | ||||
| 		this.isFold = this.searchBarWidth('contrastAnalysisBox', 1437); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		_setTableHeight() { | ||||
| 			this.tableH = this.tableHeight(250) / 2; | ||||
|   | ||||
| @@ -1,138 +1,139 @@ | ||||
| <template> | ||||
|   <div  | ||||
|     id="analysischartLine" | ||||
|     style="width: 100%" | ||||
|     :style="{ height: chartHeight + 'px' }" | ||||
|   ></div> | ||||
| 	<div | ||||
| 		id="analysischartLine" | ||||
| 		style="width: 100%" | ||||
| 		:style="{ height: chartHeight + 'px' }"></div> | ||||
| </template> | ||||
| <script> | ||||
| import * as echarts from 'echarts' | ||||
| import resize from '@/utils/chartMixins/resize' | ||||
| import * as echarts from 'echarts'; | ||||
| import resize from '@/utils/chartMixins/resize'; | ||||
| export default { | ||||
|   name: "LineChart", | ||||
|   mixins: [resize], | ||||
|   data() { | ||||
|     return { | ||||
|       chartDom: '', | ||||
|       chart: '', | ||||
|       chartHeight: this.tableHeight(370) | ||||
|     } | ||||
|   }, | ||||
|   props: { | ||||
|     chartData: { | ||||
|       type: Array, | ||||
|       required: true, | ||||
|       default: () => { | ||||
|         return [] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   watch: { | ||||
|     chartData: function () { | ||||
|       this.getChart() | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.chartHeight = this.tableHeight(370) | ||||
|     }) | ||||
|   }, | ||||
|   methods: { | ||||
|     getChart() { | ||||
|       if ( | ||||
|         this.chart !== null && | ||||
|         this.chart !== '' && | ||||
|         this.chart !== undefined | ||||
|       ) { | ||||
|         this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例 | ||||
|       } | ||||
|       this.chartDom = document.getElementById('analysischartLine') | ||||
|       this.chart = echarts.init(this.chartDom) | ||||
|       if (this.chartData.length === 0) { | ||||
|         return false | ||||
|       } | ||||
|       let arr = this.chartData[0].type // [水,电,煤] | ||||
|       let keys = Object.keys(this.chartData[0]) | ||||
|       let yData = [ | ||||
|         { | ||||
|           name: '本期', | ||||
|           type: 'bar', | ||||
|           data: [], | ||||
|           barWidth: 20, | ||||
|           label: { | ||||
|             show: true, | ||||
|             position: 'top' | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           name: '上期', | ||||
|           type: 'bar', | ||||
|           data: [], | ||||
|           barWidth: 20, | ||||
|           label: { | ||||
|             show: true, | ||||
|             position: 'top' | ||||
|           } | ||||
|         } | ||||
|       ] | ||||
|       for (let j = 0; j < arr.length; j++) { | ||||
|         for (let k = 0; k < keys.length; k++) { | ||||
|           if (keys[k].indexOf(arr[j]+'_上期') > -1) { | ||||
|             yData[1].data.push(this.chartData[0][keys[k]]) | ||||
|           } | ||||
|           if (keys[k].indexOf(arr[j]+'_能源消耗') > -1) { | ||||
|             yData[0].data.push(this.chartData[0][keys[k]]) | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       var option = { | ||||
|         color:['#288AFF','#8EF0AB'], | ||||
|         tooltip: { | ||||
|           trigger: 'axis', | ||||
|           axisPointer: { | ||||
|             type: 'shadow' | ||||
|           }, | ||||
|           formatter: function(params) { | ||||
|             return ( | ||||
|               params[0].axisValue +  | ||||
|               `<br>` + | ||||
|               params.map((item) => { | ||||
|                 let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>` | ||||
|                 let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>` | ||||
| 						let value = item.value ? item.value : '-' | ||||
| 						let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>` | ||||
| 						return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px"> | ||||
| 	name: 'LineChart', | ||||
| 	mixins: [resize], | ||||
| 	data() { | ||||
| 		return { | ||||
| 			chartDom: '', | ||||
| 			chart: '', | ||||
| 			chartHeight: this.tableHeight(370), | ||||
| 		}; | ||||
| 	}, | ||||
| 	props: { | ||||
| 		chartData: { | ||||
| 			type: Array, | ||||
| 			required: true, | ||||
| 			default: () => { | ||||
| 				return []; | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	watch: { | ||||
| 		chartData: function () { | ||||
| 			this.getChart(); | ||||
| 		}, | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		window.addEventListener('resize', () => { | ||||
| 			this.chartHeight = this.tableHeight(370); | ||||
| 		}); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		getChart() { | ||||
| 			if ( | ||||
| 				this.chart !== null && | ||||
| 				this.chart !== '' && | ||||
| 				this.chart !== undefined | ||||
| 			) { | ||||
| 				this.chart.dispose(); // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例 | ||||
| 			} | ||||
| 			this.chartDom = document.getElementById('analysischartLine'); | ||||
| 			this.chart = echarts.init(this.chartDom); | ||||
| 			if (this.chartData.length === 0) { | ||||
| 				return false; | ||||
| 			} | ||||
| 			let arr = this.chartData[0].type; // [水,电,煤] | ||||
| 			let keys = Object.keys(this.chartData[0]); | ||||
| 			let yData = [ | ||||
| 				{ | ||||
| 					name: '本期', | ||||
| 					type: 'bar', | ||||
| 					data: [], | ||||
| 					barWidth: 20, | ||||
| 					label: { | ||||
| 						show: true, | ||||
| 						position: 'top', | ||||
| 					}, | ||||
| 				}, | ||||
| 				{ | ||||
| 					name: '上期', | ||||
| 					type: 'bar', | ||||
| 					data: [], | ||||
| 					barWidth: 20, | ||||
| 					// label: { | ||||
| 					//   show: true, | ||||
| 					//   position: 'top' | ||||
| 					// } | ||||
| 				}, | ||||
| 			]; | ||||
| 			for (let j = 0; j < arr.length; j++) { | ||||
| 				for (let k = 0; k < keys.length; k++) { | ||||
| 					if (keys[k].indexOf(arr[j] + '_上期') > -1) { | ||||
| 						yData[1].data.push(this.chartData[0][keys[k]]); | ||||
| 					} | ||||
| 					if (keys[k].indexOf(arr[j] + '_能源消耗') > -1) { | ||||
| 						yData[0].data.push(this.chartData[0][keys[k]]); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 			var option = { | ||||
| 				color: ['#288AFF', '#8EF0AB'], | ||||
| 				tooltip: { | ||||
| 					trigger: 'axis', | ||||
| 					axisPointer: { | ||||
| 						type: 'shadow', | ||||
| 					}, | ||||
| 					formatter: function (params) { | ||||
| 						return ( | ||||
| 							params[0].axisValue + | ||||
| 							`<br>` + | ||||
| 							params | ||||
| 								.map((item) => { | ||||
| 									let str = `<span style="display:inline-block;width:8px;height:8px;margin: 0 8px 0 -3px;border-radius:2px;background-color:${item.color};"></span>`; | ||||
| 									let seriesNameStr = `<span style="display:inline-block;">${item.seriesName}</span>`; | ||||
| 									let value = item.value ? item.value : '-'; | ||||
| 									let valueStr = `<span style="display:inline-block;margin-left:10px;color:rgba(0,0,0,0.45);">${value}</span>`; | ||||
| 									return `<span style="display:flex; justify-content:space-between; margin-bottom: 2px"> | ||||
| 									<span>${str}${seriesNameStr}</span> | ||||
| 									<span>${valueStr}</span> | ||||
| 								</span>` | ||||
|               }).join(``) | ||||
|             ) | ||||
|           } | ||||
|         }, | ||||
|         legend: { | ||||
|           right: '1%', | ||||
|           icon: 'rect', | ||||
|           itemHeight: 8, | ||||
|           itemWidth: 8 | ||||
|         }, | ||||
|         grid: { | ||||
|           left: '1%', | ||||
|           right: '1%', | ||||
|           bottom: '3%', | ||||
|           containLabel: true | ||||
|         }, | ||||
|         yAxis: { | ||||
|           type: 'value', | ||||
|           boundaryGap: [0, 0.01] | ||||
|         }, | ||||
|         xAxis: { | ||||
|           type: 'category', | ||||
|           data: arr | ||||
|         }, | ||||
|         series: yData | ||||
|       } | ||||
|       option && this.chart.setOption(option); | ||||
|     } | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| 								</span>`; | ||||
| 								}) | ||||
| 								.join(``) | ||||
| 						); | ||||
| 					}, | ||||
| 				}, | ||||
| 				legend: { | ||||
| 					right: '1%', | ||||
| 					icon: 'rect', | ||||
| 					itemHeight: 8, | ||||
| 					itemWidth: 8, | ||||
| 				}, | ||||
| 				grid: { | ||||
| 					left: '1%', | ||||
| 					right: '1%', | ||||
| 					bottom: '3%', | ||||
| 					containLabel: true, | ||||
| 				}, | ||||
| 				yAxis: { | ||||
| 					type: 'value', | ||||
| 					boundaryGap: [0, 0.01], | ||||
| 				}, | ||||
| 				xAxis: { | ||||
| 					type: 'category', | ||||
| 					data: arr, | ||||
| 				}, | ||||
| 				series: yData, | ||||
| 			}; | ||||
| 			option && this.chart.setOption(option); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -68,9 +68,9 @@ export default { | ||||
|  | ||||
| 			var option = { | ||||
| 				color: ['#288AFF'], | ||||
| 				// tooltip: { | ||||
| 				//   trigger: 'axis' | ||||
| 				// }, | ||||
| 				tooltip: { | ||||
| 					trigger: 'axis', | ||||
| 				}, | ||||
| 				grid: { | ||||
| 					left: '4%', | ||||
| 					right: '1%', | ||||
|   | ||||
| @@ -1,8 +1,7 @@ | ||||
| <template> | ||||
| 	<div | ||||
| 		class="searchBarBox divHeight" | ||||
| 		ref="searchBarRef" | ||||
| 		:style="{ paddingRight: isFold ? '55px' : '0px' }"> | ||||
| 		class="searchBarBox" | ||||
| 		ref="searchBarRef"> | ||||
| 		<el-form | ||||
| 			:inline="true" | ||||
| 			class="demo-form-inline"> | ||||
| @@ -172,9 +171,9 @@ | ||||
| 				</el-button> | ||||
| 				<span | ||||
| 					class="separateStyle" | ||||
| 					v-hasPermi="['analysis:trend-analysis:export']"></span> | ||||
| 					v-hasPermi="['analysis:energy-analysis:query']"></span> | ||||
| 				<el-button | ||||
| 					v-hasPermi="['analysis:trend-analysis:export']" | ||||
| 					v-hasPermi="['analysis:energy-analysis:query']" | ||||
| 					type="primary" | ||||
| 					size="small" | ||||
| 					plain | ||||
| @@ -183,13 +182,6 @@ | ||||
| 				</el-button> | ||||
| 			</el-form-item> | ||||
| 		</el-form> | ||||
| 		<span | ||||
| 			v-if="isFold" | ||||
| 			class="foldClass" | ||||
| 			@click="switchMode"> | ||||
| 			{{ isExpand ? '收起' : '展开' }} | ||||
| 			<svg-icon :icon-class="isExpand ? 'upward' : 'downward'" /> | ||||
| 		</span> | ||||
| 	</div> | ||||
| </template> | ||||
| <script> | ||||
| @@ -198,16 +190,8 @@ import { getEnergyTypeListAll } from '@/api/base/energyType'; | ||||
| import moment from 'moment'; | ||||
| export default { | ||||
| 	name: 'searchArea', | ||||
| 	props: { | ||||
| 		isFold: { | ||||
| 			// 多行模式(默认否) | ||||
| 			type: Boolean, | ||||
| 			default: false, | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isExpand: false, // 展开收起 | ||||
| 			// 查询参数 | ||||
| 			queryParams: { | ||||
| 				energyTypeId: null, | ||||
| @@ -509,16 +493,6 @@ export default { | ||||
| 			let value = new Date(newData).getTime(); | ||||
| 			return value; | ||||
| 		}, | ||||
| 		switchMode() { | ||||
| 			// 展开和收起切换 | ||||
| 			this.isExpand = !this.isExpand; | ||||
| 			const element = this.$refs.searchBarRef; | ||||
| 			if (this.isExpand) { | ||||
| 				element.classList.remove('divHeight'); | ||||
| 			} else { | ||||
| 				element.classList.add('divHeight'); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| @@ -557,21 +531,6 @@ export default { | ||||
| 		margin-bottom: 4px; | ||||
| 	} | ||||
| } | ||||
| .searchBarBox .foldClass { | ||||
| 	position: absolute; | ||||
| 	top: 14px; | ||||
| 	right: 0; | ||||
| 	cursor: pointer; | ||||
| 	font-size: 12px; | ||||
| 	color: #0b58ff; | ||||
| } | ||||
| .searchBarBox .foldClass .iconfont { | ||||
| 	font-size: 14px; | ||||
| } | ||||
| .divHeight { | ||||
| 	height: 45px; | ||||
| 	overflow: hidden; | ||||
| } | ||||
| .separateStyle { | ||||
| 	display: inline-block; | ||||
| 	width: 1px; | ||||
|   | ||||
| @@ -4,7 +4,6 @@ | ||||
| 		id="trendAnalysisBox"> | ||||
| 		<!-- 搜索工作栏 --> | ||||
| 		<search-area | ||||
| 			:isFold="isFold" | ||||
| 			@submit="getList" | ||||
| 			@export="exportExl" /> | ||||
| 		<div v-show="chartData.length"> | ||||
| @@ -33,20 +32,12 @@ export default { | ||||
| 	components: { SearchArea, LineChart }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			isFold: false, | ||||
| 			chartData: [], | ||||
| 			timeDim: '', | ||||
| 			tableProps: [], | ||||
| 			list: [], | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		window.addEventListener('resize', () => { | ||||
| 			this.tableH = this.tableHeight(260); | ||||
| 			this.isFold = this.searchBarWidth('trendAnalysisBox', 1480); | ||||
| 		}); | ||||
| 		this.isFold = this.searchBarWidth('trendAnalysisBox', 1480); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		getList(params) { | ||||
| 			this.timeDim = params.timeDim; | ||||
| @@ -66,8 +57,14 @@ export default { | ||||
| 			let listObj = { useNum: '消耗量' }; // 数据 | ||||
| 			for (let i = 0; i < arr.length; i++) { | ||||
| 				let obj = {}; | ||||
| 				if (this.timeDim === '3') { | ||||
| 					let fName = arr[i].time.slice(0, 4); | ||||
| 					let lName = arr[i].time.slice(4, 6); | ||||
| 					obj.label = fName + ' 第 ' + lName + ' 周'; | ||||
| 				} else { | ||||
| 					obj.label = arr[i].time; | ||||
| 				} | ||||
| 				obj.prop = arr[i].time; | ||||
| 				obj.label = arr[i].time; | ||||
| 				obj.minWidth = 100; | ||||
| 				tempX.push(obj); | ||||
| 				listObj[arr[i].time] = arr[i].useNum || null; | ||||
| @@ -77,37 +74,20 @@ export default { | ||||
| 		}, | ||||
| 		// 导出excel | ||||
| 		exportExl(params) { | ||||
| 			exportTrend({ ...params }).then((res) => { | ||||
| 				// let fileName = ''; | ||||
| 				// const contentDisposition = res.headers['content-disposition']; | ||||
| 				// if (contentDisposition) { | ||||
| 				// 	fileName = decodeURIComponent( | ||||
| 				// 		contentDisposition.slice( | ||||
| 				// 			contentDisposition.indexOf('filename=') + 9 | ||||
| 				// 		) | ||||
| 				// 	); | ||||
| 				// } | ||||
| 				const blob = new Blob([res.data]); | ||||
| 				const reader = new FileReader(); | ||||
| 				reader.readAsDataURL(blob); | ||||
| 				reader.onload = (e) => { | ||||
| 					const a = document.createElement('a'); | ||||
| 					a.download = '走势分析'; | ||||
| 					a.href = e.target.result; | ||||
| 					document.body.appendChild(a); | ||||
| 					a.click(); | ||||
| 					document.body.removeChild(a); | ||||
| 			exportTrend({ ...params }) | ||||
| 				.then((response) => { | ||||
| 					this.$download.excel(response, '走势分析.xls'); | ||||
| 					this.$message.success('导出成功'); | ||||
| 				}; | ||||
| 			}); | ||||
| 				}) | ||||
| 				.catch(() => {}); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| <style lang='scss'> | ||||
| <style lang="scss"> | ||||
| .trendAnalysisBox { | ||||
| 	.trend-out-table { | ||||
| 		margin-bottom: 15px; | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
| </style> | ||||
|   | ||||
| @@ -89,13 +89,13 @@ export default { | ||||
| 					param: 'name', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('base:energy-plc:query') ? 'button' : '', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:energy-plc:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:energy-plc:create') ? 'button' : '', | ||||
|   | ||||
| @@ -116,7 +116,7 @@ export default { | ||||
| 		}, | ||||
| 		selectObj(val) { | ||||
| 			this.form.bindObjectId = val[val.length - 1]; | ||||
| 			this.form.bindObjectType = val.length - 1; | ||||
| 			this.form.bindObjectType = val.length; | ||||
| 		}, | ||||
| 		submitForm() { | ||||
| 			this.$refs['form'].validate((valid) => { | ||||
| @@ -152,4 +152,4 @@ export default { | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| </script> | ||||
|   | ||||
| @@ -22,7 +22,9 @@ | ||||
| 							readonly | ||||
| 							style="width: 250px"></el-input> | ||||
| 					</el-form-item> | ||||
| 					<el-form-item v-if="showBtn"> | ||||
| 					<el-form-item | ||||
| 						v-if="showBtn" | ||||
| 						v-hasPermi="['base:energy-plc-param:create']"> | ||||
| 						<el-button | ||||
| 							type="success" | ||||
| 							size="small" | ||||
| @@ -160,15 +162,19 @@ export default { | ||||
| 				this.drawerTitle = '参数绑定'; | ||||
| 				this.showBtn = true; | ||||
| 				this.tableBtn = [ | ||||
| 					{ | ||||
| 						type: 'edit', | ||||
| 						btnName: '编辑', | ||||
| 					}, | ||||
| 					{ | ||||
| 						type: 'delete', | ||||
| 						btnName: '删除', | ||||
| 					}, | ||||
| 				]; | ||||
| 					this.$auth.hasPermi('base:energy-plc-param:update') | ||||
| 						? { | ||||
| 								type: 'edit', | ||||
| 								btnName: '编辑', | ||||
| 						  } | ||||
| 						: undefined, | ||||
| 					this.$auth.hasPermi('base:energy-plc-param:delete') | ||||
| 						? { | ||||
| 								type: 'delete', | ||||
| 								btnName: '删除', | ||||
| 						  } | ||||
| 						: undefined, | ||||
| 				].filter((v) => v); | ||||
| 			} | ||||
| 		}, | ||||
| 		getList() { | ||||
|   | ||||
| @@ -107,13 +107,17 @@ export default { | ||||
| 					param: 'cnName', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('base:energy-plc-connect:query') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:energy-plc-connect:create') | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:energy-plc-connect:create') | ||||
| @@ -127,17 +131,25 @@ export default { | ||||
| 			], | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:energy-plc-connect:bind') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:energy-plc-param:query', | ||||
| 					'base:energy-type:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'connect', | ||||
| 							btnName: '绑定', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				{ | ||||
| 					type: 'detail', | ||||
| 					btnName: '详情', | ||||
| 				}, | ||||
| 				this.$auth.hasPermi('base:energy-plc-connect:update') | ||||
| 				this.$auth.hasPermi('base:energy-plc-param:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:energy-plc-connect:update', | ||||
| 					'base:energy-plc-connect:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
|   | ||||
| @@ -45,6 +45,7 @@ | ||||
| 			</el-table-column> | ||||
| 		</el-table> | ||||
| 		<el-button | ||||
| 			v-show="!isEdit" | ||||
| 			class="addButton" | ||||
| 			icon="el-icon-plus" | ||||
| 			@click="emitButtonClick"> | ||||
| @@ -70,6 +71,13 @@ export default { | ||||
| 				return []; | ||||
| 			}, | ||||
| 		}, | ||||
| 		isEdit: { | ||||
| 			type: Boolean, | ||||
| 			required: true, | ||||
| 			default: () => { | ||||
| 				return false; | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return {}; | ||||
|   | ||||
| @@ -42,6 +42,7 @@ | ||||
| 				<add-table | ||||
| 					:table-data="tableData" | ||||
| 					:table-name-list="tableNameList" | ||||
| 					:isEdit="isEdit" | ||||
| 					@emitFun="inputChange" | ||||
| 					@emitButtonClick="emitButtonClick" /> | ||||
| 			</el-col> | ||||
|   | ||||
| @@ -114,13 +114,20 @@ export default { | ||||
| 					defaultSelect: [], | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('base:energy-quantity-manual:query') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermiOr([ | ||||
| 						'base:energy-quantity-manual:export', | ||||
| 						'base:energy-quantity-manual:create', | ||||
| 					]) | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:energy-quantity-manual:export') | ||||
| @@ -147,13 +154,19 @@ export default { | ||||
| 			// 班次基础信息列表 | ||||
| 			list: [], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:energy-quantity-manual:create') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:energy-quantity-manual:query', | ||||
| 					'base:energy-quantity-manual:create', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'meterReading', | ||||
| 							btnName: '抄表', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:energy-quantity-manual:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:energy-quantity-manual:update', | ||||
| 					'base:energy-quantity-manual:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
|   | ||||
| @@ -90,7 +90,9 @@ export default { | ||||
| 					width: 350, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('base:energy-quantity-realtime:query') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
|   | ||||
| @@ -52,7 +52,10 @@ export default { | ||||
| 		return { | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:table-name-config:edit') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:energy-table:query', | ||||
| 					'base:energy-table:update', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
|   | ||||
| @@ -66,7 +66,7 @@ | ||||
| 						placeholder="请选择" | ||||
| 						style="width: 100%"> | ||||
| 						<el-option | ||||
| 							v-for="item in getDictDatas(DICT_TYPE.TABLE_NAME)" | ||||
| 							v-for="item in tableNameList" | ||||
| 							:key="item.value" | ||||
| 							:label="item.label" | ||||
| 							:value="item.value"></el-option> | ||||
| @@ -154,6 +154,7 @@ import { | ||||
| 	createEnergyLimit, | ||||
| 	getEnergyParamList, | ||||
| } from '@/api/monitoring/energyLimit'; | ||||
| import { energyTableGet } from '@/api/base/energyQuantityManual'; | ||||
| export default { | ||||
| 	name: 'energyLimitAdd', | ||||
| 	props: { | ||||
| @@ -203,6 +204,7 @@ export default { | ||||
| 					{ required: true, message: '指标类型不能为空', trigger: 'change' }, | ||||
| 				], | ||||
| 			}, | ||||
| 			tableNameList: [], | ||||
| 			detailList: [], | ||||
| 		}; | ||||
| 	}, | ||||
| @@ -214,10 +216,10 @@ export default { | ||||
| 				getEnergyLimit(id).then((res) => { | ||||
| 					if (res.code === 0) { | ||||
| 						this.form = res.data; | ||||
| 						this.form.plcParamId = res.data.plcParamId || ''; | ||||
| 						this.form.tableName = this.form.tableName | ||||
| 							? this.form.tableName + '' | ||||
| 							: ''; | ||||
| 						this.form.plcParamId = res.data.plcParamId || ''; | ||||
| 						this.form.method = this.form.method ? this.form.method + '' : ''; | ||||
| 						this.form.limitType = this.form.limitType | ||||
| 							? this.form.limitType + '' | ||||
| @@ -229,6 +231,9 @@ export default { | ||||
| 						if (this.form.type === 2) { | ||||
| 							this.getDetailList(); | ||||
| 						} | ||||
| 						if (this.form.energyTypeId) { | ||||
| 							this.getTableNameList(this.form.energyTypeId); | ||||
| 						} | ||||
| 					} | ||||
| 				}); | ||||
| 			} else { | ||||
| @@ -267,11 +272,22 @@ export default { | ||||
| 			} | ||||
| 		}, | ||||
| 		toggleType() { | ||||
| 			if (this.form.energyTypeId && this.form.type) { | ||||
| 				this.getDetailList(); | ||||
| 				this.form.plcParamId = ''; | ||||
| 			if (this.form.energyTypeId && this.form.method == 2) { | ||||
| 				this.form.tableName = ''; | ||||
| 				this.getTableNameList(this.form.energyTypeId); | ||||
| 			} | ||||
| 		}, | ||||
| 		// 获取能源表名list | ||||
| 		getTableNameList(id) { | ||||
| 			energyTableGet({ energyTypeId: id }).then((res) => { | ||||
| 				this.tableNameList = res.data.tableObjs || []; | ||||
| 				if (this.tableNameList.length === 0) { | ||||
| 					this.$modal.msgWarning( | ||||
| 						'当前能源类型暂无配置表名,请先到《表名配置》页面配置' | ||||
| 					); | ||||
| 				} | ||||
| 			}); | ||||
| 		}, | ||||
| 		// 递归处理分类回显问题 | ||||
| 		changeDetSelect(key, treeData) { | ||||
| 			let arr = []; // 递归时操作的数组 | ||||
|   | ||||
| @@ -125,13 +125,17 @@ export default { | ||||
| 					param: 'limitType', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-limit:query') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '查询', | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-limit:create') | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-limit:create') | ||||
| @@ -262,8 +266,9 @@ export default { | ||||
| 		}, | ||||
| 		/** 删除按钮操作 */ | ||||
| 		handleDelete(row) { | ||||
| 			console.log(row); | ||||
| 			this.$modal | ||||
| 				.confirm('是否确认删除监控对象为"' + row.objName + '"的数据项?') | ||||
| 				.confirm('是否确认删除第"' + row._pageIndex + '"条数据项?') | ||||
| 				.then(function () { | ||||
| 					return deleteEnergyLimit(row.id); | ||||
| 				}) | ||||
|   | ||||
| @@ -113,7 +113,9 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-report:export') | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-report:export') | ||||
|   | ||||
| @@ -22,6 +22,7 @@ | ||||
| 					</el-form-item> | ||||
| 					<el-form-item> | ||||
| 						<el-button | ||||
| 							v-hasPermi="['monitoring:energy-statistics-det:query']" | ||||
| 							type="success" | ||||
| 							size="small" | ||||
| 							v-if="showBtn" | ||||
| @@ -30,6 +31,7 @@ | ||||
| 							新增 | ||||
| 						</el-button> | ||||
| 						<el-button | ||||
| 							v-hasPermi="['monitoring:energy-statistics-det:delete']" | ||||
| 							type="danger" | ||||
| 							size="small" | ||||
| 							v-if="showBtn" | ||||
| @@ -161,11 +163,13 @@ export default { | ||||
| 				this.drawerTitle = '参数绑定'; | ||||
| 				this.showBtn = true; | ||||
| 				this.tableBtn = [ | ||||
| 					{ | ||||
| 						type: 'delete', | ||||
| 						btnName: '删除', | ||||
| 					}, | ||||
| 				]; | ||||
| 					this.$auth.hasPermi('monitoring:energy-statistics-det:delete') | ||||
| 						? { | ||||
| 								type: 'delete', | ||||
| 								btnName: '删除', | ||||
| 						  } | ||||
| 						: undefined, | ||||
| 				].filter((v) => v); | ||||
| 			} | ||||
| 		}, | ||||
| 		getList() { | ||||
|   | ||||
| @@ -88,7 +88,9 @@ export default { | ||||
| 					type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-statistics-det:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '关联', | ||||
| 					name: 'add', | ||||
| 					color: 'primary', | ||||
|   | ||||
| @@ -103,8 +103,11 @@ export default { | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
|  | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-statistics:create') | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('monitoring:energy-statistics:create') | ||||
| @@ -118,17 +121,22 @@ export default { | ||||
| 			], | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('monitoring:energy-statistics:bind') | ||||
| 				this.$auth.hasPermi('monitoring:energy-statistics-det:query') | ||||
| 					? { | ||||
| 							type: 'connect', | ||||
| 							btnName: '绑定', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				{ | ||||
| 					type: 'detail', | ||||
| 					btnName: '详情', | ||||
| 				}, | ||||
| 				this.$auth.hasPermi('monitoring:energy-statistics:update') | ||||
| 				this.$auth.hasPermi('monitoring:energy-statistics:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'monitoring:energy-statistics:update', | ||||
| 					'monitoring:energy-statistics:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
|   | ||||
| @@ -130,8 +130,20 @@ export default { | ||||
| 				{ prop: 'createTime', label: '报警时间', filter: timeFilter, width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'alarmCode', label: '设备报警码', width: 180, showOverflowtooltip: true }, | ||||
| 				{ prop: 'alarmContent', label: '报警内容', width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn }, | ||||
| 				{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn }, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'monitoring:equipment-alarm-log:query', | ||||
| 					'base:equipment-alarm-hand:query' | ||||
| 				]) ? | ||||
| 				{ prop: 'opt1', label: '处理记录', name: '查看', subcomponent: btn } : undefined, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'monitoring:equipment-alarm-log:query', | ||||
| 					'base:equipment-alarm-hand:query', | ||||
| 					'base:core-worker:query', | ||||
| 					'base:equipment-alarm-hand:create', | ||||
| 					'base:equipment-alarm-hand:update', | ||||
| 					'monitoring:equipment-alarm-log:update' | ||||
| 				]) ? | ||||
| 				{ prop: 'opt2', label: '处理', name: '报警处理', subcomponent: btn } : undefined, | ||||
| 				// { prop: 'remark', label: '备注' }, | ||||
| 			], | ||||
| 			searchBarFormConfig: [ | ||||
|   | ||||
| @@ -122,19 +122,30 @@ export default { | ||||
| 			editMode: '', | ||||
| 			searchBarKeys: ['name', 'code'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:update') | ||||
| 					? { | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:equipment-group:query', | ||||
| 					'base:equipment-group-alarm:query' | ||||
| 				]) | ||||
| 				? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看报警', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:equipment-group:update', | ||||
| 					'base:equipment-group:query', | ||||
| 					'base:equipment-group-alarm:create', | ||||
| 					'base:equipment-group-alarm:delete', | ||||
| 					'base:equipment-group-alarm:update', | ||||
| 					'base:equipment-group-alarm:query', | ||||
| 					'base:equipment-group-alarm:query' | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:alarm-group:delete') | ||||
| 				this.$auth.hasPermi('base:equipment-group:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -244,10 +255,11 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:equipment-group:create') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:alarm-group:create') | ||||
| 					type: this.$auth.hasPermi('base:equipment-group:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
|   | ||||
| @@ -123,13 +123,23 @@ export default { | ||||
| 		return { | ||||
| 			searchBarKeys: ['groupId', 'equipmentName'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:bind-group:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:equipment-group-alarm:query', | ||||
| 					'base:core-equipment:query' | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '查看报警', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:bind-group:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'equipment:bind-group:update', | ||||
| 					'base:core-equipment:query', | ||||
| 					'base:equipment-group-alarm:create', | ||||
| 					'base:equipment-group-alarm:update', | ||||
| 					'base:equipment-group-alarm:delete', | ||||
| 					'base:equipment-group-alarm:query' | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| @@ -201,11 +211,16 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 							'equipment:bind-group:create', | ||||
| 							'base:core-equipment:query' | ||||
| 						]) ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:bind-group:create') | ||||
| 						? 'button' | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 							'equipment:bind-group:create', | ||||
| 							'base:core-equipment:query' | ||||
| 						]) ? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
|   | ||||
| @@ -140,17 +140,28 @@ export default { | ||||
| 			// tableBtn: [ | ||||
| 			// ].filter((v) => v), | ||||
| 			tableBtn: [ | ||||
| 				{ | ||||
| 					type: 'detail', | ||||
| 					btnName: '参数绑定', | ||||
| 				}, | ||||
| 				this.$auth.hasPermi('equipment:collection-config:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:equipment-plc-connect:query', | ||||
| 					'base:equipment-plc-param:query' | ||||
| 				]) | ||||
| 				? { | ||||
| 						type: 'detail', | ||||
| 						btnName: '参数绑定', | ||||
| 					} : undefined, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 						'base:equipment-plc-connect:update', | ||||
| 						'base:equipment-plc-connect:query', | ||||
| 						'base:equipment-plc-param:create', | ||||
| 						'base:equipment-plc-param:update', | ||||
| 						'base:equipment-plc-param:delete', | ||||
| 						'base:equipment-plc-param:query' | ||||
| 					]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:collection-config:delete') | ||||
| 				this.$auth.hasPermi('base:equipment-plc-connect:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -158,14 +169,14 @@ export default { | ||||
| 					: undefined, | ||||
| 			].filter((v) => v), | ||||
| 			tableProps: [ | ||||
| 				{ prop: 'productionLine', label: '产线', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'workshopSection', label: '工段', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'equipmentName', label: '设备名', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'equipmentCode', label: '设备编码', width: 200, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcCode', label: '关联表编码', width: 220, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcTableName', label: '关联表名', width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcName', label: '标识名称', width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'bindingParameters', label: '绑定参数数量', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'productionLine', label: '产线', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'workshopSection', label: '工段', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'equipmentName', label: '设备名', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'equipmentCode', label: '设备编码', minWidth: 200, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcCode', label: '关联表编码', minWidth: 220, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcTableName', label: '关联表名', minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'plcName', label: '标识名称', minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'bindingParameters', label: '绑定参数数量', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				// { | ||||
| 				// 	_action: 'params-bind', | ||||
| 				// 	label: '查看绑定', | ||||
| @@ -217,10 +228,11 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:equipment-plc-connect:create') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:collection-config:create') | ||||
| 					type: this.$auth.hasPermi('base:equipment-plc-connect:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					// type: 'button', | ||||
|   | ||||
| @@ -108,13 +108,16 @@ export default { | ||||
| 			tableKey: Math.random(), | ||||
| 			searchBarKeys: ['name', 'plcTableName'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:realtime-table-config:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:equipment-plc:update', | ||||
| 					'base:equipment-plc:query' | ||||
| 					]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:realtime-table-config:delete') | ||||
| 				this.$auth.hasPermi('base:equipment-plc:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -160,13 +163,12 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:equipment-plc:create') | ||||
| 						?  'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					// type: this.$auth.hasPermi('equipment:realtime-table-config:create') | ||||
| 					// 	? 'button' | ||||
| 					// 	: '', | ||||
| 					type: 'button', | ||||
| 					type: this.$auth.hasPermi('base:equipment-plc:create') | ||||
| 						? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					plain: true, | ||||
| @@ -194,7 +196,7 @@ export default { | ||||
| 						input: true, | ||||
| 						label: '编码', | ||||
| 						prop: 'code', | ||||
| 						url: '/base/equipment-group/getCode', | ||||
| 						url: '/base/energy-plc/getCode', | ||||
| 						rules: [{ required: true, message: '编码不能为空', trigger: 'blur' }], | ||||
| 					}, | ||||
| 				], | ||||
|   | ||||
| @@ -91,7 +91,7 @@ | ||||
| 		<!-- btns  --> | ||||
| 		<el-table-column width="188" label="操作"> | ||||
| 			<template slot-scope="scope"> | ||||
| 				<el-tooltip content="确认" placement="top"> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:check:update')" content="确认" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| @@ -101,8 +101,8 @@ | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="查看详情" placement="top"> | ||||
| 				<span v-if="$auth.hasPermi('equipment:check:query')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:check:query')" content="查看详情" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| @@ -111,8 +111,26 @@ | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="编辑" placement="top"> | ||||
| 				<span v-if="$auth.hasPermiAnd([ | ||||
| 					'equipment:check:update', | ||||
| 					'base:core-worker:query', | ||||
| 					'base:group-classes:query', | ||||
| 					'base:core-department:query', | ||||
| 					'equipment:check:query', | ||||
| 					'equipment:check:create', | ||||
| 					'equipment:check:delete', | ||||
| 					'base:core-equipment:query' | ||||
| 				])" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermiAnd([ | ||||
| 					'equipment:check:update', | ||||
| 					'base:core-worker:query', | ||||
| 					'base:group-classes:query', | ||||
| 					'base:core-department:query', | ||||
| 					'equipment:check:query', | ||||
| 					'equipment:check:create', | ||||
| 					'equipment:check:delete', | ||||
| 					'base:core-equipment:query' | ||||
| 				])" content="编辑" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| @@ -121,8 +139,8 @@ | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="删除" placement="top"> | ||||
| 				<span v-if="$auth.hasPermi('equipment:check:delete')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:check:delete')" content="删除" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
|   | ||||
| @@ -101,10 +101,23 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: (this.$auth.hasPermiAnd([ | ||||
| 									'equipment:check:create', | ||||
| 									'base:core-worker:query', | ||||
| 									'base:group-classes:query', | ||||
| 									'base:core-department:query' | ||||
| 								]) || | ||||
| 								this.$auth.hasPermi('equipment:check:update') || | ||||
| 								this.$auth.hasPermi('equipment:check:export')) | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:inspection-confirm:create') | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 							'equipment:check:create', | ||||
| 							'base:core-worker:query', | ||||
| 							'base:group-classes:query', | ||||
| 							'base:core-department:query' | ||||
| 						]) | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| @@ -113,7 +126,7 @@ export default { | ||||
| 					color: 'success', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:inspection-confirm:confirm') | ||||
| 					type: this.$auth.hasPermi('equipment:check:update') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '批量确认', | ||||
| @@ -122,7 +135,7 @@ export default { | ||||
| 					plain: true, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:inspection-confirm:export') | ||||
| 					type: this.$auth.hasPermi('equipment:check:export') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '导出', | ||||
|   | ||||
| @@ -100,7 +100,7 @@ export default { | ||||
| 			addContent: false, | ||||
| 			searchBarKeys: ['name', 'actualCheckTime'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:check-record:detail') | ||||
| 				this.$auth.hasPermi('equipment:check:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| @@ -166,10 +166,11 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('equipment:check:export') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:check-record:export') | ||||
| 					type: this.$auth.hasPermi('equipment:check:export') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '导出', | ||||
|   | ||||
| @@ -68,14 +68,23 @@ export default { | ||||
| 			addOrEditTitle: '', | ||||
| 			searchBarKeys: ['equipmentId', 'name'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:check-setting:addInsp') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'equipment:check:create', | ||||
| 					'equipment:check:query', | ||||
| 					'equipment:check:update', | ||||
| 					'equipment:check:delete' | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'add', | ||||
| 							btnName: '添加', | ||||
| 							showTip: '添加巡检', | ||||
| 						} | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('equipment:check-setting:update') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'equipment:check:update', | ||||
| 					'equipment:check:query', | ||||
| 					'base:core-department:query' | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| @@ -87,7 +96,7 @@ export default { | ||||
| 				// 			btnName: '查看详情', | ||||
| 				// 	  } | ||||
| 				// 	: undefined, | ||||
| 				this.$auth.hasPermi('equipment:check-setting:delete') | ||||
| 				this.$auth.hasPermi('equipment:check:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
| @@ -157,10 +166,17 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'equipment:check:create', | ||||
| 						'base:core-department:query' | ||||
| 					]) | ||||
| 						?  'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:check-setting:create') | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'equipment:check:create', | ||||
| 						'base:core-department:query' | ||||
| 					]) | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
|   | ||||
| @@ -37,11 +37,11 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[0]" | ||||
| 			width="160" | ||||
| 			minWidth="160" | ||||
| 			label="设备保养单号" | ||||
| 			:show-overflow-tooltip="true" | ||||
| 			prop="maintainOrderNumber"></el-table-column> | ||||
| 		<el-table-column v-if="selectedBox[1]" width="128" label="保养计划名称" prop="planName"> | ||||
| 		<el-table-column v-if="selectedBox[1]" minWidth="128" label="保养计划名称" prop="planName"> | ||||
| 			<template slot-scope="scope"> | ||||
| 				{{ scope.row.planName || '---' }} | ||||
| 			</template> | ||||
| @@ -67,7 +67,7 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[5]" | ||||
| 			width="150" | ||||
| 			minWidth="150" | ||||
| 			label="计划结束时间" | ||||
| 			prop="planEndTime"> | ||||
| 			<template slot-scope="scope"> | ||||
| @@ -76,7 +76,7 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[6]" | ||||
| 			width="150" | ||||
| 			minWidth="150" | ||||
| 			label="实际开始时间" | ||||
| 			prop="startTime"> | ||||
| 			<template slot-scope="scope"> | ||||
| @@ -85,7 +85,7 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[7]" | ||||
| 			width="150" | ||||
| 			minWidth="150" | ||||
| 			label="实际结束时间" | ||||
| 			prop="endTime"> | ||||
| 			<template slot-scope="scope"> | ||||
| @@ -94,7 +94,7 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[8]" | ||||
| 			width="150" | ||||
| 			minWidth="150" | ||||
| 			label="确认截止时间" | ||||
| 			prop="confirmDueTime"> | ||||
| 			<template slot-scope="scope"> | ||||
| @@ -103,7 +103,7 @@ | ||||
| 		</el-table-column> | ||||
| 		<el-table-column | ||||
| 			v-if="selectedBox[9]" | ||||
| 			width="150" | ||||
| 			minWidth="150" | ||||
| 			label="保养计划类型" | ||||
| 			prop="relatePlan"> | ||||
| 			<template slot-scope="scope"> | ||||
| @@ -118,7 +118,7 @@ | ||||
| 		<!-- btns  --> | ||||
| 		<el-table-column width="188" label="操作"> | ||||
| 			<template slot-scope="scope"> | ||||
| 				<el-tooltip content="确认" placement="top"> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:update')" content="确认" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| @@ -128,8 +128,8 @@ | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="查看详情" placement="top"> | ||||
| 				<span v-if="$auth.hasPermi('equipment:maintain-record:query')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:query')" content="查看详情" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| @@ -138,18 +138,32 @@ | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="编辑" placement="top"> | ||||
| 				<!-- <span v-if="$auth.hasPermiAnd([ | ||||
| 						'equipment:maintain-record:update', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query', | ||||
| 						'equipment:maintain-record:create', | ||||
| 						'equipment:maintain-record:query', | ||||
| 						'equipment:maintain-record:delete' | ||||
| 						])" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermiAnd([ | ||||
| 						'equipment:maintain-record:update', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query', | ||||
| 						'equipment:maintain-record:create', | ||||
| 						'equipment:maintain-record:query', | ||||
| 						'equipment:maintain-record:delete' | ||||
| 						])" content="编辑" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
| 						@click="$emit('edit', scope.row)"> | ||||
| 						<i class="iconfont icon-edit primary-color" /> | ||||
| 					</el-button> | ||||
| 				</el-tooltip> | ||||
| 				</el-tooltip> --> | ||||
| 				<!-- line  --> | ||||
| 				<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip content="删除" placement="top"> | ||||
| 				<span v-if="$auth.hasPermi('equipment:maintain-record:delete')" style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span> | ||||
| 				<el-tooltip v-if="$auth.hasPermi('equipment:maintain-record:delete')" content="删除" placement="top"> | ||||
| 					<el-button | ||||
| 						type="text" | ||||
| 						style="margin: 5px 0; padding: 0" | ||||
|   | ||||
| @@ -157,10 +157,20 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: (this.$auth.hasPermiAnd([ | ||||
| 						'equipment:maintain-record:create', | ||||
| 						'base:core-worker:query', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query' | ||||
| 						]) || this.$auth.hasPermi('equipment:maintain-record:update') || this.$auth.hasPermi('equipment:maintain-record:export')) ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-confirm:create') | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'equipment:maintain-record:create', | ||||
| 						'base:core-worker:query', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query' | ||||
| 						]) | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| @@ -169,7 +179,7 @@ export default { | ||||
| 					color: 'success', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-confirm:confirm') | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-record:update') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '批量确认', | ||||
| @@ -178,7 +188,7 @@ export default { | ||||
| 					plain: true, | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-confirm:export') | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-record:export') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '导出', | ||||
|   | ||||
| @@ -131,7 +131,7 @@ export default { | ||||
| 				// 	width: 180, | ||||
| 				// 	filter: parseTime(createTime), | ||||
| 				// }, | ||||
| 				{ prop: 'code', label: '保养计划单号', width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'code', label: '保养计划单号', minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'name', label: '保养计划名称', minWidth: 118, showOverflowtooltip: true }, | ||||
| 				{ prop: 'departmentName', label: '部门', minWidth: 100, showOverflowtooltip: true }, | ||||
| 				{ prop: 'lineName', label: '产线名', minWidth: 100, showOverflowtooltip: true }, | ||||
| @@ -160,7 +160,8 @@ export default { | ||||
| 				// 	filter: publicFormatter(this.DICT_TYPE.MAINTAIN_TYPE), | ||||
| 				// }, | ||||
| 				// { prop: 'opt1', label: '设备保养', name: '操作', subcomponent: btn }, | ||||
| 				{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 }, | ||||
| 				this.$auth.hasPermi('equipment:plan-config:query') ? | ||||
| 				{ prop: 'opt2', label: '保养内容', name: '详情', subcomponent: btn, width: 100 } : undefined, | ||||
| 				{ | ||||
| 					prop: 'remainDays', | ||||
| 					label: '距离下次保养剩余时间(天)', | ||||
| @@ -190,10 +191,11 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('equipment:plan-config:export') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-monitor:export') | ||||
| 					type: this.$auth.hasPermi('equipment:plan-config:export') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '导出', | ||||
|   | ||||
| @@ -14,7 +14,7 @@ | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="120" | ||||
| 				:width="180" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| @@ -65,57 +65,57 @@ const tableProps = [ | ||||
| 	{ | ||||
| 		prop: 'name', | ||||
| 		label: '保养计划名称', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'departmentName', | ||||
| 		label: '部门', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'lineName', | ||||
| 		label: '产线名', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'maintenancePeriod', | ||||
| 		label: '保养频率(天/次)', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'firstMaintenanceTime', | ||||
| 		label: '首次保养时间', | ||||
| 		filter: parseTime, | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'maintainDuration', | ||||
| 		label: '保养时长', | ||||
| 		width: 120, | ||||
| 		minWidth: 120, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'maintainer', | ||||
| 		label: '计划保养人员', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
|   { | ||||
| 		prop: 'confirmTimeLimit', | ||||
| 		label: '确认时限', | ||||
| 		filter: toDay, | ||||
| 		width: 130, | ||||
| 		minWidth: 130, | ||||
| 		showOverflowtooltip: true | ||||
| 	}, | ||||
| 	{ | ||||
| 		prop: 'remark', | ||||
| 		label: '备注', | ||||
| 		width: 150, | ||||
| 		minWidth: 150, | ||||
| 		showOverflowtooltip: true | ||||
| 	} | ||||
| ]; | ||||
| @@ -138,13 +138,25 @@ export default { | ||||
| 				planName: undefined | ||||
|       }, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi(`equipment:plan-config:add`) | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'equipment:plan-config:query', | ||||
| 					'equipment:plan-config:create', | ||||
| 					'equipment:plan-config:update', | ||||
| 					'equipment:plan-config:delete', | ||||
| 					'base:core-equipment:query' | ||||
| 					]) | ||||
| 					? { | ||||
| 							type: 'add', | ||||
| 							btnName: '添加内容', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi(`equipment:plan-config:update`) | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 						'equipment:plan-config:update', | ||||
| 						'equipment:plan-config:query', | ||||
| 						'base:core-worker:query', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query' | ||||
| 					]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| @@ -172,10 +184,20 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'equipment:plan-config:create', | ||||
| 						'base:core-worker:query', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query' | ||||
| 					]) ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:plan-config:create') ? 'button' : '', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'equipment:plan-config:create', | ||||
| 						'base:core-worker:query', | ||||
| 						'base:core-production-line:query', | ||||
| 						'base:core-department:query' | ||||
| 					]) ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
|   | ||||
| @@ -131,24 +131,25 @@ export default { | ||||
| 				// 	width: 180, | ||||
| 				// 	filter: timeFilter, | ||||
| 				// }, | ||||
| 				{ prop: 'maintainOrderNumber', label: '设备保养单号', width: 170, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planName', label: '保养计划名称', width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'departmentName', label: '部门', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'lineName', label: '产线名', width: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'startTime', label: '实际开始时间', filter: parseTime, width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'endTime', label: '实际结束时间', filter: parseTime, width: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'maintainOrderNumber', label: '设备保养单号', minWidth: 170, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planName', label: '保养计划名称', minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'departmentName', label: '部门', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'lineName', label: '产线名', minWidth: 120, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planStartTime', label: '计划开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'planEndTime', label: '计划结束时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'startTime', label: '实际开始时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, | ||||
| 				{ prop: 'endTime', label: '实际结束时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true }, | ||||
| 				// { prop: 'equipmentName', label: '设备名称' }, | ||||
| 				// { prop: 'maintainWorker', label: '保养人员' }, | ||||
| 				{ | ||||
| 					prop: 'relatePlan', | ||||
| 					label: '保养计划类型', | ||||
| 					filter: (v) => (v != null ? ['', '计划型', '非计划型'][v] : ''), | ||||
| 					width: 170, | ||||
| 					minWidth: 170, | ||||
| 					showOverflowtooltip: true | ||||
| 				}, | ||||
| 				{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn } | ||||
| 				this.$auth.hasPermi('equipment:maintain-record:query') ? | ||||
| 				{ prop: 'opt', label: '详情', name: '详情', subcomponent: btn } : undefined | ||||
| 				// { prop: 'maintainDuration', label: '计划保养用时(h)' }, | ||||
| 				// { prop: 'timeUsed', label: '实际保养用时(h)' }, | ||||
| 				// { prop: 'remark', label: '备注' }, | ||||
| @@ -198,7 +199,8 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-record:export') | ||||
| 						? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:maintain-record:export') | ||||
|   | ||||
| @@ -71,7 +71,7 @@ export default { | ||||
| 			addOrUpdateVisible: false, | ||||
| 			searchBarKeys: ['maintenanceResult', 'createTime', 'equipmentId'], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('equipment:repair:update') | ||||
| 				this.$auth.hasPermi('equipment:repair:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| @@ -173,7 +173,12 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: (this.$auth.hasPermi('equipment:repair:export') ||  | ||||
| 						this.$auth.hasPermiAnd([ | ||||
| 							'equipment:repair:create', | ||||
| 							'base:core-worker:query', | ||||
| 							'system:user:list' | ||||
| 						])) ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:repair:export') ? 'button' : '', | ||||
| @@ -183,7 +188,11 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('equipment:repair:create') ? 'button' : '', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 								'equipment:repair:create', | ||||
| 								'base:core-worker:query', | ||||
| 								'system:user:list' | ||||
| 							]) ? 'button' : '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					plain: true, | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-03-22 17:11:55 | ||||
|  * @LastEditTime: 2024-04-12 14:26:22 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -62,7 +62,8 @@ | ||||
|         <div v-if="!isdetail" class="action_btn"> | ||||
|           <template> | ||||
|             <span style="display: inline-block;"> | ||||
|               <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button> | ||||
|               <el-button v-if="this.$auth.hasPermi('extend:process-equ-material-bom-det:add')" type="text" | ||||
|                 @click="addNew()" icon="el-icon-plus">新增</el-button> | ||||
|             </span> | ||||
|           </template> | ||||
|         </div> | ||||
| @@ -99,16 +100,6 @@ import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| // import {DICT_TYPE, getDictDatas} from "@/utils/dict"; | ||||
| import { publicFormatter } from '@/utils/dict'; | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
|     prop: 'materialName', | ||||
| @@ -132,22 +123,36 @@ const tableProps = [ | ||||
|     label: '备注', | ||||
|   }, | ||||
| ]; | ||||
|  | ||||
| const topBtnConfig = [ | ||||
|   { | ||||
|     type: 'add', | ||||
|     btnName: 'btn.add' | ||||
|   } | ||||
| ] | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
|       tableBtn:[ | ||||
|         { | ||||
|           type: this.$auth.hasPermi( | ||||
|             'extend:process-equ-material-bom-det:query' | ||||
|           ) | ||||
|             ? 'edit' | ||||
|             : '', | ||||
|           btnName: '编辑', | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi('extend:process-equ-material-bom-det:delete') | ||||
|             ? 'delete' | ||||
|             : '', | ||||
|           btnName: '删除', | ||||
|         }, | ||||
|       ], | ||||
| 			tableProps, | ||||
| 			topBtnConfig, | ||||
|       topBtnConfig:[ | ||||
|         { | ||||
|           type: this.$auth.hasPermi('extend:process-equ-material-bom-det:add') | ||||
|             ? 'add' | ||||
|             : '', | ||||
|           btnName: 'btn.add' | ||||
|         } | ||||
|       ], | ||||
| 			addOrUpdateVisible: false, | ||||
| 			urlOptions: { | ||||
| 			  isGetCode: false, | ||||
| @@ -237,9 +242,6 @@ export default { | ||||
|         // console.log(response); | ||||
|         this.equipmentList = res.data | ||||
|       }) | ||||
|       getMaterialCode().then(res => { | ||||
|         this.dataForm.code = res.data | ||||
|       }) | ||||
|     }, | ||||
| 		handleClick(raw) { | ||||
| 			if (raw.type === 'delete') { | ||||
| @@ -292,7 +294,10 @@ export default { | ||||
| 			if (id) { | ||||
| 				this.idAttrShow = true | ||||
| 			} else { | ||||
| 				this.idAttrShow = false | ||||
|         this.idAttrShow = false | ||||
|         getMaterialCode().then(res => { | ||||
|           this.dataForm.code = res.data | ||||
|         }) | ||||
| 			} | ||||
|  | ||||
| 			this.$nextTick(() => { | ||||
|   | ||||
| @@ -118,7 +118,8 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|           // type: 'separate', | ||||
|           type: this.$auth.hasPermi('extend:process-equ-material-bom:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('extend:process-equ-material-bom:create') ? 'button' : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2021-11-18 14:16:25 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-03-25 14:07:31 | ||||
|  * @LastEditTime: 2024-04-12 14:28:44 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -72,7 +72,8 @@ | ||||
|         <div v-if="!isdetail" class="action_btn"> | ||||
|           <template> | ||||
|             <span style="display: inline-block;"> | ||||
|               <el-button type="text" @click="addNew()" icon="el-icon-plus">新增</el-button> | ||||
|               <el-button v-if="this.$auth.hasPermi('extend:process-equ-value-bom-det:add')" type="text" | ||||
|                 @click="addNew()" icon="el-icon-plus">新增</el-button> | ||||
|             </span> | ||||
|           </template> | ||||
|         </div> | ||||
| @@ -109,16 +110,6 @@ import { parseTime } from '../../core/mixins/code-filter'; | ||||
| import attrAdd from './attr-add'; | ||||
| // import {DICT_TYPE, getDictDatas} from "@/utils/dict"; | ||||
|  | ||||
| const tableBtn = [ | ||||
| 	{ | ||||
| 		type: 'edit', | ||||
| 		btnName: '编辑', | ||||
| 	}, | ||||
| 	{ | ||||
| 		type: 'delete', | ||||
| 		btnName: '删除', | ||||
| 	}, | ||||
| ]; | ||||
| const tableProps = [ | ||||
| 	{ | ||||
|     prop: 'valueName', | ||||
| @@ -152,23 +143,35 @@ const tableProps = [ | ||||
|     prop: 'remark', | ||||
|     label: '备注', | ||||
|   }, | ||||
| ]; | ||||
|  | ||||
| const topBtnConfig = [ | ||||
|   { | ||||
|     type: 'add', | ||||
|     btnName: 'btn.add' | ||||
|   } | ||||
| ] | ||||
|  | ||||
| export default { | ||||
| 	mixins: [basicAdd], | ||||
| 	components: { SmallTitle, attrAdd }, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			tableBtn, | ||||
|       tableBtn:[ | ||||
|         { | ||||
|           type: this.$auth.hasPermi('extend:process-equ-value-bom-det:update') | ||||
|             ? 'edit' | ||||
|             : '', | ||||
|           btnName: '编辑', | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi('extend:process-equ-value-bom-det:delete') | ||||
|             ? 'delete' | ||||
|             : '', | ||||
|           btnName: '删除', | ||||
|         }, | ||||
|       ], | ||||
| 			tableProps, | ||||
| 			topBtnConfig, | ||||
|       topBtnConfig:[ | ||||
|         { | ||||
|           type: this.$auth.hasPermi('extend:process-equ-value-bom-det:add') | ||||
|             ? 'add' | ||||
|             : '', | ||||
|           btnName: 'btn.add' | ||||
|         } | ||||
|       ], | ||||
|       addOrUpdateVisible: false, | ||||
|       enableList: [ | ||||
|         { | ||||
| @@ -246,9 +249,7 @@ export default { | ||||
|         // console.log(response); | ||||
|         this.equipmentList = res.data | ||||
|       }) | ||||
|       getValueCode().then(res => { | ||||
|         this.dataForm.code = res.data | ||||
|       }) | ||||
|  | ||||
|     }, | ||||
| 		handleClick(raw) { | ||||
| 			if (raw.type === 'delete') { | ||||
| @@ -325,7 +326,10 @@ export default { | ||||
| 			if (id) { | ||||
| 				this.idAttrShow = true | ||||
| 			} else { | ||||
| 				this.idAttrShow = false | ||||
|         this.idAttrShow = false | ||||
|         getValueCode().then(res => { | ||||
|           this.dataForm.code = res.data | ||||
|         }) | ||||
| 			} | ||||
|  | ||||
| 			this.$nextTick(() => { | ||||
|   | ||||
| @@ -119,7 +119,8 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|           // type: 'separate', | ||||
|           type: this.$auth.hasPermi('extend:process-equ-value-bom:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('extend:process-equ-value-bom:create') ? 'button' : '', | ||||
|   | ||||
| @@ -1,46 +1,52 @@ | ||||
| <template> | ||||
|   <el-switch v-model="state" type="text" size="small" :disabled="readonly" @change="changeHandler" /> | ||||
| 	<el-switch | ||||
| 		v-hasPermi="['base:group-team:edit-worker']" | ||||
| 		v-model="state" | ||||
| 		type="text" | ||||
| 		size="small" | ||||
| 		:disabled="readonly" | ||||
| 		@change="changeHandler" /> | ||||
| </template> | ||||
|  | ||||
| <script> | ||||
| export default { | ||||
|   props: { | ||||
|     injectData: { | ||||
|       type: Object, | ||||
|       default: () => ({}) | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       state: false | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
|     readonly() { | ||||
|       return !!this.injectData.readonly | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.mapToState() | ||||
|   }, | ||||
|   methods: { | ||||
|     mapToState() { | ||||
|       if (this.injectData.prop === 'enabled') { | ||||
|         this.state = this.injectData.enabled === 1 ? true : false | ||||
|       } | ||||
|     }, | ||||
|     changeHandler() { | ||||
|       let params = {} | ||||
|       let payload = {} | ||||
|       params.name = 'state' | ||||
|       payload.id = this.injectData.id | ||||
|       payload.enabled = this.state ? '1' : '0' | ||||
|       payload.code = this.injectData.code | ||||
|       payload.name = this.injectData.name | ||||
|       payload.leaderId = this.injectData.leaderId | ||||
|       params.payload = payload | ||||
|       this.$emit('emitData', params) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 	props: { | ||||
| 		injectData: { | ||||
| 			type: Object, | ||||
| 			default: () => ({}), | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			state: false, | ||||
| 		}; | ||||
| 	}, | ||||
| 	computed: { | ||||
| 		readonly() { | ||||
| 			return !!this.injectData.readonly; | ||||
| 		}, | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.mapToState(); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		mapToState() { | ||||
| 			if (this.injectData.prop === 'enabled') { | ||||
| 				this.state = this.injectData.enabled === 1 ? true : false; | ||||
| 			} | ||||
| 		}, | ||||
| 		changeHandler() { | ||||
| 			let params = {}; | ||||
| 			let payload = {}; | ||||
| 			params.name = 'state'; | ||||
| 			payload.id = this.injectData.id; | ||||
| 			payload.enabled = this.state ? '1' : '0'; | ||||
| 			payload.code = this.injectData.code; | ||||
| 			payload.name = this.injectData.name; | ||||
| 			payload.leaderId = this.injectData.leaderId; | ||||
| 			params.payload = payload; | ||||
| 			this.$emit('emitData', params); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
|   | ||||
| @@ -1,41 +1,51 @@ | ||||
| <template> | ||||
|   <div class="workerOperate"> | ||||
|     <div class="operateBtn"> | ||||
|       <span class="view" v-if="this.$auth.hasPermi('base:group-team:view-worker')" @click="emitParams('view')">查看</span> | ||||
|       <span class="edit" v-if="this.$auth.hasPermi('base:group-team:edit-worker')" @click="emitParams('edit')">编辑</span> | ||||
|     </div> | ||||
|   </div> | ||||
| 	<div class="workerOperate"> | ||||
| 		<div class="operateBtn"> | ||||
| 			<span | ||||
| 				class="view" | ||||
| 				v-hasPermi="['base:group-team:view-worker']" | ||||
| 				@click="emitParams('view')"> | ||||
| 				查看 | ||||
| 			</span> | ||||
| 			<span | ||||
| 				class="edit" | ||||
| 				v-hasPermi="['base:group-team:edit-worker']" | ||||
| 				@click="emitParams('edit')"> | ||||
| 				编辑 | ||||
| 			</span> | ||||
| 		</div> | ||||
| 	</div> | ||||
| </template> | ||||
| <script> | ||||
| export default { | ||||
|   name: 'WorkerOperate', | ||||
|   props: { | ||||
|     injectData: { | ||||
|       type: Object, | ||||
|       default: () => ({}) | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     emitParams(data) { | ||||
|       let params = {} | ||||
|       params.name = data | ||||
|       params.payload = this.injectData | ||||
|       this.$emit('emitData', params) | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 	name: 'WorkerOperate', | ||||
| 	props: { | ||||
| 		injectData: { | ||||
| 			type: Object, | ||||
| 			default: () => ({}), | ||||
| 		}, | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		emitParams(data) { | ||||
| 			let params = {}; | ||||
| 			params.name = data; | ||||
| 			params.payload = this.injectData; | ||||
| 			this.$emit('emitData', params); | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| <style lang='scss' scoped> | ||||
| .workerOperate { | ||||
|   .operateBtn{ | ||||
|     color: #0B58FF; | ||||
|     .view { | ||||
|       margin-right: 10px; | ||||
|       cursor: pointer; | ||||
|     } | ||||
|     .edit { | ||||
|       cursor: pointer; | ||||
|     } | ||||
|   } | ||||
| 	.operateBtn { | ||||
| 		color: #0b58ff; | ||||
| 		.view { | ||||
| 			margin-right: 10px; | ||||
| 			cursor: pointer; | ||||
| 		} | ||||
| 		.edit { | ||||
| 			cursor: pointer; | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
| @@ -125,7 +125,7 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
| 					type: this.$auth.hasPermi('base:group-team:create') ? 'separate' : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:group-team:create') ? 'button' : '', | ||||
|   | ||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							| @@ -88,7 +88,7 @@ export default { | ||||
| 			workOrderList: [], | ||||
| 			workOrderName: '', | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:group-team-view:detail') | ||||
| 				this.$auth.hasPermi('monitoring:group-team-scheduling:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
|   | ||||
| @@ -97,7 +97,7 @@ export default { | ||||
| 			}, | ||||
| 			tableProps, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:team-production:detail') | ||||
| 				this.$auth.hasPermi('monitoring:group-team-scheduling:query') | ||||
| 					? { | ||||
| 							type: 'productionDetail', | ||||
| 							btnName: '查看', | ||||
|   | ||||
| @@ -173,12 +173,24 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:order-group:create') | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'base:order-group:create', | ||||
| 						'base:core-product:query', | ||||
| 						'base:core-customer:query', | ||||
| 						'base:order:query', | ||||
| 					]) | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:order-group:create') ? 'button' : '', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'base:order-group:create', | ||||
| 						'base:core-product:query', | ||||
| 						'base:core-customer:query', | ||||
| 						'base:order:query', | ||||
| 					]) | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| @@ -197,7 +209,10 @@ export default { | ||||
| 			tableProps, | ||||
| 			list: [], | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:order-group:bind') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order:query', | ||||
| 					'base:order-con-group-order:create', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'bind', | ||||
| 							btnName: '绑定', | ||||
| @@ -214,7 +229,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-group:complete') | ||||
| 				this.$auth.hasPermi('base:order-group:update') | ||||
| 					? { | ||||
| 							type: 'complete', | ||||
| 							btnName: '完成', | ||||
| @@ -231,7 +246,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-group:termination') | ||||
| 				this.$auth.hasPermi('base:order-group:update') | ||||
| 					? { | ||||
| 							type: 'termination', | ||||
| 							btnName: '终止', | ||||
| @@ -248,7 +263,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-group:cancel') | ||||
| 				this.$auth.hasPermi('base:order-group:update') | ||||
| 					? { | ||||
| 							type: 'cancel', | ||||
| 							btnName: '作废', | ||||
| @@ -265,11 +280,17 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				{ | ||||
| 					type: 'detail', | ||||
| 					btnName: '详情', | ||||
| 				}, | ||||
| 				this.$auth.hasPermi('base:order-group:edit') | ||||
| 				this.$auth.hasPermi('base:order-group:query') | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order-group:update', | ||||
| 					'base:core-product:query', | ||||
| 					'base:core-customer:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
| @@ -462,4 +483,4 @@ export default { | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| </script> | ||||
|   | ||||
| @@ -15,7 +15,7 @@ | ||||
| 			<method-btn | ||||
| 				v-if="tableBtn.length" | ||||
| 				slot="handleBtn" | ||||
| 				:width="290" | ||||
| 				:width="250" | ||||
| 				label="操作" | ||||
| 				:method-list="tableBtn" | ||||
| 				@clickBtn="handleClick" /> | ||||
| @@ -169,12 +169,22 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:order-manage:create') | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'base:order:query', | ||||
| 						'base:core-product:query', | ||||
| 						'base:order:create', | ||||
| 					]) | ||||
| 						? 'separate' | ||||
| 						: '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:order-manage:create') ? 'button' : '', | ||||
| 					type: this.$auth.hasPermiAnd([ | ||||
| 						'base:order:query', | ||||
| 						'base:core-product:query', | ||||
| 						'base:order:create', | ||||
| 					]) | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| 					name: 'add', | ||||
| 					color: 'success', | ||||
| @@ -210,7 +220,14 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:bindWorkOrder') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order:update', | ||||
| 					'base:core-product:query', | ||||
| 					'base:production-line:query', | ||||
| 					'extend:process-flow:query', | ||||
| 					'base:core-work-order:query', | ||||
| 					'base:order:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'bind', | ||||
| 							btnName: '绑定', | ||||
| @@ -227,7 +244,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:complete') | ||||
| 				this.$auth.hasPermi('base:order:update') | ||||
| 					? { | ||||
| 							type: 'complete', | ||||
| 							btnName: '完成', | ||||
| @@ -244,7 +261,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:termination') | ||||
| 				this.$auth.hasPermi('base:order:update') | ||||
| 					? { | ||||
| 							type: 'termination', | ||||
| 							btnName: '终止', | ||||
| @@ -261,7 +278,7 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:cancel') | ||||
| 				this.$auth.hasPermi('base:order:update') | ||||
| 					? { | ||||
| 							type: 'cancel', | ||||
| 							btnName: '作废', | ||||
| @@ -278,13 +295,20 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:detail') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order:query', | ||||
| 					'extend:process-flow:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'detail', | ||||
| 							btnName: '详情', | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-manage:edit') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order:query', | ||||
| 					'base:core-product:query', | ||||
| 					'base:order:update', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '编辑', | ||||
|   | ||||
| @@ -1,168 +1,223 @@ | ||||
| <template> | ||||
|   <div> | ||||
|     <div class="boxTitle"> | ||||
|       <span class="blueTitle"></span> | ||||
|       <span>各集团订单环形图</span> | ||||
|     </div> | ||||
|     <div class="chartBox" id='orderChartBox' v-show='chartList.length'> | ||||
|       <div class="chartItem" v-for="(item, index) in chartList" :key='index' :style="{width: 388*beilv+'px',height: 286*beilv+'px',padding:14*beilv+'px',marginRight:9*beilv+'px',marginBottom:9*beilv+'px'}"> | ||||
|         <div class="topTitle" :style="{fontSize: 14 * beilv + 'px'}"> | ||||
|           <svg-icon icon-class="order-monitoring" :style="{fontSize: 16*beilv+'px'}"/> | ||||
|           <span class="orderName" :style="{paddingRight:8*beilv+'px',marginRight:8*beilv+'px'}">{{item.orderGroupName}}</span> | ||||
|           <span>订单计划数量{{item.num}}</span> | ||||
|         </div> | ||||
|         <div | ||||
|           :id="item.id" | ||||
|           :style="{width: 166*beilv+'px',height: 166*beilv+'px',margin: 'auto'}" | ||||
|         ></div> | ||||
|         <div class="legend" :style="{height: 54 * beilv + 'px', marginTop: 10*beilv+'px'}"> | ||||
|           <div class="legendItem" v-for="(subItem, i) in item.order" :key='i' :style="{paddingRight:9*beilv+'px',marginRight:9*beilv+'px'}"> | ||||
|             <span class="itemNum" :style="{fontSize: 18 * beilv + 'px'}">{{subItem.value}}</span> | ||||
|             <div> | ||||
|               <span class="itemName" :style="{fontSize: 14 * beilv + 'px'}"> | ||||
|                 <span class="smallBlock" :style="{backgroundColor:subItem.color,width:8*beilv+'px',height:8*beilv+'px'}"></span> | ||||
|                 {{subItem.name}} | ||||
|               </span> | ||||
|             </div> | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     <!-- 空图 --> | ||||
|     <div class="no-data-bg" v-show='!chartList.length'></div> | ||||
|   </div> | ||||
| 	<div> | ||||
| 		<div class="boxTitle"> | ||||
| 			<span class="blueTitle"></span> | ||||
| 			<span>各集团订单环形图</span> | ||||
| 		</div> | ||||
| 		<div | ||||
| 			class="chartBox" | ||||
| 			id="orderChartBox" | ||||
| 			v-show="chartList.length"> | ||||
| 			<div | ||||
| 				class="chartItem" | ||||
| 				v-for="(item, index) in chartList" | ||||
| 				:key="index" | ||||
| 				:style="{ | ||||
| 					width: 388 * beilv + 'px', | ||||
| 					height: 286 * beilv + 'px', | ||||
| 					padding: 14 * beilv + 'px', | ||||
| 					marginRight: 9 * beilv + 'px', | ||||
| 					marginBottom: 9 * beilv + 'px', | ||||
| 				}"> | ||||
| 				<div | ||||
| 					class="topTitle" | ||||
| 					:style="{ fontSize: 14 * beilv + 'px' }"> | ||||
| 					<svg-icon | ||||
| 						icon-class="order-monitoring" | ||||
| 						:style="{ fontSize: 16 * beilv + 'px' }" /> | ||||
| 					<span | ||||
| 						class="orderName" | ||||
| 						:style="{ | ||||
| 							paddingRight: 8 * beilv + 'px', | ||||
| 							marginRight: 8 * beilv + 'px', | ||||
| 						}"> | ||||
| 						{{ item.orderGroupName }} | ||||
| 					</span> | ||||
| 					<span>订单计划数量{{ item.num }}</span> | ||||
| 				</div> | ||||
| 				<div | ||||
| 					:id="item.id" | ||||
| 					:style="{ | ||||
| 						width: 166 * beilv + 'px', | ||||
| 						height: 166 * beilv + 'px', | ||||
| 						margin: 'auto', | ||||
| 					}"></div> | ||||
| 				<div | ||||
| 					class="legend" | ||||
| 					:style="{ height: 54 * beilv + 'px', marginTop: 10 * beilv + 'px' }"> | ||||
| 					<div | ||||
| 						class="legendItem" | ||||
| 						v-for="(subItem, i) in item.order" | ||||
| 						:key="i" | ||||
| 						:style="{ | ||||
| 							paddingRight: 9 * beilv + 'px', | ||||
| 							marginRight: 9 * beilv + 'px', | ||||
| 						}"> | ||||
| 						<span | ||||
| 							class="itemNum" | ||||
| 							:style="{ fontSize: 18 * beilv + 'px' }"> | ||||
| 							{{ subItem.value }} | ||||
| 						</span> | ||||
| 						<div> | ||||
| 							<span | ||||
| 								class="itemName" | ||||
| 								:style="{ fontSize: 14 * beilv + 'px' }"> | ||||
| 								<span | ||||
| 									class="smallBlock" | ||||
| 									:style="{ | ||||
| 										backgroundColor: subItem.color, | ||||
| 										width: 8 * beilv + 'px', | ||||
| 										height: 8 * beilv + 'px', | ||||
| 									}"></span> | ||||
| 								{{ subItem.name }} | ||||
| 							</span> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<!-- 空图 --> | ||||
| 		<div | ||||
| 			class="no-data-bg" | ||||
| 			v-show="!chartList.length"></div> | ||||
| 	</div> | ||||
| </template> | ||||
| <script> | ||||
| import * as echarts from 'echarts' | ||||
| import { debounce } from '@/utils/debounce' | ||||
| import * as echarts from 'echarts'; | ||||
| import { debounce } from '@/utils/debounce'; | ||||
| export default { | ||||
|   name: 'MonitoringRingCharts', | ||||
|   props: { | ||||
|     chartList: { | ||||
|       type: Array, | ||||
|       default: () => { | ||||
|         return [] | ||||
|       } | ||||
|     } | ||||
|   }, | ||||
|   data() { | ||||
|     return { | ||||
|       myChart: [], | ||||
|       beilv: 1, | ||||
|       canvasReset: '' | ||||
|     } | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.beilv = document.getElementById('orderChartBox').offsetWidth / 1610 | ||||
|     this.canvasReset = debounce(() => { | ||||
|       this.initChart() | ||||
|     }, 500) | ||||
|     window.addEventListener('resize', () => { | ||||
|       this.beilv = document.getElementById('orderChartBox').offsetWidth / 1610 | ||||
|       this.canvasReset() | ||||
|     }) | ||||
|   }, | ||||
|   methods: { | ||||
|     // 饼图 | ||||
|     initChart() { | ||||
|       if (this.chartList.length <= 0) { | ||||
|         return false | ||||
|       } | ||||
|       // 销毁实例 | ||||
|       for (let j = 0;j < this.chartList.length; j++) { | ||||
|         if (this.myChart[j]) { | ||||
|           this.myChart[j].dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例 | ||||
|         } | ||||
|       } | ||||
|       for (let i = 0; i < this.chartList.length; i++) { | ||||
|         var chartDom = document.getElementById(this.chartList[i].id); | ||||
|         this.myChart[i] = echarts.init(chartDom); | ||||
|         let colorList = [] | ||||
|         this.chartList[i].order.map(item => { | ||||
|           colorList.push(item.color) | ||||
|         }) | ||||
|         let percentage = (this.chartList[i].sunNum/this.chartList[i].num*100).toFixed(0) | ||||
|         var option = { | ||||
|           color: colorList, | ||||
|           series: [ | ||||
|             { | ||||
|               name: 'Access From', | ||||
|               type: 'pie', | ||||
|               radius: ['75%', '95%'], | ||||
|               avoidLabelOverlap: false, | ||||
|               itemStyle: { | ||||
|                 borderRadius: 5, | ||||
|                 borderColor: '#fff', | ||||
|                 borderWidth: 2 | ||||
|               }, | ||||
|               label: { | ||||
|                 show: true, | ||||
|                 position: 'center', | ||||
|                 color: '#000', | ||||
|                 formatter: [ | ||||
|                     '{a|'+percentage+'%}', | ||||
|                     '{b|生产'+this.chartList[i].sunNum+'}' | ||||
|                 ].join('\n\n'), | ||||
|                 rich: { | ||||
|                   a: { | ||||
|                       fontSize: this.beilv*24 +'px' | ||||
|                   }, | ||||
|                   b: { | ||||
|                       fontSize: this.beilv*12 +'px' | ||||
|                   } | ||||
|                 } | ||||
|               }, | ||||
|               emphasis: { | ||||
|                 disabled: true | ||||
|               }, | ||||
|               labelLine: { | ||||
|                 show: false | ||||
|               }, | ||||
|               data: this.chartList[i].order | ||||
|             } | ||||
|           ] | ||||
|         }; | ||||
|         option && this.myChart[i].setOption(option) | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| } | ||||
| 	name: 'MonitoringRingCharts', | ||||
| 	props: { | ||||
| 		chartList: { | ||||
| 			type: Array, | ||||
| 			default: () => { | ||||
| 				return []; | ||||
| 			}, | ||||
| 		}, | ||||
| 	}, | ||||
| 	data() { | ||||
| 		return { | ||||
| 			myChart: [], | ||||
| 			beilv: 1, | ||||
| 		}; | ||||
| 	}, | ||||
| 	mounted() { | ||||
| 		this.canvasReset(); | ||||
| 		window.addEventListener('resize', this.canvasReset); | ||||
| 	}, | ||||
| 	destroyed() { | ||||
| 		window.removeEventListener('resize', this.canvasReset); | ||||
| 	}, | ||||
| 	methods: { | ||||
| 		canvasReset() { | ||||
| 			debounce(() => { | ||||
| 				this.initChart(); | ||||
| 			}, 500)(); | ||||
| 			this.beilv = document.getElementById('orderChartBox').offsetWidth / 1610; | ||||
| 		}, | ||||
| 		// 饼图 | ||||
| 		initChart() { | ||||
| 			if (this.chartList.length <= 0) { | ||||
| 				return false; | ||||
| 			} | ||||
| 			// 销毁实例 | ||||
| 			for (let j = 0; j < this.chartList.length; j++) { | ||||
| 				if (this.myChart[j]) { | ||||
| 					this.myChart[j].dispose(); // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例 | ||||
| 				} | ||||
| 			} | ||||
| 			for (let i = 0; i < this.chartList.length; i++) { | ||||
| 				var chartDom = document.getElementById(this.chartList[i].id); | ||||
| 				this.myChart[i] = echarts.init(chartDom); | ||||
| 				let colorList = []; | ||||
| 				this.chartList[i].order.map((item) => { | ||||
| 					colorList.push(item.color); | ||||
| 				}); | ||||
| 				let percentage = ( | ||||
| 					(this.chartList[i].sunNum / this.chartList[i].num) * | ||||
| 					100 | ||||
| 				).toFixed(0); | ||||
| 				var option = { | ||||
| 					color: colorList, | ||||
| 					series: [ | ||||
| 						{ | ||||
| 							name: 'Access From', | ||||
| 							type: 'pie', | ||||
| 							radius: ['75%', '95%'], | ||||
| 							avoidLabelOverlap: false, | ||||
| 							itemStyle: { | ||||
| 								borderRadius: 5, | ||||
| 								borderColor: '#fff', | ||||
| 								borderWidth: 2, | ||||
| 							}, | ||||
| 							label: { | ||||
| 								show: true, | ||||
| 								position: 'center', | ||||
| 								color: '#000', | ||||
| 								formatter: [ | ||||
| 									'{a|' + percentage + '%}', | ||||
| 									'{b|生产' + this.chartList[i].sunNum + '}', | ||||
| 								].join('\n\n'), | ||||
| 								rich: { | ||||
| 									a: { | ||||
| 										fontSize: this.beilv * 24 + 'px', | ||||
| 									}, | ||||
| 									b: { | ||||
| 										fontSize: this.beilv * 12 + 'px', | ||||
| 									}, | ||||
| 								}, | ||||
| 							}, | ||||
| 							emphasis: { | ||||
| 								disabled: true, | ||||
| 							}, | ||||
| 							labelLine: { | ||||
| 								show: false, | ||||
| 							}, | ||||
| 							data: this.chartList[i].order, | ||||
| 						}, | ||||
| 					], | ||||
| 				}; | ||||
| 				option && this.myChart[i].setOption(option); | ||||
| 			} | ||||
| 		}, | ||||
| 	}, | ||||
| }; | ||||
| </script> | ||||
| <style lang='scss' scoped> | ||||
| .chartBox { | ||||
|   width: 100%; | ||||
|   padding-right: 6px; | ||||
|   height: calc(100vh - 356px); | ||||
|   display: flex; | ||||
|   flex-flow: row wrap; | ||||
|   overflow: auto; | ||||
|   align-content: flex-start; | ||||
|   .chartItem { | ||||
|     border-radius: 8px; | ||||
|     border: 1px solid #CACACA; | ||||
|     .topTitle { | ||||
|       margin-bottom: 10px; | ||||
|       .orderName { | ||||
|         border-right: 1px solid #CACACA; | ||||
|       } | ||||
|     } | ||||
|     .legend { | ||||
|       text-align: center; | ||||
|       white-space: nowrap; | ||||
|       overflow: auto; | ||||
|       .legendItem { | ||||
|         display: inline-block; | ||||
|         border-right: 1px solid #E8E8E8; | ||||
|         .itemName { | ||||
|           .smallBlock { | ||||
|             display: inline-block; | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|       .legendItem:last-child { | ||||
|         border: none; | ||||
|       } | ||||
|     } | ||||
|   } | ||||
| 	width: 100%; | ||||
| 	padding-right: 6px; | ||||
| 	height: calc(100vh - 356px); | ||||
| 	display: flex; | ||||
| 	flex-flow: row wrap; | ||||
| 	overflow: auto; | ||||
| 	align-content: flex-start; | ||||
| 	.chartItem { | ||||
| 		border-radius: 8px; | ||||
| 		border: 1px solid #cacaca; | ||||
| 		.topTitle { | ||||
| 			margin-bottom: 10px; | ||||
| 			.orderName { | ||||
| 				border-right: 1px solid #cacaca; | ||||
| 			} | ||||
| 		} | ||||
| 		.legend { | ||||
| 			text-align: center; | ||||
| 			white-space: nowrap; | ||||
| 			overflow: auto; | ||||
| 			.legendItem { | ||||
| 				display: inline-block; | ||||
| 				border-right: 1px solid #e8e8e8; | ||||
| 				.itemName { | ||||
| 					.smallBlock { | ||||
| 						display: inline-block; | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
| 			.legendItem:last-child { | ||||
| 				border: none; | ||||
| 			} | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| </style> | ||||
| @@ -181,7 +181,10 @@ export default { | ||||
| 			list: [], | ||||
| 			total: 0, | ||||
| 			tableBtn: [ | ||||
| 				this.$auth.hasPermi('base:order-completion-monitoring:orderDet') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:order:query', | ||||
| 					'extend:process-flow:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'orderDetail', | ||||
| 							btnName: '详情', | ||||
| @@ -198,7 +201,11 @@ export default { | ||||
| 							}, | ||||
| 					  } | ||||
| 					: undefined, | ||||
| 				this.$auth.hasPermi('base:order-completion-monitoring:qualityDet') | ||||
| 				this.$auth.hasPermiAnd([ | ||||
| 					'base:quality-inspection-record:query', | ||||
| 					'base:core-product:query', | ||||
| 					'base:core-work-order:query', | ||||
| 				]) | ||||
| 					? { | ||||
| 							type: 'qualityDetail', | ||||
| 							btnName: '质量', | ||||
|   | ||||
| @@ -62,7 +62,9 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-btn:create') | ||||
|             ? 'separate' | ||||
|             : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:quality-inspection-box-btn:create') | ||||
|   | ||||
| @@ -66,7 +66,7 @@ export default { | ||||
|           param: 'nickName', | ||||
|         }, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-permissions:query') | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-btn-auth:query') | ||||
|             ? 'button' | ||||
|             : '', | ||||
| 					btnName: '查询', | ||||
| @@ -74,10 +74,12 @@ export default { | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-btn-auth:create') | ||||
|             ? 'separate' | ||||
|             : '', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-permissions:create') | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-box-btn-auth:create') | ||||
| 						? 'button' | ||||
| 						: '', | ||||
| 					btnName: '新增', | ||||
| @@ -87,13 +89,13 @@ export default { | ||||
| 				}, | ||||
| 			], | ||||
| 			tableBtn: [ | ||||
|         this.$auth.hasPermi('base:quality-inspection-box-permissions:update') | ||||
|         this.$auth.hasPermi('base:quality-inspection-box-btn-auth:update') | ||||
| 					? { | ||||
| 							type: 'edit', | ||||
| 							btnName: '修改', | ||||
| 					  } | ||||
| 					: undefined, | ||||
|         this.$auth.hasPermi('base:quality-inspection-box-permissions:delete') | ||||
|         this.$auth.hasPermi('base:quality-inspection-box-btn-auth:delete') | ||||
| 					? { | ||||
| 							type: 'delete', | ||||
| 							btnName: '删除', | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-12-08 13:46:17 | ||||
|  * @LastEditTime: 2024-03-25 08:50:25 | ||||
|  * @LastEditTime: 2024-04-11 15:25:51 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
| @@ -73,31 +73,45 @@ | ||||
|           </el-form-item> | ||||
|         </el-row> | ||||
|         <el-row :gutter="24" v-for="(item,index) in ingredientList" :key="item.id"> | ||||
|           <el-col :span="6"> | ||||
|           <el-col :span="4"> | ||||
|             <el-form-item label="成分"> | ||||
|               {{ item.name }} | ||||
|               {{ item.checkName }} | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量" | ||||
|             <el-form-item :prop="'checkValueList.' + index + '.minCheckValue'" label="最小检测值" | ||||
|               :rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]"> | ||||
|               <el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail" | ||||
|                 style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue' | ||||
|                 v-model.number="dataForm.checkValueList[index].checkValue" | ||||
|                 @change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> | ||||
|                 v-model.number="dataForm.checkValueList[index].minCheckValue" | ||||
|                 @change="judgeMinValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> | ||||
|               <span v-if="dataForm.checkValueList[index].showIcon"> | ||||
|                 <!-- <i class="el-icon-success"></i> --> | ||||
|                 <svg-icon v-if="dataForm.checkValueList[index].isStandard" icon-class="standards" /> | ||||
|                 <svg-icon v-if="dataForm.checkValueList[index].isMinStandard" icon-class="standards" /> | ||||
|                 <svg-icon v-else icon-class="noStandards" /> | ||||
|               </span> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|             <el-form-item :prop="'checkValueList.' + index + '.maxCheckValue'" label="最大检测值" | ||||
|               :rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]"> | ||||
|               <el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail" | ||||
|                 style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue' | ||||
|                 v-model.number="dataForm.checkValueList[index].maxCheckValue" | ||||
|                 @change="judgeMaxValue(arguments[0],item.minValue,item.maxValue,index)"></el-input> | ||||
|               <span v-if="dataForm.checkValueList[index].showIcon"> | ||||
|                 <!-- <i class="el-icon-success"></i> --> | ||||
|                 <svg-icon v-if="dataForm.checkValueList[index].isMaxStandard" icon-class="standards" /> | ||||
|                 <svg-icon v-else icon-class="noStandards" /> | ||||
|               </span> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="4"> | ||||
|             <el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"> | ||||
|               <el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input> | ||||
|             </el-form-item> | ||||
|           </el-col> | ||||
|           <el-col :span="6"> | ||||
|           <el-col :span="4"> | ||||
|             <el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"> | ||||
|               <el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input> | ||||
|             </el-form-item> | ||||
| @@ -260,14 +274,25 @@ export default { | ||||
|     onInput() { | ||||
|       this.$forceUpdate(); | ||||
|     }, | ||||
|     judgeValue(val, minValue, maxValue, index) { | ||||
|     judgeMinValue(val, minValue, maxValue, index) { | ||||
|       // console.log(cal); | ||||
|       if (val >= minValue && val <= maxValue) { | ||||
|         console.log(val) | ||||
|         this.dataForm.checkValueList[index].showIcon = true | ||||
|         this.dataForm.checkValueList[index].isStandard = true | ||||
|         this.dataForm.checkValueList[index].isMinStandard = true | ||||
|       } else { | ||||
|         this.dataForm.checkValueList[index].showIcon = true | ||||
|         this.dataForm.checkValueList[index].isStandard = false | ||||
|         this.dataForm.checkValueList[index].isMinStandard = false | ||||
|       } | ||||
|     }, | ||||
|     judgeMaxValue(val, minValue, maxValue, index) { | ||||
|       if (val >= minValue && val <= maxValue) { | ||||
|         console.log(val) | ||||
|         this.dataForm.checkValueList[index].showIcon = true | ||||
|         this.dataForm.checkValueList[index].isMaxStandard = true | ||||
|       } else { | ||||
|         this.dataForm.checkValueList[index].showIcon = true | ||||
|         this.dataForm.checkValueList[index].isMaxStandard = false | ||||
|       } | ||||
|     }, | ||||
|     handleClose() { | ||||
| @@ -290,7 +315,7 @@ export default { | ||||
|             checkerId: this.dataForm.checkerId, | ||||
|             checkTime: this.dataForm.checkTime, | ||||
|             appearance: this.dataForm.appearance, | ||||
|             checkResult: this.dataForm.checkResult, | ||||
|             // checkResult: this.dataForm.checkResult, | ||||
|             materialGrade: this.dataForm.materialGrade, | ||||
|             // checkValueList: [], | ||||
|             checkResult: this.dataForm.checkResult, | ||||
| @@ -304,7 +329,9 @@ export default { | ||||
|                 mainId: this.dataForm.id, | ||||
|                 id:ele.id, | ||||
|                 checkDetId: ele.checkDetId, | ||||
|                 checkValue: ele.checkValue | ||||
|                 minCheckValue: ele.minCheckValue, | ||||
|                 maxCheckValue: ele.maxCheckValue | ||||
|  | ||||
|               })) | ||||
|             }) | ||||
|             Promise.all(array).then(res => { | ||||
| @@ -333,7 +360,7 @@ export default { | ||||
|           checkResult: this.dataForm.checkResult, | ||||
|           materialGrade: this.dataForm.materialGrade, | ||||
|           // checkValueList: [], | ||||
|           checkResult: this.dataForm.checkResult, | ||||
|           // checkResult: this.dataForm.checkResult, | ||||
|           materialGrade: this.dataForm.materialGrade, | ||||
|           remark:this.dataForm.remark | ||||
|         } | ||||
| @@ -341,11 +368,15 @@ export default { | ||||
|           // this.idAttrShow = true; | ||||
|           let array = [] | ||||
|           this.dataForm.checkValueList.forEach(ele => { | ||||
|             array.push(this.createDet({ | ||||
|               mainId: response.data, | ||||
|               checkDetId: ele.checkDetId, | ||||
|               checkValue: ele.checkValue | ||||
|             })) | ||||
|             array.push(this.createDet([ | ||||
|               { | ||||
|                 mainId: response.data, | ||||
|                 checkDetId: ele.checkDetId, | ||||
|                 minCheckValue: ele.minCheckValue, | ||||
|                 maxCheckValue: ele.maxCheckValue | ||||
|  | ||||
|               } | ||||
|             ])) | ||||
|           }) | ||||
|           Promise.all(array).then(res => { | ||||
|             this.$modal.msgSuccess("新增成功"); | ||||
| @@ -376,14 +407,17 @@ export default { | ||||
|       getMaterialCheckList({ | ||||
|         materialId:val | ||||
|       }).then((res) => { | ||||
|         console.log('aaaaaaaa', res.data); | ||||
|         this.ingredientList = res.data | ||||
|         this.ingredientFlag = true | ||||
|         this.dataForm.checkValueList = res.data.map((ele) => { | ||||
|           return { | ||||
|             mainId: null, | ||||
|             checkDetId: ele.id, | ||||
|             checkValue: null, | ||||
|             isStandard: true, | ||||
|             checkDetId: ele.checkDetId, | ||||
|             minCheckValue:undefined, | ||||
|             maxCheckValue: undefined, | ||||
|             isMinStandard: true, | ||||
|             isMaxStandard: true, | ||||
|             showIcon:false, | ||||
|           } | ||||
|         }) | ||||
| @@ -477,28 +511,31 @@ export default { | ||||
|           this.urlOptions.infoURL(id).then(response => { | ||||
|             this.dataForm = response.data | ||||
|             getMaterialCheckList({ | ||||
|               materialId: response.data.materialId | ||||
|               materialId: response.data.materialId, | ||||
|               mainId:id, | ||||
|             }).then((res) => { | ||||
|               console.log(res.data); | ||||
|               let arr  = res.data | ||||
|               valueList = arr.map((ele) => { | ||||
|                 // console.log(ele) | ||||
|                 return { | ||||
|                   checkDetId:ele.id, | ||||
|                   checkDetId: ele.checkDetId, | ||||
|                   maxValue: ele.maxValue, | ||||
|                   minValue: ele.minValue | ||||
|                 } | ||||
|               }) | ||||
|               console.log(valueList); | ||||
|               getQualityHotMaterialDetList({ | ||||
|                 mainId: response.data.id | ||||
|                 mainId: response.data.id, | ||||
|                 materialId: response.data.materialId, | ||||
|               }).then((result) => { | ||||
|                 this.ingredientList = result.data.map((ele) => { | ||||
|                   return { | ||||
|                     name: ele.checkName, | ||||
|                     checkName: ele.checkName, | ||||
|                     id: ele.id, | ||||
|                     checkDetId: ele.checkDetId, | ||||
|                     checkValue: ele.checkValue, | ||||
|                     minCheckValue: ele.minCheckValue, | ||||
|                     maxCheckValue: ele.maxCheckValue, | ||||
|                     maxValue:null, | ||||
|                     minValue: null | ||||
|                   } | ||||
| @@ -509,8 +546,10 @@ export default { | ||||
|                     mainId: ele.mainId, | ||||
|                     id: ele.id, | ||||
|                     checkDetId: ele.checkDetId, | ||||
|                     checkValue: ele.checkValue, | ||||
|                     isStandard: true, | ||||
|                     minCheckValue: ele.minCheckValue, | ||||
|                     maxCheckValue: ele.maxCheckValue, | ||||
|                     isMinStandard: true, | ||||
|                     isMaxStandard: true, | ||||
|                     showIcon: false, | ||||
|                   } | ||||
|                 }) | ||||
| @@ -524,13 +563,21 @@ export default { | ||||
|                 }) | ||||
|                 valueList.forEach((ele, index) => { | ||||
|                  this.dataForm.checkValueList.forEach((item, i) => { | ||||
|                    if (ele.checkDetId == item.checkDetId && item.checkValue >= ele.minValue && item.checkValue <= ele.maxValue) { | ||||
|                    if (ele.checkDetId == item.checkDetId && item.minCheckValue >= ele.minValue && item.minCheckValue <= ele.maxValue) { | ||||
|                      console.log(1111) | ||||
|                      item.showIcon = true | ||||
|                      item.isStandard = true | ||||
|                      item.isMinStandard = true | ||||
|                    } else { | ||||
|                      item.showIcon = true | ||||
|                      item.isStandard = false | ||||
|                      item.isMinStandard = false | ||||
|                    } | ||||
|                    if (ele.checkDetId == item.checkDetId && item.maxCheckValue >= ele.minValue && item.maxCheckValue <= ele.maxValue) { | ||||
|                      console.log(1111) | ||||
|                      item.showIcon = true | ||||
|                      item.isMaxStandard = true | ||||
|                    } else { | ||||
|                      item.showIcon = true | ||||
|                      item.isMaxStandard = false | ||||
|                    } | ||||
|                   }) | ||||
|                 }) | ||||
|   | ||||
| @@ -140,8 +140,9 @@ export default { | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:quality-hot-material:create') ? 'separate' : '', | ||||
| 					// type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-hot-material:create') ? 'button' : '', | ||||
|   | ||||
| @@ -105,7 +105,10 @@ export default { | ||||
| 				// 	name: 'reset', | ||||
| 				// }, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|           // type: 'separate', | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-det:create') | ||||
|             ? 'separate' | ||||
|             : '', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:quality-inspection-det:create') | ||||
|   | ||||
| @@ -146,8 +146,11 @@ export default { | ||||
| 				// 	btnName: '重置', | ||||
| 				// 	name: 'reset', | ||||
| 				// }, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:quality-inspection-type:create') | ||||
|             ? 'separate' | ||||
|             : '', | ||||
| 					// type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: this.$auth.hasPermi('base:quality-inspection-type:create') | ||||
|   | ||||
| @@ -97,8 +97,9 @@ export default { | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'separate' : '', | ||||
| 					// type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'button' : '', | ||||
|   | ||||
| @@ -1,7 +1,7 @@ | ||||
| <!-- | ||||
|  * @Author: zhp | ||||
|  * @Date: 2023-11-06 15:15:30 | ||||
|  * @LastEditTime: 2024-03-22 17:13:16 | ||||
|  * @LastEditTime: 2024-04-09 15:14:08 | ||||
|  * @LastEditors: zhp | ||||
|  * @Description: | ||||
| --> | ||||
|   | ||||
| @@ -26,7 +26,7 @@ import { | ||||
|   getQualityScrapLogPage, | ||||
|   deleteQualityScrapLog, | ||||
|   getWorkOrderList, | ||||
|   getTeamList | ||||
|   // getTeamList | ||||
| } from '@/api/base/qualityScrapLog'; | ||||
|  | ||||
| const tableProps = [ | ||||
| @@ -124,8 +124,9 @@ export default { | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'separate' : '', | ||||
| 					// type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-det:create') ? 'button' : '', | ||||
| @@ -189,18 +190,18 @@ export default { | ||||
|         // console.log(this.formConfig[0].selectOptions); | ||||
|         // this.listQuery.total = response.data.total; | ||||
|       }) | ||||
|       getTeamList().then((res) => { | ||||
|         console.log(res); | ||||
|         // console.log(response); | ||||
|         this.formConfig[1].selectOptions = res.data.map((item) => { | ||||
|           return { | ||||
|             name: item.name, | ||||
|             id: item.id | ||||
|           } | ||||
|         }) | ||||
|         // console.log(this.formConfig[0].selectOptions); | ||||
|         // this.listQuery.total = response.data.total; | ||||
|       }) | ||||
|       // getTeamList().then((res) => { | ||||
|       //   console.log(res); | ||||
|       //   // console.log(response); | ||||
|       //   this.formConfig[1].selectOptions = res.data.map((item) => { | ||||
|       //     return { | ||||
|       //       name: item.name, | ||||
|       //       id: item.id | ||||
|       //     } | ||||
|       //   }) | ||||
|       //   // console.log(this.formConfig[0].selectOptions); | ||||
|       //   // this.listQuery.total = response.data.total; | ||||
|       // }) | ||||
|     }, | ||||
|     getDataList() { | ||||
|       this.dataListLoading = true; | ||||
|   | ||||
| @@ -87,8 +87,9 @@ export default { | ||||
| 					name: 'search', | ||||
| 					color: 'primary', | ||||
| 				}, | ||||
| 				{ | ||||
| 					type: 'separate', | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-type:create') ? 'separate' : '', | ||||
| 					// type: 'separate', | ||||
| 				}, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi('base:quality-scrap-type:create') ? 'button' : '', | ||||
|   | ||||
| @@ -219,7 +219,7 @@ export default { | ||||
|         }, | ||||
|         { | ||||
|             type: this.$auth.hasPermi( | ||||
|               'monitoring:device-parameters:query' | ||||
|               'monitoring:equipment:query' | ||||
|             ) | ||||
|             ? 'button' | ||||
|             : '', | ||||
|   | ||||
| @@ -261,7 +261,7 @@ export default { | ||||
| 				// }, | ||||
| 				{ | ||||
|           type: this.$auth.hasPermi( | ||||
|             'monitoring:equipment-traceability:query' | ||||
|             'analysis:equipment:query' | ||||
|           ) | ||||
|             ? 'button' | ||||
|             : '', | ||||
| @@ -271,7 +271,14 @@ export default { | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi( | ||||
|             'monitoring:equipment-traceability:export' | ||||
|             'analysis:equipment:export' | ||||
|           ) | ||||
|             ? 'separate' | ||||
|             : '', | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi( | ||||
|             'analysis:equipment:export' | ||||
|           ) | ||||
|             ? 'button' | ||||
|             : '', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 14:55:51 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-04-07 16:19:18 | ||||
|  * @LastEditTime: 2024-04-12 14:12:55 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -131,7 +131,7 @@ export default { | ||||
|           width: 250 | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi('monitoring:materiel-date-from:query') ? 'button' : '', | ||||
|           type: this.$auth.hasPermi('base:material-use-log:query') ? 'button' : '', | ||||
|           btnName: '查询', | ||||
|           name: 'search', | ||||
|           color: 'primary', | ||||
| @@ -162,7 +162,14 @@ export default { | ||||
|         // 	type: this.$auth.hasPermi('base:product:create') ? 'separate' : '', | ||||
|         // }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi('monitoring:materiel-date-from:export') ? 'button' : '', | ||||
|           type: this.$auth.hasPermi( | ||||
|             'base:material-use-log:export' | ||||
|           ) | ||||
|             ? 'separate' | ||||
|             : '', | ||||
|         }, | ||||
|         { | ||||
|           type: this.$auth.hasPermi('base:material-use-log:export') ? 'button' : '', | ||||
|         	btnName: '导出', | ||||
|         	name: 'export', | ||||
|           color: 'primary', | ||||
|   | ||||
| @@ -2,7 +2,7 @@ | ||||
|  * @Author: zwq | ||||
|  * @Date: 2023-08-01 14:55:51 | ||||
|  * @LastEditors: zhp | ||||
|  * @LastEditTime: 2024-04-07 16:26:56 | ||||
|  * @LastEditTime: 2024-04-12 14:16:03 | ||||
|  * @Description: | ||||
| --> | ||||
| <template> | ||||
| @@ -96,11 +96,14 @@ export default { | ||||
|         //     btnName: '编辑', | ||||
|         //   } | ||||
|         //   : undefined, | ||||
|           { | ||||
|             type: 'processDetail', | ||||
|         { | ||||
|         	 type: this.$auth.hasPermi( | ||||
|              'extend:process-retrospect:query' | ||||
|            ) | ||||
|             ? 'button' | ||||
|             : '', | ||||
|             btnName: '查看工艺详情', | ||||
|           }, | ||||
|  | ||||
|       ].filter((v) => v), | ||||
|       list: [], | ||||
|       listQuery: { | ||||
| @@ -137,7 +140,7 @@ export default { | ||||
|         { | ||||
|  | ||||
|        	 type: this.$auth.hasPermi( | ||||
|             'monitoring:process-traceability:query' | ||||
|              'extend:process-retrospect:query' | ||||
|           ) | ||||
|             ? 'button' | ||||
|             : '', | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user