Compare commits
	
		
			4 Commits
		
	
	
		
			develop
			...
			e117388027
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| e117388027 | |||
| 5511837e90 | |||
| 755ad9df30 | |||
| 101eac890c | 
@@ -3,8 +3,8 @@
 | 
				
			|||||||
 * @version: 
 | 
					 * @version: 
 | 
				
			||||||
 * @Author: fzq
 | 
					 * @Author: fzq
 | 
				
			||||||
 * @Date: 2022-11-25 09:51:46
 | 
					 * @Date: 2022-11-25 09:51:46
 | 
				
			||||||
 * @LastEditors: fzq
 | 
					 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 | 
				
			||||||
 * @LastEditTime: 2023-02-09 14:40:52
 | 
					 * @LastEditTime: 2023-09-20 11:15:04
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
<html>
 | 
					<html>
 | 
				
			||||||
@@ -40,25 +40,29 @@
 | 
				
			|||||||
  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
					  <% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.8';
 | 
					    // window.SITE_CONFIG['apiURL'] = 'http://192.168.1.8';
 | 
				
			||||||
    window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
					    // window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
				
			||||||
 | 
					    window.SITE_CONFIG['apiURL'] = 'http://127.0.0.1:8080/';
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
  <% } %>
 | 
					  <% } %>
 | 
				
			||||||
  <!-- 集成测试环境 -->
 | 
					  <!-- 集成测试环境 -->
 | 
				
			||||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
 | 
					  <% if (process.env.VUE_APP_NODE_ENV === 'prod:sit') { %>
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
      window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
					      // window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
				
			||||||
 | 
					      window.SITE_CONFIG['apiURL'] = 'http://127.0.0.1:8080/';
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
  <% } %>
 | 
					  <% } %>
 | 
				
			||||||
  <!-- 验收测试环境 -->
 | 
					  <!-- 验收测试环境 -->
 | 
				
			||||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
 | 
					  <% if (process.env.VUE_APP_NODE_ENV === 'prod:uat') { %>
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
      window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
					      // window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
				
			||||||
 | 
					      window.SITE_CONFIG['apiURL'] = 'http://127.0.0.1:8080/';
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
  <% } %>
 | 
					  <% } %>
 | 
				
			||||||
  <!-- 生产环境 -->
 | 
					  <!-- 生产环境 -->
 | 
				
			||||||
  <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
 | 
					  <% if (process.env.VUE_APP_NODE_ENV === 'prod') { %>
 | 
				
			||||||
    <script>
 | 
					    <script>
 | 
				
			||||||
      window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
					      // window.SITE_CONFIG['apiURL'] = 'http://india.mes.picaiba.com/';
 | 
				
			||||||
 | 
					      window.SITE_CONFIG['apiURL'] = 'http://127.0.0.1:8080/';
 | 
				
			||||||
    </script>
 | 
					    </script>
 | 
				
			||||||
  <% } %>
 | 
					  <% } %>
 | 
				
			||||||
