Compare commits
	
		
			13 Commits
		
	
	
		
			ff11e1d3fb
			...
			lb
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5d36eb676c | |||
| 14b933fb0c | |||
| 92f52ab553 | |||
| 15210c2f12 | |||
| 8447b8f7ab | |||
| ca7fda73e3 | |||
| 762861a922 | |||
| 127347fab0 | |||
| b9ac64ab13 | |||
| 089a6517d3 | |||
| 1047dd78ec | |||
| 5a08d8c1dd | |||
| d0f113513c | 
@@ -47,6 +47,7 @@
 | 
				
			|||||||
								:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
 | 
													:options="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].options"
 | 
				
			||||||
								:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
													:props="configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].props"
 | 
				
			||||||
								:disabled="isDetail"
 | 
													:disabled="isDetail"
 | 
				
			||||||
 | 
													clearable
 | 
				
			||||||
							/>
 | 
												/>
 | 
				
			||||||
							<el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
 | 
												<el-time-select v-if="getType(n, c) === 'time'" v-model="dataForm[configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)].name]" :disabled="isDetail" />
 | 
				
			||||||
							<el-date-picker
 | 
												<el-date-picker
 | 
				
			||||||
@@ -113,6 +114,7 @@
 | 
				
			|||||||
import CKEditor from 'ckeditor4-vue'
 | 
					import CKEditor from 'ckeditor4-vue'
 | 
				
			||||||
import AttrForm from '../AttrForm'
 | 
					import AttrForm from '../AttrForm'
 | 
				
			||||||
import { pick } from 'lodash/object'
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
 | 
					import { pick as __pick } from '@/utils/filters'
 | 
				
			||||||
import i18n from '@/i18n'
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
// 标题 for i18n
 | 
					// 标题 for i18n
 | 
				
			||||||