</head>
 | 
					</head>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -359,7 +359,7 @@ export default {
 | 
				
			|||||||
					}).then(({ data: res }) => {
 | 
										}).then(({ data: res }) => {
 | 
				
			||||||
						if (res && res.code === 0) {
 | 
											if (res && res.code === 0) {
 | 
				
			||||||
							const dataFormKeys = Object.keys(this.dataForm)
 | 
												const dataFormKeys = Object.keys(this.dataForm)
 | 
				
			||||||
							console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
												// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
				
			||||||
							this.dataForm = pick(res.data, dataFormKeys)
 | 
												this.dataForm = pick(res.data, dataFormKeys)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							// LABEL: FILE_RELATED
 | 
												// LABEL: FILE_RELATED
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -184,6 +184,8 @@ export default {
 | 
				
			|||||||
	// },
 | 
						// },
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
 | 
								//按钮盒用
 | 
				
			||||||
 | 
								idMark: 1,
 | 
				
			||||||
			// 按钮防重复点击
 | 
								// 按钮防重复点击
 | 
				
			||||||
			isDisabled: false,
 | 
								isDisabled: false,
 | 
				
			||||||
			COLUMN_PER_ROW,
 | 
								COLUMN_PER_ROW,
 | 
				
			||||||
@@ -411,10 +413,10 @@ export default {
 | 
				
			|||||||
					}).then(({ data: res }) => {
 | 
										}).then(({ data: res }) => {
 | 
				
			||||||
						if (res && res.code === 0) {
 | 
											if (res && res.code === 0) {
 | 
				
			||||||
							const dataFormKeys = Object.keys(this.dataForm)
 | 
												const dataFormKeys = Object.keys(this.dataForm)
 | 
				
			||||||
							console.log('keys ===> ', dataFormKeys)
 | 
												// console.log('keys ===> ', dataFormKeys)
 | 
				
			||||||
							// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
												// console.log('data form keys: ', dataFormKeys, pick(res.data, dataFormKeys))
 | 
				
			||||||
							this.dataForm = __pick(res.data, dataFormKeys)
 | 
												this.dataForm = __pick(res.data, dataFormKeys)
 | 
				
			||||||
							console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
 | 
												// console.log('pick(res.data, dataFormKeys) ===> ', __pick(res.data, dataFormKeys))
 | 
				
			||||||
							// LABEL: FILE_RELATED
 | 
												// LABEL: FILE_RELATED
 | 
				
			||||||
							/** 对文件下载进行分流 */
 | 
												/** 对文件下载进行分流 */
 | 
				
			||||||
							this.fileList = {}
 | 
												this.fileList = {}
 | 
				
			||||||
@@ -469,6 +471,9 @@ export default {
 | 
				
			|||||||
				this.dataForm[currentField.relatedField] = null
 | 
									this.dataForm[currentField.relatedField] = null
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			this.$emit('select-change', { name, id })
 | 
								this.$emit('select-change', { name, id })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//按钮盒页面用
 | 
				
			||||||
 | 
								this.idMark = id
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		handleEditorReady(val) {},
 | 
							handleEditorReady(val) {},
 | 
				
			||||||
@@ -510,9 +515,19 @@ export default {
 | 
				
			|||||||
								}
 | 
													}
 | 
				
			||||||
								this.$set(this.dataForm, 'fileIds', fileIds)
 | 
													this.$set(this.dataForm, 'fileIds', fileIds)
 | 
				
			||||||
							}
 | 
												}
 | 
				
			||||||
 | 
					                            // console.log('this.$route',this.$route);
 | 
				
			||||||
 | 
												// console.log('before send: ', this.dataForm)
 | 
				
			||||||
							
 | 
												
 | 
				
			||||||
							console.log('before send: ', this.dataForm)
 | 
												//增加质量模块按钮盒多传参数的判断
 | 
				
			||||||
 | 
					                            if(this.$route.name == 'monitoring-qualityInspectionBoxBtn'){
 | 
				
			||||||
 | 
													// console.log('关键',this.configs.fields);
 | 
				
			||||||
 | 
													for(let i = 0;i<this.configs.fields[4].options.length;i++){
 | 
				
			||||||
 | 
														if (this.configs.fields[4].options[i].label == this.idMark) {
 | 
				
			||||||
 | 
															this.dataForm.inspectionDetId = this.configs.fields[4].options[i].inspectionDetId
 | 
				
			||||||
 | 
														}
 | 
				
			||||||
 | 
												    }
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
												// console.log('before send: ', this.dataForm)
 | 
				
			||||||
							this.$http({
 | 
												this.$http({
 | 
				
			||||||
								url: this.$http.adornUrl(urls[btn.name].url),
 | 
													url: this.$http.adornUrl(urls[btn.name].url),
 | 
				
			||||||
								method: btn.name === 'save' ? 'POST' : 'PUT',
 | 
													method: btn.name === 'save' ? 'POST' : 'PUT',
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,6 +27,7 @@ t.routes['字典管理'] = 'Dict Management'
 | 
				
			|||||||
t.routes['PLC信息'] = 'PLC'
 | 
					t.routes['PLC信息'] = 'PLC'
 | 
				
			||||||
// Relations between
 | 
					// Relations between
 | 
				
			||||||
t.routes['设备与PLC关联配置'] = 'PLC & Equipments'
 | 
					t.routes['设备与PLC关联配置'] = 'PLC & Equipments'
 | 
				
			||||||
 | 
					t.routes['下片监测'] = 'Unload Log'
 | 
				
			||||||
t.routes['近24小时设备生产数据'] = 'Equipment Data'
 | 
					t.routes['近24小时设备生产数据'] = 'Equipment Data'
 | 
				
			||||||
t.routes['近24小时产线生产数据'] = 'Productline Data'
 | 
					t.routes['近24小时产线生产数据'] = 'Productline Data'
 | 
				
			||||||
t.routes['近24小时质量检查数据'] = 'Quality Inspection Data'
 | 
					t.routes['近24小时质量检查数据'] = 'Quality Inspection Data'
 | 
				
			||||||
@@ -67,6 +68,7 @@ t.routes['设备信息'] = 'Equipment Details'
 | 
				
			|||||||
t.routes['设备参数状态监控'] = 'Current Equipment State'
 | 
					t.routes['设备参数状态监控'] = 'Current Equipment State'
 | 
				
			||||||
t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
 | 
					t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
 | 
				
			||||||
t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
					t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
				
			||||||
 | 
					t.routes['下片详情'] = 'Unload Detail'
 | 
				
			||||||
t.routes['质量检测类型'] = 'Quality Inpection Types'
 | 
					t.routes['质量检测类型'] = 'Quality Inpection Types'
 | 
				
			||||||
t.routes['质量检测信息'] = 'Quality Inpection Details'
 | 
					t.routes['质量检测信息'] = 'Quality Inpection Details'
 | 
				
			||||||
t.routes['安灯检测盒'] = 'Andeng inspection box'
 | 
					t.routes['安灯检测盒'] = 'Andeng inspection box'
 | 
				
			||||||
@@ -146,6 +148,11 @@ t.status = 'Status'
 | 
				
			|||||||
t.normal = 'Normal'
 | 
					t.normal = 'Normal'
 | 
				
			||||||
t.shutdown = 'Shut Down'
 | 
					t.shutdown = 'Shut Down'
 | 
				
			||||||
t.malfunction = 'Malfunction' // ?
 | 
					t.malfunction = 'Malfunction' // ?
 | 
				
			||||||
 | 
					t.stop = 'Stop'
 | 
				
			||||||
 | 
					t.run = 'Run'
 | 
				
			||||||
 | 
					t.unknown = 'Unknown'
 | 
				
			||||||
 | 
					t.buttonId = 'Button Number'
 | 
				
			||||||
 | 
					t.boxNo = 'Box Number'
 | 
				
			||||||
t.diagram = 'Device Status Sequence Diagram'
 | 
					t.diagram = 'Device Status Sequence Diagram'
 | 
				
			||||||
t.diagram2 = 'Device Product Sequence Diagram'
 | 
					t.diagram2 = 'Device Product Sequence Diagram'
 | 
				
			||||||
t.addr = 'Address'
 | 
					t.addr = 'Address'
 | 
				
			||||||
@@ -422,6 +429,13 @@ t.pl.choose = 'Please select equipment'
 | 
				
			|||||||
t.pl.confirm = 'Confirm'
 | 
					t.pl.confirm = 'Confirm'
 | 
				
			||||||
t.pl.cancel = 'Cancel'
 | 
					t.pl.cancel = 'Cancel'
 | 
				
			||||||
t.pl.success = 'The new device data is obtained successfully'
 | 
					t.pl.success = 'The new device data is obtained successfully'
 | 
				
			||||||
 | 
					t.pl.paperLaying = 'Paper Laying Machine Number'
 | 
				
			||||||
 | 
					t.pl.robotNo = 'Robot Number'
 | 
				
			||||||
 | 
					t.pl.glassNumber = 'Pallet Glass Number'
 | 
				
			||||||
 | 
					t.pl.glassLength = 'Glass Length'
 | 
				
			||||||
 | 
					t.pl.glassWidth = 'Glass Width'
 | 
				
			||||||
 | 
					t.pl.thick = 'Glass Thcikness'
 | 
				
			||||||
 | 
					t.pl.quantity = 'Pallet Quantity'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.prompt = {}
 | 
					t.prompt = {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -27,6 +27,7 @@ t.routes['设备'] = '设备'
 | 
				
			|||||||
t.routes['字典管理'] = '字典管理'
 | 
					t.routes['字典管理'] = '字典管理'
 | 
				
			||||||
t.routes['PLC信息'] = 'PLC信息'
 | 
					t.routes['PLC信息'] = 'PLC信息'
 | 
				
			||||||
t.routes['设备与PLC关联配置'] = '设备与PLC关联配置'  // ?
 | 
					t.routes['设备与PLC关联配置'] = '设备与PLC关联配置'  // ?
 | 
				
			||||||
 | 
					t.routes['下片监测'] = '下片监测'
 | 
				
			||||||
t.routes['近24小时设备生产数据'] = '近24小时设备生产数据'
 | 
					t.routes['近24小时设备生产数据'] = '近24小时设备生产数据'
 | 
				
			||||||
t.routes['近24小时产线生产数据'] = '近24小时产线生产数据'
 | 
					t.routes['近24小时产线生产数据'] = '近24小时产线生产数据'
 | 
				
			||||||
t.routes['近24小时质量检查数据'] = '近24小时质量检查数据'
 | 
					t.routes['近24小时质量检查数据'] = '近24小时质量检查数据'
 | 
				
			||||||
@@ -67,6 +68,7 @@ t.routes['设备信息'] = '设备信息'
 | 
				
			|||||||
t.routes['设备参数状态监控'] = '设备参数状态监控'
 | 
					t.routes['设备参数状态监控'] = '设备参数状态监控'
 | 
				
			||||||
t.routes['设备分组报警信息'] = '设备分组报警信息'
 | 
					t.routes['设备分组报警信息'] = '设备分组报警信息'
 | 
				
			||||||
t.routes['设备历史参数'] = '设备历史参数'
 | 
					t.routes['设备历史参数'] = '设备历史参数'
 | 
				
			||||||
 | 
					t.routes['下片详情'] = '下片详情'
 | 
				
			||||||
t.routes['质量检测类型'] = '质量检测类型'
 | 
					t.routes['质量检测类型'] = '质量检测类型'
 | 
				
			||||||
t.routes['质量检测信息'] = '质量检测信息'
 | 
					t.routes['质量检测信息'] = '质量检测信息'
 | 
				
			||||||
t.routes['安灯检测盒'] = '安灯检测盒'
 | 
					t.routes['安灯检测盒'] = '安灯检测盒'
 | 
				
			||||||
@@ -145,10 +147,16 @@ t.status = '状态' // 1
 | 
				
			|||||||
t.normal = '正常' // ?
 | 
					t.normal = '正常' // ?
 | 
				
			||||||
t.shutdown = '停机' // ?
 | 
					t.shutdown = '停机' // ?
 | 
				
			||||||
t.malfunction = '故障' // ?
 | 
					t.malfunction = '故障' // ?
 | 
				
			||||||
 | 
					t.stop = '停止'
 | 
				
			||||||
 | 
					t.run = '运行'
 | 
				
			||||||
 | 
					t.unknown = '未知'
 | 
				
			||||||
 | 
					t.buttonId = '网关号'
 | 
				
			||||||
 | 
					t.boxNo = '盒子编号'
 | 
				
			||||||
t.diagram = '设备状态时序图'
 | 
					t.diagram = '设备状态时序图'
 | 
				
			||||||
t.diagram2 = '设备产量时序图'
 | 
					t.diagram2 = '设备产量时序图'
 | 
				
			||||||
t.addr = '地址' // 1
 | 
					t.addr = '地址' // 1
 | 
				
			||||||
t.planStop = '计划停机' // ?
 | 
					t.planStop = '计划停机' // ?
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.startTime = '开始时间' // 1
 | 
					t.startTime = '开始时间' // 1
 | 
				
			||||||
t.endTime = '结束时间' // 1
 | 
					t.endTime = '结束时间' // 1
 | 
				
			||||||
t.to = '至' // 1
 | 
					t.to = '至' // 1
 | 
				
			||||||
@@ -423,6 +431,14 @@ t.pl.success = '新设备数据获取成功'
 | 
				
			|||||||
t.pl.choose = '请选择设备'
 | 
					t.pl.choose = '请选择设备'
 | 
				
			||||||
t.pl.confirm = '确定'
 | 
					t.pl.confirm = '确定'
 | 
				
			||||||
t.pl.cancel = '取消'
 | 
					t.pl.cancel = '取消'
 | 
				
			||||||
 | 
					t.pl.paperLaying = '铺纸机名称'
 | 
				
			||||||
 | 
					t.pl.robotNo = '下片机名称'
 | 
				
			||||||
 | 
					t.pl.glassNumber = '木托玻璃数'
 | 
				
			||||||
 | 
					t.pl.glassLength = '玻璃长度'
 | 
				
			||||||
 | 
					t.pl.glassWidth = '玻璃宽度'
 | 
				
			||||||
 | 
					t.pl.thick = '玻璃厚度'
 | 
				
			||||||
 | 
					t.pl.quantity = '木托数量'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.prompt = {}
 | 
					t.prompt = {}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -8,8 +8,8 @@ import merge from 'lodash/merge'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
const http = axios.create({
 | 
					const http = axios.create({
 | 
				
			||||||
  // baseURL: window.SITE_CONFIG['apiURL'],
 | 
					  // baseURL: window.SITE_CONFIG['apiURL'],
 | 
				
			||||||
  baseURL: '/api',
 | 
					  // baseURL: '/api',
 | 
				
			||||||
  // baseURL: '/yd-monitor',
 | 
					  baseURL: '/yd-monitor',
 | 
				
			||||||
  // baseURL: process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor',
 | 
					  // baseURL: process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor',
 | 
				
			||||||
  timeout: 1000 * 180,
 | 
					  timeout: 1000 * 180,
 | 
				
			||||||
  withCredentials: true
 | 
					  withCredentials: true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										355
									
								
								src/views/modules/monitoring/downloadLog.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										355
									
								
								src/views/modules/monitoring/downloadLog.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,355 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
						<div class="mod-config">
 | 
				
			||||||
 | 
							<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)" class="blueTip" size="small">
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('pl.name') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
					                <!-- @input="getLineEqList($event)" -->
 | 
				
			||||||
 | 
									<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable filterable >
 | 
				
			||||||
 | 
										<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
 | 
				
			||||||
 | 
									</el-select>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<!-- <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('eq.name') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-select v-model="dataForm.equipmentId" :placeholder="$t('eq.name')" clearable filterable>
 | 
				
			||||||
 | 
										<el-option v-for="eq in eqList" :key="eq.code" :value="eq.id" :label="eq.name" />
 | 
				
			||||||
 | 
									</el-select>
 | 
				
			||||||
 | 
								</el-form-item> -->
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('startTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="startTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('endTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="endTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('pl.thick') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
					                <el-select v-model="glassThick" :placeholder="$t('pl.thick')">
 | 
				
			||||||
 | 
					                    <el-option
 | 
				
			||||||
 | 
					                        v-for="item in glassOptions"
 | 
				
			||||||
 | 
					                        :key="item.value"
 | 
				
			||||||
 | 
					                        :label="item.label"
 | 
				
			||||||
 | 
					                        :value="item.value">
 | 
				
			||||||
 | 
					                    </el-option>
 | 
				
			||||||
 | 
					                </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					    			<el-form-item>
 | 
				
			||||||
 | 
									<!-- <el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> -->
 | 
				
			||||||
 | 
					                <el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> 
 | 
				
			||||||
 | 
									<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList" />
 | 
				
			||||||
 | 
					            <!-- layout="total, sizes, prev, pager, next, jumper" -->
 | 
				
			||||||
 | 
							<el-pagination
 | 
				
			||||||
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
 | 
								:current-page="pageIndex"
 | 
				
			||||||
 | 
								:page-sizes="[10, 20, 50, 100]"
 | 
				
			||||||
 | 
								:page-size="pageSize"
 | 
				
			||||||
 | 
								:total="totalPage"
 | 
				
			||||||
 | 
					            layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
 | 
								>
 | 
				
			||||||
 | 
							</el-pagination>
 | 
				
			||||||
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
 | 
					import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
 | 
					import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
 | 
				
			||||||
 | 
					// import AddOrUpdate from './equipmentGroup-add-or-update'
 | 
				
			||||||
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
 | 
					// import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
				
			||||||
 | 
					import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const tableConfigs = [
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
 | 
							name: i18n.t('index')
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{ prop: 'lineName', name: i18n.t('pl.name') },
 | 
				
			||||||
 | 
						{ prop: 'location', name: i18n.t('pl.paperLaying') },
 | 
				
			||||||
 | 
					    { prop: 'equipmentName', name: i18n.t('pl.robotNo') },
 | 
				
			||||||
 | 
					    { prop: 'quantity', name: i18n.t('pl.quantity') },
 | 
				
			||||||
 | 
					    { prop: 'glassNumber', name: i18n.t('pl.glassNumber') },
 | 
				
			||||||
 | 
					    { prop: 'startTime', name: i18n.t('startTime') },
 | 
				
			||||||
 | 
					    { prop: 'endTime', name: i18n.t('endTime') },
 | 
				
			||||||
 | 
					    { prop: 'glassLength', name: i18n.t('pl.glassLength') },
 | 
				
			||||||
 | 
					    { prop: 'glassWidth', name: i18n.t('pl.glassWidth') },
 | 
				
			||||||
 | 
					    { prop: 'glassThickness', name: i18n.t('pl.thick') },
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
							prop: 'detail',
 | 
				
			||||||
 | 
							name: i18n.t('detail'),
 | 
				
			||||||
 | 
							buttonContent: i18n.t('detail'),
 | 
				
			||||||
 | 
							subcomponent: TableTextComponent,
 | 
				
			||||||
 | 
							emitFullData: true,
 | 
				
			||||||
 | 
							actionName: 'view-detail'
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const addOrUpdateConfigs = {
 | 
				
			||||||
 | 
						type: 'dialog',
 | 
				
			||||||
 | 
						infoUrl: '/monitoring/downloadLog/getTimeDet',
 | 
				
			||||||
 | 
						fields: [{ name: 'equipmentName', label: i18n.t('eq.groupname') }, { name: 'equipmentName', label: i18n.t('eq.groupname') }],
 | 
				
			||||||
 | 
						operations: [
 | 
				
			||||||
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
 | 
							{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
 | 
				
			||||||
 | 
							{ name: 'update', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:update', showOnEdit: true }
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								addOrUpdateConfigs,
 | 
				
			||||||
 | 
								calcMaxHeight,
 | 
				
			||||||
 | 
								tableConfigs,
 | 
				
			||||||
 | 
								dataForm: {
 | 
				
			||||||
 | 
									equipmentId: '',
 | 
				
			||||||
 | 
									lineId: ''
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								dataList: [],
 | 
				
			||||||
 | 
								eqList: [],
 | 
				
			||||||
 | 
								lineList: [],
 | 
				
			||||||
 | 
								pageIndex: 1,
 | 
				
			||||||
 | 
								pageSize: 20,
 | 
				
			||||||
 | 
								totalPage: 0,
 | 
				
			||||||
 | 
								dataListLoading: false,
 | 
				
			||||||
 | 
								dataListSelections: [],
 | 
				
			||||||
 | 
								addOrUpdateVisible: false,
 | 
				
			||||||
 | 
					            startTime: '',
 | 
				
			||||||
 | 
					            endTime: '',
 | 
				
			||||||
 | 
					            glassNumber: 95,
 | 
				
			||||||
 | 
					            glassLength: 2261,
 | 
				
			||||||
 | 
					            glassWidth: 1128,
 | 
				
			||||||
 | 
					            glassThick: 3.2,
 | 
				
			||||||
 | 
					            glassOptions: [{
 | 
				
			||||||
 | 
					                value: 3.2,
 | 
				
			||||||
 | 
					                label: '3.2mm'
 | 
				
			||||||
 | 
					                }, {
 | 
				
			||||||
 | 
					                value: 2,
 | 
				
			||||||
 | 
					                label: '2mm'
 | 
				
			||||||
 | 
					                }],
 | 
				
			||||||
 | 
					            value: ''
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						components: {
 | 
				
			||||||
 | 
							AddOrUpdate,
 | 
				
			||||||
 | 
							BaseTable
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						activated() {
 | 
				
			||||||
 | 
							// this.getEqList()
 | 
				
			||||||
 | 
							this.getLineList()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.getDataList()
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 产线对应设备
 | 
				
			||||||
 | 
							getLineEqList(event) {
 | 
				
			||||||
 | 
								// console.log(event)
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipment/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										limit: 99999,
 | 
				
			||||||
 | 
										page: 1,
 | 
				
			||||||
 | 
										lineId: event
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										let fileterEqList = data.data.list.filter((t) => {
 | 
				
			||||||
 | 
											return t.lineId == event
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
										this.eqList = fileterEqList
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.eqList = []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 产线
 | 
				
			||||||
 | 
							getLineList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
 | 
									method: 'get'
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										this.lineList = data.data
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.lineList = []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取数据列表
 | 
				
			||||||
 | 
							getDataList() {
 | 
				
			||||||
 | 
								this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								this.dataListLoading = true
 | 
				
			||||||
 | 
								// this.$http({
 | 
				
			||||||
 | 
								// 	url: this.$http.adornUrl('/monitoring/downloadLog/getTimeCount'),
 | 
				
			||||||
 | 
								// 	method: 'POST',
 | 
				
			||||||
 | 
								// 	params: this.$http.adornParams({
 | 
				
			||||||
 | 
								// 		// page: this.pageIndex,
 | 
				
			||||||
 | 
								// 		// limit: this.pageSize,
 | 
				
			||||||
 | 
								// 		// lineId: this.dataForm.lineId,
 | 
				
			||||||
 | 
					            //         'startTime': this.startTime,
 | 
				
			||||||
 | 
					            //         'endTime': this.endTime
 | 
				
			||||||
 | 
					            //     }
 | 
				
			||||||
 | 
								// 	)
 | 
				
			||||||
 | 
					            this.$http({
 | 
				
			||||||
 | 
					                url: this.$http.adornUrl('/monitoring/downloadLog/getTimeCount'),
 | 
				
			||||||
 | 
					                method: 'POST',
 | 
				
			||||||
 | 
					                data: {
 | 
				
			||||||
 | 
					                    page: this.pageIndex,
 | 
				
			||||||
 | 
					                    limit: this.pageSize,
 | 
				
			||||||
 | 
					                    // lineId: this.dataForm.lineId,
 | 
				
			||||||
 | 
					                    'startTime': this.startTime,
 | 
				
			||||||
 | 
					                    'endTime': this.endTime
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					            }).then(({ data }) => {
 | 
				
			||||||
 | 
					                if ((data && data.code === 0) && (this.dataForm.lineId != '')) {
 | 
				
			||||||
 | 
					                    // console.log('this.dataForm.lineId', this.dataForm.lineId);
 | 
				
			||||||
 | 
					                    let fileterLineList = data.data.filter((t) => {
 | 
				
			||||||
 | 
					                        return t.lineId == this.dataForm.lineId
 | 
				
			||||||
 | 
					                    })
 | 
				
			||||||
 | 
					                    this.dataList = fileterLineList
 | 
				
			||||||
 | 
					                    // this.dataList = data.data
 | 
				
			||||||
 | 
					                    this.totalPage = this.dataList.length
 | 
				
			||||||
 | 
					                    // console.log('this.totalPage',this.totalPage)
 | 
				
			||||||
 | 
					                } else if (this.dataForm.lineId == '') {
 | 
				
			||||||
 | 
					                    this.dataList = data.data
 | 
				
			||||||
 | 
					                    this.totalPage = data.data.length
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else {
 | 
				
			||||||
 | 
					                    this.dataList = []
 | 
				
			||||||
 | 
					                    this.totalPage = 0
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                for(let i =0;i<this.dataList.length;i++){
 | 
				
			||||||
 | 
					                    this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
 | 
				
			||||||
 | 
					                    this.dataList[i].glassThickness = this.glassThick
 | 
				
			||||||
 | 
					                    this.dataList[i].glassLength = 2261
 | 
				
			||||||
 | 
					                    this.dataList[i].glassWidth = 1128
 | 
				
			||||||
 | 
					                    this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
 | 
				
			||||||
 | 
					                    this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                // console.log(this.dataList);
 | 
				
			||||||
 | 
					                this.dataListLoading = false
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
							// 每页数
 | 
				
			||||||
 | 
							sizeChangeHandle(val) {
 | 
				
			||||||
 | 
								this.pageSize = val
 | 
				
			||||||
 | 
								this.pageIndex = 1
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 当前页
 | 
				
			||||||
 | 
							currentChangeHandle(val) {
 | 
				
			||||||
 | 
								this.pageIndex = val
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 多选
 | 
				
			||||||
 | 
							selectionChangeHandle(val) {
 | 
				
			||||||
 | 
								this.dataListSelections = val
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleOperations({ type, data }) {
 | 
				
			||||||
 | 
								switch (type) {
 | 
				
			||||||
 | 
									case 'view-detail':
 | 
				
			||||||
 | 
										const { equipmentId: id , equipmentName: name} = data
 | 
				
			||||||
 | 
										this.$router.push({
 | 
				
			||||||
 | 
											name: 'monitoring-unloadDetail',
 | 
				
			||||||
 | 
											params: { id, name }
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
										break
 | 
				
			||||||
 | 
									// case 'edit':
 | 
				
			||||||
 | 
									// 	return this.addOrUpdateHandle(id)
 | 
				
			||||||
 | 
									// case 'delete':
 | 
				
			||||||
 | 
									// 	return this.deleteHandle(id)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 新增 / 修改
 | 
				
			||||||
 | 
							addOrUpdateHandle(id) {
 | 
				
			||||||
 | 
								this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.$refs.addOrUpdate.init(id)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 删除
 | 
				
			||||||
 | 
							deleteHandle(id) {
 | 
				
			||||||
 | 
								var ids = id
 | 
				
			||||||
 | 
									? [id]
 | 
				
			||||||
 | 
									: this.dataListSelections.map((item) => {
 | 
				
			||||||
 | 
											return item.id
 | 
				
			||||||
 | 
									  })
 | 
				
			||||||
 | 
								this.$confirm(`${i18n.t('prompt.info', { handle: id ? i18n.t('delete').toLowerCase() : i18n.t('deleteBatch').toLowerCase() })}`, i18n.t('prompt.title'), {
 | 
				
			||||||
 | 
									confirmButtonText: i18n.t('confirm'),
 | 
				
			||||||
 | 
									cancelButtonText: i18n.t('cancel'),
 | 
				
			||||||
 | 
									type: 'warning'
 | 
				
			||||||
 | 
								}).then(() => {
 | 
				
			||||||
 | 
									this.$http({
 | 
				
			||||||
 | 
										url: this.$http.adornUrl('/monitoring/equipmentGroup'),
 | 
				
			||||||
 | 
										method: 'delete',
 | 
				
			||||||
 | 
										data: this.$http.adornData(ids, false, 'raw')
 | 
				
			||||||
 | 
									}).then(({ data }) => {
 | 
				
			||||||
 | 
										if (data && data.code === 0) {
 | 
				
			||||||
 | 
											this.$message({
 | 
				
			||||||
 | 
												message: i18n.t('prompt.success'),
 | 
				
			||||||
 | 
												type: 'success',
 | 
				
			||||||
 | 
												duration: 1500,
 | 
				
			||||||
 | 
												onClose: () => {
 | 
				
			||||||
 | 
													this.getDataList()
 | 
				
			||||||
 | 
												}
 | 
				
			||||||
 | 
											})
 | 
				
			||||||
 | 
										} else {
 | 
				
			||||||
 | 
											this.$message.error(data.msg)
 | 
				
			||||||
 | 
										}
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<style>
 | 
				
			||||||
 | 
					.blueTip::before {
 | 
				
			||||||
 | 
						display: inline-block;
 | 
				
			||||||
 | 
						content: '';
 | 
				
			||||||
 | 
						width: 4px;
 | 
				
			||||||
 | 
						height: 24px;
 | 
				
			||||||
 | 
						background: #0b58ff;
 | 
				
			||||||
 | 
						border-radius: 1px;
 | 
				
			||||||
 | 
						margin-right: 8px;
 | 
				
			||||||
 | 
						margin-top: 4px;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					.buttonColor {
 | 
				
			||||||
 | 
						color: #fff;
 | 
				
			||||||
 | 
						background: #0b58ff;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</style>
 | 
				
			||||||
@@ -5,7 +5,7 @@
 | 
				
			|||||||
				{{ $t('pl.name') }}
 | 
									{{ $t('pl.name') }}
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable filterable>
 | 
									<el-select v-model="dataForm.lineId" :placeholder="$t('pl.name')" clearable filterable @input="getLineEqList($event)">
 | 
				
			||||||
					<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
 | 
										<el-option v-for="line in lineList" :key="line.code" :value="line.id" :label="line.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
@@ -90,6 +90,7 @@ const tableConfigs = [
 | 
				
			|||||||
		prop: 'status',
 | 
							prop: 'status',
 | 
				
			||||||
		name: i18n.t('realtime.state'),
 | 
							name: i18n.t('realtime.state'),
 | 
				
			||||||
		filter: (val) => {
 | 
							filter: (val) => {
 | 
				
			||||||
 | 
								if (val == 9) return i18n.t('unknown')
 | 
				
			||||||
			if (val !== null && val !== undefined) return [i18n.t('normal'), i18n.t('planStop'), i18n.t('malfunction')][+val]
 | 
								if (val !== null && val !== undefined) return [i18n.t('normal'), i18n.t('planStop'), i18n.t('malfunction')][+val]
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -150,8 +151,9 @@ export default {
 | 
				
			|||||||
		BaseTable
 | 
							BaseTable
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	activated() {
 | 
						activated() {
 | 
				
			||||||
		this.getEqList()
 | 
							// this.getEqList()
 | 
				
			||||||
		this.getLineList()
 | 
							this.getLineList()
 | 
				
			||||||
 | 
							this.getEqList()
 | 
				
			||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
@@ -178,6 +180,28 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							// 产线对应设备
 | 
				
			||||||
 | 
							getLineEqList(event) {
 | 
				
			||||||
 | 
								console.log(event)
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipment/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										limit: 99999,
 | 
				
			||||||
 | 
										page: 1,
 | 
				
			||||||
 | 
										lineId: event
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										let fileterEqList = data.data.list.filter((t) => {
 | 
				
			||||||
 | 
											return t.lineId == event
 | 
				
			||||||
 | 
										})
 | 
				
			||||||
 | 
										this.eqList = fileterEqList
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.eqList = []
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 产线
 | 
							// 产线
 | 
				
			||||||
		getLineList() {
 | 
							getLineList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -61,7 +61,7 @@ const tableConfigs = [
 | 
				
			|||||||
	{ prop: 'factoryName', name: i18n.t('factory.title') },
 | 
						{ prop: 'factoryName', name: i18n.t('factory.title') },
 | 
				
			||||||
	{ prop: 'name', name: i18n.t('pl.name') },
 | 
						{ prop: 'name', name: i18n.t('pl.name') },
 | 
				
			||||||
	{ prop: 'code', name: i18n.t('pl.code') },
 | 
						{ prop: 'code', name: i18n.t('pl.code') },
 | 
				
			||||||
	{ prop: 'status', name: i18n.t('pl.status'), filter: (val) => (val === 0 || val === 1 || val === 2) && ['停止', '运行', '未知'][val] },
 | 
						{ prop: 'status', name: i18n.t('pl.status'), filter: (val) => (val === 0 || val === 1 || val === 2) && [i18n.t('stop'), i18n.t('run'), i18n.t('unknown')][val] },
 | 
				
			||||||
	{ prop: 'description', name: i18n.t('desc') },
 | 
						{ prop: 'description', name: i18n.t('desc') },
 | 
				
			||||||
	{ prop: 'remark', name: i18n.t('remark') },
 | 
						{ prop: 'remark', name: i18n.t('remark') },
 | 
				
			||||||
	{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
 | 
						{ prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -75,7 +75,7 @@ const tableConfigs = [
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // name: '检测内容' },
 | 
						{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // name: '检测内容' },
 | 
				
			||||||
	{ prop: 'keyValue', name: i18n.t('andeng.btnVal') }, // name: '按钮值' },
 | 
						{ prop: 'keyValue', name: i18n.t('andeng.btnVal') }, // name: '按钮值' },
 | 
				
			||||||
	{ prop: 'model', name: i18n.t('andeng.btnBoxModel') }, // name: '按钮盒模式' },
 | 
						{ prop: 'buttonId', name: i18n.t('buttonId') }, // name: '网关号' },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		prop: 'operations',
 | 
							prop: 'operations',
 | 
				
			||||||
@@ -145,7 +145,9 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
			required: true,
 | 
								required: true,
 | 
				
			||||||
			type: 'select',
 | 
								type: 'select',
 | 
				
			||||||
			options: []
 | 
								options: []
 | 
				
			||||||
		}
 | 
							},
 | 
				
			||||||
 | 
							{ name: 'buttonId', label: i18n.t('buttonId') },
 | 
				
			||||||
 | 
							{ name: 'boxNo', label: i18n.t('boxNo') }
 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
	operations: [
 | 
						operations: [
 | 
				
			||||||
		{ name: 'cancel', showAlways: true },
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
@@ -334,14 +336,15 @@ export default {
 | 
				
			|||||||
					this.addOrUpdateConfigs.fields.forEach((item) => {
 | 
										this.addOrUpdateConfigs.fields.forEach((item) => {
 | 
				
			||||||
						// console.log('item',item)
 | 
											// console.log('item',item)
 | 
				
			||||||
						// console.log('res',res)
 | 
											// console.log('res',res)
 | 
				
			||||||
						if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.code }))
 | 
											if (item.name === 'inspectionDetContent') item.options = res.data.list.map((item) => ({ label: item.content, value: item.content, inspectionDetId: item.id }))
 | 
				
			||||||
						// console.log('item',item)
 | 
											// console.log('this.addOrUpdateConfigs.fields[4].options', this.addOrUpdateConfigs.fields[4].options)
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.addOrUpdateConfigs.fields.forEach((item) => {
 | 
										this.addOrUpdateConfigs.fields.forEach((item) => {
 | 
				
			||||||
						if (item.name === 'inspectionDetContent') item.options.splice(0)
 | 
											if (item.name === 'inspectionDetContent') item.options.splice(0)
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									// console.log('this.addOrUpdateConfigs.fields[4]检测内容',this.addOrUpdateConfigs)
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// 每页数
 | 
							// 每页数
 | 
				
			||||||
@@ -375,16 +378,20 @@ export default {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
				case 'inspectionDetContent':
 | 
									case 'inspectionDetContent':
 | 
				
			||||||
					// this.dataForm.inspectionDetId = id
 | 
										// this.dataForm.inspectionDetId = id
 | 
				
			||||||
					// console.log(id)
 | 
										// console.log('name',name)
 | 
				
			||||||
 | 
										// console.log('id',id)
 | 
				
			||||||
					// console.log(this.addOrUpdateConfigs.fields[4].options)
 | 
										// console.log(this.addOrUpdateConfigs.fields[4].options)
 | 
				
			||||||
					for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
 | 
										for (var i = 0; i < this.addOrUpdateConfigs.fields[4].options.length; i++) {
 | 
				
			||||||
						if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
 | 
											if (this.addOrUpdateConfigs.fields[4].options[i].label == id) {
 | 
				
			||||||
							this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
 | 
												this.dataForm.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
 | 
				
			||||||
							this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
 | 
												this.addOrUpdateConfigs.fields.inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
 | 
				
			||||||
 | 
												// this.addOrUpdateConfigs.fields[6].inspectionDetId = this.addOrUpdateConfigs.fields[4].options[i].inspectionDetId
 | 
				
			||||||
 | 
												// console.log('this.addOrUpdateConfigs.fields.inspectionDetId', this.addOrUpdateConfigs.fields)
 | 
				
			||||||
 | 
												// this.addOrUpdateConfigs.fields.push({name:'inspectionDetId'})
 | 
				
			||||||
						}
 | 
											}
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					console.log('dataForm', this.dataForm)
 | 
										// console.log('dataForm', this.dataForm)
 | 
				
			||||||
					console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
 | 
										// console.log('addOrUpdateConfigs', this.addOrUpdateConfigs.fields)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		addSuccess() {
 | 
							addSuccess() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,21 +1,34 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="mod-config">
 | 
						<div class="mod-config">
 | 
				
			||||||
		<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
 | 
							<el-form :inline="true" @keyup.enter.native="getDataList()" class="blueTip" size="small">
 | 
				
			||||||
			<el-form-item>
 | 
								<!-- <el-form-item>
 | 
				
			||||||
				{{ $t('time') }}
 | 
									{{ $t('time') }}
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<!-- type="datetimerange" -->
 | 
									type="datetimerange"
 | 
				
			||||||
 | 
									:default-time="['00:00:00', '23:59:59']"
 | 
				
			||||||
				<el-date-picker
 | 
									<el-date-picker
 | 
				
			||||||
					type="daterange"
 | 
										type="daterange"
 | 
				
			||||||
					v-model="datetime"
 | 
										v-model="datetime"
 | 
				
			||||||
 | 
										format="yyyy-MM-dd HH:mm:ss"
 | 
				
			||||||
					value-format="yyyy-MM-ddTHH:mm:ss"
 | 
										value-format="yyyy-MM-ddTHH:mm:ss"
 | 
				
			||||||
					:start-placeholder="$t('startTime')"
 | 
										:start-placeholder="$t('startTime')"
 | 
				
			||||||
					:end-placeholder="$t('endTime')"
 | 
										:end-placeholder="$t('endTime')"
 | 
				
			||||||
					:range-separator="$t('to')"
 | 
										:range-separator="$t('to')"
 | 
				
			||||||
					:default-time="['00:00:00', '23:59:59']"
 | 
					 | 
				
			||||||
					:picker-options="quickOptions"
 | 
										:picker-options="quickOptions"
 | 
				
			||||||
					clearable />
 | 
										clearable />
 | 
				
			||||||
 | 
								</el-form-item> -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('startTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="startTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('endTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="endTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
 | 
									<el-button class="buttonColor" @click="getDataList()">{{ $t('query') }}</el-button>
 | 
				
			||||||
@@ -176,7 +189,7 @@ const FakeChart = {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		defaultOpts: {
 | 
							defaultOpts: {
 | 
				
			||||||
			handler: function (val) {
 | 
								handler: function (val) {
 | 
				
			||||||
				console.log('defaullt opts change: ', val)
 | 
									// console.log('defaullt opts change: ', val)
 | 
				
			||||||
				this.setOptions()
 | 
									this.setOptions()
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			immediate: true,
 | 
								immediate: true,
 | 
				
			||||||
@@ -222,6 +235,8 @@ export default {
 | 
				
			|||||||
			dataType: dict[0], // 表格 | 图形
 | 
								dataType: dict[0], // 表格 | 图形
 | 
				
			||||||
			showGraph: false,
 | 
								showGraph: false,
 | 
				
			||||||
			datetime: [],
 | 
								datetime: [],
 | 
				
			||||||
 | 
								startTime: '',
 | 
				
			||||||
 | 
					            endTime: '',
 | 
				
			||||||
			quickOptions: {
 | 
								quickOptions: {
 | 
				
			||||||
				shortcuts: [
 | 
									shortcuts: [
 | 
				
			||||||
					{
 | 
										{
 | 
				
			||||||
@@ -267,8 +282,10 @@ export default {
 | 
				
			|||||||
			this.echartCategories = null
 | 
								this.echartCategories = null
 | 
				
			||||||
			this.echartCheckTypes.splice(0)
 | 
								this.echartCheckTypes.splice(0)
 | 
				
			||||||
			/** 设置默认日期 */
 | 
								/** 设置默认日期 */
 | 
				
			||||||
			const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
								// const startTime = this.datetime[0] || moment().set({ hour: 0, minute: 0, second: 0 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
			const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
								// const endTime = this.datetime[1] || moment().set({ hour: 23, minute: 59, second: 59 }).format('yyyy-MM-DDTHH:mm:ss')
 | 
				
			||||||
 | 
								const startTime = this.startTime
 | 
				
			||||||
 | 
								const endTime = this.endTime
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/** [1] 获取上下片数据 */
 | 
								/** [1] 获取上下片数据 */
 | 
				
			||||||
			this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
 | 
								this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
 | 
				
			||||||
@@ -277,12 +294,12 @@ export default {
 | 
				
			|||||||
			})
 | 
								})
 | 
				
			||||||
			/** [2] 获取产线检测类型 */
 | 
								/** [2] 获取产线检测类型 */
 | 
				
			||||||
			this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
 | 
								this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
 | 
				
			||||||
				console.log('res: ', res)
 | 
									// console.log('res: ', res)
 | 
				
			||||||
				/** TODO: 解析 nameData */
 | 
									/** TODO: 解析 nameData */
 | 
				
			||||||
				this.parseTableProps(res.data.nameData)
 | 
									this.parseTableProps(res.data.nameData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				this.dataListDynamic = this.parseDynamicData(res.data.data) || []
 | 
									this.dataListDynamic = this.parseDynamicData(res.data.data) || []
 | 
				
			||||||
				console.log('this.dataListDynamic', this.dataListDynamic)
 | 
									// console.log('this.dataListDynamic', this.dataListDynamic)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
				this.buildGraphData()
 | 
									this.buildGraphData()
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
@@ -337,9 +354,9 @@ export default {
 | 
				
			|||||||
			this.echartCheckTypes.forEach((ect) => {
 | 
								this.echartCheckTypes.forEach((ect) => {
 | 
				
			||||||
				result.push({ name: ect, type: 'bar', data: [] })
 | 
									result.push({ name: ect, type: 'bar', data: [] })
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			console.log('result', result)
 | 
								// console.log('result', result)
 | 
				
			||||||
						console.log('echartCheckTypes',this.echartCheckTypes);
 | 
								// console.log('echartCheckTypes',this.echartCheckTypes);
 | 
				
			||||||
			console.log('this.echartCategories',this.echartCategories);
 | 
								// console.log('this.echartCategories',this.echartCategories);
 | 
				
			||||||
			this.dataListDynamic.forEach((inspection, index) => {
 | 
								this.dataListDynamic.forEach((inspection, index) => {
 | 
				
			||||||
				// console.log('inspection: ', inspection)
 | 
									// console.log('inspection: ', inspection)
 | 
				
			||||||
				this.echartCategories.forEach((cate) => {
 | 
									this.echartCategories.forEach((cate) => {
 | 
				
			||||||
@@ -357,7 +374,7 @@ export default {
 | 
				
			|||||||
			// 	{ name: '222', type: 'bar', data: [1, 2, 3] }
 | 
								// 	{ name: '222', type: 'bar', data: [1, 2, 3] }
 | 
				
			||||||
			// ]
 | 
								// ]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			console.log('echarts data: ', this.echartsData)
 | 
								// console.log('echarts data: ', this.echartsData)
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		fetchList(type, startTime, endTime) {
 | 
							fetchList(type, startTime, endTime) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -205,7 +205,7 @@ export default {
 | 
				
			|||||||
					limit: 9999999
 | 
										limit: 9999999
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
			}).then(({ data: res }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				console.log('insdet:', res)
 | 
									// console.log('insdet:', res)
 | 
				
			||||||
				const insDetOpt = this.addOrUpdateConfigs.fields.find((item) => item.name === 'inspectionDetId')
 | 
									const insDetOpt = this.addOrUpdateConfigs.fields.find((item) => item.name === 'inspectionDetId')
 | 
				
			||||||
				if (insDetOpt) {
 | 
									if (insDetOpt) {
 | 
				
			||||||
					insDetOpt.options = res.data.list.map((item) => ({ value: item.id, label: item.content })) || []
 | 
										insDetOpt.options = res.data.list.map((item) => ({ value: item.id, label: item.content })) || []
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -134,8 +134,8 @@ export default {
 | 
				
			|||||||
										children: [
 | 
															children: [
 | 
				
			||||||
											{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
 | 
																{ prop: obj.recordTime + '-inputNum', label: i18n.t('realtime.in') },
 | 
				
			||||||
											{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
 | 
																{ prop: obj.recordTime + '-outputNum', label: i18n.t('realtime.out') },
 | 
				
			||||||
											{ prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
 | 
																// { prop: obj.recordTime + '-scrapNum', label: i18n.t('realtime.data') },
 | 
				
			||||||
											{ prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
 | 
																// { prop: obj.recordTime + '-scrapRate', label: i18n.t('realtime.rate'), filter: val => (val !== '-' ? `${val.toFixed(2)}%` : '-') }
 | 
				
			||||||
										]
 | 
															]
 | 
				
			||||||
									})
 | 
														})
 | 
				
			||||||
								}
 | 
													}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -14,7 +14,8 @@ export default {
 | 
				
			|||||||
			// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/designer')
 | 
								// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/designer')
 | 
				
			||||||
			// url: this.$http.adornUrl('/ureport/designer')
 | 
								// url: this.$http.adornUrl('/ureport/designer')
 | 
				
			||||||
			// url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/designer'
 | 
								// url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/designer'
 | 
				
			||||||
			url: '/api/ureport/designer'
 | 
								// url: '/api/ureport/designer'
 | 
				
			||||||
 | 
								url: '/yd-monitor/ureport/designer'
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: gtz
 | 
					 * @Author: gtz
 | 
				
			||||||
 * @Date: 2021-03-07 18:39:03
 | 
					 * @Date: 2021-03-07 18:39:03
 | 
				
			||||||
 * @LastEditors: gtz
 | 
					 * @LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
 | 
				
			||||||
 * @LastEditTime: 2022-02-24 16:35:51
 | 
					 * @LastEditTime: 2023-09-20 11:14:33
 | 
				
			||||||
 * @Description: file content
 | 
					 * @Description: file content
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
@@ -24,7 +24,8 @@ export default {
 | 
				
			|||||||
			// url: process.env.VUE_APP_REPORT_VIEW_URL
 | 
								// url: process.env.VUE_APP_REPORT_VIEW_URL
 | 
				
			||||||
			// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/preview')
 | 
								// url: window.SITE_CONFIG['apiURL'] + this.$http.adornUrl('/ureport/preview')
 | 
				
			||||||
			// url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/preview'
 | 
								// url: (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + '/ureport/preview'
 | 
				
			||||||
			url: '/api/ureport/preview'
 | 
								// url: '/api/ureport/preview'
 | 
				
			||||||
 | 
								url: '/yd-monitor/ureport/preview'
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										210
									
								
								src/views/modules/monitoring/unloadDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										210
									
								
								src/views/modules/monitoring/unloadDetail.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,210 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
							<el-form :model="dataForm" :inline="true" class="blueTip" size="small">
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('pl.robotNo') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<!-- <el-form-item :label="$t('equCode')">
 | 
				
			||||||
 | 
									<strong>{{ equipmentCode }}</strong>
 | 
				
			||||||
 | 
								</el-form-item> -->
 | 
				
			||||||
 | 
					            <el-form-item >
 | 
				
			||||||
 | 
									{{ equipmentName }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					        <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('startTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="startTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
									{{ $t('endTime') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-date-picker v-model="endTime" type="datetime" :placeholder="$t('hints.date')" format="yyyy-MM-dd HH:mm:ss" value-format="yyyy-MM-ddTHH:mm:ss" />
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									{{ $t('pl.thick') }}
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <el-form-item>
 | 
				
			||||||
 | 
					                <el-select v-model="glassThick" :placeholder="$t('pl.thick')">
 | 
				
			||||||
 | 
					                    <el-option
 | 
				
			||||||
 | 
					                        v-for="item in glassOptions"
 | 
				
			||||||
 | 
					                        :key="item.value"
 | 
				
			||||||
 | 
					                        :label="item.label"
 | 
				
			||||||
 | 
					                        :value="item.value">
 | 
				
			||||||
 | 
					                    </el-option>
 | 
				
			||||||
 | 
					                </el-select>
 | 
				
			||||||
 | 
					            </el-form-item>
 | 
				
			||||||
 | 
					    			<el-form-item>
 | 
				
			||||||
 | 
									<!-- <el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> -->
 | 
				
			||||||
 | 
					                <el-button class="buttonColor" @click="currentChangeHandle(1)">{{ $t('query') }}</el-button> 
 | 
				
			||||||
 | 
									<!-- <el-button v-if="$hasPermission('monitoring:equipmentgroup:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
					            <base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList" />
 | 
				
			||||||
 | 
					            <!-- layout="total, sizes, prev, pager, next, jumper" -->
 | 
				
			||||||
 | 
							<el-pagination
 | 
				
			||||||
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
 | 
								:current-page="pageIndex"
 | 
				
			||||||
 | 
								:page-sizes="[10, 20, 50, 100]"
 | 
				
			||||||
 | 
								:page-size="pageSize"
 | 
				
			||||||
 | 
								:total="totalPage"
 | 
				
			||||||
 | 
					            layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
 | 
								>
 | 
				
			||||||
 | 
							</el-pagination>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
 | 
					import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
 | 
					import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
 | 
				
			||||||
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
 | 
					import equipmentVue from './equipment.vue'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const tableConfigs = [
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							type: 'index',
 | 
				
			||||||
 | 
							width: 100,
 | 
				
			||||||
 | 
							name: i18n.t('index')
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{ prop: 'lineName', name: i18n.t('pl.name') },
 | 
				
			||||||
 | 
						{ prop: 'location', name: i18n.t('pl.paperLaying') },
 | 
				
			||||||
 | 
					    { prop: 'equipmentName', name: i18n.t('pl.robotNo') },
 | 
				
			||||||
 | 
					    { prop: 'glassNumber', name: i18n.t('pl.glassNumber') },
 | 
				
			||||||
 | 
					    { prop: 'startTime', name: i18n.t('startTime') },
 | 
				
			||||||
 | 
					    { prop: 'endTime', name: i18n.t('endTime') },
 | 
				
			||||||
 | 
					    { prop: 'glassLength', name: i18n.t('pl.glassLength') },
 | 
				
			||||||
 | 
					    { prop: 'glassWidth', name: i18n.t('pl.glassWidth') },
 | 
				
			||||||
 | 
					    { prop: 'glassThickness', name: i18n.t('pl.thick') },
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
						// { prop: 'operations', name: i18n.t('handle'), fixed: 'right', width: 180, subcomponent: TableOperateComponent, options: ['edit', 'delete'] }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								calcMaxHeight,
 | 
				
			||||||
 | 
								tableConfigs,
 | 
				
			||||||
 | 
								dataForm: {
 | 
				
			||||||
 | 
									equipmentId: '',
 | 
				
			||||||
 | 
									lineId: ''
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								dataList: [],
 | 
				
			||||||
 | 
								eqList: [],
 | 
				
			||||||
 | 
								lineList: [],
 | 
				
			||||||
 | 
								pageIndex: 1,
 | 
				
			||||||
 | 
								pageSize: 10,
 | 
				
			||||||
 | 
								totalPage: 0,
 | 
				
			||||||
 | 
					            equId: null,
 | 
				
			||||||
 | 
								dataListLoading: false,
 | 
				
			||||||
 | 
								dataListSelections: [],
 | 
				
			||||||
 | 
								addOrUpdateVisible: false,
 | 
				
			||||||
 | 
					            startTime: '',
 | 
				
			||||||
 | 
					            endTime: '',
 | 
				
			||||||
 | 
					            glassNumber: 95,
 | 
				
			||||||
 | 
					            glassLength: 2261,
 | 
				
			||||||
 | 
					            glassWidth: 1128,
 | 
				
			||||||
 | 
					            glassThick: 3.2,
 | 
				
			||||||
 | 
					            glassOptions: [{
 | 
				
			||||||
 | 
					                value: 3.2,
 | 
				
			||||||
 | 
					                label: '3.2mm'
 | 
				
			||||||
 | 
					                }, {
 | 
				
			||||||
 | 
					                value: 2,
 | 
				
			||||||
 | 
					                label: '2mm'
 | 
				
			||||||
 | 
					                }],
 | 
				
			||||||
 | 
					            value: '',
 | 
				
			||||||
 | 
					            equipmentName: this.$route.params.name
 | 
				
			||||||
 | 
								
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						components: {
 | 
				
			||||||
 | 
							AddOrUpdate,
 | 
				
			||||||
 | 
							BaseTable
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						activated() {
 | 
				
			||||||
 | 
							this.getDataList()
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						mouted() {
 | 
				
			||||||
 | 
							this.getDataList()
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						created() {
 | 
				
			||||||
 | 
							// console.log('params',this.$route.params)
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取数据列表
 | 
				
			||||||
 | 
							getDataList() {
 | 
				
			||||||
 | 
					            // console.log('this.$route.params.name',this.$route.params.name);
 | 
				
			||||||
 | 
					            this.equipmentName = this.$route.params.name
 | 
				
			||||||
 | 
								this.dataListLoading = true
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									// url: this.$http.adornUrl(`/monitoring/downloadLog/getTimeDet/${this.$route.params.id}`),
 | 
				
			||||||
 | 
					                url: this.$http.adornUrl('/monitoring/downloadLog/getTimeDet'),
 | 
				
			||||||
 | 
									method: 'POST',
 | 
				
			||||||
 | 
					                data: {
 | 
				
			||||||
 | 
					                    page: this.pageIndex,
 | 
				
			||||||
 | 
					                    limit: this.pageSize,
 | 
				
			||||||
 | 
					                    // lineId: this.dataForm.lineId,
 | 
				
			||||||
 | 
					                    equId: this.$route.params.id,
 | 
				
			||||||
 | 
					                    'startTime': this.startTime,
 | 
				
			||||||
 | 
					                    'endTime': this.endTime
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
					                if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                    // let fileterLineList = data.data.filter((t) => {
 | 
				
			||||||
 | 
					                    //     return t.lineId == this.dataForm.lineId
 | 
				
			||||||
 | 
					                    // })
 | 
				
			||||||
 | 
					                    // this.dataList = fileterLineList
 | 
				
			||||||
 | 
					                    this.dataList = data.data.list
 | 
				
			||||||
 | 
					                    // this.totalPage = this.dataList.length
 | 
				
			||||||
 | 
										this.totalPage = data.data.total
 | 
				
			||||||
 | 
					                    console.log('data',data)
 | 
				
			||||||
 | 
					                } else if (this.dataForm.lineId == '') {
 | 
				
			||||||
 | 
					                    this.dataList = data.data.list
 | 
				
			||||||
 | 
					                    this.totalPage = data.data.total
 | 
				
			||||||
 | 
					                    // console.log('this.dataList',this.dataList);
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                else {
 | 
				
			||||||
 | 
					                    this.dataList = []
 | 
				
			||||||
 | 
					                    this.totalPage = 0
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                for(let i =0;i<this.dataList.length;i++){
 | 
				
			||||||
 | 
					                    this.dataList[i].glassNumber = ( this.glassThick == 3.2 ) ? 95 :150
 | 
				
			||||||
 | 
					                    this.dataList[i].glassThickness = this.glassThick
 | 
				
			||||||
 | 
					                    this.dataList[i].glassLength = 2261
 | 
				
			||||||
 | 
					                    this.dataList[i].glassWidth = 1128
 | 
				
			||||||
 | 
					                    this.dataList[i].endTime = this.dataList[i].endTime == null ? '-' : this.dataList[i].endTime
 | 
				
			||||||
 | 
					                    this.dataList[i].startTime = this.dataList[i].startTime == null ? '-' : this.dataList[i].startTime
 | 
				
			||||||
 | 
					                }
 | 
				
			||||||
 | 
					                // console.log(this.dataList);
 | 
				
			||||||
 | 
					                this.dataListLoading = false
 | 
				
			||||||
 | 
								}).catch(()=>{}) //---去除无效报错---
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					        // 每页数
 | 
				
			||||||
 | 
							sizeChangeHandle(val) {
 | 
				
			||||||
 | 
								this.pageSize = val
 | 
				
			||||||
 | 
								this.pageIndex = 1
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 当前页
 | 
				
			||||||
 | 
							currentChangeHandle(val) {
 | 
				
			||||||
 | 
								this.pageIndex = val
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -30,7 +30,8 @@ export default {
 | 
				
			|||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			// this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
 | 
								// this.url = `${window.SITE_CONFIG['apiURL']}/sys/oss/upload?token=${Cookies.get('token')}`
 | 
				
			||||||
			// this.url = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/sys/oss/upload?token=${Cookies.get('token')}`
 | 
								// this.url = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/sys/oss/upload?token=${Cookies.get('token')}`
 | 
				
			||||||
			this.url = `/api/sys/oss/upload?token=${Cookies.get('token')}`
 | 
								// this.url = `/api/sys/oss/upload?token=${Cookies.get('token')}`
 | 
				
			||||||
 | 
								this.url = `/yd-monitor/sys/oss/upload?token=${Cookies.get('token')}`
 | 
				
			||||||
			this.num = 0
 | 
								this.num = 0
 | 
				
			||||||
			this.fileList = []
 | 
								this.fileList = []
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -166,7 +166,8 @@ export default {
 | 
				
			|||||||
		this.dataForm.uuid = getUUID()
 | 
							this.dataForm.uuid = getUUID()
 | 
				
			||||||
		// this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
 | 
							// this.captchaPath = `${window.SITE_CONFIG['apiURL']}/captcha?uuid=${this.dataForm.uuid}`
 | 
				
			||||||
		// this.captchaPath = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/captcha?uuid=${this.dataForm.uuid}`
 | 
							// this.captchaPath = (process.env.NODE_ENV === 'production' ? '/api' : '/yd-monitor') + `/captcha?uuid=${this.dataForm.uuid}`
 | 
				
			||||||
		this.captchaPath = `/api/captcha?uuid=${this.dataForm.uuid}`
 | 
							// this.captchaPath = `/api/captcha?uuid=${this.dataForm.uuid}`
 | 
				
			||||||
 | 
					    this.captchaPath = `/yd-monitor/captcha?uuid=${this.dataForm.uuid}`
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	// 表单提交
 | 
						// 表单提交
 | 
				
			||||||
	dataFormSubmitHandle: debounce(
 | 
						dataFormSubmitHandle: debounce(
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,13 +29,16 @@ module.exports = {
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    proxy: {
 | 
					    proxy: {
 | 
				
			||||||
      '/api': {
 | 
					      '/api': {
 | 
				
			||||||
        target: 'http://india.mes.picaiba.com/'
 | 
					        // target: 'http://india.mes.picaiba.com/'
 | 
				
			||||||
 | 
					        target: 'http://127.0.0.1:8080/'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      '/yd-monitor': {
 | 
					      '/yd-monitor': {
 | 
				
			||||||
        target: 'http://192.168.1.18:8080/' // 开发地址
 | 
					        // target: 'http://192.168.1.18:8080/' // 开发地址
 | 
				
			||||||
 | 
					        target: 'http://127.0.0.1:8080/'
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      '/ureport': {
 | 
					      '/ureport': {
 | 
				
			||||||
        target: 'http://india.mes.picaiba.com/' // ureporter
 | 
					        // target: 'http://india.mes.picaiba.com/' // ureporter
 | 
				
			||||||
 | 
					        target: 'http://127.0.0.1:8080/'
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user