const title = {
 | 
					const title = {
 | 
				
			||||||
@@ -147,13 +149,6 @@ export default {
 | 
				
			|||||||
	components: { AttrForm },
 | 
						components: { AttrForm },
 | 
				
			||||||
	props: {
 | 
						props: {
 | 
				
			||||||
		configs: {
 | 
							configs: {
 | 
				
			||||||
			/**
 | 
					 | 
				
			||||||
			 * TODO: 定义及使用方式,应改用README.md文件记录
 | 
					 | 
				
			||||||
			 * type: 'dialog' | 'drawer' | 'page'
 | 
					 | 
				
			||||||
			 * fields: Array<string|object>
 | 
					 | 
				
			||||||
			 * - fields.object: { name, type: 'number'|'textarea'|'select'|'date'|.., required: boolean,  validator: boolean(是否需要验证), [options]: any[], api: string(自动获取数据的接口,一般为getcode接口)}
 | 
					 | 
				
			||||||
			 * operations: Array[object], 操作名和对应的接口地址,还有permission(如,sys:dict:update)
 | 
					 | 
				
			||||||
			 */
 | 
					 | 
				
			||||||
			type: Object,
 | 
								type: Object,
 | 
				
			||||||
			default: () => ({}) // 此处省去类型检查,使用者自行注意就好
 | 
								default: () => ({}) // 此处省去类型检查,使用者自行注意就好
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@@ -280,7 +275,8 @@ export default {
 | 
				
			|||||||
					const requiredRule = {
 | 
										const requiredRule = {
 | 
				
			||||||
						required: true,
 | 
											required: true,
 | 
				
			||||||
						message: i18n.t('validate.required'),
 | 
											message: i18n.t('validate.required'),
 | 
				
			||||||
						trigger: 'change'
 | 
											// trigger: 'change'
 | 
				
			||||||
 | 
											trigger: 'blur'
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
					/** 检查是否已经存在该字段的规则 */
 | 
										/** 检查是否已经存在该字段的规则 */
 | 
				
			||||||
					const exists = this.dataFormRules[item.name] || null
 | 
										const exists = this.dataFormRules[item.name] || null
 | 
				
			||||||
@@ -351,6 +347,11 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		getPlaceholder(n, c) {
 | 
							getPlaceholder(n, c) {
 | 
				
			||||||
 | 
								if (this.isDetail) {
 | 
				
			||||||
 | 
									/** 如果是详情,就不展示 提示文本 */
 | 
				
			||||||
 | 
									return ''
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
 | 
								const opt = this.configs.fields[(n - 1) * COLUMN_PER_ROW + (c - 1)]
 | 
				
			||||||
			if (opt) {
 | 
								if (opt) {
 | 
				
			||||||
				// if opt is valid
 | 
									// if opt is valid
 | 
				
			||||||
@@ -399,9 +400,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('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))
 | 
				
			||||||
							// LABEL: FILE_RELATED
 | 
												// LABEL: FILE_RELATED
 | 
				
			||||||
							/** 对文件下载进行分流 */
 | 
												/** 对文件下载进行分流 */
 | 
				
			||||||
							this.fileList = {}
 | 
												this.fileList = {}
 | 
				
			||||||
@@ -533,7 +535,7 @@ export default {
 | 
				
			|||||||
					}
 | 
										}
 | 
				
			||||||
					break
 | 
										break
 | 
				
			||||||
				case 'cancel':
 | 
									case 'cancel':
 | 
				
			||||||
					this.visible = false
 | 
										this.handleClose()
 | 
				
			||||||
				// add more..
 | 
									// add more..
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,7 @@ t.routes['报表设计'] = 'Report Design'
 | 
				
			|||||||
t.routes['报表预览'] = 'Report Preview'
 | 
					t.routes['报表预览'] = 'Report Preview'
 | 
				
			||||||
t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
 | 
					t.routes['质量检测基础数据'] = 'Quality Inspection Basic Data'
 | 
				
			||||||
t.routes['当前检测数据'] = 'Current Inspection Data'
 | 
					t.routes['当前检测数据'] = 'Current Inspection Data'
 | 
				
			||||||
 | 
					t.routes['检测统计数据'] = 'Statistics Data'
 | 
				
			||||||
t.routes['质量检查信息记录'] = 'Quality Inspection Records'
 | 
					t.routes['质量检查信息记录'] = 'Quality Inspection Records'
 | 
				
			||||||
t.routes['用户管理'] = 'User Management'
 | 
					t.routes['用户管理'] = 'User Management'
 | 
				
			||||||
t.routes['部门管理'] = 'Department Management'
 | 
					t.routes['部门管理'] = 'Department Management'
 | 
				
			||||||
@@ -61,9 +62,13 @@ t.routes['设备分组报警信息'] = 'Equipment Group Alarm'
 | 
				
			|||||||
t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
					t.routes['设备历史参数'] = 'Equipment Historical Parameters'
 | 
				
			||||||
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.andeng = {}
 | 
				
			||||||
 | 
					t.andeng.inspectContent = 'Inspection Content'
 | 
				
			||||||
 | 
					t.andeng.btnVal = 'Button Value'
 | 
				
			||||||
 | 
					t.andeng.btnBoxModel = 'Button Box Model'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.dictValueList = 'View Details'
 | 
					t.dictValueList = 'View Details'
 | 
				
			||||||
@@ -161,6 +166,10 @@ t.all = 'All'
 | 
				
			|||||||
t.reset = 'Reset'
 | 
					t.reset = 'Reset'
 | 
				
			||||||
t.preview = 'Preview'
 | 
					t.preview = 'Preview'
 | 
				
			||||||
t.design = 'Design'
 | 
					t.design = 'Design'
 | 
				
			||||||
 | 
					t.timetype = 'Time Type'
 | 
				
			||||||
 | 
					t.reftimerange = 'By time range'
 | 
				
			||||||
 | 
					t.refdate = 'By date'
 | 
				
			||||||
 | 
					t.hour = 'Hour(s)'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.errors = {}
 | 
					t.errors = {}
 | 
				
			||||||
t.errors.nosection = 'There is no sections on this product line.'
 | 
					t.errors.nosection = 'There is no sections on this product line.'
 | 
				
			||||||
@@ -173,6 +182,7 @@ t.hints.select = 'Please select '
 | 
				
			|||||||
t.hints.date = 'Please select date'
 | 
					t.hints.date = 'Please select date'
 | 
				
			||||||
t.hints.checktime = 'Please select inspection time'
 | 
					t.hints.checktime = 'Please select inspection time'
 | 
				
			||||||
t.hints.number = 'Please input correct number'
 | 
					t.hints.number = 'Please input correct number'
 | 
				
			||||||
 | 
					t.hints.integer = 'Please input correct integer'
 | 
				
			||||||
t.hints.addr = 'Please input address'
 | 
					t.hints.addr = 'Please input address'
 | 
				
			||||||
t.hints.upload2m = 'File size cannot be larger than 2MB (2048KB)'
 | 
					t.hints.upload2m = 'File size cannot be larger than 2MB (2048KB)'
 | 
				
			||||||
t.hints.upload2mPic = 'Image files only. File size cannot be larger than 2MB (2048KB)'
 | 
					t.hints.upload2mPic = 'Image files only. File size cannot be larger than 2MB (2048KB)'
 | 
				
			||||||
@@ -213,6 +223,9 @@ t.alarm.content = 'Alarm Content'
 | 
				
			|||||||
t.alarm.source = 'Alarm Source'
 | 
					t.alarm.source = 'Alarm Source'
 | 
				
			||||||
t.alarm.det = 'Alarm Details'
 | 
					t.alarm.det = 'Alarm Details'
 | 
				
			||||||
t.alarm.externalCode = 'External Code'
 | 
					t.alarm.externalCode = 'External Code'
 | 
				
			||||||
 | 
					t.alarm.description = 'Description'
 | 
				
			||||||
 | 
					t.alarm.remark = 'Remark'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.report = {}
 | 
					t.report = {}
 | 
				
			||||||
t.report.name = 'Report Name'
 | 
					t.report.name = 'Report Name'
 | 
				
			||||||
@@ -232,7 +245,7 @@ t.inspect.typetotal = 'Total Inspection Types'
 | 
				
			|||||||
t.inspect.typename = 'Inspection Type'
 | 
					t.inspect.typename = 'Inspection Type'
 | 
				
			||||||
t.inspect.typecode = 'Inspection Code'
 | 
					t.inspect.typecode = 'Inspection Code'
 | 
				
			||||||
t.inspect.ioTotal = 'Data of input/output and total inspections'
 | 
					t.inspect.ioTotal = 'Data of input/output and total inspections'
 | 
				
			||||||
t.inspect.plTotal = 'Inspection types per line'
 | 
					t.inspect.plTotal = 'Inspection contents in each line'
 | 
				
			||||||
t.inspect.inTotal = 'Up Sum'
 | 
					t.inspect.inTotal = 'Up Sum'
 | 
				
			||||||
t.inspect.outTotal = 'Down Sum'
 | 
					t.inspect.outTotal = 'Down Sum'
 | 
				
			||||||
t.inspect.checkTotal = 'Total Inspections'
 | 
					t.inspect.checkTotal = 'Total Inspections'
 | 
				
			||||||
@@ -251,17 +264,17 @@ t.realtime.num = 'scrap quantity'
 | 
				
			|||||||
t.realtime.rate = 'scrap rate'
 | 
					t.realtime.rate = 'scrap rate'
 | 
				
			||||||
t.realtime.total = 'total production'
 | 
					t.realtime.total = 'total production'
 | 
				
			||||||
t.realtime.goodrate = 'Passed Rate'
 | 
					t.realtime.goodrate = 'Passed Rate'
 | 
				
			||||||
t.realtime.runState = '是否运行'
 | 
					t.realtime.runState = 'running state'
 | 
				
			||||||
t.realtime.state = '状态'
 | 
					t.realtime.state = 'status'
 | 
				
			||||||
t.realtime.hasFault = '是否故障'
 | 
					t.realtime.hasFault = 'malfunction'
 | 
				
			||||||
t.realtime.recentParamValue = '参数近期值'
 | 
					t.realtime.recentParamValue = 'recent parameters'
 | 
				
			||||||
t.realtime.view = '查看'
 | 
					t.realtime.view = 'view'
 | 
				
			||||||
t.realtime.input = '投入数'
 | 
					t.realtime.input = 'input' //'投入数'
 | 
				
			||||||
t.realtime.output = '产出数'
 | 
					t.realtime.output = 'output' //'产出数'
 | 
				
			||||||
t.realtime.eqName = '设备名称'
 | 
					t.realtime.eqName = 'Equipment name'
 | 
				
			||||||
t.realtime.eqCode = '设备编码'
 | 
					t.realtime.eqCode = 'Equipment cdoe'
 | 
				
			||||||
t.realtime.productionSnapshotTime = '生产量记录时间'
 | 
					t.realtime.productionSnapshotTime = 'production recording time' // '生产量记录时间'
 | 
				
			||||||
t.realtime.statusSnapshotTime = '状态记录时间'
 | 
					t.realtime.statusSnapshotTime = 'status recording time' // '状态记录时间'
 | 
				
			||||||
t.realtime.refresh = 'Refresh data...'
 | 
					t.realtime.refresh = 'Refresh data...'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -315,6 +328,40 @@ t.eq.port = 'Port'
 | 
				
			|||||||
t.eq.type = 'Type'
 | 
					t.eq.type = 'Type'
 | 
				
			||||||
t.eq.typecode = 'Type Code'
 | 
					t.eq.typecode = 'Type Code'
 | 
				
			||||||
t.eq.parent = 'Parent'
 | 
					t.eq.parent = 'Parent'
 | 
				
			||||||
 | 
					t.eq.mtbf = 'Mean time between failures[MTBF] (h)'
 | 
				
			||||||
 | 
					t.eq.mttr = 'Mean time to repair[MTTR] (h)'
 | 
				
			||||||
 | 
					t.eq.efficienttimeh = 'Working time(h)'
 | 
				
			||||||
 | 
					t.eq.shutdowntimeh = 'Off time(h)'
 | 
				
			||||||
 | 
					t.eq.worktimeh = 'Working time(h)'
 | 
				
			||||||
 | 
					t.eq.downtimeh = 'Malfunction duration(h)'
 | 
				
			||||||
 | 
					t.eq.stoptimeh = 'Halt duration(h)'
 | 
				
			||||||
 | 
					t.eq.worktime = 'Functioning duration'
 | 
				
			||||||
 | 
					t.eq.stoptime = 'Halt duration'
 | 
				
			||||||
 | 
					t.eq.downtime = 'Malfunction duration'
 | 
				
			||||||
 | 
					t.eq.downcount = 'Malfunction counts'
 | 
				
			||||||
 | 
					t.eq.downrate = 'Malfunction rates'
 | 
				
			||||||
 | 
					t.eq.stoplost = 'Lost'
 | 
				
			||||||
 | 
					t.eq.ratio = 'percentage'
 | 
				
			||||||
 | 
					t.eq.time = 'time'
 | 
				
			||||||
 | 
					t.eq.timetrend = 'trend'
 | 
				
			||||||
 | 
					t.eq.nogap = 'no interval'
 | 
				
			||||||
 | 
					t.eq.monthgap = 'by month'
 | 
				
			||||||
 | 
					t.eq.daygap = 'by day'
 | 
				
			||||||
 | 
					t.eq.weekgap = 'by week'
 | 
				
			||||||
 | 
					t.eq.hourgap = 'by hour'
 | 
				
			||||||
 | 
					t.eq.workdurationratio = 'Functioning duration ratio' // '工作时长比率'
 | 
				
			||||||
 | 
					t.eq.stopdurationratio = 'Halt duration ratio' // '停机时长比率'
 | 
				
			||||||
 | 
					t.eq.stopratio = 'Halt ratio' // '停机比率'
 | 
				
			||||||
 | 
					t.eq.downdurationratio = 'Malfunction duration ratio' // '故障时长比率'
 | 
				
			||||||
 | 
					t.eq.speedefficiency = 'Speed launch rate' //'速度开动率'
 | 
				
			||||||
 | 
					t.eq.speedlost = 'Speed lost'
 | 
				
			||||||
 | 
					t.eq.timeefficiency = 'Time launch rate' //'时间开动率'
 | 
				
			||||||
 | 
					t.eq.year = 'year'
 | 
				
			||||||
 | 
					t.eq.month = 'month'
 | 
				
			||||||
 | 
					t.eq.realyield = 'Actual processing speed'
 | 
				
			||||||
 | 
					t.eq.designyield = 'Theoretical processing speed'
 | 
				
			||||||
 | 
					t.eq.viewtrend = 'View Trends'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.pl = {}
 | 
					t.pl = {}
 | 
				
			||||||
@@ -327,6 +374,7 @@ t.pl.belong = 'Product Line'
 | 
				
			|||||||
t.pl.tvalue = 'TT Value'
 | 
					t.pl.tvalue = 'TT Value'
 | 
				
			||||||
t.pl.factoryHints = 'Please select a factory'
 | 
					t.pl.factoryHints = 'Please select a factory'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.prompt = {}
 | 
					t.prompt = {}
 | 
				
			||||||
t.prompt.title = 'Prompt'
 | 
					t.prompt.title = 'Prompt'
 | 
				
			||||||
t.prompt.info = 'Are you sure to {handle}?'
 | 
					t.prompt.info = 'Are you sure to {handle}?'
 | 
				
			||||||
@@ -334,6 +382,7 @@ t.prompt.sure = 'Are you sure to delete this record?'
 | 
				
			|||||||
t.prompt.success = 'success'
 | 
					t.prompt.success = 'success'
 | 
				
			||||||
t.prompt.failed = 'failed'
 | 
					t.prompt.failed = 'failed'
 | 
				
			||||||
t.prompt.deleteBatch = 'Please choose items to delete.'
 | 
					t.prompt.deleteBatch = 'Please choose items to delete.'
 | 
				
			||||||
 | 
					t.prompt.month = 'Please choose month'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.validate = {}
 | 
					t.validate = {}
 | 
				
			||||||
t.validate.required = 'This is required.'
 | 
					t.validate.required = 'This is required.'
 | 
				
			||||||
@@ -349,6 +398,8 @@ t.datePicker = {}
 | 
				
			|||||||
t.datePicker.range = 'to'
 | 
					t.datePicker.range = 'to'
 | 
				
			||||||
t.datePicker.start = 'Start Time'
 | 
					t.datePicker.start = 'Start Time'
 | 
				
			||||||
t.datePicker.end = 'End Time'
 | 
					t.datePicker.end = 'End Time'
 | 
				
			||||||
 | 
					t.datePicker.starttime = 'Start Time'
 | 
				
			||||||
 | 
					t.datePicker.endtime = 'End Time'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.fullscreen = {}
 | 
					t.fullscreen = {}
 | 
				
			||||||
t.fullscreen.prompt = 'This operation is not supported by your browser.'
 | 
					t.fullscreen.prompt = 'This operation is not supported by your browser.'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -36,6 +36,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['部门管理'] = '部门管理'
 | 
				
			||||||
@@ -62,8 +63,12 @@ t.routes['设备分组报警信息'] = '设备分组报警信息'
 | 
				
			|||||||
t.routes['设备历史参数'] = '设备历史参数'
 | 
					t.routes['设备历史参数'] = '设备历史参数'
 | 
				
			||||||
t.routes['质量检测类型'] = '质量检测类型'
 | 
					t.routes['质量检测类型'] = '质量检测类型'
 | 
				
			||||||
t.routes['质量检测信息'] = '质量检测信息'
 | 
					t.routes['质量检测信息'] = '质量检测信息'
 | 
				
			||||||
 | 
					t.routes['安灯检测盒'] = '安灯检测盒'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.andeng = {}
 | 
				
			||||||
 | 
					t.andeng.inspectContent = '检测内容'
 | 
				
			||||||
 | 
					t.andeng.btnVal = '按钮值'
 | 
				
			||||||
 | 
					t.andeng.btnBoxModel = '按钮盒模式'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.dictValueList = '查看值列表'
 | 
					t.dictValueList = '查看值列表'
 | 
				
			||||||
@@ -162,6 +167,10 @@ t.all = '全部'
 | 
				
			|||||||
t.reset = '重置'
 | 
					t.reset = '重置'
 | 
				
			||||||
t.preview = '预览'
 | 
					t.preview = '预览'
 | 
				
			||||||
t.design = '设计'
 | 
					t.design = '设计'
 | 
				
			||||||
 | 
					t.timetype = '时间类型'
 | 
				
			||||||
 | 
					t.reftimerange = '按时间段'
 | 
				
			||||||
 | 
					t.refdate = '按日期'
 | 
				
			||||||
 | 
					t.hour = '小时'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.errors = {}
 | 
					t.errors = {}
 | 
				
			||||||
t.errors.nosection = '该产线没有工段'
 | 
					t.errors.nosection = '该产线没有工段'
 | 
				
			||||||
@@ -174,6 +183,7 @@ t.hints.select = '请选择'
 | 
				
			|||||||
t.hints.date = '请选择日期'
 | 
					t.hints.date = '请选择日期'
 | 
				
			||||||
t.hints.checktime = '请选择检测时间'
 | 
					t.hints.checktime = '请选择检测时间'
 | 
				
			||||||
t.hints.number = '请输入正确的数值'
 | 
					t.hints.number = '请输入正确的数值'
 | 
				
			||||||
 | 
					t.hints.integer = '请输入正确的整数'
 | 
				
			||||||
t.hints.addr = '请输入地址'
 | 
					t.hints.addr = '请输入地址'
 | 
				
			||||||
t.hints.upload2m = '上传文件大小不要超过 2MB (2048KB)'
 | 
					t.hints.upload2m = '上传文件大小不要超过 2MB (2048KB)'
 | 
				
			||||||
t.hints.upload2mPic = '上传图片文件,且大小不要超过 2MB (2048KB)'
 | 
					t.hints.upload2mPic = '上传图片文件,且大小不要超过 2MB (2048KB)'
 | 
				
			||||||
@@ -215,6 +225,8 @@ t.alarm.content = '报警内容'
 | 
				
			|||||||
t.alarm.source = '报警来源'
 | 
					t.alarm.source = '报警来源'
 | 
				
			||||||
t.alarm.det = '报警详细内容'
 | 
					t.alarm.det = '报警详细内容'
 | 
				
			||||||
t.alarm.externalCode = '外部编码'
 | 
					t.alarm.externalCode = '外部编码'
 | 
				
			||||||
 | 
					t.alarm.description = '描述'
 | 
				
			||||||
 | 
					t.alarm.remark = '备注'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.report = {}
 | 
					t.report = {}
 | 
				
			||||||
t.report.name = '报表名称'
 | 
					t.report.name = '报表名称'
 | 
				
			||||||
@@ -234,7 +246,7 @@ t.inspect.typetotal = '检测类型总数'
 | 
				
			|||||||
t.inspect.typename = '检测类型名称'
 | 
					t.inspect.typename = '检测类型名称'
 | 
				
			||||||
t.inspect.typecode = '检测类型编码'
 | 
					t.inspect.typecode = '检测类型编码'
 | 
				
			||||||
t.inspect.ioTotal = '上下片及检测总数统计'
 | 
					t.inspect.ioTotal = '上下片及检测总数统计'
 | 
				
			||||||
t.inspect.plTotal = '各产线检测类型统计'
 | 
					t.inspect.plTotal = '各产线检测内容统计'
 | 
				
			||||||
t.inspect.inTotal = '上片总数'
 | 
					t.inspect.inTotal = '上片总数'
 | 
				
			||||||
t.inspect.outTotal = '下片总数'
 | 
					t.inspect.outTotal = '下片总数'
 | 
				
			||||||
t.inspect.checkTotal = '检测总数'
 | 
					t.inspect.checkTotal = '检测总数'
 | 
				
			||||||
@@ -317,6 +329,39 @@ t.eq.port = '端口'
 | 
				
			|||||||
t.eq.type = '类型名称'
 | 
					t.eq.type = '类型名称'
 | 
				
			||||||
t.eq.typecode = '类型编码'
 | 
					t.eq.typecode = '类型编码'
 | 
				
			||||||
t.eq.parent = '父类'
 | 
					t.eq.parent = '父类'
 | 
				
			||||||
 | 
					t.eq.mtbf = '平均故障间隔时间[MTBF] (h)'
 | 
				
			||||||
 | 
					t.eq.mttr = '平均维修时间[MTTR] (h)'
 | 
				
			||||||
 | 
					t.eq.efficienttimeh = '有效时间(h)'
 | 
				
			||||||
 | 
					t.eq.shutdowntimeh = '关机时间(h)'
 | 
				
			||||||
 | 
					t.eq.worktimeh = '工作时长(h)'
 | 
				
			||||||
 | 
					t.eq.downtimeh = '故障时长(h)'
 | 
				
			||||||
 | 
					t.eq.stoptimeh = '停机时长(h)'
 | 
				
			||||||
 | 
					t.eq.worktime = '工作时长'
 | 
				
			||||||
 | 
					t.eq.stoptime = '停机时长'
 | 
				
			||||||
 | 
					t.eq.downtime = '故障时长'
 | 
				
			||||||
 | 
					t.eq.downcount = '故障次数'
 | 
				
			||||||
 | 
					t.eq.downrate = '故障比率'
 | 
				
			||||||
 | 
					t.eq.stoplost = '中断损失'
 | 
				
			||||||
 | 
					t.eq.ratio = '百分比'
 | 
				
			||||||
 | 
					t.eq.time = '时间'
 | 
				
			||||||
 | 
					t.eq.timetrend = '时间区间走势'
 | 
				
			||||||
 | 
					t.eq.nogap = '无间隔'
 | 
				
			||||||
 | 
					t.eq.monthgap = '按月'
 | 
				
			||||||
 | 
					t.eq.daygap = '按天'
 | 
				
			||||||
 | 
					t.eq.weekgap = '按周'
 | 
				
			||||||
 | 
					t.eq.hourgap = '按小时'
 | 
				
			||||||
 | 
					t.eq.workdurationratio = '工作时长比率'
 | 
				
			||||||
 | 
					t.eq.stopdurationratio = '停机时长比率'
 | 
				
			||||||
 | 
					t.eq.stopratio = '停机比率'
 | 
				
			||||||
 | 
					t.eq.downdurationratio = '故障时长比率'
 | 
				
			||||||
 | 
					t.eq.speedefficiency = '速度开动率'
 | 
				
			||||||
 | 
					t.eq.speedlost = '速度损失'
 | 
				
			||||||
 | 
					t.eq.timeefficiency = '时间开动率'
 | 
				
			||||||
 | 
					t.eq.year='年'
 | 
				
			||||||
 | 
					t.eq.month='月'
 | 
				
			||||||
 | 
					t.eq.realyield = '实际加工速度'
 | 
				
			||||||
 | 
					t.eq.designyield = '理论加工速度' 
 | 
				
			||||||
 | 
					t.eq.viewtrend = '查看趋势' 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.pl = {}
 | 
					t.pl = {}
 | 
				
			||||||
@@ -336,6 +381,7 @@ t.prompt.sure = '确定删除这条记录吗?'
 | 
				
			|||||||
t.prompt.success = '操作成功'
 | 
					t.prompt.success = '操作成功'
 | 
				
			||||||
t.prompt.failed = '操作失败'
 | 
					t.prompt.failed = '操作失败'
 | 
				
			||||||
t.prompt.deleteBatch = '请选择删除项'
 | 
					t.prompt.deleteBatch = '请选择删除项'
 | 
				
			||||||
 | 
					t.prompt.month = '请选择月份'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.validate = {}
 | 
					t.validate = {}
 | 
				
			||||||
t.validate.required = '必填项不能为空'
 | 
					t.validate.required = '必填项不能为空'
 | 
				
			||||||
@@ -351,6 +397,8 @@ t.datePicker = {}
 | 
				
			|||||||
t.datePicker.range = '至'
 | 
					t.datePicker.range = '至'
 | 
				
			||||||
t.datePicker.start = '开始日期'
 | 
					t.datePicker.start = '开始日期'
 | 
				
			||||||
t.datePicker.end = '结束日期'
 | 
					t.datePicker.end = '结束日期'
 | 
				
			||||||
 | 
					t.datePicker.starttime = '开始时间'
 | 
				
			||||||
 | 
					t.datePicker.endtime = '结束时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.fullscreen = {}
 | 
					t.fullscreen = {}
 | 
				
			||||||
t.fullscreen.prompt = '您的浏览器不支持此操作'
 | 
					t.fullscreen.prompt = '您的浏览器不支持此操作'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,3 +10,15 @@ export const dictFilter = dictTypeId => {
 | 
				
			|||||||
export const timeFilter = (val) => {
 | 
					export const timeFilter = (val) => {
 | 
				
			||||||
	return moment(val).format('YYYY-MM-DD HH:mm:ss')
 | 
						return moment(val).format('YYYY-MM-DD HH:mm:ss')
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export const pick = (obj, paths) => {
 | 
				
			||||||
 | 
						let result = {}
 | 
				
			||||||
 | 
						paths.forEach(key => {
 | 
				
			||||||
 | 
							if (obj.hasOwnProperty(key)) {
 | 
				
			||||||
 | 
								result[key] = obj[key];
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								result[key] = null
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
						return result
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,36 +1,20 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<nav
 | 
						<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
 | 
				
			||||||
		class="aui-navbar"
 | 
					 | 
				
			||||||
		:class="`aui-navbar--${$store.state.navbarLayoutType}`"
 | 
					 | 
				
			||||||
	>
 | 
					 | 
				
			||||||
		<div class="aui-navbar__header">
 | 
							<div class="aui-navbar__header">
 | 
				
			||||||
			<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
 | 
								<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
 | 
				
			||||||
				<a class="aui-navbar__brand-lg" href="javascript:;">{{
 | 
									<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
 | 
				
			||||||
					$t('brand.lg')
 | 
									<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
 | 
				
			||||||
				}}</a>
 | 
					 | 
				
			||||||
				<a class="aui-navbar__brand-mini" href="javascript:;">{{
 | 
					 | 
				
			||||||
					$t('brand.mini')
 | 
					 | 
				
			||||||
				}}</a>
 | 
					 | 
				
			||||||
			</h1>
 | 
								</h1>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
		<div class="aui-navbar__body">
 | 
							<div class="aui-navbar__body">
 | 
				
			||||||
			<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
 | 
								<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
 | 
				
			||||||
				<el-menu-item
 | 
									<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
 | 
				
			||||||
					index="1"
 | 
										<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true">
 | 
				
			||||||
					@click="$store.state.sidebarFold = !$store.state.sidebarFold"
 | 
					 | 
				
			||||||
				>
 | 
					 | 
				
			||||||
					<svg
 | 
					 | 
				
			||||||
						class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
 | 
					 | 
				
			||||||
						aria-hidden="true"
 | 
					 | 
				
			||||||
					>
 | 
					 | 
				
			||||||
						<use xlink:href="#icon-outdent"></use>
 | 
											<use xlink:href="#icon-outdent"></use>
 | 
				
			||||||
					</svg>
 | 
										</svg>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
				<el-menu-item index="2" @click="refresh()">
 | 
									<el-menu-item index="2" @click="refresh()">
 | 
				
			||||||
					<svg
 | 
										<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true">
 | 
				
			||||||
						class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
 | 
					 | 
				
			||||||
						aria-hidden="true"
 | 
					 | 
				
			||||||
					>
 | 
					 | 
				
			||||||
						<use xlink:href="#icon-sync"></use>
 | 
											<use xlink:href="#icon-sync"></use>
 | 
				
			||||||
					</svg>
 | 
										</svg>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
@@ -47,11 +31,7 @@
 | 
				
			|||||||
					</a>
 | 
										</a>
 | 
				
			||||||
				</el-menu-item> -->
 | 
									</el-menu-item> -->
 | 
				
			||||||
				<el-menu-item index="3">
 | 
									<el-menu-item index="3">
 | 
				
			||||||
					<el-dropdown
 | 
										<el-dropdown placement="bottom" :show-timeout="0" @command="handleCommand">
 | 
				
			||||||
						placement="bottom"
 | 
					 | 
				
			||||||
						:show-timeout="0"
 | 
					 | 
				
			||||||
						@command="handleCommand"
 | 
					 | 
				
			||||||
					>
 | 
					 | 
				
			||||||
						<span class="el-dropdown-link">
 | 
											<span class="el-dropdown-link">
 | 
				
			||||||
							<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
												<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
				
			||||||
								<use xlink:href="#icon-earth"></use>
 | 
													<use xlink:href="#icon-earth"></use>
 | 
				
			||||||
@@ -59,12 +39,8 @@
 | 
				
			|||||||
							<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
 | 
												<!-- <i class="el-icon-arrow-down el-icon--right"></i> -->
 | 
				
			||||||
						</span>
 | 
											</span>
 | 
				
			||||||
						<el-dropdown-menu slot="dropdown">
 | 
											<el-dropdown-menu slot="dropdown">
 | 
				
			||||||
							<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN"
 | 
												<el-dropdown-item :disabled="getLang() === 'zh-CN'" command="toCN">中文</el-dropdown-item>
 | 
				
			||||||
								>中文</el-dropdown-item
 | 
												<el-dropdown-item :disabled="getLang() === 'en'" command="toEN">En</el-dropdown-item>
 | 
				
			||||||
							>
 | 
					 | 
				
			||||||
							<el-dropdown-item :disabled="getLang() === 'en'" command="toEN"
 | 
					 | 
				
			||||||
								>En</el-dropdown-item
 | 
					 | 
				
			||||||
							>
 | 
					 | 
				
			||||||
						</el-dropdown-menu>
 | 
											</el-dropdown-menu>
 | 
				
			||||||
					</el-dropdown>
 | 
										</el-dropdown>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
@@ -81,22 +57,15 @@
 | 
				
			|||||||
							<i class="el-icon-arrow-down"></i>
 | 
												<i class="el-icon-arrow-down"></i>
 | 
				
			||||||
						</span>
 | 
											</span>
 | 
				
			||||||
						<el-dropdown-menu slot="dropdown">
 | 
											<el-dropdown-menu slot="dropdown">
 | 
				
			||||||
							<el-dropdown-item @click.native="updatePasswordHandle()">{{
 | 
												<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
 | 
				
			||||||
								$t('updatePassword.title')
 | 
												<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
 | 
				
			||||||
							}}</el-dropdown-item>
 | 
					 | 
				
			||||||
							<el-dropdown-item @click.native="logoutHandle()">{{
 | 
					 | 
				
			||||||
								$t('logout')
 | 
					 | 
				
			||||||
							}}</el-dropdown-item>
 | 
					 | 
				
			||||||
						</el-dropdown-menu>
 | 
											</el-dropdown-menu>
 | 
				
			||||||
					</el-dropdown>
 | 
										</el-dropdown>
 | 
				
			||||||
				</el-menu-item>
 | 
									</el-menu-item>
 | 
				
			||||||
			</el-menu>
 | 
								</el-menu>
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
		<!-- 弹窗, 修改密码 -->
 | 
							<!-- 弹窗, 修改密码 -->
 | 
				
			||||||
		<update-password
 | 
							<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
 | 
				
			||||||
			v-if="updatePasswordVisible"
 | 
					 | 
				
			||||||
			ref="updatePassword"
 | 
					 | 
				
			||||||
		></update-password>
 | 
					 | 
				
			||||||
	</nav>
 | 
						</nav>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
@@ -156,15 +125,11 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		// 退出
 | 
							// 退出
 | 
				
			||||||
		logoutHandle() {
 | 
							logoutHandle() {
 | 
				
			||||||
			this.$confirm(
 | 
								this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
 | 
				
			||||||
				this.$t('prompt.info', { handle: this.$t('logout') }),
 | 
					 | 
				
			||||||
				this.$t('prompt.title'),
 | 
					 | 
				
			||||||
				{
 | 
					 | 
				
			||||||
				confirmButtonText: this.$t('confirm'),
 | 
									confirmButtonText: this.$t('confirm'),
 | 
				
			||||||
				cancelButtonText: this.$t('cancel'),
 | 
									cancelButtonText: this.$t('cancel'),
 | 
				
			||||||
				type: 'warning'
 | 
									type: 'warning'
 | 
				
			||||||
				}
 | 
								})
 | 
				
			||||||
			)
 | 
					 | 
				
			||||||
				.then(() => {
 | 
									.then(() => {
 | 
				
			||||||
					this.$http
 | 
										this.$http
 | 
				
			||||||
						.post(this.$http.adornUrl('/logout'))
 | 
											.post(this.$http.adornUrl('/logout'))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -58,6 +58,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
    init () {
 | 
					    init () {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -56,6 +56,12 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
    init () {
 | 
					    init () {
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.getDataList()
 | 
					      this.getDataList()
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,6 +97,12 @@ export default {
 | 
				
			|||||||
    Log
 | 
					    Log
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
    // 暂停
 | 
					    // 暂停
 | 
				
			||||||
    pauseHandle (id) {
 | 
					    pauseHandle (id) {
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
					      if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -30,7 +30,14 @@
 | 
				
			|||||||
			layout="total, sizes, prev, pager, next, jumper"
 | 
								layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
		></el-pagination>
 | 
							></el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @select-change="handleDialogSelectChange" />
 | 
							<add-or-update
 | 
				
			||||||
 | 
								v-if="addOrUpdateVisible"
 | 
				
			||||||
 | 
								ref="addOrUpdate"
 | 
				
			||||||
 | 
								:configs="addOrUpdateConfigs"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
								@select-change="handleDialogSelectChange"
 | 
				
			||||||
 | 
								@destory-dialog="handleDestroyDialog"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -85,7 +92,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	infoUrl: '/monitoring/equipment',
 | 
						infoUrl: '/monitoring/equipment',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'name', label: i18n.t('eq.name'), required: true },
 | 
							{ name: 'name', label: i18n.t('eq.name'), required: true },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('eq.code'), api: '/monitoring/equipment/getCode' },
 | 
							{ name: 'code', label: i18n.t('eq.code'), required: true, api: '/monitoring/equipment/getCode' },
 | 
				
			||||||
		{ name: 'enName', label: i18n.t('enname') },
 | 
							{ name: 'enName', label: i18n.t('enname') },
 | 
				
			||||||
		{ name: 'abbr', label: i18n.t('abbr') },
 | 
							{ name: 'abbr', label: i18n.t('abbr') },
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -113,7 +120,8 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'sort',
 | 
								name: 'sort',
 | 
				
			||||||
			label: i18n.t('ws.sort'),
 | 
								label: i18n.t('ws.sort'),
 | 
				
			||||||
			rules: [{ type: 'number', message: i18n.t('hints.number'), transform: val => Number(val) }]
 | 
								type: 'number',
 | 
				
			||||||
 | 
								rules: [{ type: 'number', message: i18n.t('hints.number'), trigger: 'blur', transform: val => Number(val) }]
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'groupId',
 | 
								name: 'groupId',
 | 
				
			||||||
@@ -297,6 +305,12 @@ export default {
 | 
				
			|||||||
		this.getTypeList()
 | 
							this.getTypeList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取产线列表,用于刷新工段列表
 | 
							// 获取产线列表,用于刷新工段列表
 | 
				
			||||||
		getPlList() {
 | 
							getPlList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -29,7 +29,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -128,6 +128,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 设备
 | 
							// 设备
 | 
				
			||||||
		getEqList() {
 | 
							getEqList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,27 +5,27 @@
 | 
				
			|||||||
			<!-- 工厂 -->
 | 
								<!-- 工厂 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
 | 
									<!-- <el-select v-model="dataForm.factoryId" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-select> -->
 | 
				
			||||||
				<el-select v-model="dataForm.ftId" :placeholder="'工厂'" clearable>
 | 
									<el-select v-model="dataForm.ftId" :placeholder="$t('factory.title')" clearable>
 | 
				
			||||||
					<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
 | 
										<el-option v-for="factory in factoryList" :key="factory.id" :value="factory.id" :label="factory.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 产线 -->
 | 
								<!-- 产线 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
 | 
									<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
 | 
				
			||||||
					<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
										<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 时间类型 -->
 | 
								<!-- 时间类型 -->
 | 
				
			||||||
			<!-- 按时间段 -->
 | 
								<!-- 按时间段 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="timeType" :placeholder="'时间类型'" clearable>
 | 
									<el-select v-model="timeType" :placeholder="$t('timetype')" clearable>
 | 
				
			||||||
					<el-option value="range" label="按时间段" />
 | 
										<el-option value="range" :label="$t('reftimerange')" />
 | 
				
			||||||
					<el-option value="date" label="按日期" />
 | 
										<el-option value="date" :label="$t('refdate')" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 日期选择 -->
 | 
								<!-- 日期选择 -->
 | 
				
			||||||
			<el-form-item v-if="timeType === 'date'">
 | 
								<el-form-item v-if="timeType === 'date'">
 | 
				
			||||||
				<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="'请选择日期'" format="yyyy-MM-dd" />
 | 
									<el-date-picker key="range-picker" v-model="rawTime" type="date" :placeholder="$t('hints.date')" format="yyyy-MM-dd" />
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 时间段选择 -->
 | 
								<!-- 时间段选择 -->
 | 
				
			||||||
			<el-form-item v-else>
 | 
								<el-form-item v-else>
 | 
				
			||||||
@@ -33,9 +33,9 @@
 | 
				
			|||||||
					key="time-picker"
 | 
										key="time-picker"
 | 
				
			||||||
					v-model="rawTime"
 | 
										v-model="rawTime"
 | 
				
			||||||
					type="daterange"
 | 
										type="daterange"
 | 
				
			||||||
					:range-separator="'至'"
 | 
										:range-separator="$t('datePicker.range')"
 | 
				
			||||||
					:start-placeholder="'开始时间'"
 | 
										:start-placeholder="$t('datePicker.starttime')"
 | 
				
			||||||
					:end-placeholder="'结束时间'"
 | 
										:end-placeholder="$t('datePicker.endtime')"
 | 
				
			||||||
					format="yyyy-MM-dd"
 | 
										format="yyyy-MM-dd"
 | 
				
			||||||
				/>
 | 
									/>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
@@ -48,7 +48,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		<transition mode="out-in" name="slide-to-left">
 | 
							<transition mode="out-in" name="slide-to-left">
 | 
				
			||||||
			<equipment-efficiency-graph v-if="showGraph" key="graph" ref="eegraph" @close-graph="showGraph = false" />
 | 
								<equipment-efficiency-graph v-if="showGraph" key="graph" ref="eegraph" @close-graph="showGraph = false" />
 | 
				
			||||||
			<base-table v-else :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
								<base-table v-else :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
									@operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
				
			||||||
			<!-- v-loading="dataIsLoading " -->
 | 
								<!-- v-loading="dataIsLoading " -->
 | 
				
			||||||
		</transition>
 | 
							</transition>
 | 
				
			||||||
		<!-- <el-pagination
 | 
							<!-- <el-pagination
 | 
				
			||||||
@@ -66,11 +67,11 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import i18n from '@/i18n'
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
import BaseTable from '@/components/base-table'
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
					// import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
				
			||||||
import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
					import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
				
			||||||
import EquipmentEfficiencyGraph from './equipmentEfficiencyGraph.vue'
 | 
					import EquipmentEfficiencyGraph from './equipmentEfficiencyGraph.vue'
 | 
				
			||||||
import { calcMaxHeight } from '@/utils'
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
import { timeFilter } from '@/utils/filters'
 | 
					// import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const tableConfigs = [
 | 
					const tableConfigs = [
 | 
				
			||||||
@@ -81,39 +82,39 @@ const tableConfigs = [
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		// name: i18n.t('createTime'),
 | 
							// name: i18n.t('createTime'),
 | 
				
			||||||
		prop: 'factoryName',
 | 
							prop: 'factoryName',
 | 
				
			||||||
		name: '工厂'
 | 
							name: i18n.t('factory.title')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'pdName', name: '产线' },
 | 
						{ prop: 'pdName', name: i18n.t('pl.title') },
 | 
				
			||||||
	{ prop: 'wsName', name: '工段' },
 | 
						{ prop: 'wsName', name: i18n.t('ws.title') },
 | 
				
			||||||
	{ prop: 'eqName', name: '设备' },
 | 
						{ prop: 'eqName', name: i18n.t('eq.title') },
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '有效时间(h)',
 | 
							name: i18n.t('eq.efficienttimeh'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'workTime', name: '工作时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'workTime', name: i18n.t('eq.worktimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'workRate', name: '工作时长比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'workRate', name: i18n.t('eq.workdurationratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '关机时间(h)',
 | 
							name: i18n.t('eq.shutdowntimeh'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'stopTime', name: '停机时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'stopTime', name: i18n.t('eq.stoptimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'stopRate', name: '停机比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'stopRate', name: i18n.t('eq.stopratio'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '中断损失',
 | 
							name: i18n.t('eq.stoplost'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'downTime', name: '故障时长(h)', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'downTime', name: i18n.t('eq.downtimeh'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'downRate', name: '故障比率', width: 120, filter: val => (val * 100).toFixed(2) + '%' },
 | 
								{ prop: 'downRate', name: i18n.t('eq.downrate'), width: 120, filter: val => (val * 100).toFixed(2) + '%' },
 | 
				
			||||||
			{ prop: 'timeEfficiency', name: '时间开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'timeEfficiency', name: i18n.t('eq.timeefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		name: '速度损失',
 | 
							name: i18n.t('eq.speedlost'),
 | 
				
			||||||
		children: [
 | 
							children: [
 | 
				
			||||||
			{ prop: 'realYield', name: '实际加工速度', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'realYield', name: i18n.t('eq.realyield'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'designYield', name: '理论加工速度', width: 120, filter: val => `${val} 小时` },
 | 
								{ prop: 'designYield', name: i18n.t('eq.designyield'), width: 120, filter: val => `${val} `+i18n.t('hour') },
 | 
				
			||||||
			{ prop: 'peEfficiency', name: '速度开动率', width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
								{ prop: 'peEfficiency', name: i18n.t('eq.speedefficiency'), width: 120, filter: val => (val * 100).toFixed(2) + '%' }
 | 
				
			||||||
		]
 | 
							]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
@@ -134,7 +135,7 @@ const tableConfigs = [
 | 
				
			|||||||
		subcomponent: TableTextComponent,
 | 
							subcomponent: TableTextComponent,
 | 
				
			||||||
		// options: ['edit', 'delete']
 | 
							// options: ['edit', 'delete']
 | 
				
			||||||
		// options: ['view-trend'] // 查看趋势
 | 
							// options: ['view-trend'] // 查看趋势
 | 
				
			||||||
		buttonContent: '查看趋势',
 | 
							buttonContent: i18n.t('eq.viewtrend'),
 | 
				
			||||||
		actionName: 'view-trend',
 | 
							actionName: 'view-trend',
 | 
				
			||||||
		emitFullData: true
 | 
							emitFullData: true
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -171,9 +172,10 @@ export default {
 | 
				
			|||||||
		EquipmentEfficiencyGraph
 | 
							EquipmentEfficiencyGraph
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	created() {
 | 
						activated() {
 | 
				
			||||||
		this.getFactoryList()
 | 
							this.getFactoryList().then(() => {
 | 
				
			||||||
			this.getProductLineList()
 | 
								this.getProductLineList()
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	watch: {
 | 
						watch: {
 | 
				
			||||||
		timeType() {
 | 
							timeType() {
 | 
				
			||||||
@@ -184,12 +186,12 @@ export default {
 | 
				
			|||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		// 获取工厂列表
 | 
							// 获取工厂列表
 | 
				
			||||||
		getFactoryList() {
 | 
							getFactoryList() {
 | 
				
			||||||
			this.$http({
 | 
								return this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/factory/page'),
 | 
									url: this.$http.adornUrl('/monitoring/factory/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (res && res.code === 0) {
 | 
				
			||||||
					this.factoryList = data.data.list
 | 
										this.factoryList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default */
 | 
				
			||||||
					if (this.factoryList.length) {
 | 
										if (this.factoryList.length) {
 | 
				
			||||||
						this.dataForm.ftId = this.factoryList[0].id
 | 
											this.dataForm.ftId = this.factoryList[0].id
 | 
				
			||||||
@@ -200,20 +202,31 @@ export default {
 | 
				
			|||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// 选择工厂时
 | 
				
			||||||
 | 
							handleFactoryChange(val) {
 | 
				
			||||||
 | 
								this.getProductLineList()
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLineList() {
 | 
							getProductLineList() {
 | 
				
			||||||
			this.$http({
 | 
								const query = {
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
					 | 
				
			||||||
				if (data && data.code === 0) {
 | 
					 | 
				
			||||||
					this.productLineList = data.data.list
 | 
					 | 
				
			||||||
					/** set default */
 | 
					 | 
				
			||||||
					if (this.productLineList.length) {
 | 
					 | 
				
			||||||
						this.dataForm.productlines = [this.productLineList[0].id]
 | 
					 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
								if (this.dataForm.ftId) {
 | 
				
			||||||
 | 
									query.params = this.$http.adornParams({
 | 
				
			||||||
 | 
										factoryId: this.dataForm.ftId
 | 
				
			||||||
 | 
									});
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.$http(query).then(({ data: res }) => {
 | 
				
			||||||
 | 
									if (res && res.code === 0 && res.data.length) {
 | 
				
			||||||
 | 
										this.productLineList = res.data
 | 
				
			||||||
 | 
										/** set default */
 | 
				
			||||||
 | 
										this.dataForm.productlines = [this.productLineList[0].id]
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.productLineList = []
 | 
										this.productLineList = []
 | 
				
			||||||
 | 
										this.dataForm.productlines = []
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -17,8 +17,8 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		<div class="close-row">
 | 
							<div class="close-row">
 | 
				
			||||||
			<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
 | 
								<el-radio-group v-model="dataType" class="head-radio-group" size="small" @change="setLegend">
 | 
				
			||||||
				<el-radio-button label="百分比" />
 | 
									<el-radio-button :label="$t('eq.ratio')" />
 | 
				
			||||||
				<el-radio-button label="时间" />
 | 
									<el-radio-button :label="$t('eq.time')" />
 | 
				
			||||||
			</el-radio-group>
 | 
								</el-radio-group>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
 | 
								<el-radio-group v-if="1" v-model="searchType" class="head-radio-group" style="margin-left: 8px;" size="small" @change="handleRadioGroupChanged">
 | 
				
			||||||
@@ -34,12 +34,13 @@
 | 
				
			|||||||
import * as echarts from 'echarts'
 | 
					import * as echarts from 'echarts'
 | 
				
			||||||
import moment from 'moment'
 | 
					import moment from 'moment'
 | 
				
			||||||
import { pick } from 'lodash/object'
 | 
					import { pick } from 'lodash/object'
 | 
				
			||||||
 | 
					import i18n from '../../../i18n'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class EchartConfigs {
 | 
					class EchartConfigs {
 | 
				
			||||||
	constructor() {
 | 
						constructor() {
 | 
				
			||||||
		this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
 | 
							this.color = ['#e91e63', '#4caf50', '#3f51b5', '#ffc107', '#607d8b']
 | 
				
			||||||
		this.title = {
 | 
							this.title = {
 | 
				
			||||||
			text: '时间区间走势',
 | 
								text: i18n.t('eq.timetrend'),
 | 
				
			||||||
			top: 0,
 | 
								top: 0,
 | 
				
			||||||
			left: 'center',
 | 
								left: 'center',
 | 
				
			||||||
			textStyle: {
 | 
								textStyle: {
 | 
				
			||||||
@@ -113,10 +114,10 @@ export default {
 | 
				
			|||||||
	props: {},
 | 
						props: {},
 | 
				
			||||||
	data() {
 | 
						data() {
 | 
				
			||||||
		return {
 | 
							return {
 | 
				
			||||||
			searchType: '无间隔',
 | 
								searchType: i18n.t('eq.nogap'),
 | 
				
			||||||
			searchRadioOptions: ['无间隔', '按月', '按周', '按天'],
 | 
								searchRadioOptions: [i18n.t('eq.nogap'), i18n.t('eq.monthgap'), i18n.t('eq.weekgap'), i18n.t('eq.daygap')],
 | 
				
			||||||
			dataType: '时间',
 | 
								dataType: i18n.t('eq.time'),
 | 
				
			||||||
			dataRadioOptions: ['时间', '百分比'],
 | 
								dataRadioOptions: [i18n.t('eq.time'), i18n.t('eq.ratio')],
 | 
				
			||||||
			config: new EchartConfigs(),
 | 
								config: new EchartConfigs(),
 | 
				
			||||||
			chart: null,
 | 
								chart: null,
 | 
				
			||||||
			rateList: [], // 对请求来的数据分流
 | 
								rateList: [], // 对请求来的数据分流
 | 
				
			||||||
@@ -127,7 +128,7 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		async initChart() {
 | 
							async initChart() {
 | 
				
			||||||
			this.config.setTitle(this.injectData.equipmentName + '时间区间走势')
 | 
								this.config.setTitle(this.injectData.equipmentName + i18n.t('eq.timetrend'))
 | 
				
			||||||
			await this.getList()
 | 
								await this.getList()
 | 
				
			||||||
			this.setLegend()
 | 
								this.setLegend()
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -146,11 +147,11 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
		makeQuerys() {
 | 
							makeQuerys() {
 | 
				
			||||||
			const searchTypeMap = {
 | 
								const searchTypeMap = {
 | 
				
			||||||
				无间隔: 1,
 | 
									[i18n.t('eq.nogap')]: 1,
 | 
				
			||||||
				按月: 2,
 | 
									[i18n.t('eq.monthgap')]: 2,
 | 
				
			||||||
				按周: 3,
 | 
									[i18n.t('eq.weekgap')]: 3,
 | 
				
			||||||
				按天: 4,
 | 
									[i18n.t('eq.daygap')]: 4,
 | 
				
			||||||
				按小时: 5
 | 
									[i18n.t('eq.hourgap')]: 5
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			return {
 | 
								return {
 | 
				
			||||||
@@ -189,11 +190,11 @@ export default {
 | 
				
			|||||||
					// 分流
 | 
										// 分流
 | 
				
			||||||
					datalist.map(item => {
 | 
										datalist.map(item => {
 | 
				
			||||||
						const time = moment(item.time)
 | 
											const time = moment(item.time)
 | 
				
			||||||
						if (this.searchType === '按月') {
 | 
											if (this.searchType === i18n.t('eq.monthgap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.year()}年${time.month() + 1}月`)
 | 
												this.xAxis.push(`${time.year()}${i18n.t('eq.year')}${time.month() + 1}${i18n.t('eq.month')}`)
 | 
				
			||||||
						} else if (this.searchType === '按周') {
 | 
											} else if (this.searchType === i18n.t('eq.weekgap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
												this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
				
			||||||
						} else if (this.searchType === '按天') {
 | 
											} else if (this.searchType === i18n.t('eq.daygap')) {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YY-M-D')}`)
 | 
												this.xAxis.push(`${time.format('YY-M-D')}`)
 | 
				
			||||||
						} else {
 | 
											} else {
 | 
				
			||||||
							this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
												this.xAxis.push(`${time.format('YYYY-MM-DD')}`)
 | 
				
			||||||
@@ -218,8 +219,16 @@ export default {
 | 
				
			|||||||
		setLegend() {
 | 
							setLegend() {
 | 
				
			||||||
			// 设置legend
 | 
								// 设置legend
 | 
				
			||||||
			const legendMap = {
 | 
								const legendMap = {
 | 
				
			||||||
				百分比: ['工作时长比率', '停机时长比率', '故障时长比率', '速度开动率', '时间开动率', 'OEE', 'TEEP'],
 | 
									[i18n.t('eq.ratio')]: [
 | 
				
			||||||
				时间: ['工作时长', '停机时长', '故障时长']
 | 
										i18n.t('eq.workdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.stopdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.downdurationratio'),
 | 
				
			||||||
 | 
										i18n.t('eq.speedefficiency'),
 | 
				
			||||||
 | 
										i18n.t('eq.timeefficiency'),
 | 
				
			||||||
 | 
										'OEE',
 | 
				
			||||||
 | 
										'TEEP'
 | 
				
			||||||
 | 
									],
 | 
				
			||||||
 | 
									[i18n.t('eq.time')]: [i18n.t('eq.worktime'), i18n.t('eq.stoptime'), i18n.t('eq.downtime')]
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
			this.config.setLegend(legendMap[this.dataType])
 | 
								this.config.setLegend(legendMap[this.dataType])
 | 
				
			||||||
			this.setData()
 | 
								this.setData()
 | 
				
			||||||
@@ -228,7 +237,7 @@ export default {
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		setData() {
 | 
							setData() {
 | 
				
			||||||
			if (this.dataType === '时间') {
 | 
								if (this.dataType === i18n.t('eq.time')) {
 | 
				
			||||||
				const workTimeList = []
 | 
									const workTimeList = []
 | 
				
			||||||
				const stopTimeList = []
 | 
									const stopTimeList = []
 | 
				
			||||||
				const downTimeList = []
 | 
									const downTimeList = []
 | 
				
			||||||
@@ -238,9 +247,9 @@ export default {
 | 
				
			|||||||
					downTimeList.push(item.downTime)
 | 
										downTimeList.push(item.downTime)
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
				this.config.setSeries([
 | 
									this.config.setSeries([
 | 
				
			||||||
					{ name: '工作时长', type: 'bar', data: workTimeList },
 | 
										{ name: i18n.t('eq.worktime'), type: 'bar', data: workTimeList },
 | 
				
			||||||
					{ name: '停机时长', type: 'bar', data: stopTimeList },
 | 
										{ name: i18n.t('eq.stoptime'), type: 'bar', data: stopTimeList },
 | 
				
			||||||
					{ name: '故障时长', type: 'bar', data: downTimeList }
 | 
										{ name: i18n.t('eq.downtime'), type: 'bar', data: downTimeList }
 | 
				
			||||||
				])
 | 
									])
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				// 百分比
 | 
									// 百分比
 | 
				
			||||||
@@ -261,11 +270,11 @@ export default {
 | 
				
			|||||||
					teepList.push(item.teep)
 | 
										teepList.push(item.teep)
 | 
				
			||||||
				})
 | 
									})
 | 
				
			||||||
				this.config.setSeries([
 | 
									this.config.setSeries([
 | 
				
			||||||
					{ name: '工作时长比率', type: 'bar', data: workRateList },
 | 
										{ name: i18n.t('eq.workdurationratio'), type: 'bar', data: workRateList },
 | 
				
			||||||
					{ name: '停机时长比率', type: 'bar', data: stopRateList },
 | 
										{ name: i18n.t('eq.stopdurationratio'), type: 'bar', data: stopRateList },
 | 
				
			||||||
					{ name: '故障时长比率', type: 'bar', data: downRateList },
 | 
										{ name: i18n.t('eq.downdurationratio'), type: 'bar', data: downRateList },
 | 
				
			||||||
					{ name: '速度开动率', type: 'bar', data: peEfficiencyList },
 | 
										{ name: i18n.t('eq.speedefficiency'), type: 'bar', data: peEfficiencyList },
 | 
				
			||||||
					{ name: '时间开动率', type: 'bar', data: timeEfficiencyList },
 | 
										{ name: i18n.t('eq.timeefficiency'), type: 'bar', data: timeEfficiencyList },
 | 
				
			||||||
					{ name: 'OEE', type: 'bar', data: oeeList },
 | 
										{ name: 'OEE', type: 'bar', data: oeeList },
 | 
				
			||||||
					{ name: 'TEEP', type: 'bar', data: teepList }
 | 
										{ name: 'TEEP', type: 'bar', data: teepList }
 | 
				
			||||||
				])
 | 
									])
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -4,11 +4,11 @@
 | 
				
			|||||||
		<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
							<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
				
			||||||
			<!-- 月份 -->
 | 
								<!-- 月份 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="'请选择月份'" format="yyyy-MM" />
 | 
									<el-date-picker key="month-picker" v-model="rawTime" type="month" :placeholder="$t('prompt.month')" format="yyyy-MM" />
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 产线 -->
 | 
								<!-- 产线 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.productlines" :placeholder="'产线'" multiple clearable>
 | 
									<el-select v-model="dataForm.productlines" :placeholder="$t('pl.title')" multiple clearable>
 | 
				
			||||||
					<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
										<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
@@ -49,14 +49,14 @@ const tableConfigs = [
 | 
				
			|||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	// { prop: 'time', name: '时间', filter: timeFilter },
 | 
						// { prop: 'time', name: '时间', filter: timeFilter },
 | 
				
			||||||
	{ prop: 'pdName', name: '产线名称' },
 | 
						{ prop: 'pdName', name: i18n.t('pl.name') },
 | 
				
			||||||
	{ prop: 'wsName', name: '工序' },
 | 
						{ prop: 'wsName', name: i18n.t('ws.title') },
 | 
				
			||||||
	{ prop: 'eqName', name: '设备' },
 | 
						{ prop: 'eqName', name: i18n.t('eq.title') },
 | 
				
			||||||
	{ prop: 'mtbf', name: '平均故障间隔时间[MTBF] (h)', width: 220 },
 | 
						{ prop: 'mtbf', name: i18n.t('eq.mtbf'), width: 220 },
 | 
				
			||||||
	{ prop: 'mttr', name: '平均维修时间[MTTR] (h)', width: 190 },
 | 
						{ prop: 'mttr', name: i18n.t('eq.mttr'), width: 190 },
 | 
				
			||||||
	{ prop: 'workTime', name: '工作时长 (h)' },
 | 
						{ prop: 'workTime', name: i18n.t('eq.worktimeh') },
 | 
				
			||||||
	{ prop: 'downTime', name: '故障时长 (h)' },
 | 
						{ prop: 'downTime', name: i18n.t('eq.downtimeh') },
 | 
				
			||||||
	{ prop: 'downCount', name: '故障次数' },
 | 
						{ prop: 'downCount', name: i18n.t('eq.downcount') }
 | 
				
			||||||
	// {
 | 
						// {
 | 
				
			||||||
	// 	prop: 'operations',
 | 
						// 	prop: 'operations',
 | 
				
			||||||
	// 	name: i18n.t('handle'),
 | 
						// 	name: i18n.t('handle'),
 | 
				
			||||||
@@ -96,7 +96,7 @@ export default {
 | 
				
			|||||||
		BaseTable
 | 
							BaseTable
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	created() {
 | 
						activated() {
 | 
				
			||||||
		// this.getFactoryList()
 | 
							// this.getFactoryList()
 | 
				
			||||||
		this.getProductLineList()
 | 
							this.getProductLineList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -123,17 +123,18 @@ export default {
 | 
				
			|||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLineList() {
 | 
							getProductLineList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (res && res.code === 0) {
 | 
				
			||||||
					this.productLineList = data.data.list
 | 
										this.productLineList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default */
 | 
				
			||||||
					if (this.productLineList.length) {
 | 
										if (this.productLineList.length) {
 | 
				
			||||||
						this.dataForm.productlines = [this.productLineList[0].id]
 | 
											this.dataForm.productlines = [this.productLineList[0].id]
 | 
				
			||||||
					}
 | 
										}
 | 
				
			||||||
				} else {
 | 
									} else {
 | 
				
			||||||
					this.productLineList = []
 | 
										this.productLineList = []
 | 
				
			||||||
 | 
										this.dataForm.productlines = []
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -80,6 +80,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -52,7 +60,7 @@ const tableConfigs = [
 | 
				
			|||||||
const addOrUpdateConfigs = {
 | 
					const addOrUpdateConfigs = {
 | 
				
			||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/equipmentGroup',
 | 
						infoUrl: '/monitoring/equipmentGroup',
 | 
				
			||||||
	fields: [{ name: 'name', label: i18n.t('eq.groupname') }, { name: 'code', label: i18n.t('eq.groupcode') }, 'remark'],
 | 
						fields: [{ name: 'name', required: true, label: i18n.t('eq.groupname') }, { name: 'code', required: true, label: i18n.t('eq.groupcode') }, 'remark'],
 | 
				
			||||||
	operations: [
 | 
						operations: [
 | 
				
			||||||
		{ name: 'cancel', showAlways: true },
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
		{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
 | 
							{ name: 'save', url: '/monitoring/equipmentGroup', permission: 'monitoring:equipmentgroup:save', showOnEdit: false },
 | 
				
			||||||
@@ -86,6 +94,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.addOrUpdateVisible = false
 | 
								this.addOrUpdateVisible = false
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -44,7 +44,7 @@
 | 
				
			|||||||
			layout="total, sizes, prev, pager, next, jumper"
 | 
								layout="total, sizes, prev, pager, next, jumper"
 | 
				
			||||||
		></el-pagination>
 | 
							></el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -76,7 +76,9 @@ const tableConfigs = [
 | 
				
			|||||||
	{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
 | 
						{ prop: 'typeDictValue', name: i18n.t('alarm.type'), filter: dictFilter(dictEntries.alarmType.value) },
 | 
				
			||||||
	{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
 | 
						{ prop: 'gradeDictValue', name: i18n.t('alarm.level'), filter: dictFilter(dictEntries.alarmLevel.value) },
 | 
				
			||||||
	{ prop: 'alarmContent', name: i18n.t('alarm.content') },
 | 
						{ prop: 'alarmContent', name: i18n.t('alarm.content') },
 | 
				
			||||||
	{ prop: 'externalCode', name: i18n.t('alarm.externalCode') },
 | 
						// { prop: 'externalCode', name: i18n.t('alarm.externalCode') },
 | 
				
			||||||
 | 
						{ prop: 'description', name: i18n.t('alarm.description') },
 | 
				
			||||||
 | 
						{ prop: 'remark', name: i18n.t('alarm.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'] }
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -88,7 +90,9 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
		{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
 | 
							{ name: 'typeDictValue', label: i18n.t('alarm.type'), type: 'select', options: [] },
 | 
				
			||||||
		{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
 | 
							{ name: 'gradeDictValue', label: i18n.t('alarm.level'), type: 'select', options: [] },
 | 
				
			||||||
		{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
 | 
							{ name: 'alarmContent', label: i18n.t('alarm.content'), required: true },
 | 
				
			||||||
		{ name: 'externalCode', label: i18n.t('alarm.externalCode') }
 | 
							{ name: 'description', label: i18n.t('alarm.description') },
 | 
				
			||||||
 | 
							{ name: 'remark', label: i18n.t('alarm.remark') }
 | 
				
			||||||
 | 
							// { name: 'externalCode', label: i18n.t('alarm.externalCode') }
 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
	operations: [
 | 
						operations: [
 | 
				
			||||||
		{ name: 'cancel', showAlways: true },
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
@@ -125,6 +129,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取字典数据
 | 
							// 获取字典数据
 | 
				
			||||||
		getDictData() {
 | 
							getDictData() {
 | 
				
			||||||
			this.initDictList(Object.entries(dictEntries).map(([_, item]) => item.value))
 | 
								this.initDictList(Object.entries(dictEntries).map(([_, item]) => item.value))
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -40,6 +40,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -106,6 +106,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		//handleOperations
 | 
							//handleOperations
 | 
				
			||||||
		handleOperations({ type, data: id }) {
 | 
							handleOperations({ type, data: id }) {
 | 
				
			||||||
			switch (type) {
 | 
								switch (type) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -141,6 +141,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 设备列表
 | 
							// 设备列表
 | 
				
			||||||
		getEqList() {
 | 
							getEqList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,6 +79,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -85,6 +85,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,6 +81,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -5,7 +5,8 @@
 | 
				
			|||||||
			<!-- 产线 -->
 | 
								<!-- 产线 -->
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-select v-model="dataForm.productlines" :placeholder="'产线'" @change="handleProductLineChange" clearable>
 | 
									<el-select v-model="dataForm.productlines" :placeholder="'产线'" @change="handleProductLineChange" clearable>
 | 
				
			||||||
					<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id" :label="productLine.name" />
 | 
										<el-option v-for="productLine in productLineList" :key="productLine.id" :value="productLine.id"
 | 
				
			||||||
 | 
											:label="productLine.name" />
 | 
				
			||||||
				</el-select>
 | 
									</el-select>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
			<!-- 工序 -->
 | 
								<!-- 工序 -->
 | 
				
			||||||
@@ -30,14 +31,8 @@
 | 
				
			|||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<div class="time-chart" style="margin-top: 10px;">
 | 
							<div class="time-chart" style="margin-top: 10px;">
 | 
				
			||||||
			<div
 | 
								<div v-show="equipmentCount > 0" id="time-chart__inner" ref="time-chart__inner" class="time-chart__inner"
 | 
				
			||||||
				v-show="equipmentCount > 0"
 | 
									style="min-height: 50vh;" :style="{ height: autoHeight + 'px', width: '100%' }" />
 | 
				
			||||||
				id="time-chart__inner"
 | 
					 | 
				
			||||||
				ref="time-chart__inner"
 | 
					 | 
				
			||||||
				class="time-chart__inner"
 | 
					 | 
				
			||||||
				style="min-height: 50vh;"
 | 
					 | 
				
			||||||
				:style="{ height: autoHeight + 'px', width: '100%' }"
 | 
					 | 
				
			||||||
			/>
 | 
					 | 
				
			||||||
			<div v-show="equipmentCount === 0">请先查询数据</div>
 | 
								<div v-show="equipmentCount === 0">请先查询数据</div>
 | 
				
			||||||
			<!-- <div v-show="equipmentCount === 0">{{ $t('module.basicData.visual.hints.searchFirst') }}</div> -->
 | 
								<!-- <div v-show="equipmentCount === 0">{{ $t('module.basicData.visual.hints.searchFirst') }}</div> -->
 | 
				
			||||||
		</div>
 | 
							</div>
 | 
				
			||||||
@@ -231,9 +226,6 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	created() {
 | 
						created() {
 | 
				
			||||||
		this.getProductLineList().then(() => {
 | 
					 | 
				
			||||||
			this.getWorksetionList()
 | 
					 | 
				
			||||||
		})
 | 
					 | 
				
			||||||
		this.getEqList()
 | 
							this.getEqList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
@@ -241,6 +233,11 @@ export default {
 | 
				
			|||||||
			this.initChart()
 | 
								this.initChart()
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
 | 
						activated() {
 | 
				
			||||||
 | 
							this.getProductLineList().then(() => {
 | 
				
			||||||
 | 
								this.getWorksetionList()
 | 
				
			||||||
 | 
							})
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
	updated() {
 | 
						updated() {
 | 
				
			||||||
		if (this.chart) this.chart.resize()
 | 
							if (this.chart) this.chart.resize()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -259,11 +256,11 @@ export default {
 | 
				
			|||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLineList() {
 | 
							getProductLineList() {
 | 
				
			||||||
			return this.$http({
 | 
								return this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get'
 | 
									method: 'get'
 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (res && res.code === 0) {
 | 
				
			||||||
					this.productLineList = data.data.list
 | 
										this.productLineList = res.data
 | 
				
			||||||
					/** set default */
 | 
										/** set default */
 | 
				
			||||||
					if (this.productLineList.length) {
 | 
										if (this.productLineList.length) {
 | 
				
			||||||
						this.dataForm.productlines = this.productLineList[0].id
 | 
											this.dataForm.productlines = this.productLineList[0].id
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -52,8 +60,8 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/equipmentType',
 | 
						infoUrl: '/monitoring/equipmentType',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'name', label: i18n.t('eq.type') },
 | 
							{ name: 'name', required: true, label: i18n.t('eq.type') },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' },
 | 
							{ name: 'code', required: true, label: i18n.t('eq.typecode'), api: '/monitoring/equipmentType/getCode' },
 | 
				
			||||||
		{ name: 'parentId', label: i18n.t('eq.parent'), type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
 | 
							{ name: 'parentId', label: i18n.t('eq.parent'), type: 'cascader', props: { label: 'name', value: 'id', checkStrictly: true, emitPath: false }, options: [] },
 | 
				
			||||||
		'remark'
 | 
							'remark'
 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
@@ -106,6 +114,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取设备类型树形数据
 | 
							// 获取设备类型树形数据
 | 
				
			||||||
		getTreeEquipmentType() {
 | 
							getTreeEquipmentType() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -81,6 +81,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -79,6 +79,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -53,9 +61,10 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/factory',
 | 
						infoUrl: '/monitoring/factory',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		'name',
 | 
							{ name: 'name', required: true },
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'code',
 | 
								name: 'code',
 | 
				
			||||||
 | 
								required: true,
 | 
				
			||||||
			api: '/monitoring/factory/getCode'
 | 
								api: '/monitoring/factory/getCode'
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
@@ -99,6 +108,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.addOrUpdateVisible = false
 | 
								this.addOrUpdateVisible = false
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -12,7 +12,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
@@ -25,7 +33,7 @@
 | 
				
			|||||||
		></el-pagination>
 | 
							></el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
 | 
							<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
 | 
				
			||||||
		<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" />
 | 
							<base-dialog v-if="showbasedialog" ref="basedialog" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -61,11 +69,13 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		// 'name',
 | 
							// 'name',
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'name'
 | 
								name: 'name',
 | 
				
			||||||
 | 
								required: true
 | 
				
			||||||
			// label: i18n.t('pl.name')
 | 
								// label: i18n.t('pl.name')
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'code',
 | 
								name: 'code',
 | 
				
			||||||
 | 
								required: true,
 | 
				
			||||||
			// label: i18n.t('pl.code'),
 | 
								// label: i18n.t('pl.code'),
 | 
				
			||||||
			api: '/monitoring/product/getCode'
 | 
								api: '/monitoring/product/getCode'
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
@@ -171,7 +181,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		//
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.showbasedialog = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		addOrEdit(id) {
 | 
							addOrEdit(id) {
 | 
				
			||||||
			this.showbasedialog = true
 | 
								this.showbasedialog = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destroy-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" :configs="addOrUpdateConfigs" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -111,6 +111,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取产品列表
 | 
							// 获取产品列表
 | 
				
			||||||
		getProductList() {
 | 
							getProductList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -44,7 +52,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') },
 | 
						{ prop: 'status', name: i18n.t('pl.status'), filter: val => (val === 0 || val === 1 || val === 2) && ['停止', '运行', '未知'][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'] }
 | 
				
			||||||
@@ -55,8 +63,8 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	infoUrl: '/monitoring/productionLine',
 | 
						infoUrl: '/monitoring/productionLine',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		// 'name',
 | 
							// 'name',
 | 
				
			||||||
		{ name: 'name', label: i18n.t('pl.name') },
 | 
							{ name: 'name', label: i18n.t('pl.name'), required: true },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('pl.code'), api: '/monitoring/productionLine/getCode' },
 | 
							{ name: 'code', label: i18n.t('pl.code'), required: true, api: '/monitoring/productionLine/getCode' },
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'factoryId',
 | 
								name: 'factoryId',
 | 
				
			||||||
			required: true,
 | 
								required: true,
 | 
				
			||||||
@@ -111,6 +119,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取工厂列表
 | 
							// 获取工厂列表
 | 
				
			||||||
		getFactoryList() {
 | 
							getFactoryList() {
 | 
				
			||||||
			this.$http.get(this.$http.adornUrl('/monitoring/factory/list')).then(({ data: res }) => {
 | 
								this.$http.get(this.$http.adornUrl('/monitoring/factory/list')).then(({ data: res }) => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,6 +72,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										368
									
								
								src/views/modules/monitoring/qualityInspectionBoxBtn.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										368
									
								
								src/views/modules/monitoring/qualityInspectionBoxBtn.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,368 @@
 | 
				
			|||||||
 | 
					<template>
 | 
				
			||||||
 | 
						<div class="mod-config">
 | 
				
			||||||
 | 
							<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
				
			||||||
 | 
								<!-- <el-form-item> -->
 | 
				
			||||||
 | 
								<!-- <el-input v-model="dataForm.key" :placeholder="$t('eq.name') + ' / ' + $t('eq.code')" clearable></el-input>
 | 
				
			||||||
 | 
								</el-form-item> -->
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-button @click="currentChangeHandle(1)">{{ $t('search') }}</el-button>
 | 
				
			||||||
 | 
									<el-button v-if="$hasPermission('monitoring:qualityInspectionBoxBtn:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
				
			||||||
 | 
									<!-- <el-button v-if="$hasPermission('monitoring:equipment:export')" @click="exportHandle()">{{ $t('export') }}</el-button> -->
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
 | 
							<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"
 | 
				
			||||||
 | 
								@select-change="handleDialogSelectChange"
 | 
				
			||||||
 | 
								@destory-dialog="handleDestroyDialog"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
 | 
						</div>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import i18n from '@/i18n'
 | 
				
			||||||
 | 
					import AddOrUpdate from '@/components/base-dialog/addOrUpdate'
 | 
				
			||||||
 | 
					// import AddOrUpdate from './equipment-add-or-update'
 | 
				
			||||||
 | 
					import BaseTable from '@/components/base-table'
 | 
				
			||||||
 | 
					import TableOperateComponent from '@/components/base-table/components/operationComponent'
 | 
				
			||||||
 | 
					// import TableTextComponent from '@/components/base-table/components/detailComponent'
 | 
				
			||||||
 | 
					// import CKEditor from 'ckeditor4-vue'
 | 
				
			||||||
 | 
					import { calcMaxHeight } from '@/utils'
 | 
				
			||||||
 | 
					import { timeFilter } from '@/utils/filters'
 | 
				
			||||||
 | 
					// import Cookies from 'js-cookie'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const tableConfigs = [
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							type: 'index',
 | 
				
			||||||
 | 
							name: i18n.t('index')
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							prop: 'createTime',
 | 
				
			||||||
 | 
							name: i18n.t('createTime'),
 | 
				
			||||||
 | 
							filter: timeFilter
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						{ prop: 'inspectionDetContent', name: i18n.t('andeng.inspectContent') }, // name: '检测内容' },
 | 
				
			||||||
 | 
						{ prop: 'keyValue', name: i18n.t('andeng.btnVal') }, // name: '按钮值' },
 | 
				
			||||||
 | 
						{ prop: 'model', name: i18n.t('andeng.btnBoxModel') }, // name: '按钮盒模式' },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							prop: 'operations',
 | 
				
			||||||
 | 
							name: i18n.t('handle'),
 | 
				
			||||||
 | 
							fixed: 'right',
 | 
				
			||||||
 | 
							width: 180,
 | 
				
			||||||
 | 
							subcomponent: TableOperateComponent,
 | 
				
			||||||
 | 
							options: ['edit', 'delete']
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const addOrUpdateConfigs = {
 | 
				
			||||||
 | 
						type: 'dialog',
 | 
				
			||||||
 | 
						infoUrl: '/monitoring/qualityInspectionBoxBtn',
 | 
				
			||||||
 | 
						fields: [
 | 
				
			||||||
 | 
							// { name: 'productionId', label: i18n.t('eq.name'), required: true },
 | 
				
			||||||
 | 
							{ name: 'productionId', label: i18n.t('pl.title'), required: true, type: 'select', options: [], relatedField: 'sectionId' },
 | 
				
			||||||
 | 
							{ name: 'sectionId', label: i18n.t('ws.title'), required: true, type: 'select', options: [] },
 | 
				
			||||||
 | 
							{ name: 'model', label: i18n.t('andeng.btnBoxModel') },
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'keyValue',
 | 
				
			||||||
 | 
								label: i18n.t('andeng.btnVal'),
 | 
				
			||||||
 | 
								required: true,
 | 
				
			||||||
 | 
								rules: [{ type: 'integer', trigger: 'blur', message: i18n.t('hints.integer'), transform: val => Number(val) }]
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'inspectionDetContent',
 | 
				
			||||||
 | 
								label: i18n.t('andeng.inspectContent')
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
 | 
						operations: [
 | 
				
			||||||
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'save',
 | 
				
			||||||
 | 
								url: '/monitoring/qualityInspectionBoxBtn',
 | 
				
			||||||
 | 
								permission: 'monitoring:qualityInspectionBoxBtn:save',
 | 
				
			||||||
 | 
								showOnEdit: false
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								name: 'update',
 | 
				
			||||||
 | 
								url: '/monitoring/qualityInspectionBoxBtn',
 | 
				
			||||||
 | 
								permission: 'monitoring:qualityInspectionBoxBtn:update',
 | 
				
			||||||
 | 
								showOnEdit: true
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						]
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
						data() {
 | 
				
			||||||
 | 
							return {
 | 
				
			||||||
 | 
								calcMaxHeight,
 | 
				
			||||||
 | 
								tableConfigs,
 | 
				
			||||||
 | 
								addOrUpdateConfigs,
 | 
				
			||||||
 | 
								dataForm: {
 | 
				
			||||||
 | 
									key: ''
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								dataList: [],
 | 
				
			||||||
 | 
								pageIndex: 1,
 | 
				
			||||||
 | 
								pageSize: 10,
 | 
				
			||||||
 | 
								totalPage: 0,
 | 
				
			||||||
 | 
								dataListLoading: false,
 | 
				
			||||||
 | 
								dataListSelections: [],
 | 
				
			||||||
 | 
								addOrUpdateVisible: false
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						components: {
 | 
				
			||||||
 | 
							AddOrUpdate,
 | 
				
			||||||
 | 
							BaseTable
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						activated() {
 | 
				
			||||||
 | 
							this.getDataList()
 | 
				
			||||||
 | 
							this.getPlList()
 | 
				
			||||||
 | 
							this.getWsList()
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取产线列表,用于刷新工段列表
 | 
				
			||||||
 | 
							getPlList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
 | 
									method: 'get'
 | 
				
			||||||
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
 | 
									const plConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
 | 
				
			||||||
 | 
									plConfig.options =
 | 
				
			||||||
 | 
										res.data?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取工段列表
 | 
				
			||||||
 | 
							getWsList(id) {
 | 
				
			||||||
 | 
								let params = {
 | 
				
			||||||
 | 
									page: 1,
 | 
				
			||||||
 | 
									limit: 999
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (id) {
 | 
				
			||||||
 | 
									params.lineId = id
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/workshopSection/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams(params)
 | 
				
			||||||
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
 | 
									const wsConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'sectionId')
 | 
				
			||||||
 | 
									wsConfig.options =
 | 
				
			||||||
 | 
										res.data?.list?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取设备类型列表
 | 
				
			||||||
 | 
							getTypeList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipmentType/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										// page: this.pageIndex,
 | 
				
			||||||
 | 
										// limit: this.pageSize,
 | 
				
			||||||
 | 
										// key: this.dataForm.key
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									const eqTypeConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'equipmentTypeId')
 | 
				
			||||||
 | 
									eqTypeConfig.options =
 | 
				
			||||||
 | 
										data.data?.list?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取设备分组列表
 | 
				
			||||||
 | 
							getGroupList() {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipmentGroup/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										// page: this.pageIndex,
 | 
				
			||||||
 | 
										// limit: this.pageSize,
 | 
				
			||||||
 | 
										// key: this.dataForm.key
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									const groupConfig = this.addOrUpdateConfigs.fields.find(item => item.name === 'groupId')
 | 
				
			||||||
 | 
									groupConfig.options =
 | 
				
			||||||
 | 
										data.data?.list?.map(item => ({
 | 
				
			||||||
 | 
											value: item.id,
 | 
				
			||||||
 | 
											label: item.name
 | 
				
			||||||
 | 
										})) || []
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 获取数据列表
 | 
				
			||||||
 | 
							getDataList() {
 | 
				
			||||||
 | 
								this.dataListLoading = true
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/qualityInspectionBoxBtn/page'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									params: this.$http.adornParams({
 | 
				
			||||||
 | 
										page: this.pageIndex,
 | 
				
			||||||
 | 
										limit: this.pageSize
 | 
				
			||||||
 | 
										// key: this.dataForm.key
 | 
				
			||||||
 | 
									})
 | 
				
			||||||
 | 
								}).then(({ data }) => {
 | 
				
			||||||
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
 | 
										this.dataList = data.data.list
 | 
				
			||||||
 | 
										// this.dataList = new Array(20).fill('1')
 | 
				
			||||||
 | 
										// console.log('data list', this.dataList)
 | 
				
			||||||
 | 
										this.totalPage = data.data.total
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										this.dataList = []
 | 
				
			||||||
 | 
										this.totalPage = 0
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
									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
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 对话框里的某个选择改变了
 | 
				
			||||||
 | 
							handleDialogSelectChange({ name, id }) {
 | 
				
			||||||
 | 
								switch (name) {
 | 
				
			||||||
 | 
									case 'productionId':
 | 
				
			||||||
 | 
										this.getWsList(id)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							handleOperations({ type, data: id }) {
 | 
				
			||||||
 | 
								switch (type) {
 | 
				
			||||||
 | 
									case 'view-detail':
 | 
				
			||||||
 | 
										// const { name, code } = this.dataList.find(item => item.id === id)
 | 
				
			||||||
 | 
										// this.$router.push({
 | 
				
			||||||
 | 
										// 	name: 'monitoring-equipmentAdd',
 | 
				
			||||||
 | 
										// 	params: {
 | 
				
			||||||
 | 
										// 		isdetail: true,
 | 
				
			||||||
 | 
										// 		equipmentId: id
 | 
				
			||||||
 | 
										// 	}
 | 
				
			||||||
 | 
										// })
 | 
				
			||||||
 | 
										// break
 | 
				
			||||||
 | 
										return this.addOrUpdateHandle(id, true)
 | 
				
			||||||
 | 
									case 'edit':
 | 
				
			||||||
 | 
										return this.addOrUpdateHandle(id)
 | 
				
			||||||
 | 
									case 'delete':
 | 
				
			||||||
 | 
										return this.deleteHandle(id)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							exportHandle() {
 | 
				
			||||||
 | 
								// this.$http.get(this.$http.adornUrl('/monitoring/equipment/export')).then(({ data: res }) => {
 | 
				
			||||||
 | 
								this.$http({
 | 
				
			||||||
 | 
									url: this.$http.adornUrl('/monitoring/equipment/export'),
 | 
				
			||||||
 | 
									method: 'get',
 | 
				
			||||||
 | 
									responseType: 'blob'
 | 
				
			||||||
 | 
								}).then(res => {
 | 
				
			||||||
 | 
									let fileName = 'equipment-list.xls'
 | 
				
			||||||
 | 
									if (res.headers['content-disposition']) {
 | 
				
			||||||
 | 
										const contentDisposition = res.headers['content-disposition']
 | 
				
			||||||
 | 
										fileName = contentDisposition.slice(contentDisposition.indexOf('filename=') + 9)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									fileName = decodeURIComponent(fileName)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									const blob = new Blob([res.data])
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
									if ('download' in document.createElement('a')) {
 | 
				
			||||||
 | 
										const alink = document.createElement('a')
 | 
				
			||||||
 | 
										alink.download = fileName
 | 
				
			||||||
 | 
										alink.style.display = 'none'
 | 
				
			||||||
 | 
										alink.target = '_blank'
 | 
				
			||||||
 | 
										alink.href = URL.createObjectURL(blob)
 | 
				
			||||||
 | 
										document.body.appendChild(alink)
 | 
				
			||||||
 | 
										alink.click()
 | 
				
			||||||
 | 
										URL.revokeObjectURL(alink.href)
 | 
				
			||||||
 | 
										document.body.removeChild(alink)
 | 
				
			||||||
 | 
									} else {
 | 
				
			||||||
 | 
										navigator.msSaveBlob(blob, fileName)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							// 新增 / 修改
 | 
				
			||||||
 | 
							addOrUpdateHandle(id, isdetail = false) {
 | 
				
			||||||
 | 
								this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 | 
									this.$refs.addOrUpdate.init(id, isdetail)
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
								// this.$router.push({
 | 
				
			||||||
 | 
								// 	name: 'monitoring-equipmentAdd',
 | 
				
			||||||
 | 
								// 	params: {
 | 
				
			||||||
 | 
								// 		equipmentId: 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/qualityInspectionBoxBtn'),
 | 
				
			||||||
 | 
										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>
 | 
				
			||||||
@@ -78,7 +78,7 @@ const tableConfigStatic = [
 | 
				
			|||||||
]
 | 
					]
 | 
				
			||||||
const tableConfigDynamic = [
 | 
					const tableConfigDynamic = [
 | 
				
			||||||
	{ type: 'index', width: 100, name: i18n.t('index') },
 | 
						{ type: 'index', width: 100, name: i18n.t('index') },
 | 
				
			||||||
	{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
 | 
						{ name: i18n.t('inspect.det'), prop: 'inspectionContent' },
 | 
				
			||||||
	/** dynamic */
 | 
						/** dynamic */
 | 
				
			||||||
	{ name: i18n.t('inspect.typetotal'), prop: '' },
 | 
						{ name: i18n.t('inspect.typetotal'), prop: '' },
 | 
				
			||||||
	{ name: i18n.t('inspect.rate'), prop: '' }
 | 
						{ name: i18n.t('inspect.rate'), prop: '' }
 | 
				
			||||||
@@ -105,17 +105,31 @@ const FakeChart = {
 | 
				
			|||||||
			calcMaxHeight,
 | 
								calcMaxHeight,
 | 
				
			||||||
			chart: null,
 | 
								chart: null,
 | 
				
			||||||
			defaultOpts: {
 | 
								defaultOpts: {
 | 
				
			||||||
 | 
									grid: {
 | 
				
			||||||
 | 
										left: '5%',
 | 
				
			||||||
 | 
										right: '12%',
 | 
				
			||||||
 | 
										top: '20%',
 | 
				
			||||||
 | 
										bottom: '10%'
 | 
				
			||||||
 | 
									},
 | 
				
			||||||
				title: {
 | 
									title: {
 | 
				
			||||||
					text: i18n.t('inspect.typeCount')
 | 
										text: i18n.t('inspect.typeCount')
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				tooltip: {},
 | 
									tooltip: {},
 | 
				
			||||||
				legend: {
 | 
									legend: {
 | 
				
			||||||
					orient: 'vertical',
 | 
										orient: 'vertical',
 | 
				
			||||||
 | 
										type: 'scroll',
 | 
				
			||||||
					top: 10,
 | 
										top: 10,
 | 
				
			||||||
					right: 20,
 | 
										right: 0,
 | 
				
			||||||
					data: [
 | 
										width: '12%',
 | 
				
			||||||
						/** dynamic */
 | 
										/** 修复文本太长时显示问题 */
 | 
				
			||||||
					]
 | 
										formatter: function(name) {
 | 
				
			||||||
 | 
											return echarts.format.truncateText(name, 120, '14px Microsoft Yahei', '...')
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										tooltip: {
 | 
				
			||||||
 | 
											show: true
 | 
				
			||||||
 | 
										},
 | 
				
			||||||
 | 
										/** end */
 | 
				
			||||||
 | 
										data: []
 | 
				
			||||||
				},
 | 
									},
 | 
				
			||||||
				xAxis: {
 | 
									xAxis: {
 | 
				
			||||||
					data: [
 | 
										data: [
 | 
				
			||||||
@@ -221,11 +235,25 @@ export default {
 | 
				
			|||||||
				]
 | 
									]
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
			echartCategories: null,
 | 
								echartCategories: null,
 | 
				
			||||||
			echartCheckTypes: []
 | 
								echartCheckTypes: [],
 | 
				
			||||||
 | 
								interval: null
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	mounted() {
 | 
						mounted() {
 | 
				
			||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							this.interval = setInterval(() => {
 | 
				
			||||||
 | 
								this.$message.info(i18n.t('refresh'))
 | 
				
			||||||
 | 
								this.dataListStatic.splice(0)
 | 
				
			||||||
 | 
								this.dataListDynamic.splice(0)
 | 
				
			||||||
 | 
								this.getDataList()
 | 
				
			||||||
 | 
							}, 1000 * 5 * 60)
 | 
				
			||||||
 | 
						},
 | 
				
			||||||
 | 
						deactivated() {
 | 
				
			||||||
 | 
							if (this.interval) {
 | 
				
			||||||
 | 
								clearInterval(this.interval)
 | 
				
			||||||
 | 
								this.interval = null
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
		handleOperations() {},
 | 
							handleOperations() {},
 | 
				
			||||||
@@ -251,12 +279,12 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			/** [1] 获取上下片数据 */
 | 
								/** [1] 获取上下片数据 */
 | 
				
			||||||
			this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
 | 
								this.fetchList('sx', startTime, endTime).then(({ data: res }) => {
 | 
				
			||||||
				console.log('sx: ', res)
 | 
									// console.log('sx: ', res)
 | 
				
			||||||
				this.dataListStatic = res.data || []
 | 
									this.dataListStatic = res.data || []
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
			/** [2] 获取产线检测类型 */
 | 
								/** [2] 获取产线检测类型 */
 | 
				
			||||||
			this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
 | 
								this.fetchList('pl', startTime, endTime).then(({ data: res }) => {
 | 
				
			||||||
				console.log('pl: ', res)
 | 
									// console.log('pl: ', res)
 | 
				
			||||||
				/** TODO: 解析 nameData */
 | 
									/** TODO: 解析 nameData */
 | 
				
			||||||
				this.parseTableProps(res.data.nameData)
 | 
									this.parseTableProps(res.data.nameData)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -282,7 +310,7 @@ export default {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
			this.tableConfigDynamic = [
 | 
								this.tableConfigDynamic = [
 | 
				
			||||||
				{ type: 'index', width: 100, name: i18n.t('index') },
 | 
									{ type: 'index', width: 100, name: i18n.t('index') },
 | 
				
			||||||
				{ name: i18n.t('inspect.type'), prop: 'inspectionContent' },
 | 
									{ name: i18n.t('inspect.det'), prop: 'inspectionContent' },
 | 
				
			||||||
				...subProps,
 | 
									...subProps,
 | 
				
			||||||
				{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
 | 
									{ name: i18n.t('inspect.typetotal'), prop: 'sumInput' },
 | 
				
			||||||
				{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
 | 
									{ name: i18n.t('inspect.rate'), prop: 'scrapRatio', filter: val => (val || val === 0 ? `${val}%` : '-') }
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -22,7 +22,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -53,9 +53,9 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/qualityInspectionDet',
 | 
						infoUrl: '/monitoring/qualityInspectionDet',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'typeId', label: i18n.t('inspect.type'), type: 'select', options: [] },
 | 
							{ name: 'typeId', label: i18n.t('inspect.type'), required: true, type: 'select', options: [] },
 | 
				
			||||||
		{ name: 'content', label: i18n.t('inspect.det') },
 | 
							{ name: 'content', label: i18n.t('inspect.det'), required: true },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('inspect.detcode'), api: '/monitoring/qualityInspectionDet/getCode' },
 | 
							{ name: 'code', label: i18n.t('inspect.code'), api: '/monitoring/qualityInspectionDet/getCode' },
 | 
				
			||||||
		'remark'
 | 
							'remark'
 | 
				
			||||||
	],
 | 
						],
 | 
				
			||||||
	operations: [
 | 
						operations: [
 | 
				
			||||||
@@ -92,6 +92,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取产检测类型列表
 | 
							// 获取产检测类型列表
 | 
				
			||||||
		getInspectionTypeList() {
 | 
							getInspectionTypeList() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,29 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
	<div class="mod-config">
 | 
						<div class="mod-config">
 | 
				
			||||||
		<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
							<el-form :inline="true" :model="dataForm" @keyup.enter.native="currentChangeHandle(1)">
 | 
				
			||||||
			<!-- <el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-input v-model="dataForm.key" :placeholder="$t('parameter')" clearable></el-input>
 | 
									<el-select v-model="dataForm.lineId" :placeholder="$t('pl.title')" clearable filterable>
 | 
				
			||||||
			</el-form-item> -->
 | 
										<el-option v-for="pl in plList" :key="pl.value" :value="pl.value" :label="pl.label" />
 | 
				
			||||||
 | 
									</el-select>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
 | 
								<el-form-item>
 | 
				
			||||||
 | 
									<el-input v-model="dataForm.key" :placeholder="$t('inspect.det')" clearable></el-input>
 | 
				
			||||||
 | 
								</el-form-item>
 | 
				
			||||||
			<el-form-item>
 | 
								<el-form-item>
 | 
				
			||||||
				<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
 | 
									<el-button @click="currentChangeHandle(1)">{{ $t('query') }}</el-button>
 | 
				
			||||||
				<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
									<el-button v-if="$hasPermission('monitoring:qualityinspectionrecord:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
				
			||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
@@ -29,7 +42,7 @@
 | 
				
			|||||||
			ref="addOrUpdate"
 | 
								ref="addOrUpdate"
 | 
				
			||||||
			:configs="addOrUpdateConfigs"
 | 
								:configs="addOrUpdateConfigs"
 | 
				
			||||||
			@refreshDataList="getDataList"
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
			@destory-dialog="addOrUpdateVisible = false"
 | 
								@destory-dialog="handleDestroyDialog"
 | 
				
			||||||
			@select-change="handleSelectChange"
 | 
								@select-change="handleSelectChange"
 | 
				
			||||||
		/>
 | 
							/>
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
@@ -71,9 +84,9 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/qualityInspectionRecord',
 | 
						infoUrl: '/monitoring/qualityInspectionRecord',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'checkTime', label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') },
 | 
							{ name: 'checkTime', required: true, label: i18n.t('inspect.time'), type: 'date', props: { style: 'width: 100%', type: 'datetime' }, placeholder: i18n.t('hints.checktime') },
 | 
				
			||||||
		{ name: 'productionId', label: i18n.t('pl.title'), type: 'select', options: [] },
 | 
							{ name: 'productionId', required: true, label: i18n.t('pl.title'), type: 'select', options: [] },
 | 
				
			||||||
		{ name: 'sectionId', label: i18n.t('ws.title'), type: 'select', options: [] },
 | 
							{ name: 'sectionId', required: true, label: i18n.t('ws.title'), type: 'select', options: [] },
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			name: 'source',
 | 
								name: 'source',
 | 
				
			||||||
			label: i18n.t('source'),
 | 
								label: i18n.t('source'),
 | 
				
			||||||
@@ -83,7 +96,7 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
				{ value: 2, label: i18n.t('auto') }
 | 
									{ value: 2, label: i18n.t('auto') }
 | 
				
			||||||
			]
 | 
								]
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{ name: 'inspectionDetId', label: i18n.t('inspect.det'), type: 'select', options: [] },
 | 
							{ name: 'inspectionDetId', required: true, label: i18n.t('inspect.det'), type: 'select', options: [] },
 | 
				
			||||||
		{ name: 'checkPerson', label: i18n.t('inspect.people') },
 | 
							{ name: 'checkPerson', label: i18n.t('inspect.people') },
 | 
				
			||||||
		{ name: 'explainText', label: i18n.t('desc') },
 | 
							{ name: 'explainText', label: i18n.t('desc') },
 | 
				
			||||||
		'remark'
 | 
							'remark'
 | 
				
			||||||
@@ -102,8 +115,10 @@ export default {
 | 
				
			|||||||
			addOrUpdateConfigs,
 | 
								addOrUpdateConfigs,
 | 
				
			||||||
			tableConfigs,
 | 
								tableConfigs,
 | 
				
			||||||
			dataForm: {
 | 
								dataForm: {
 | 
				
			||||||
				key: ''
 | 
									key: '',
 | 
				
			||||||
 | 
									lineId: ''
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								plList: [],
 | 
				
			||||||
			dataList: [],
 | 
								dataList: [],
 | 
				
			||||||
			pageIndex: 1,
 | 
								pageIndex: 1,
 | 
				
			||||||
			pageSize: 10,
 | 
								pageSize: 10,
 | 
				
			||||||
@@ -124,6 +139,12 @@ export default {
 | 
				
			|||||||
		this.getProductLines()
 | 
							this.getProductLines()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// handle
 | 
							// handle
 | 
				
			||||||
		async handleSelectChange({ name, id }) {
 | 
							async handleSelectChange({ name, id }) {
 | 
				
			||||||
			if (name === 'productionId') {
 | 
								if (name === 'productionId') {
 | 
				
			||||||
@@ -152,18 +173,14 @@ export default {
 | 
				
			|||||||
		// 获取产线
 | 
							// 获取产线
 | 
				
			||||||
		getProductLines() {
 | 
							getProductLines() {
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/productionLine/page'),
 | 
									url: this.$http.adornUrl('/monitoring/productionLine/list'),
 | 
				
			||||||
				method: 'get',
 | 
									method: 'get'
 | 
				
			||||||
				params: this.$http.adornParams({
 | 
					 | 
				
			||||||
					// 	page: this.pageIndex,
 | 
					 | 
				
			||||||
					// 	limit: this.pageSize,
 | 
					 | 
				
			||||||
					// 	key: this.dataForm.key
 | 
					 | 
				
			||||||
				})
 | 
					 | 
				
			||||||
			}).then(({ data: res }) => {
 | 
								}).then(({ data: res }) => {
 | 
				
			||||||
				const plOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
 | 
									const plOpt = this.addOrUpdateConfigs.fields.find(item => item.name === 'productionId')
 | 
				
			||||||
				if (plOpt) {
 | 
									if (plOpt) {
 | 
				
			||||||
					plOpt.options = res.data.list.map(item => ({ value: item.id, label: item.name })) || []
 | 
										plOpt.options = res.data.map(item => ({ value: item.id, label: item.name })) || []
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
									this.plList = res.data.map(item => ({ value: item.id, label: item.name })) || []
 | 
				
			||||||
			})
 | 
								})
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		// 获取工段
 | 
							// 获取工段
 | 
				
			||||||
@@ -197,14 +214,22 @@ export default {
 | 
				
			|||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.addOrUpdateVisible = false
 | 
								this.addOrUpdateVisible = false
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								const queryParams = {
 | 
				
			||||||
 | 
									page: this.pageIndex,
 | 
				
			||||||
 | 
									limit: this.pageSize
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								if (this.dataForm.key) {
 | 
				
			||||||
 | 
									queryParams['key'] = this.dataForm.key
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if (this.dataForm.lineId) {
 | 
				
			||||||
 | 
									queryParams['lineId'] = this.dataForm.lineId
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			this.$http({
 | 
								this.$http({
 | 
				
			||||||
				url: this.$http.adornUrl('/monitoring/qualityInspectionRecord/page'),
 | 
									url: this.$http.adornUrl('/monitoring/qualityInspectionRecord/page'),
 | 
				
			||||||
				method: 'get',
 | 
									method: 'get',
 | 
				
			||||||
				params: this.$http.adornParams({
 | 
									params: this.$http.adornParams(queryParams)
 | 
				
			||||||
					page: this.pageIndex,
 | 
					 | 
				
			||||||
					limit: this.pageSize,
 | 
					 | 
				
			||||||
					key: this.dataForm.key
 | 
					 | 
				
			||||||
				})
 | 
					 | 
				
			||||||
			}).then(({ data }) => {
 | 
								}).then(({ data }) => {
 | 
				
			||||||
				if (data && data.code === 0) {
 | 
									if (data && data.code === 0) {
 | 
				
			||||||
					this.dataList = data.data.list
 | 
										this.dataList = data.data.list
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -42,7 +50,7 @@ const tableConfigs = [
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
 | 
						{ prop: 'createTime', name: i18n.t('createTime'), filter: timeFilter },
 | 
				
			||||||
	{ prop: 'name', name: i18n.t('inspect.typename') },
 | 
						{ prop: 'name', name: i18n.t('inspect.typename') },
 | 
				
			||||||
	{ prop: 'code', name: i18n.t('inspect.typename') },
 | 
						{ prop: 'code', name: i18n.t('inspect.typecode') },
 | 
				
			||||||
	{ 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'] }
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
@@ -50,7 +58,11 @@ const tableConfigs = [
 | 
				
			|||||||
const addOrUpdateConfigs = {
 | 
					const addOrUpdateConfigs = {
 | 
				
			||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/qualityInspectionType',
 | 
						infoUrl: '/monitoring/qualityInspectionType',
 | 
				
			||||||
	fields: [{ name: 'name', label: i18n.t('inspect.type') }, { name: 'code', label: i18n.t('inspect.typename'), api: '/monitoring/qualityInspectionType/getCode' }, 'remark'],
 | 
						fields: [
 | 
				
			||||||
 | 
							{ name: 'name', label: i18n.t('inspect.type'), required: true },
 | 
				
			||||||
 | 
							{ name: 'code', label: i18n.t('inspect.typecode'), api: '/monitoring/qualityInspectionType/getCode' },
 | 
				
			||||||
 | 
							'remark'
 | 
				
			||||||
 | 
						],
 | 
				
			||||||
	operations: [
 | 
						operations: [
 | 
				
			||||||
		{ name: 'cancel', showAlways: true },
 | 
							{ name: 'cancel', showAlways: true },
 | 
				
			||||||
		{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
 | 
							{ name: 'save', url: '/monitoring/qualityInspectionType', permission: 'monitoring:qualityinspectiontype:save', showOnEdit: false },
 | 
				
			||||||
@@ -84,6 +96,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.addOrUpdateVisible = false
 | 
								this.addOrUpdateVisible = false
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,7 +23,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -83,6 +83,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		handleOperations({ type, data: id }) {
 | 
							handleOperations({ type, data: id }) {
 | 
				
			||||||
			switch (type) {
 | 
								switch (type) {
 | 
				
			||||||
				case 'edit':
 | 
									case 'edit':
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" :configs="addOrUpdateConfigs" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -55,6 +55,12 @@ const CategoryList = {
 | 
				
			|||||||
		this.pickedId = this.injectData[this.injectData.head.prop]
 | 
							this.pickedId = this.injectData[this.injectData.head.prop]
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		handleChange(id) {
 | 
							handleChange(id) {
 | 
				
			||||||
			this.pickedId = id
 | 
								this.pickedId = id
 | 
				
			||||||
			this.$emit('emit-data', {
 | 
								this.$emit('emit-data', {
 | 
				
			||||||
@@ -112,6 +118,12 @@ export default {
 | 
				
			|||||||
	},
 | 
						},
 | 
				
			||||||
	computed: {},
 | 
						computed: {},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		getAllCategories() {
 | 
							getAllCategories() {
 | 
				
			||||||
			axios.get(axios.adornUrl('/monitoring/reportSheetCategory/page')).then(({ data: res }) => {
 | 
								axios.get(axios.adornUrl('/monitoring/reportSheetCategory/page')).then(({ data: res }) => {
 | 
				
			||||||
				if (res.data && res.data.list) {
 | 
									if (res.data && res.data.list) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -73,6 +73,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -67,6 +67,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -78,6 +78,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -75,6 +75,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -10,7 +10,15 @@
 | 
				
			|||||||
			</el-form-item>
 | 
								</el-form-item>
 | 
				
			||||||
		</el-form>
 | 
							</el-form>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		<base-table :page="pageIndex" :size="pageSize" :data="dataList" :table-head-configs="tableConfigs" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
							<base-table
 | 
				
			||||||
 | 
								:page="pageIndex"
 | 
				
			||||||
 | 
								:size="pageSize"
 | 
				
			||||||
 | 
								:data="dataList"
 | 
				
			||||||
 | 
								:table-head-configs="tableConfigs"
 | 
				
			||||||
 | 
								:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
								@operate-event="handleOperations"
 | 
				
			||||||
 | 
								@refreshDataList="getDataList"
 | 
				
			||||||
 | 
							/>
 | 
				
			||||||
		<el-pagination
 | 
							<el-pagination
 | 
				
			||||||
			@size-change="sizeChangeHandle"
 | 
								@size-change="sizeChangeHandle"
 | 
				
			||||||
			@current-change="currentChangeHandle"
 | 
								@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -22,7 +30,7 @@
 | 
				
			|||||||
		>
 | 
							>
 | 
				
			||||||
		</el-pagination>
 | 
							</el-pagination>
 | 
				
			||||||
		<!-- 弹窗, 新增 / 修改 -->
 | 
							<!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
		<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="addOrUpdateVisible = false" />
 | 
							<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList" @destory-dialog="handleDestroyDialog" />
 | 
				
			||||||
	</div>
 | 
						</div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -54,8 +62,8 @@ const addOrUpdateConfigs = {
 | 
				
			|||||||
	type: 'dialog',
 | 
						type: 'dialog',
 | 
				
			||||||
	infoUrl: '/monitoring/workshopSection',
 | 
						infoUrl: '/monitoring/workshopSection',
 | 
				
			||||||
	fields: [
 | 
						fields: [
 | 
				
			||||||
		{ name: 'name', label: i18n.t('ws.name') },
 | 
							{ name: 'name', required: true, label: i18n.t('ws.name') },
 | 
				
			||||||
		{ name: 'code', label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
 | 
							{ name: 'code', required: true, label: i18n.t('ws.code'), api: '/monitoring/workshopSection/getCode' },
 | 
				
			||||||
		{ name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] },
 | 
							{ name: 'productionLineId', label: i18n.t('ws.belong'), type: 'select', options: [] },
 | 
				
			||||||
		'description',
 | 
							'description',
 | 
				
			||||||
		'remark'
 | 
							'remark'
 | 
				
			||||||
@@ -96,6 +104,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible = false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200)
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取产线列表
 | 
							// 获取产线列表
 | 
				
			||||||
		getProductLine() {
 | 
							getProductLine() {
 | 
				
			||||||
			this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => {
 | 
								this.$http.get(this.$http.adornUrl('/monitoring/productionLine/list')).then(({ data: res }) => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -68,6 +68,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 获取数据列表
 | 
							// 获取数据列表
 | 
				
			||||||
		getDataList() {
 | 
							getDataList() {
 | 
				
			||||||
			this.dataListLoading = true
 | 
								this.dataListLoading = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -42,7 +42,15 @@
 | 
				
			|||||||
					<!-- <el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button> -->
 | 
										<!-- <el-button type="text" v-if="!showAttrForm" @click="addEq">{{ $t('add') }}</el-button> -->
 | 
				
			||||||
				</h3>
 | 
									</h3>
 | 
				
			||||||
				<div class="table" v-if="!showAttrForm">
 | 
									<div class="table" v-if="!showAttrForm">
 | 
				
			||||||
					<base-table :page="page" :size="limit" :data="eqList" :table-head-configs="tableProps" :max-height="calcMaxHeight(8)" @operate-event="handleOperations" @refreshDataList="getDataList" />
 | 
										<base-table
 | 
				
			||||||
 | 
											:page="page"
 | 
				
			||||||
 | 
											:size="limit"
 | 
				
			||||||
 | 
											:data="eqList"
 | 
				
			||||||
 | 
											:table-head-configs="tableProps"
 | 
				
			||||||
 | 
											:max-height="calcMaxHeight(8)"
 | 
				
			||||||
 | 
											@operate-event="handleOperations"
 | 
				
			||||||
 | 
											@refreshDataList="getDataList"
 | 
				
			||||||
 | 
										/>
 | 
				
			||||||
					<el-pagination
 | 
										<el-pagination
 | 
				
			||||||
						@size-change="sizeChangeHandle"
 | 
											@size-change="sizeChangeHandle"
 | 
				
			||||||
						@current-change="currentChangeHandle"
 | 
											@current-change="currentChangeHandle"
 | 
				
			||||||
@@ -78,7 +86,7 @@ const tableProps = [
 | 
				
			|||||||
		name: i18n.t('index')
 | 
							name: i18n.t('index')
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	{ name: i18n.t('eq.name'), prop: 'equipmentName' },
 | 
						{ name: i18n.t('eq.name'), prop: 'equipmentName' },
 | 
				
			||||||
	{ name: i18n.t('dept.sort'), prop: 'sort' },
 | 
						{ name: i18n.t('dept.sort'), prop: 'sort' }
 | 
				
			||||||
	// {
 | 
						// {
 | 
				
			||||||
	// 	name: i18n.t('handle'),
 | 
						// 	name: i18n.t('handle'),
 | 
				
			||||||
	// 	prop: 'operations',
 | 
						// 	prop: 'operations',
 | 
				
			||||||
@@ -114,9 +122,12 @@ export default {
 | 
				
			|||||||
				// 备注
 | 
									// 备注
 | 
				
			||||||
				remark: ''
 | 
									remark: ''
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								dataFormRules: {
 | 
				
			||||||
 | 
									name: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }],
 | 
				
			||||||
 | 
									code: [{ required: true, message: i18n.t('validate.required'), trigger: 'blur' }]
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
			limit: 5,
 | 
								limit: 5,
 | 
				
			||||||
			page: 1,
 | 
								page: 1,
 | 
				
			||||||
			dataFormRules: {},
 | 
					 | 
				
			||||||
			showAttrForm: false
 | 
								showAttrForm: false
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
@@ -279,6 +290,8 @@ export default {
 | 
				
			|||||||
			}
 | 
								}
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		handleCreateOrUpdate() {
 | 
							handleCreateOrUpdate() {
 | 
				
			||||||
 | 
								this.$refs['dataForm'].validate(valid => {
 | 
				
			||||||
 | 
									if (valid) {
 | 
				
			||||||
					this.$http({
 | 
										this.$http({
 | 
				
			||||||
						url: this.$http.adornUrl('/monitoring/workshopSection'),
 | 
											url: this.$http.adornUrl('/monitoring/workshopSection'),
 | 
				
			||||||
						method: this.dataForm.id ? 'put' : 'post',
 | 
											method: this.dataForm.id ? 'put' : 'post',
 | 
				
			||||||
@@ -295,6 +308,8 @@ export default {
 | 
				
			|||||||
						})
 | 
											})
 | 
				
			||||||
					})
 | 
										})
 | 
				
			||||||
				}
 | 
									}
 | 
				
			||||||
 | 
								})
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -152,6 +152,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -20,6 +20,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			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')}`
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -64,6 +64,12 @@ export default {
 | 
				
			|||||||
		Upload
 | 
							Upload
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 云存储配置
 | 
							// 云存储配置
 | 
				
			||||||
		configHandle() {
 | 
							configHandle() {
 | 
				
			||||||
			this.configVisible = true
 | 
								this.configVisible = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -65,6 +65,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -47,6 +47,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,12 @@ export default {
 | 
				
			|||||||
		this.getDataList()
 | 
							this.getDataList()
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 新增 / 修改
 | 
							// 新增 / 修改
 | 
				
			||||||
		addOrUpdateHandle(id) {
 | 
							addOrUpdateHandle(id) {
 | 
				
			||||||
			this.addOrUpdateVisible = true
 | 
								this.addOrUpdateVisible = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -46,6 +46,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -24,7 +24,7 @@
 | 
				
			|||||||
			<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
 | 
								<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" @sort-change="dataListSortChangeHandle" style="width: 100%;">
 | 
				
			||||||
				<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
 | 
									<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
 | 
				
			||||||
				<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
 | 
									<el-table-column prop="dictName" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
				<el-table-column prop="dictType" :label="$t('dict.dictName')" header-align="center" align="center"></el-table-column>
 | 
									<el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center"></el-table-column>
 | 
				
			||||||
				<!-- <el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
 | 
									<!-- <el-table-column prop="dictType" :label="$t('dict.dictType')" header-align="center" align="center">
 | 
				
			||||||
					<template slot-scope="scope">
 | 
										<template slot-scope="scope">
 | 
				
			||||||
						<el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button>
 | 
											<el-button type="text" @click="childHandle(scope.row)">{{ scope.row.dictType }}</el-button>
 | 
				
			||||||
@@ -87,6 +87,12 @@ export default {
 | 
				
			|||||||
		IconsDialog
 | 
							IconsDialog
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		//
 | 
							//
 | 
				
			||||||
		showIcons() {
 | 
							showIcons() {
 | 
				
			||||||
			this.displayIcon = true
 | 
								this.displayIcon = true
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -54,6 +54,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		// 异常信息
 | 
							// 异常信息
 | 
				
			||||||
		infoHandle(info) {
 | 
							infoHandle(info) {
 | 
				
			||||||
			this.$alert(info, this.$t('logError.errorInfo'), {
 | 
								this.$alert(info, this.$t('logError.errorInfo'), {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -95,6 +95,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,6 +41,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -52,6 +52,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.$nextTick(() => {
 | 
								this.$nextTick(() => {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -111,6 +111,12 @@ export default {
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	},
 | 
						},
 | 
				
			||||||
	methods: {
 | 
						methods: {
 | 
				
			||||||
 | 
							// destroy dialog
 | 
				
			||||||
 | 
							handleDestroyDialog() {
 | 
				
			||||||
 | 
								setTimeout(() => {
 | 
				
			||||||
 | 
									this.addOrUpdateVisible= false
 | 
				
			||||||
 | 
								}, /** after dialog animated */ 200);
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		init() {
 | 
							init() {
 | 
				
			||||||
			this.visible = true
 | 
								this.visible = true
 | 
				
			||||||
			this.dataForm.deptId = ''
 | 
								this.dataForm.deptId = ''
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user