模块更新
This commit is contained in:
		
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							@@ -19,3 +19,5 @@ yarn-error.log*
 | 
				
			|||||||
*.njsproj
 | 
					*.njsproj
 | 
				
			||||||
*.sln
 | 
					*.sln
 | 
				
			||||||
*.sw*
 | 
					*.sw*
 | 
				
			||||||
 | 
					/public/index.html
 | 
				
			||||||
 | 
					/package-lock.json
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14203
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										14203
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -15,9 +15,9 @@
 | 
				
			|||||||
    "axios": "^0.19.2",
 | 
					    "axios": "^0.19.2",
 | 
				
			||||||
    "babel-eslint": "^8.0.1",
 | 
					    "babel-eslint": "^8.0.1",
 | 
				
			||||||
    "babel-plugin-component": "^1.1.1",
 | 
					    "babel-plugin-component": "^1.1.1",
 | 
				
			||||||
    "code-brick-zj": "0.0.4",
 | 
					    "code-brick-zj": "0.0.7",
 | 
				
			||||||
    "core-js": "^3.6.5",
 | 
					    "core-js": "^3.6.5",
 | 
				
			||||||
    "echarts": "^5.3.3",
 | 
					    "echarts": "^5.4.2",
 | 
				
			||||||
    "element-theme": "^2.0.1",
 | 
					    "element-theme": "^2.0.1",
 | 
				
			||||||
    "element-ui": "^2.15.7",
 | 
					    "element-ui": "^2.15.7",
 | 
				
			||||||
    "js-cookie": "^2.2.1",
 | 
					    "js-cookie": "^2.2.1",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-08-22 14:57:50
 | 
					 * @Date: 2022-08-22 14:57:50
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-05-12 10:11:06
 | 
					 * @LastEditTime: 2023-05-12 14:03:44
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<!DOCTYPE html>
 | 
					<!DOCTYPE html>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -390,7 +390,7 @@ img {
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
      .aui-navbar__icon-menu {
 | 
					      .aui-navbar__icon-menu {
 | 
				
			||||||
        vertical-align: middle;
 | 
					        vertical-align: middle;
 | 
				
			||||||
        font-size: 16px;
 | 
					        font-size: 24px;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      .el-dropdown {
 | 
					      .el-dropdown {
 | 
				
			||||||
        color: $--color-text-secondary;
 | 
					        color: $--color-text-secondary;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,16 +1,29 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Date: 2020-12-29 16:49:28
 | 
					 * @Date: 2020-12-29 16:49:28
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-05-08 10:26:39
 | 
					 * @LastEditTime: 2023-05-23 14:36:20
 | 
				
			||||||
 * @FilePath: \basic-admin\src\filters\DataDict\index.js
 | 
					 * @FilePath: \basic-admin\src\filters\DataDict\index.js
 | 
				
			||||||
 * @Description: 部分常量的数据字典定义
 | 
					 * @Description: 部分常量的数据字典定义
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
const table = {
 | 
					const table = {
 | 
				
			||||||
  measurementType: {
 | 
					  measurementType: {
 | 
				
			||||||
      0: '计量',
 | 
					      0: '计量',
 | 
				
			||||||
      1:'计数',
 | 
					      1:'计数',
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  VerifyType: {
 | 
				
			||||||
 | 
					    0: i18n.t('gage.insideVerify'),
 | 
				
			||||||
 | 
					    1:  i18n.t('gage.outsideVerify')
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  eventList: {
 | 
				
			||||||
 | 
					    0: '领用',
 | 
				
			||||||
 | 
					    1: '归还',
 | 
				
			||||||
 | 
					    2: '量具报废',
 | 
				
			||||||
 | 
					    3: '量具维修',
 | 
				
			||||||
 | 
					    4: '量具购买',
 | 
				
			||||||
 | 
					    5: '量具检测',
 | 
				
			||||||
 | 
					    6: '量具转移'
 | 
				
			||||||
 | 
					   },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default function (dictTable) {
 | 
					export default function (dictTable) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Date: 2020-12-29 16:49:28
 | 
					 * @Date: 2020-12-29 16:49:28
 | 
				
			||||||
 * @LastEditors: zwq
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 * @LastEditTime: 2023-01-05 15:49:17
 | 
					 * @LastEditTime: 2023-05-12 12:39:26
 | 
				
			||||||
 * @FilePath: \basic-admin\src\filters\basicData\index.js
 | 
					 * @FilePath: \basic-admin\src\filters\basicData\index.js
 | 
				
			||||||
 * @Description:
 | 
					 * @Description:
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
@@ -29,6 +29,10 @@ const table = {
 | 
				
			|||||||
    '0': i18n.t('logLogin.status0'),
 | 
					    '0': i18n.t('logLogin.status0'),
 | 
				
			||||||
    '1': i18n.t('logLogin.status1')
 | 
					    '1': i18n.t('logLogin.status1')
 | 
				
			||||||
  }, 
 | 
					  }, 
 | 
				
			||||||
 | 
					  scheduleStatus: {
 | 
				
			||||||
 | 
					    '0': i18n.t('schedule.status0'),
 | 
				
			||||||
 | 
					    '1': i18n.t('schedule.status1')
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default function(dictTable) {
 | 
					export default function(dictTable) {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										267
									
								
								src/i18n/en.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										267
									
								
								src/i18n/en.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,267 @@
 | 
				
			|||||||
 | 
					import module from './en'
 | 
				
			||||||
 | 
					const t = {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.module = module
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.loading = 'loading...'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.brand = {}
 | 
				
			||||||
 | 
					t.brand.lg = 'SPC'
 | 
				
			||||||
 | 
					t.brand.mini = 'spc'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.public = {}
 | 
				
			||||||
 | 
					t.public.operation = 'operation'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.add = 'add'
 | 
				
			||||||
 | 
					t.delete = 'delete'
 | 
				
			||||||
 | 
					t.deleteBatch = 'deleteBatch'
 | 
				
			||||||
 | 
					t.update = 'update'
 | 
				
			||||||
 | 
					t.query = 'query'
 | 
				
			||||||
 | 
					t.export = 'export'
 | 
				
			||||||
 | 
					t.handle = 'handle'
 | 
				
			||||||
 | 
					t.confirm = 'confirm'
 | 
				
			||||||
 | 
					t.cancel = 'cancel'
 | 
				
			||||||
 | 
					t.clear = 'clear'
 | 
				
			||||||
 | 
					t.logout = 'logout'
 | 
				
			||||||
 | 
					t.manage = 'manage'
 | 
				
			||||||
 | 
					t.createDate = 'createDate'
 | 
				
			||||||
 | 
					t.keyword = 'keyword:'
 | 
				
			||||||
 | 
					t.choose = 'choose'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.prompt = {}
 | 
				
			||||||
 | 
					t.prompt.title = 'Tips'
 | 
				
			||||||
 | 
					t.prompt.info = '确定进行[{handle}]操作?'
 | 
				
			||||||
 | 
					t.prompt.success = 'Operation succeeded'
 | 
				
			||||||
 | 
					t.prompt.failed = 'Operation failed'
 | 
				
			||||||
 | 
					t.prompt.deleteBatch = 'Please select delete item'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.validate = {}
 | 
				
			||||||
 | 
					t.validate.required = 'required'
 | 
				
			||||||
 | 
					t.validate.format = '{attr}Format error'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.upload = {}
 | 
				
			||||||
 | 
					t.upload.text = '将文件拖到此处,或<em>点击上传</em>'
 | 
				
			||||||
 | 
					t.upload.tip = '只支持{format}格式文件!'
 | 
				
			||||||
 | 
					t.upload.button = 'upload'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.datePicker = {}
 | 
				
			||||||
 | 
					t.datePicker.range = 'range'
 | 
				
			||||||
 | 
					t.datePicker.start = 'start'
 | 
				
			||||||
 | 
					t.datePicker.end = 'end'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.fullscreen = {}
 | 
				
			||||||
 | 
					t.fullscreen.prompt = 'Your browser does not support this operation'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.updatePassword = {}
 | 
				
			||||||
 | 
					t.updatePassword.title = 'Change Password'
 | 
				
			||||||
 | 
					t.updatePassword.username = 'account number'
 | 
				
			||||||
 | 
					t.updatePassword.password = 'Original password'
 | 
				
			||||||
 | 
					t.updatePassword.newPassword = 'New password'
 | 
				
			||||||
 | 
					t.updatePassword.confirmPassword = 'Confirm Password'
 | 
				
			||||||
 | 
					t.updatePassword.validate = {}
 | 
				
			||||||
 | 
					t.updatePassword.validate.confirmPassword = 'The confirmed password is inconsistent with the new password'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.contentTabs = {}
 | 
				
			||||||
 | 
					t.contentTabs.closeCurrent = 'close Current Page'
 | 
				
			||||||
 | 
					t.contentTabs.closeOther = 'close Other Page'
 | 
				
			||||||
 | 
					t.contentTabs.closeAll = 'close All'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/* 页面 */
 | 
				
			||||||
 | 
					t.notFound = {}
 | 
				
			||||||
 | 
					t.notFound.desc = '抱歉!您访问的页面<em>失联</em>啦...'
 | 
				
			||||||
 | 
					t.notFound.back = 'back'
 | 
				
			||||||
 | 
					t.notFound.home = 'home'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.login = {}
 | 
				
			||||||
 | 
					t.login.title = 'login'
 | 
				
			||||||
 | 
					t.login.username = 'username'
 | 
				
			||||||
 | 
					t.login.password = 'password'
 | 
				
			||||||
 | 
					t.login.captcha = 'captcha'
 | 
				
			||||||
 | 
					t.login.demo = 'demo'
 | 
				
			||||||
 | 
					t.login.copyright = '中建材智能自动化研究院'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.schedule = {}
 | 
				
			||||||
 | 
					t.schedule.beanName = 'bean名称'
 | 
				
			||||||
 | 
					t.schedule.beanNameTips = 'spring bean名称, 如: testTask'
 | 
				
			||||||
 | 
					t.schedule.pauseBatch = 'pause'
 | 
				
			||||||
 | 
					t.schedule.resumeBatch = 'resume'
 | 
				
			||||||
 | 
					t.schedule.runBatch = 'run'
 | 
				
			||||||
 | 
					t.schedule.log = 'log'
 | 
				
			||||||
 | 
					t.schedule.params = 'params'
 | 
				
			||||||
 | 
					t.schedule.cronExpression = 'cron表达式'
 | 
				
			||||||
 | 
					t.schedule.cronExpressionTips = '如: 0 0 12 * * ?'
 | 
				
			||||||
 | 
					t.schedule.remark = 'remark'
 | 
				
			||||||
 | 
					t.schedule.status = 'status'
 | 
				
			||||||
 | 
					t.schedule.status0 = 'pause'
 | 
				
			||||||
 | 
					t.schedule.status1 = 'normal'
 | 
				
			||||||
 | 
					t.schedule.statusLog0 = 'fail'
 | 
				
			||||||
 | 
					t.schedule.statusLog1 = 'success'
 | 
				
			||||||
 | 
					t.schedule.pause = 'pause'
 | 
				
			||||||
 | 
					t.schedule.resume = 'resume'
 | 
				
			||||||
 | 
					t.schedule.run = 'run'
 | 
				
			||||||
 | 
					t.schedule.jobId = '任务ID'
 | 
				
			||||||
 | 
					t.schedule.times = 'times(单位: 毫秒)'
 | 
				
			||||||
 | 
					t.schedule.createDate = 'create Date'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.oss = {}
 | 
				
			||||||
 | 
					t.oss.config = 'Cloud storage configuration'
 | 
				
			||||||
 | 
					t.oss.upload = 'upload'
 | 
				
			||||||
 | 
					t.oss.url = 'URL'
 | 
				
			||||||
 | 
					t.oss.createDate = 'create Date'
 | 
				
			||||||
 | 
					t.oss.type = 'type'
 | 
				
			||||||
 | 
					t.oss.type1 = '七牛'
 | 
				
			||||||
 | 
					t.oss.type2 = '阿里云'
 | 
				
			||||||
 | 
					t.oss.type3 = '腾讯云'
 | 
				
			||||||
 | 
					t.oss.qiniuDomain = '域名'
 | 
				
			||||||
 | 
					t.oss.qiniuDomainTips = '七牛绑定的域名'
 | 
				
			||||||
 | 
					t.oss.qiniuPrefix = '路径前缀'
 | 
				
			||||||
 | 
					t.oss.qiniuPrefixTips = '不设置默认为空'
 | 
				
			||||||
 | 
					t.oss.qiniuAccessKey = 'AccessKey'
 | 
				
			||||||
 | 
					t.oss.qiniuAccessKeyTips = '七牛AccessKey'
 | 
				
			||||||
 | 
					t.oss.qiniuSecretKey = 'SecretKey'
 | 
				
			||||||
 | 
					t.oss.qiniuSecretKeyTips = '七牛SecretKey'
 | 
				
			||||||
 | 
					t.oss.qiniuBucketName = '空间名'
 | 
				
			||||||
 | 
					t.oss.qiniuBucketNameTips = '七牛存储空间名'
 | 
				
			||||||
 | 
					t.oss.aliyunDomain = '域名'
 | 
				
			||||||
 | 
					t.oss.aliyunDomainTips = '阿里云绑定的域名,如:http://cdn.renren.io'
 | 
				
			||||||
 | 
					t.oss.aliyunPrefix = '路径前缀'
 | 
				
			||||||
 | 
					t.oss.aliyunPrefixTips = '不设置默认为空'
 | 
				
			||||||
 | 
					t.oss.aliyunEndPoint = 'EndPoint'
 | 
				
			||||||
 | 
					t.oss.aliyunEndPointTips = '阿里云EndPoint'
 | 
				
			||||||
 | 
					t.oss.aliyunAccessKeyId = 'AccessKeyId'
 | 
				
			||||||
 | 
					t.oss.aliyunAccessKeyIdTips = '阿里云AccessKeyId'
 | 
				
			||||||
 | 
					t.oss.aliyunAccessKeySecret = 'AccessKeySecret'
 | 
				
			||||||
 | 
					t.oss.aliyunAccessKeySecretTips = '阿里云AccessKeySecret'
 | 
				
			||||||
 | 
					t.oss.aliyunBucketName = 'BucketName'
 | 
				
			||||||
 | 
					t.oss.aliyunBucketNameTips = '阿里云BucketName'
 | 
				
			||||||
 | 
					t.oss.qcloudDomain = '域名'
 | 
				
			||||||
 | 
					t.oss.qcloudDomainTips = '腾讯云绑定的域名'
 | 
				
			||||||
 | 
					t.oss.qcloudPrefix = '路径前缀'
 | 
				
			||||||
 | 
					t.oss.qcloudPrefixTips = '不设置默认为空'
 | 
				
			||||||
 | 
					t.oss.qcloudAppId = 'AppId'
 | 
				
			||||||
 | 
					t.oss.qcloudAppIdTips = '腾讯云AppId'
 | 
				
			||||||
 | 
					t.oss.qcloudSecretId = 'SecretId'
 | 
				
			||||||
 | 
					t.oss.qcloudSecretIdTips = '腾讯云SecretId'
 | 
				
			||||||
 | 
					t.oss.qcloudSecretKey = 'SecretKey'
 | 
				
			||||||
 | 
					t.oss.qcloudSecretKeyTips = '腾讯云SecretKey'
 | 
				
			||||||
 | 
					t.oss.qcloudBucketName = 'BucketName'
 | 
				
			||||||
 | 
					t.oss.qcloudBucketNameTips = '腾讯云BucketName'
 | 
				
			||||||
 | 
					t.oss.qcloudRegion = '所属地区'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionTips = '请选择'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionBeijing1 = '北京一区(华北)'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionBeijing = '北京'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionShanghai = '上海(华东)'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionGuangzhou = '广州(华南)'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionChengdu = '成都(西南)'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionChongqing = '重庆'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionSingapore = '新加坡'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionHongkong = '香港'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionToronto = '多伦多'
 | 
				
			||||||
 | 
					t.oss.qcloudRegionFrankfurt = '法兰克福'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.dept = {}
 | 
				
			||||||
 | 
					t.dept.name = 'name'
 | 
				
			||||||
 | 
					t.dept.parentName = 'Superior department'
 | 
				
			||||||
 | 
					t.dept.sort = 'sort'
 | 
				
			||||||
 | 
					t.dept.parentNameDefault = 'Primary department'
 | 
				
			||||||
 | 
					t.dept.chooseerror = 'Please select a department'
 | 
				
			||||||
 | 
					t.dept.title = 'Please select a department'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.dict = {}
 | 
				
			||||||
 | 
					t.dict.dictName = 'dictName'
 | 
				
			||||||
 | 
					t.dict.dictType = 'dictType'
 | 
				
			||||||
 | 
					t.dict.dictLabel = 'dictLabel'
 | 
				
			||||||
 | 
					t.dict.dictValue = 'dictValue'
 | 
				
			||||||
 | 
					t.dict.sort = 'sort'
 | 
				
			||||||
 | 
					t.dict.remark = 'remark'
 | 
				
			||||||
 | 
					t.dict.createDate = 'create Date'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.logError = {}
 | 
				
			||||||
 | 
					t.logError.requestUri = 'requestURI'
 | 
				
			||||||
 | 
					t.logError.requestMethod = 'requestMethod'
 | 
				
			||||||
 | 
					t.logError.requestParams = 'requestParams'
 | 
				
			||||||
 | 
					t.logError.ip = 'IP'
 | 
				
			||||||
 | 
					t.logError.userAgent = 'userAgent'
 | 
				
			||||||
 | 
					t.logError.createDate = 'createDate'
 | 
				
			||||||
 | 
					t.logError.errorInfo = 'errorInfo'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.logLogin = {}
 | 
				
			||||||
 | 
					t.logLogin.creatorName = 'creatorName'
 | 
				
			||||||
 | 
					t.logLogin.status = 'status'
 | 
				
			||||||
 | 
					t.logLogin.status0 = 'fail'
 | 
				
			||||||
 | 
					t.logLogin.status1 = 'success'
 | 
				
			||||||
 | 
					t.logLogin.status2 = 'Account locked'
 | 
				
			||||||
 | 
					t.logLogin.operation = 'operation'
 | 
				
			||||||
 | 
					t.logLogin.operation0 = 'login'
 | 
				
			||||||
 | 
					t.logLogin.operation1 = 'loginOut'
 | 
				
			||||||
 | 
					t.logLogin.ip = 'IP'
 | 
				
			||||||
 | 
					t.logLogin.userAgent = 'User-Agent'
 | 
				
			||||||
 | 
					t.logLogin.createDate = 'createDate'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.logOperation = {}
 | 
				
			||||||
 | 
					t.logOperation.status = 'status'
 | 
				
			||||||
 | 
					t.logOperation.status0 = 'fail'
 | 
				
			||||||
 | 
					t.logOperation.status1 = 'success'
 | 
				
			||||||
 | 
					t.logOperation.creatorName = 'creatorName'
 | 
				
			||||||
 | 
					t.logOperation.operation = 'operation'
 | 
				
			||||||
 | 
					t.logOperation.requestUri = 'requestURI'
 | 
				
			||||||
 | 
					t.logOperation.requestMethod = 'requestMethod'
 | 
				
			||||||
 | 
					t.logOperation.requestParams = 'requestParams'
 | 
				
			||||||
 | 
					t.logOperation.requestTime = 'requestTime'
 | 
				
			||||||
 | 
					t.logOperation.ip = 'IP'
 | 
				
			||||||
 | 
					t.logOperation.userAgent = 'User-Agent'
 | 
				
			||||||
 | 
					t.logOperation.createDate = 'createDate'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.menu = {}
 | 
				
			||||||
 | 
					t.menu.name = 'name'
 | 
				
			||||||
 | 
					t.menu.icon = 'icon'
 | 
				
			||||||
 | 
					t.menu.type = 'type'
 | 
				
			||||||
 | 
					t.menu.type0 = 'menu'
 | 
				
			||||||
 | 
					t.menu.type1 = 'button'
 | 
				
			||||||
 | 
					t.menu.sort = 'sort'
 | 
				
			||||||
 | 
					t.menu.url = 'url'
 | 
				
			||||||
 | 
					t.menu.permissions = 'permissions'
 | 
				
			||||||
 | 
					t.menu.permissionsTips = '多个用逗号分隔,如:sys:menu:save,sys:menu:update'
 | 
				
			||||||
 | 
					t.menu.parentName = 'parentName'
 | 
				
			||||||
 | 
					t.menu.parentNameDefault = 'parentNameDefault'
 | 
				
			||||||
 | 
					t.menu.resource = 'resource'
 | 
				
			||||||
 | 
					t.menu.resourceUrl = 'resourceUrl'
 | 
				
			||||||
 | 
					t.menu.resourceMethod = 'resourceMethod'
 | 
				
			||||||
 | 
					t.menu.resourceAddItem = 'resourceAddItem'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.params = {}
 | 
				
			||||||
 | 
					t.params.paramCode = 'code'
 | 
				
			||||||
 | 
					t.params.paramValue = 'value'
 | 
				
			||||||
 | 
					t.params.remark = 'remark'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.role = {}
 | 
				
			||||||
 | 
					t.role.name = 'name'
 | 
				
			||||||
 | 
					t.role.remark = 'remark'
 | 
				
			||||||
 | 
					t.role.createDate = 'createDate'
 | 
				
			||||||
 | 
					t.role.menuList = 'menuList'
 | 
				
			||||||
 | 
					t.role.deptList = 'deptList'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.user = {}
 | 
				
			||||||
 | 
					t.user.username = 'username'
 | 
				
			||||||
 | 
					t.user.deptName = 'deptName'
 | 
				
			||||||
 | 
					t.user.email = 'email'
 | 
				
			||||||
 | 
					t.user.mobile = 'mobile'
 | 
				
			||||||
 | 
					t.user.status = 'status'
 | 
				
			||||||
 | 
					t.user.status0 = 'Deactivate'
 | 
				
			||||||
 | 
					t.user.status1 = 'Normal'
 | 
				
			||||||
 | 
					t.user.createDate = 'createDate'
 | 
				
			||||||
 | 
					t.user.password = 'password'
 | 
				
			||||||
 | 
					t.user.confirmPassword = 'confirmPassword'
 | 
				
			||||||
 | 
					t.user.realName = 'realName'
 | 
				
			||||||
 | 
					t.user.gender = 'gender'
 | 
				
			||||||
 | 
					t.user.gender0 = 'male'
 | 
				
			||||||
 | 
					t.user.gender1 = 'female'
 | 
				
			||||||
 | 
					t.user.gender2 = 'secrecy'
 | 
				
			||||||
 | 
					t.user.roleIdList = 'Role configuration'
 | 
				
			||||||
 | 
					t.user.validate = {}
 | 
				
			||||||
 | 
					t.user.validate.confirmPassword = 'The confirmation password is inconsistent with the password input'
 | 
				
			||||||
 | 
					t.user.select = 'Select user'
 | 
				
			||||||
 | 
					t.user.selecterror = 'Please select a record'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default t
 | 
				
			||||||
							
								
								
									
										14
									
								
								src/i18n/en/basicData.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/i18n/en/basicData.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2023-02-28 14:21:52
 | 
				
			||||||
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-28 14:24:19
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: 'name',
 | 
				
			||||||
 | 
					    code: 'code',
 | 
				
			||||||
 | 
					    status: 'status',
 | 
				
			||||||
 | 
					    createTime: 'create time',
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										13
									
								
								src/i18n/en/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/i18n/en/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: gtz
 | 
				
			||||||
 | 
					 * @Date: 2021-03-04 16:12:46
 | 
				
			||||||
 | 
					 * @LastEditors: gtz
 | 
				
			||||||
 | 
					 * @LastEditTime: 2021-12-08 14:29:14
 | 
				
			||||||
 | 
					 * @Description: file content
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import basicData from './basicData'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  basicData,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,8 +1,17 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2023-05-12 12:37:21
 | 
				
			||||||
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-12 12:40:16
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
import Vue from 'vue'
 | 
					import Vue from 'vue'
 | 
				
			||||||
import VueI18n from 'vue-i18n'
 | 
					import VueI18n from 'vue-i18n'
 | 
				
			||||||
import Cookies from 'js-cookie'
 | 
					import Cookies from 'js-cookie'
 | 
				
			||||||
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
 | 
					import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
 | 
				
			||||||
import zhCN from './zh-CN' 
 | 
					import zhCN from './zh-CN' 
 | 
				
			||||||
 | 
					import EnLocale from 'element-ui/lib/locale/lang/en'
 | 
				
			||||||
 | 
					import en from './en'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Vue.use(VueI18n)
 | 
					Vue.use(VueI18n)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -10,8 +19,13 @@ export const messages = {
 | 
				
			|||||||
  'zh-CN': {
 | 
					  'zh-CN': {
 | 
				
			||||||
    '_lang': '简体中文',
 | 
					    '_lang': '简体中文',
 | 
				
			||||||
    ...zhCN, 
 | 
					    ...zhCN, 
 | 
				
			||||||
    ...zhCNLocale
 | 
					    ...zhCNLocale,
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
 | 
					  'en': {
 | 
				
			||||||
 | 
					    '_lang': 'English',
 | 
				
			||||||
 | 
					    ...en,
 | 
				
			||||||
 | 
					    ...EnLocale
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export default new VueI18n({
 | 
					export default new VueI18n({
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,11 +1,19 @@
 | 
				
			|||||||
 | 
					 
 | 
				
			||||||
 | 
					import module from './zh'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const t = {}
 | 
					const t = {}
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 | 
					t.module = module
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.loading = '加载中...'
 | 
					t.loading = '加载中...'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.brand = {}
 | 
					t.brand = {}
 | 
				
			||||||
t.brand.lg = 'QMS'
 | 
					t.brand.lg = 'QMS'
 | 
				
			||||||
t.brand.mini = 'qms'
 | 
					t.brand.mini = 'qms'
 | 
				
			||||||
 
 | 
					 
 | 
				
			||||||
 | 
					t.public = {}
 | 
				
			||||||
 | 
					t.public.operation = '操作'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.add = '新增'
 | 
					t.add = '新增'
 | 
				
			||||||
t.delete = '删除'
 | 
					t.delete = '删除'
 | 
				
			||||||
t.deleteBatch = '删除'
 | 
					t.deleteBatch = '删除'
 | 
				
			||||||
@@ -33,6 +41,8 @@ t.all = '全部'
 | 
				
			|||||||
t.available = '可用'
 | 
					t.available = '可用'
 | 
				
			||||||
t.notAvailable = '不可用'
 | 
					t.notAvailable = '不可用'
 | 
				
			||||||
t.time = '时间段'
 | 
					t.time = '时间段'
 | 
				
			||||||
 | 
					t.parameter = '台差参数'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -287,6 +297,7 @@ t.basic.client = '服务对象'
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
t.quality = {}
 | 
					t.quality = {}
 | 
				
			||||||
t.quality.name = '名称'
 | 
					t.quality.name = '名称'
 | 
				
			||||||
 | 
					t.quality.code = '编号'
 | 
				
			||||||
t.quality.planCategory = '计划类别'
 | 
					t.quality.planCategory = '计划类别'
 | 
				
			||||||
t.quality.fatalFlaw = '致命缺陷'
 | 
					t.quality.fatalFlaw = '致命缺陷'
 | 
				
			||||||
t.quality.acceptable = '可接受'
 | 
					t.quality.acceptable = '可接受'
 | 
				
			||||||
@@ -316,7 +327,26 @@ t.quality.disposalMethodName =	'名称'
 | 
				
			|||||||
t.quality.disposalMethodCode =	'编码'
 | 
					t.quality.disposalMethodCode =	'编码'
 | 
				
			||||||
t.quality.judgmentMark = '判断标识'
 | 
					t.quality.judgmentMark = '判断标识'
 | 
				
			||||||
t.quality.disposalMethodStatus = '状态'
 | 
					t.quality.disposalMethodStatus = '状态'
 | 
				
			||||||
t.quality.inspectionPositionNumber =	'序号'
 | 
					t.quality.inspectionPositionNumber = '序号'
 | 
				
			||||||
 | 
					t.quality.productName =	'检验产品'
 | 
				
			||||||
 | 
					t.quality.supplierName =	'供应商名称'
 | 
				
			||||||
 | 
					t.quality.transferOutName =	'转出'
 | 
				
			||||||
 | 
					t.quality.transferInName =	'转入'
 | 
				
			||||||
 | 
					t.quality.dataSources	 =	'数据来源'
 | 
				
			||||||
 | 
					t.quality.remark = '备注'
 | 
				
			||||||
 | 
					t.quality.userName = '创建人'
 | 
				
			||||||
 | 
					t.quality.inspectionStage = '检验阶段'
 | 
				
			||||||
 | 
					t.quality.supplierName = '供应商'
 | 
				
			||||||
 | 
					t.quality.normalToRelaxed = '正常转放宽'
 | 
				
			||||||
 | 
					t.quality.normalToTightened =	'正常转加严'
 | 
				
			||||||
 | 
					t.quality.relaxedToNormal =	'放宽转正常'
 | 
				
			||||||
 | 
					t.quality.tightenedToNormal =	'加严转正常'
 | 
				
			||||||
 | 
					t.quality.productName = '检验产品'
 | 
				
			||||||
 | 
					t.quality.transferTime =	'转移时间'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
t.disqualification = {}
 | 
					t.disqualification = {}
 | 
				
			||||||
@@ -411,7 +441,7 @@ t.gage.createDate = '发生日期'
 | 
				
			|||||||
t.gage.userDepartment = '使用部门'
 | 
					t.gage.userDepartment = '使用部门'
 | 
				
			||||||
t.gage.useLocation = '使用位置'
 | 
					t.gage.useLocation = '使用位置'
 | 
				
			||||||
t.gage.remark = '备注'
 | 
					t.gage.remark = '备注'
 | 
				
			||||||
t.gage.measuringToolSpecification = '规格'
 | 
					t.gage.measuringToolSpecification = '量具规格'
 | 
				
			||||||
t.gage.client = '委托单位'
 | 
					t.gage.client = '委托单位'
 | 
				
			||||||
t.gage.certificateCodeBh = '证书编号Bh'
 | 
					t.gage.certificateCodeBh = '证书编号Bh'
 | 
				
			||||||
t.gage.certificateCode = '证书编号'
 | 
					t.gage.certificateCode = '证书编号'
 | 
				
			||||||
@@ -453,10 +483,62 @@ t.gage.precisionDecimalPlace	= '精度小数位数'
 | 
				
			|||||||
t.gage.connection = '客户'
 | 
					t.gage.connection = '客户'
 | 
				
			||||||
t.gage.publicErrand	 = '公差'
 | 
					t.gage.publicErrand	 = '公差'
 | 
				
			||||||
t.gage.tester	 = '测试者'
 | 
					t.gage.tester	 = '测试者'
 | 
				
			||||||
t.gage.fabrication	= '制作'
 | 
					t.gage.partName	= '品名 '
 | 
				
			||||||
t.gage.connection		= '客户'
 | 
					t.gage.specification		= '规格'
 | 
				
			||||||
t.gage.connection		= '客户'
 | 
					t.gage.parentId = '父类型'
 | 
				
			||||||
t.gage.connection		= '客户'
 | 
					t.gage.singleValueAnalysis = '台差单值分析'
 | 
				
			||||||
 | 
					t.gage.stageDifferenceMeanAnalysis = '台差单值分析'
 | 
				
			||||||
 | 
					t.gage.contrastiveAnalysis = '大流量台差对比分析'
 | 
				
			||||||
 | 
					t.gage.inspectionTime = '报检时间'
 | 
				
			||||||
 | 
					t.gage.batchTail = '批号'
 | 
				
			||||||
 | 
					t.gage.analysisParameter = '台差分析参数'
 | 
				
			||||||
 | 
					t.gage.tips = '通过选择量具事件控制输入参数'
 | 
				
			||||||
 | 
					t.gage.gageResumeName = '量具履历'
 | 
				
			||||||
 | 
					t.gage.measuringToolAccuracy = '基准'
 | 
				
			||||||
 | 
					t.gage.price = '值'
 | 
				
			||||||
 | 
					t.gage.parameter = '台差分析参数'
 | 
				
			||||||
 | 
					t.gage.parameterRemark = '台差分析参数备注'
 | 
				
			||||||
 | 
					t.gage.batchTips = '请输入数字开头中间为_数字结尾的批号'
 | 
				
			||||||
 | 
					t.gage.verifyLog = '校验记录'
 | 
				
			||||||
 | 
					t.gage.insideVerify = '内部校验'
 | 
				
			||||||
 | 
					t.gage.outsideVerify = '外部校验'
 | 
				
			||||||
 | 
					t.gage.verificationFee = '校验费用'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					t.laboratory = {}
 | 
				
			||||||
 | 
					t.laboratory.userName= '人员名称'
 | 
				
			||||||
 | 
					t.laboratory.userCode = '人员编码'
 | 
				
			||||||
 | 
					t.laboratory.inspectionQualification= '检验资质'
 | 
				
			||||||
 | 
					t.laboratory.Experience = '培训经历'
 | 
				
			||||||
 | 
					t.laboratory.EmployeeResume = '员工履历'
 | 
				
			||||||
 | 
					t.laboratory.endDate = '结束日期'
 | 
				
			||||||
 | 
					t.laboratory.startDate= '开始日期'
 | 
				
			||||||
 | 
					t.laboratory.department= '任职部门'
 | 
				
			||||||
 | 
					t.laboratory.position = '任职岗位'
 | 
				
			||||||
 | 
					t.laboratory.responsibilitie = '岗位职责'
 | 
				
			||||||
 | 
					t.laboratory.remark = '备注'
 | 
				
			||||||
 | 
					t.laboratory.name = '资质名称'
 | 
				
			||||||
 | 
					t.laboratory.qualificationDescription	= '资质说明'
 | 
				
			||||||
 | 
					t.laboratory.validDate	= '有效日期'
 | 
				
			||||||
 | 
					t.laboratory.code = '资质编号'
 | 
				
			||||||
 | 
					t.laboratory.getDate	= '获取日期'
 | 
				
			||||||
 | 
					t.laboratory.result = '结果'
 | 
				
			||||||
 | 
					t.laboratory.title = '主题'
 | 
				
			||||||
 | 
					t.laboratory.trainContent	= '培训内容'
 | 
				
			||||||
 | 
					t.laboratory.trainDate	= '培训日期'
 | 
				
			||||||
 | 
					t.laboratory.trainDuration = '培训时长'
 | 
				
			||||||
 | 
					t.laboratory.trainType	= '培训类型'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										14
									
								
								src/i18n/zh/basicData.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/i18n/zh/basicData.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,14 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2023-02-28 14:21:52
 | 
				
			||||||
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-02-28 14:24:19
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					    name: '名称',
 | 
				
			||||||
 | 
					    code: '编码',
 | 
				
			||||||
 | 
					    status: '状态',
 | 
				
			||||||
 | 
					    createTime: '添加时间',
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										13
									
								
								src/i18n/zh/index.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								src/i18n/zh/index.js
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,13 @@
 | 
				
			|||||||
 | 
					/*
 | 
				
			||||||
 | 
					 * @Author: gtz
 | 
				
			||||||
 | 
					 * @Date: 2021-03-04 16:12:46
 | 
				
			||||||
 | 
					 * @LastEditors: gtz
 | 
				
			||||||
 | 
					 * @LastEditTime: 2021-12-08 14:29:14
 | 
				
			||||||
 | 
					 * @Description: file content
 | 
				
			||||||
 | 
					 */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import basicData from './basicData'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  basicData,
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										14
									
								
								src/icons/svg/中英.svg
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/icons/svg/中英.svg
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							| 
		 After Width: | Height: | Size: 6.6 KiB  | 
@@ -1,8 +1,8 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-08-22 14:57:50
 | 
					 * @Date: 2022-08-22 14:57:50
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 * @LastEditTime: 2023-04-03 14:37:45
 | 
					 * @LastEditTime: 2023-05-12 13:41:20
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
import Vue from 'vue'
 | 
					import Vue from 'vue'
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,7 +2,7 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-08-24 11:19:43
 | 
					 * @Date: 2022-08-24 11:19:43
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @LastEditTime: 2023-04-18 14:28:38
 | 
					 * @LastEditTime: 2023-05-16 14:55:04
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
@@ -51,7 +51,7 @@ export default {
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(() => {
 | 
					        .catch(() => {
 | 
				
			||||||
          this.dataListLoading = false;
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
        });
 | 
					        })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 每页数
 | 
					    // 每页数
 | 
				
			||||||
    sizeChangeHandle(val) {
 | 
					    sizeChangeHandle(val) {
 | 
				
			||||||
@@ -103,12 +103,16 @@ export default {
 | 
				
			|||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else if (val.type === "delete") { 
 | 
					      } else if (val.type === "delete") { 
 | 
				
			||||||
        this.deleteHandle(val.data.id,val.data.name)
 | 
					        this.deleteHandle(val.data.id, val.data.name,val.data._pageIndex)
 | 
				
			||||||
 | 
					      } else if (val.type === "change") {
 | 
				
			||||||
 | 
					        this.changeStatus(val.data.id)
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.otherMethods(val)
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 删除 
 | 
					    // 删除 
 | 
				
			||||||
    deleteHandle(id, name) {
 | 
					    deleteHandle(id, name,index) {
 | 
				
			||||||
      this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
 | 
					      this.$confirm(`确定对${name?'[名称='+name+']':'[序号='+index+']'}进行删除操作?`, "提示", {
 | 
				
			||||||
        confirmButtonText: "确定",
 | 
					        confirmButtonText: "确定",
 | 
				
			||||||
        cancelButtonText: "取消",
 | 
					        cancelButtonText: "取消",
 | 
				
			||||||
        type: "warning",
 | 
					        type: "warning",
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,8 +1,8 @@
 | 
				
			|||||||
/*
 | 
					/*
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-06 10:13:07
 | 
					 * @Date: 2023-01-06 10:13:07
 | 
				
			||||||
 * @LastEditTime: 2023-02-22 16:52:30
 | 
					 * @LastEditTime: 2023-05-12 12:42:15
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
import axios from 'axios'
 | 
					import axios from 'axios'
 | 
				
			||||||
@@ -23,7 +23,11 @@ const http = axios.create({
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
http.interceptors.request.use(config => {
 | 
					http.interceptors.request.use(config => {
 | 
				
			||||||
  config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' 
 | 
					  config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN' 
 | 
				
			||||||
  config.headers['token'] = Cookies.get('token') || ''
 | 
					  if (config.url === "/login") {
 | 
				
			||||||
 | 
					    config.headers['token'] = ''
 | 
				
			||||||
 | 
					  } else {
 | 
				
			||||||
 | 
					    config.headers['token'] = Cookies.get('token') || ''
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  // 默认参数
 | 
					  // 默认参数
 | 
				
			||||||
  var defaults = {}
 | 
					  var defaults = {}
 | 
				
			||||||
  // 防止缓存,GET请求默认带_t参数
 | 
					  // 防止缓存,GET请求默认带_t参数
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,47 +2,85 @@
 | 
				
			|||||||
 * @Author: zwq
 | 
					 * @Author: zwq
 | 
				
			||||||
 * @Date: 2022-08-22 14:57:51
 | 
					 * @Date: 2022-08-22 14:57:51
 | 
				
			||||||
 * @LastEditors: zwq
 | 
					 * @LastEditors: zwq
 | 
				
			||||||
 * @LastEditTime: 2023-01-06 09:44:17
 | 
					 * @LastEditTime: 2023-05-12 12:46:50
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
 | 
					  <nav 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:;">{{ $t('brand.lg') }}</a>
 | 
					        <a class="aui-navbar__brand-lg" href="javascript:;">{{ $t("brand.lg") }}</a>
 | 
				
			||||||
        <a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</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 index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
 | 
					        <el-menu-item index="1" @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></svg>
 | 
					          <svg
 | 
				
			||||||
 | 
					            class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
 | 
				
			||||||
 | 
					            aria-hidden="true"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            <use xlink:href="#icon-outdent"></use>
 | 
				
			||||||
 | 
					          </svg>
 | 
				
			||||||
        </el-menu-item>
 | 
					        </el-menu-item>
 | 
				
			||||||
        <el-menu-item index="2" @click="refresh()">
 | 
					        <el-menu-item index="2" @click="refresh()">
 | 
				
			||||||
          <svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
 | 
					          <svg
 | 
				
			||||||
 | 
					            class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh"
 | 
				
			||||||
 | 
					            aria-hidden="true"
 | 
				
			||||||
 | 
					          >
 | 
				
			||||||
 | 
					            <use xlink:href="#icon-sync"></use>
 | 
				
			||||||
 | 
					          </svg>
 | 
				
			||||||
        </el-menu-item>
 | 
					        </el-menu-item>
 | 
				
			||||||
      </el-menu>
 | 
					      </el-menu>
 | 
				
			||||||
      <el-menu class="aui-navbar__menu" mode="horizontal">
 | 
					      <el-menu class="aui-navbar__menu" mode="horizontal">
 | 
				
			||||||
        <el-menu-item index="6"  @click="$router.push({ name: 'home' })">
 | 
					         
 | 
				
			||||||
          <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
 | 
					        <el-menu-item index="6" @click="$router.push({ name: 'home' })">
 | 
				
			||||||
 | 
					          <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
				
			||||||
 | 
					            <use xlink:href="#icon-home"></use>
 | 
				
			||||||
 | 
					          </svg>
 | 
				
			||||||
 | 
					        </el-menu-item>
 | 
				
			||||||
 | 
					        <el-menu-item index="7">
 | 
				
			||||||
 | 
					          <el-dropdown trigger="click" class="international" @command="handleSetLanguage">
 | 
				
			||||||
 | 
					            <div>
 | 
				
			||||||
 | 
					              <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
				
			||||||
 | 
					                <use xlink:href="#中英"></use>
 | 
				
			||||||
 | 
					              </svg>
 | 
				
			||||||
 | 
					            </div>
 | 
				
			||||||
 | 
					            <el-dropdown-menu slot="dropdown">
 | 
				
			||||||
 | 
					              <el-dropdown-item :disabled="language === 'zh-CN'" command="zh-CN">
 | 
				
			||||||
 | 
					                中文
 | 
				
			||||||
 | 
					              </el-dropdown-item>
 | 
				
			||||||
 | 
					              <el-dropdown-item :disabled="language === 'en'" command="en">
 | 
				
			||||||
 | 
					                English
 | 
				
			||||||
 | 
					              </el-dropdown-item>
 | 
				
			||||||
 | 
					            </el-dropdown-menu>
 | 
				
			||||||
 | 
					          </el-dropdown>
 | 
				
			||||||
        </el-menu-item>
 | 
					        </el-menu-item>
 | 
				
			||||||
        <el-menu-item index="4" @click="fullscreenHandle()">
 | 
					        <el-menu-item index="4" @click="fullscreenHandle()">
 | 
				
			||||||
          <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
 | 
					          <svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
 | 
				
			||||||
 | 
					            <use xlink:href="#icon-fullscreen"></use>
 | 
				
			||||||
 | 
					          </svg>
 | 
				
			||||||
        </el-menu-item>
 | 
					        </el-menu-item>
 | 
				
			||||||
        <el-menu-item index="5" class="aui-navbar__avatar">
 | 
					        <el-menu-item index="5" class="aui-navbar__avatar">
 | 
				
			||||||
          <el-dropdown placement="bottom" :show-timeout="0">
 | 
					          <el-dropdown placement="bottom" :show-timeout="0">
 | 
				
			||||||
            <span class="el-dropdown-link">
 | 
					            <span class="el-dropdown-link">
 | 
				
			||||||
              <img src="~@/assets/img/avatar.png">
 | 
					              <img src="~@/assets/img/avatar.png" />
 | 
				
			||||||
              <span>{{ $store.state.user.name }}</span>
 | 
					              <span>{{ $store.state.user.name }}</span>
 | 
				
			||||||
              <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()">
 | 
				
			||||||
                <svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#修改密码"></use></svg>
 | 
					                <svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
 | 
				
			||||||
                {{ $t('updatePassword.title') }}</el-dropdown-item>
 | 
					                  <use xlink:href="#修改密码"></use>
 | 
				
			||||||
 | 
					                </svg>
 | 
				
			||||||
 | 
					                {{ $t("updatePassword.title") }}</el-dropdown-item
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
              <el-dropdown-item @click.native="logoutHandle()">
 | 
					              <el-dropdown-item @click.native="logoutHandle()">
 | 
				
			||||||
                <svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#tuichu"></use></svg>
 | 
					                <svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
 | 
				
			||||||
                {{ $t('logout') }}</el-dropdown-item>
 | 
					                  <use xlink:href="#tuichu"></use>
 | 
				
			||||||
 | 
					                </svg>
 | 
				
			||||||
 | 
					                {{ $t("logout") }}</el-dropdown-item
 | 
				
			||||||
 | 
					              >
 | 
				
			||||||
            </el-dropdown-menu>
 | 
					            </el-dropdown-menu>
 | 
				
			||||||
          </el-dropdown>
 | 
					          </el-dropdown>
 | 
				
			||||||
        </el-menu-item>
 | 
					        </el-menu-item>
 | 
				
			||||||
@@ -53,55 +91,77 @@
 | 
				
			|||||||
  </nav>
 | 
					  </nav>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import screenfull from 'screenfull'
 | 
					import screenfull from "screenfull";
 | 
				
			||||||
import UpdatePassword from './main-navbar-update-password'
 | 
					import UpdatePassword from "./main-navbar-update-password";
 | 
				
			||||||
import { clearLoginInfo } from '@/utils'
 | 
					import { clearLoginInfo } from "@/utils"; 
 | 
				
			||||||
 | 
					import { messages } from '@/i18n'
 | 
				
			||||||
 | 
					import Cookies from "js-cookie";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  inject: ['refresh'],
 | 
					  inject: ["refresh"],
 | 
				
			||||||
  data () {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      updatePasswordVisible: false,
 | 
					      updatePasswordVisible: false,
 | 
				
			||||||
      messageTip: false
 | 
					      messageTip: false,
 | 
				
			||||||
    }
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    UpdatePassword
 | 
					    UpdatePassword,
 | 
				
			||||||
 | 
					  }, 
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    language() {
 | 
				
			||||||
 | 
					      return Cookies.get("language");
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: { 
 | 
					  methods: { 
 | 
				
			||||||
 | 
					    handleSetLanguage(val) {
 | 
				
			||||||
 | 
					      Cookies.set("language", val);
 | 
				
			||||||
 | 
					      document.querySelector("html").setAttribute("lang", val);
 | 
				
			||||||
 | 
					      document.title = messages[val].brand.lg;
 | 
				
			||||||
 | 
					      window.location.reload();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    // 全屏
 | 
					    // 全屏
 | 
				
			||||||
    fullscreenHandle () {
 | 
					    fullscreenHandle() {
 | 
				
			||||||
      if (!screenfull.enabled) {
 | 
					      if (!screenfull.enabled) {
 | 
				
			||||||
        return this.$message({
 | 
					        return this.$message({
 | 
				
			||||||
          message: this.$t('fullscreen.prompt'),
 | 
					          message: this.$t("fullscreen.prompt"),
 | 
				
			||||||
          type: 'warning',
 | 
					          type: "warning",
 | 
				
			||||||
          duration: 500
 | 
					          duration: 500,
 | 
				
			||||||
        })
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      screenfull.toggle()
 | 
					      screenfull.toggle();
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 修改密码
 | 
					    // 修改密码
 | 
				
			||||||
    updatePasswordHandle () {
 | 
					    updatePasswordHandle() {
 | 
				
			||||||
      this.updatePasswordVisible = true
 | 
					      this.updatePasswordVisible = true;
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
        this.$refs.updatePassword.init()
 | 
					        this.$refs.updatePassword.init();
 | 
				
			||||||
      })
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 退出
 | 
					    // 退出
 | 
				
			||||||
    logoutHandle () {
 | 
					    logoutHandle() {
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {
 | 
					      this.$confirm(
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
					        this.$t("prompt.info", { handle: this.$t("logout") }),
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
					        this.$t("prompt.title"),
 | 
				
			||||||
        type: 'warning'
 | 
					        {
 | 
				
			||||||
      }).then(() => {
 | 
					          confirmButtonText: this.$t("confirm"),
 | 
				
			||||||
        this.$http.post('/logout').then(({ data: res }) => {
 | 
					          cancelButtonText: this.$t("cancel"),
 | 
				
			||||||
          if (res.code !== 0) {
 | 
					          type: "warning",
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
					        }
 | 
				
			||||||
          }
 | 
					      )
 | 
				
			||||||
          clearLoginInfo()
 | 
					        .then(() => {
 | 
				
			||||||
          this.$router.push({ name: 'login' })
 | 
					          this.$http
 | 
				
			||||||
        }).catch(() => {})
 | 
					            .post("/logout")
 | 
				
			||||||
      }).catch(() => {})
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
    }
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
  }
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
}
 | 
					              }
 | 
				
			||||||
 | 
					              clearLoginInfo();
 | 
				
			||||||
 | 
					              this.$router.push({ name: "login" });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-31 09:49:36
 | 
					 * @Date: 2023-01-31 09:49:36
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 14:56:08
 | 
					 * @LastEditTime: 2023-05-17 15:00:50
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -44,11 +44,11 @@ export default {
 | 
				
			|||||||
            type: "success",
 | 
					            type: "success",
 | 
				
			||||||
            duration: 1500,
 | 
					            duration: 1500,
 | 
				
			||||||
            onClose: () => {
 | 
					            onClose: () => {
 | 
				
			||||||
              this.getDataList();
 | 
					              this.$message.error(data.msg);
 | 
				
			||||||
            },
 | 
					            },
 | 
				
			||||||
          });
 | 
					          });
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
          this.$message.error(data.msg);
 | 
					          this.$message.error(data.msg)
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      });
 | 
					      });
 | 
				
			||||||
      // 路由参数
 | 
					      // 路由参数
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-02-14 15:02:26
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 * @LastEditTime: 2023-05-10 14:17:09
 | 
					 * @LastEditTime: 2023-05-17 14:21:45
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -87,8 +87,7 @@
 | 
				
			|||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
					    <el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
				
			||||||
      <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
					      <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
				
			||||||
        <el-option v-for="item in departmentList" :key="item.id" :label="item.name"
 | 
					        <el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
          :value="item.id">
 | 
					 | 
				
			||||||
        </el-option>
 | 
					        </el-option>
 | 
				
			||||||
      </el-select>
 | 
					      </el-select>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
@@ -96,8 +95,8 @@
 | 
				
			|||||||
      <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
					      <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
				
			||||||
      </el-input>
 | 
					      </el-input>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="recipientName" :label="$t('gage.recipientName')">
 | 
					    <el-form-item prop="recipient" :label="$t('gage.recipientName')">
 | 
				
			||||||
      <el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
 | 
					      <el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
 | 
				
			||||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
					        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
				
			||||||
        </el-option>
 | 
					        </el-option>
 | 
				
			||||||
      </el-select>
 | 
					      </el-select>
 | 
				
			||||||
@@ -209,7 +208,7 @@ export default {
 | 
				
			|||||||
      ],
 | 
					      ],
 | 
				
			||||||
      visible: false,
 | 
					      visible: false,
 | 
				
			||||||
      dataForm: {
 | 
					      dataForm: {
 | 
				
			||||||
        belongPerson:null,
 | 
					        belongPerson:'1067246875800000001',
 | 
				
			||||||
        benchmarkMeasurTool: null,
 | 
					        benchmarkMeasurTool: null,
 | 
				
			||||||
        certificateCode: null,
 | 
					        certificateCode: null,
 | 
				
			||||||
        certificateCodeBh: null,
 | 
					        certificateCodeBh: null,
 | 
				
			||||||
@@ -231,7 +230,7 @@ export default {
 | 
				
			|||||||
        name: null,
 | 
					        name: null,
 | 
				
			||||||
        nextExternalInspectionTime: null,
 | 
					        nextExternalInspectionTime: null,
 | 
				
			||||||
        nextInternalInspectionTime: null,
 | 
					        nextInternalInspectionTime: null,
 | 
				
			||||||
        recipient: null,
 | 
					        recipient: '1067246875800000001',
 | 
				
			||||||
        remark: null,
 | 
					        remark: null,
 | 
				
			||||||
        updateDate: null,
 | 
					        updateDate: null,
 | 
				
			||||||
        useLocation: null,
 | 
					        useLocation: null,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										327
									
								
								src/views/modules/gage/components/gageGrs-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										327
									
								
								src/views/modules/gage/components/gageGrs-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,327 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-12 15:35:59
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="partName" :label="$t('gage.partName')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.partName" :placeholder="$t('gage.partName')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" @change="getGageType">
 | 
				
			||||||
 | 
					        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="corporation" :label="$t('gage.corporation')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.corporation" :placeholder="$t('gage.corporation')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="itemNo" :label="$t('gage.itemNo')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.itemNo" :placeholder="$t('gage.itemNo')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="gageTypeName" :label="$t('gage.gageTypeName')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.gageTypeName" :placeholder="$t('gage.gageTypeName')" disabled>
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="partNumber" :label="$t('gage.partNumber')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.partNumber" :placeholder="$t('gage.partNumber')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="specification" :label="$t('gage.specification')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.specification" :placeholder="$t('gage.specification')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')"
 | 
				
			||||||
 | 
					        disabled>
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="process" :label="$t('gage.process')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.process" :placeholder="$t('gage.process')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measurementNumber" :label="$t('gage.measurementNumber')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.measurementNumber" :placeholder="$t('gage.measurementNumber')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="fabrication" :label="$t('gage.fabrication')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.fabrication" :placeholder="$t('gage.fabrication')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="publicErrand" :label="$t('gage.publicErrand')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.publicErrand" :placeholder="$t('gage.publicErrand')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="tester" :label="$t('gage.tester')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.tester" :placeholder="$t('gage.tester')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="precisionDecimalPlace" :label="$t('gage.precisionDecimalPlace')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.precisionDecimalPlace" :placeholder="$t('gage.precisionDecimalPlace')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measurementTime" :label="$t('gage.measurementTime')">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.measurementTime" type="datetime" :placeholder="$t('gage.measurementTime')"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/gage/qmsGage",
 | 
				
			||||||
 | 
					        infoURL: "/gage/qmsGage/{ id }",
 | 
				
			||||||
 | 
					        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
				
			||||||
 | 
					        getUserList: '/sys/user/page',
 | 
				
			||||||
 | 
					        getGageTypeList: '/gage/qmsGageType/page',
 | 
				
			||||||
 | 
					        getGageList: '/gage/qmsGage/page',
 | 
				
			||||||
 | 
					        getCustomerListURL: '/basic/qmsCustomer/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      customerList:[],
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      processList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '未审核'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '不同意'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '同意'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        page: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageStatusList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name:'在用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '备用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '停用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: '封存'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 4,
 | 
				
			||||||
 | 
					          name: '报废'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 5,
 | 
				
			||||||
 | 
					          name: '降级使用'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      certificateTypeList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '检定证书'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '校准证书'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '检测报告'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: '自校报告'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        connection:null,
 | 
				
			||||||
 | 
					        corporation: null,	
 | 
				
			||||||
 | 
					        fabrication: null,	
 | 
				
			||||||
 | 
					        gageId: null,
 | 
				
			||||||
 | 
					        gageName: null,
 | 
				
			||||||
 | 
					        gageTypeName: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        itemNo: null,
 | 
				
			||||||
 | 
					        measurementNumber: null,
 | 
				
			||||||
 | 
					        measurementTime: null,
 | 
				
			||||||
 | 
					        measuringToolAccuracy: null,
 | 
				
			||||||
 | 
					        measuringToolSpecification: null,
 | 
				
			||||||
 | 
					        partName: null,
 | 
				
			||||||
 | 
					        partNumber: null,
 | 
				
			||||||
 | 
					        precisionDecimalPlace: null,
 | 
				
			||||||
 | 
					        process: null,
 | 
				
			||||||
 | 
					        publicErrand: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					        specification: null,
 | 
				
			||||||
 | 
					        tester: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getGageType() {
 | 
				
			||||||
 | 
					      this.gageList.forEach(ele => {
 | 
				
			||||||
 | 
					        if (val === ele.id) {
 | 
				
			||||||
 | 
					          this.dataForm.gageTypeName = ele.gageTypeName
 | 
				
			||||||
 | 
					          this.dataForm.measuringToolSpecification = ele.measuringToolSpecification
 | 
				
			||||||
 | 
					          this.dataForm.measuringToolAccuracy = ele.measuringToolAccuracy
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http.get(this.urlOptions.getGageList, {
 | 
				
			||||||
 | 
					          params: this.listQuery,
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data)
 | 
				
			||||||
 | 
					            this.gageList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserList, this.listQuery)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.userList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/gage/qmsGage/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-02-14 15:02:26
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 * @LastEditTime: 2023-05-08 10:34:55
 | 
					 * @LastEditTime: 2023-05-17 14:40:50
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -129,7 +129,9 @@ export default {
 | 
				
			|||||||
      //   .catch(() => {
 | 
					      //   .catch(() => {
 | 
				
			||||||
      //   });
 | 
					      //   });
 | 
				
			||||||
      this.$http
 | 
					      this.$http
 | 
				
			||||||
        .get(this.urlOptions.getGageListURL, this.listQuery)
 | 
					        .get(this.urlOptions.getGageListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
        .then(({ data: res }) => {
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
          if (res.code === 0) {
 | 
					          if (res.code === 0) {
 | 
				
			||||||
            console.log(res.data);
 | 
					            console.log(res.data);
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,221 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-17 14:50:02
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="code" :label="$t('gage.code')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.code" :placeholder="$t('gage.code')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="name" :label="$t('gage.name')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.name" :placeholder="$t('gage.name')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="decimalDigits" :label="$t('gage.decimalDigits')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.decimalDigits" :placeholder="$t('gage.decimalDigits')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="lsl" :label="$t('gage.lsl')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.lsl" :placeholder="$t('gage.lsl')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="serialNo" :label="$t('gage.serialNo')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.serialNo" :placeholder="$t('gage.serialNo')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="sl" :label="$t('gage.sl')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.sl" :placeholder="$t('gage.sl')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="usl" :label="$t('gage.usl')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.usl" :placeholder="$t('gage.usl')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="gageTypeId" :label="$t('gage.gageTypeName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.gageTypeId" :placeholder="$t('gage.gageTypeName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in gageTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/gage/qmsGageType",
 | 
				
			||||||
 | 
					        infoURL: "/gage/qmsGageType/{ id }",
 | 
				
			||||||
 | 
					        // getGageListURL: '/gage/qmsGage/page',
 | 
				
			||||||
 | 
					        getGageTypeListURL: '/gage/qmsGageType/page',
 | 
				
			||||||
 | 
					        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
				
			||||||
 | 
					        // getProductURL: '/basic/qmsProduct/gape',
 | 
				
			||||||
 | 
					        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      // supplierList:[],
 | 
				
			||||||
 | 
					      // productList:[],
 | 
				
			||||||
 | 
					      // typeList: [],
 | 
				
			||||||
 | 
					      // teamList:[],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        gape: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      measurementTypeList: [{
 | 
				
			||||||
 | 
					        id: 0,
 | 
				
			||||||
 | 
					        name: '计量'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        id: 1,
 | 
				
			||||||
 | 
					        name: '计数'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        decimalDigits:null,	
 | 
				
			||||||
 | 
					        gageTypeId: null,
 | 
				
			||||||
 | 
					        lsl: null,
 | 
				
			||||||
 | 
					        name: null,
 | 
				
			||||||
 | 
					        serialNo: null,
 | 
				
			||||||
 | 
					        sl: null,
 | 
				
			||||||
 | 
					        updateDate: null,
 | 
				
			||||||
 | 
					        usl: null,	
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      // this.$http
 | 
				
			||||||
 | 
					      //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
				
			||||||
 | 
					      //   .then(({ data: res }) => {
 | 
				
			||||||
 | 
					      //     if (res.code === 0) {
 | 
				
			||||||
 | 
					      //       console.log(res.data);
 | 
				
			||||||
 | 
					      //       this.typeList = res.data.list
 | 
				
			||||||
 | 
					      //     }
 | 
				
			||||||
 | 
					      //   })
 | 
				
			||||||
 | 
					      //   .catch(() => {
 | 
				
			||||||
 | 
					      //   });
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageTypeListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.gageTypeList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/gage/qmsGageTypeDifferenceParameter/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -49,8 +49,8 @@
 | 
				
			|||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="parityBit" :label="$t('gage.parityBit')">
 | 
					    <el-form-item prop="parityBit" :label="$t('gage.parityBit')">
 | 
				
			||||||
      <el-radio-group v-model="dataForm.parityBit">
 | 
					      <el-radio-group v-model="dataForm.parityBit">
 | 
				
			||||||
        <el-radio :label="0">内部校验</el-radio>
 | 
					        <el-radio :label="0">{{ $t('gage.outsideVerify') }}</el-radio>
 | 
				
			||||||
        <el-radio :label="1">外部校验</el-radio>
 | 
					        <el-radio :label="1"> {{ $t('gage.outsideVerify') }}</el-radio>
 | 
				
			||||||
      </el-radio-group>
 | 
					      </el-radio-group>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="checker" :label="$t('gage.checker')">
 | 
					    <el-form-item prop="checker" :label="$t('gage.checker')">
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										218
									
								
								src/views/modules/gage/components/parameter-show.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										218
									
								
								src/views/modules/gage/components/parameter-show.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,218 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2020-12-29 16:37:56
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-22 15:24:00
 | 
				
			||||||
 | 
					 * @remark: 报废原因--新增
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-dialog :visible.sync="visible">
 | 
				
			||||||
 | 
					    <el-row :gutter="15">
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <span slot="footer" class="dialog-footer">
 | 
				
			||||||
 | 
					      <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
 | 
				
			||||||
 | 
					      <el-button type="primary" @click="dataFormSubmit()">{{ $t('confirm') }}</el-button>
 | 
				
			||||||
 | 
					    </span>
 | 
				
			||||||
 | 
					    <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
 | 
				
			||||||
 | 
					      @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					      <parameterShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					      </parameterShow-add>
 | 
				
			||||||
 | 
					    </base-dialog>
 | 
				
			||||||
 | 
					  </el-dialog>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// import gage from '@/filters/gage'
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					import parameterShowAdd from './parameterShow-add'
 | 
				
			||||||
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'batchNumber',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.batchTail"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'gageName',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.gageName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'measuringToolAccuracy',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.measuringToolAccuracy"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'parameter',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.parameter"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'price',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.price"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'remark',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.remark"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch, basicAdd],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    parameterShowAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/gage/qmsStationDeviationAnalysis/page",
 | 
				
			||||||
 | 
					        deleteURL: "/gage/qmsStationDeviationAnalysis",
 | 
				
			||||||
 | 
					        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      addOrUpdateVisible:false,
 | 
				
			||||||
 | 
					      showParameterVisible: false,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      addOrEditTitle:'',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    init(id,) {
 | 
				
			||||||
 | 
					      // this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.listQuery.gageResumeId = id 
 | 
				
			||||||
 | 
					        console.log(this.listQuery.gageResumeId)
 | 
				
			||||||
 | 
					        this.getDataList()
 | 
				
			||||||
 | 
					        // this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        // if (this.dataForm.id) {
 | 
				
			||||||
 | 
					        //   this.getInfo()
 | 
				
			||||||
 | 
					        // } else {
 | 
				
			||||||
 | 
					        //   // this.getCode()
 | 
				
			||||||
 | 
					        // }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.page = 1
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = ' 修改'
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init(val.data.id)
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										200
									
								
								src/views/modules/gage/components/parameterShow-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										200
									
								
								src/views/modules/gage/components/parameterShow-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,200 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-22 16:23:33
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.batchNumber" :placeholder="$t('gage.batchTail')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="price" :label="$t('gage.price')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.price" :placeholder="$t('gage.price')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="parameter" :label="$t('gage.parameter')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')" disabled>
 | 
				
			||||||
 | 
					        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/gage/qmsStationDeviationAnalysis",
 | 
				
			||||||
 | 
					        infoURL: "/gage/qmsStationDeviationAnalysis/{ id }",
 | 
				
			||||||
 | 
					        getGageListURL: '/gage/qmsGage/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      parameterList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '基准'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '校验'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        page: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        batchNumber:null,
 | 
				
			||||||
 | 
					        gageId: null,
 | 
				
			||||||
 | 
					        gageResumeId: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        measuringToolAccuracy: null,
 | 
				
			||||||
 | 
					        parameter: null,
 | 
				
			||||||
 | 
					        price: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.gageList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/gage/qmsStationDeviationAnalysis/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,96 +1,134 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-02-14 15:02:26
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 * @LastEditTime: 2023-05-10 13:45:58
 | 
					 * @LastEditTime: 2023-05-18 15:30:28
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
					  <div>
 | 
				
			||||||
    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
					    <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
					      <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
				
			||||||
        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
					        <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
				
			||||||
        </el-option>
 | 
					          <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
      </el-select>
 | 
					          </el-option>
 | 
				
			||||||
    </el-form-item>
 | 
					        </el-select>
 | 
				
			||||||
    <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <!-- <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
 | 
				
			||||||
      <el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
 | 
					      <el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
 | 
				
			||||||
      </el-input>
 | 
					      </el-input>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item>
 | 
				
			||||||
    <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
 | 
					    <el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
 | 
				
			||||||
      <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
 | 
					      <el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
 | 
				
			||||||
      </el-input>
 | 
					      </el-input>
 | 
				
			||||||
    </el-form-item>
 | 
					    </el-form-item> -->
 | 
				
			||||||
    <el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
 | 
					      <el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
 | 
				
			||||||
      <el-select v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
 | 
					        <el-select @change="changeShow" v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
 | 
				
			||||||
        <el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
 | 
					          <el-option v-for="item in eventList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
        </el-option>
 | 
					          </el-option>
 | 
				
			||||||
      </el-select>
 | 
					        </el-select>
 | 
				
			||||||
    </el-form-item>
 | 
					        <el-tooltip class="item" effect="dark" :content="$t('gage.tips')" placement="top">
 | 
				
			||||||
    <el-form-item prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
					          <i class="el-icon-warning"></i>
 | 
				
			||||||
      <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
					        </el-tooltip>
 | 
				
			||||||
        <el-option v-for="item in departmentList" :key="item.id" :label="item.name"
 | 
					      </el-form-item>
 | 
				
			||||||
          :value="item.id">
 | 
					      <el-form-item v-if="receiveShow || returnShow || maintainShow || transferShow || detectionShow"
 | 
				
			||||||
        </el-option>
 | 
					        prop="userDepartment" :label="$t('gage.userDepartment')">
 | 
				
			||||||
      </el-select>
 | 
					        <el-select v-model="dataForm.userDepartment" :placeholder="$t('gage.userDepartment')">
 | 
				
			||||||
    </el-form-item>
 | 
					          <el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
    <el-form-item prop="useLocation" :label="$t('gage.useLocation')">
 | 
					          </el-option>
 | 
				
			||||||
      <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
					        </el-select>
 | 
				
			||||||
      </el-input>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form-item>
 | 
					      <el-form-item v-if="receiveShow || returnShow || maintainShow" prop="useLocation" :label="$t('gage.useLocation')">
 | 
				
			||||||
    <el-form-item prop="recipientName" :label="$t('gage.recipientName')">
 | 
					        <el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
 | 
				
			||||||
      <el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
 | 
					        </el-input>
 | 
				
			||||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
					      </el-form-item>
 | 
				
			||||||
        </el-option>
 | 
					      <el-form-item v-if="!scrapShow" prop="recipient" :label="$t('gage.recipientName')">
 | 
				
			||||||
      </el-select>
 | 
					        <el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
 | 
				
			||||||
    </el-form-item>
 | 
					          <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
				
			||||||
    <el-form-item prop="processUserName" :label="$t('gage.processUserName')">
 | 
					          </el-option>
 | 
				
			||||||
      <el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
 | 
					        </el-select>
 | 
				
			||||||
        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
					      </el-form-item>
 | 
				
			||||||
        </el-option>
 | 
					      <el-form-item prop="processUserId" :label="$t('gage.processUserName')">
 | 
				
			||||||
      </el-select>
 | 
					        <el-select v-model="dataForm.processUserId" :placeholder="$t('gage.processUserName')">
 | 
				
			||||||
    </el-form-item>
 | 
					          <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
				
			||||||
    <el-form-item prop="process" :label="$t('gage.process')">
 | 
					          </el-option>
 | 
				
			||||||
      <el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
 | 
					        </el-select>
 | 
				
			||||||
        <el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
 | 
					      </el-form-item>
 | 
				
			||||||
        </el-option>
 | 
					      <el-form-item prop="process" :label="$t('gage.process')">
 | 
				
			||||||
      </el-select>
 | 
					        <el-select v-model="dataForm.process" :placeholder="$t('gage.process')">
 | 
				
			||||||
    </el-form-item>
 | 
					          <el-option v-for="item in processList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
    <el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
 | 
					          </el-option>
 | 
				
			||||||
      <el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
 | 
					        </el-select>
 | 
				
			||||||
        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
					      </el-form-item>
 | 
				
			||||||
      </el-date-picker>
 | 
					      <el-form-item v-if="receiveShow || maintainShow || detectionShow" prop="expectedReturnDate"
 | 
				
			||||||
    </el-form-item>
 | 
					        :label="$t('gage.expectedReturnDate')">
 | 
				
			||||||
    <el-form-item prop="transferDate" :label="$t('gage.transferDate')">
 | 
					        <el-date-picker v-model="dataForm.expectedReturnDate" type="datetime"
 | 
				
			||||||
      <el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
 | 
					          :placeholder="$t('gage.expectedReturnDate')" format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
					        </el-date-picker>
 | 
				
			||||||
      </el-date-picker>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form-item>
 | 
					      <el-form-item v-if="transferShow" prop="transferDate" :label="$t('gage.transferDate')">
 | 
				
			||||||
    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
					        <el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
 | 
				
			||||||
      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
					          format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
      </el-input>
 | 
					        </el-date-picker>
 | 
				
			||||||
    </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
  </el-form>
 | 
					      <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
				
			||||||
 | 
					        <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
				
			||||||
 | 
					        </el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					    <el-form v-if="detectionShow && showForm" :model="parameterData" ref="parameterData" label-width="150px">
 | 
				
			||||||
 | 
					      <el-form-item prop="parameter" :label="$t('gage.parameter')">
 | 
				
			||||||
 | 
					        <el-select v-model="dataForm.parameter" :placeholder="$t('gage.parameter')">
 | 
				
			||||||
 | 
					          <el-option v-for="item in parameterList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					          </el-option>
 | 
				
			||||||
 | 
					        </el-select>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item prop="batchNumber" :label="$t('gage.batchTail')">
 | 
				
			||||||
 | 
					        <el-input v-model="parameterData.batchNumber" :placeholder="$t('gage.batchTail')">
 | 
				
			||||||
 | 
					        </el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item prop="measuringToolAccuracy" :label="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					        <el-input v-model="parameterData.measuringToolAccuracy" :placeholder="$t('gage.measuringToolAccuracy')">
 | 
				
			||||||
 | 
					        </el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item prop="price" :label="$t('gage.price')">
 | 
				
			||||||
 | 
					        <el-input v-model="parameterData.price" :placeholder="$t('gage.price')">
 | 
				
			||||||
 | 
					        </el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					      <el-form-item prop="remark" :label="$t('gage.parameterRemark')">
 | 
				
			||||||
 | 
					        <el-input v-model="parameterData.remark" :placeholder="$t('gage.parameterRemark')">
 | 
				
			||||||
 | 
					        </el-input>
 | 
				
			||||||
 | 
					      </el-form-item>
 | 
				
			||||||
 | 
					    </el-form>
 | 
				
			||||||
 | 
					  </div>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import debounce from "lodash/debounce";
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
import basicAdd from "@/mixins/basic-add";
 | 
					// import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicAdd],
 | 
					  // mixins: [basicAdd],
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        submitURL: "/gage/qmsGageResume",
 | 
					        submitURL: "/gage/qmsGageResume",
 | 
				
			||||||
        infoURL: "/gage/qmsGageResume/{ id }",
 | 
					        infoURL: "/gage/qmsGageResume/{ id }",
 | 
				
			||||||
        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
					        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
				
			||||||
        getUserList: '/sys/user/page'
 | 
					        getUserList: '/sys/user/page',
 | 
				
			||||||
        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
					        getGageList: '/gage/qmsGage/page',
 | 
				
			||||||
        // getProductURL: '/basic/qmsProduct/gape',
 | 
					        submitStationDeviationAnalysisURL: '/gage/qmsStationDeviationAnalysis',
 | 
				
			||||||
        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      gageList: [],
 | 
					      gageList: [],
 | 
				
			||||||
      userList:[],
 | 
					      gageResumeList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      showForm:true,
 | 
				
			||||||
 | 
					      receiveShow: false,
 | 
				
			||||||
 | 
					      returnShow: false,
 | 
				
			||||||
 | 
					      scrapShow: false,
 | 
				
			||||||
 | 
					      maintainShow: false,
 | 
				
			||||||
 | 
					      purchaseShow: false,
 | 
				
			||||||
 | 
					      detectionShow: false,
 | 
				
			||||||
 | 
					      transferShow: false,
 | 
				
			||||||
      departmentList: [],
 | 
					      departmentList: [],
 | 
				
			||||||
      processList: [
 | 
					      processList: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -106,18 +144,28 @@ export default {
 | 
				
			|||||||
          name: '同意'
 | 
					          name: '同意'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
 | 
					      parameterList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '基准 '
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '校验'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
      listQuery: {
 | 
					      listQuery: {
 | 
				
			||||||
        limit: 999,
 | 
					        limit: 999,
 | 
				
			||||||
        gape: 1
 | 
					        page: 1
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      eventList: [
 | 
					      eventList: [
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
        id: 0,
 | 
					          id: 0,
 | 
				
			||||||
          name: '领用'
 | 
					          name: '领用'
 | 
				
			||||||
      },
 | 
					        },
 | 
				
			||||||
      {
 | 
					        {
 | 
				
			||||||
        id: 1,
 | 
					          id: 1,
 | 
				
			||||||
        name: '归还'
 | 
					          name: '归还'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          id: 2,
 | 
					          id: 2,
 | 
				
			||||||
@@ -131,18 +179,34 @@ export default {
 | 
				
			|||||||
          id: 4,
 | 
					          id: 4,
 | 
				
			||||||
          name: '量具购买'
 | 
					          name: '量具购买'
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 5,
 | 
				
			||||||
 | 
					          name: '量具检测'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 6,
 | 
				
			||||||
 | 
					          name: '量具转移'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
      ],
 | 
					      ],
 | 
				
			||||||
      visible: false,
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      parameterData: {
 | 
				
			||||||
 | 
					        gageResumeId:null,
 | 
				
			||||||
 | 
					        batchNumber: null,
 | 
				
			||||||
 | 
					        measuringToolAccuracy: null,
 | 
				
			||||||
 | 
					        parameter: null,
 | 
				
			||||||
 | 
					        price: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      dataForm: {
 | 
					      dataForm: {
 | 
				
			||||||
        id: null,
 | 
					        id: null,
 | 
				
			||||||
        expectedReturnDate:null,
 | 
					        expectedReturnDate:null,
 | 
				
			||||||
        gageCode: null,
 | 
					        gageCode: null,
 | 
				
			||||||
        gageId: null,
 | 
					        gageId: '',
 | 
				
			||||||
        measuringToolSpecification:null,
 | 
					        measuringToolSpecification:null,
 | 
				
			||||||
        measurToolEvent: null,
 | 
					        measurToolEvent: null,
 | 
				
			||||||
        process: null,
 | 
					        process: null,
 | 
				
			||||||
        processUserId: null,
 | 
					        processUserId: '1067246875800000001',
 | 
				
			||||||
        recipient: null,
 | 
					        recipient: '1067246875800000001',
 | 
				
			||||||
        remark: null,
 | 
					        remark: null,
 | 
				
			||||||
        transferDate: null,
 | 
					        transferDate: null,
 | 
				
			||||||
        useLocation: null,
 | 
					        useLocation: null,
 | 
				
			||||||
@@ -181,9 +245,80 @@ export default {
 | 
				
			|||||||
  mounted () {
 | 
					  mounted () {
 | 
				
			||||||
    this.getData();
 | 
					    this.getData();
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  destroyed () {
 | 
				
			||||||
 | 
					    this.receiveShow = false
 | 
				
			||||||
 | 
					    this.returnShow = false
 | 
				
			||||||
 | 
					    this.scrapShow = false
 | 
				
			||||||
 | 
					    this.maintainShow = false
 | 
				
			||||||
 | 
					    this.purchaseShow = false
 | 
				
			||||||
 | 
					    this.detectionShow = false
 | 
				
			||||||
 | 
					    this.transferShow = false
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    changeShow(val) {
 | 
				
			||||||
 | 
					      if (val === 0) {
 | 
				
			||||||
 | 
					        this.receiveShow = true
 | 
				
			||||||
 | 
					        this.returnShow = false 
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if(val === 1 ) {
 | 
				
			||||||
 | 
					        this.returnShow = true 
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if (val === 2) {
 | 
				
			||||||
 | 
					        this.scrapShow = true
 | 
				
			||||||
 | 
					        this.returnShow = false
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if (val === 3) {
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.returnShow = false
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = true
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if (val === 4) {
 | 
				
			||||||
 | 
					        this.purchaseShow = true
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.returnShow = false
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if (val === 5) {
 | 
				
			||||||
 | 
					        this.detectionShow = true
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.returnShow = false
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.transferShow = false
 | 
				
			||||||
 | 
					      } else if (val === 6) {
 | 
				
			||||||
 | 
					        this.detectionShow = false
 | 
				
			||||||
 | 
					        this.purchaseShow = false
 | 
				
			||||||
 | 
					        this.scrapShow = false
 | 
				
			||||||
 | 
					        this.returnShow = false
 | 
				
			||||||
 | 
					        this.receiveShow = false
 | 
				
			||||||
 | 
					        this.maintainShow = false
 | 
				
			||||||
 | 
					        this.transferShow = true
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    init(id, ) {
 | 
					    init(id, ) {
 | 
				
			||||||
      this.dataForm.id = id || ""
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      if (id) {
 | 
				
			||||||
 | 
					        this.showForm = false
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      // console.log(11111)
 | 
					      // console.log(11111)
 | 
				
			||||||
      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
@@ -206,7 +341,19 @@ export default {
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(() => {
 | 
					        .catch(() => {
 | 
				
			||||||
        });
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageList, {
 | 
				
			||||||
 | 
					          params: this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.gageList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
      this.$http
 | 
					      this.$http
 | 
				
			||||||
        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
					        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
				
			||||||
        .then(({ data: res }) => {
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
@@ -244,35 +391,79 @@ export default {
 | 
				
			|||||||
        })
 | 
					        })
 | 
				
			||||||
        .catch(() => { })
 | 
					        .catch(() => { })
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    formClear() {
 | 
				
			||||||
 | 
					      this.$refs.dataForm.resetFields()
 | 
				
			||||||
 | 
					      this.tableData = []
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    // 表单提交
 | 
					    // 表单提交
 | 
				
			||||||
    dataFormSubmitHandle: debounce(
 | 
					    dataFormSubmit() {
 | 
				
			||||||
      function () {
 | 
					 | 
				
			||||||
        this.$refs["dataForm"].validate((valid) => {
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
          if (!valid) {
 | 
					          if (!valid) {
 | 
				
			||||||
            return false;
 | 
					            return false;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
					          if (this.dataForm.measurToolEvent === 5) {
 | 
				
			||||||
            .then(({ data: res }) => {
 | 
					            var pattern = /^[0-9]+(_)[0-9]+$/
 | 
				
			||||||
              if (res.code !== 0) {
 | 
					            if (pattern.test(this.parameterData.batchNumber)) {
 | 
				
			||||||
                return this.$message.error(res.msg);
 | 
					              this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
              }
 | 
					                .then(({ data: res }) => {
 | 
				
			||||||
 | 
					                  if (res.code !== 0) {
 | 
				
			||||||
 | 
					                    return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                  this.parameterData.gageResumeId = res.data
 | 
				
			||||||
 | 
					                  this.$http.post(this.urlOptions.submitStationDeviationAnalysisURL, this.parameterData)
 | 
				
			||||||
 | 
					                    .then(({ data: res }) => {
 | 
				
			||||||
 | 
					                      if (res.code !== 0) {
 | 
				
			||||||
 | 
					                        return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					                      }
 | 
				
			||||||
 | 
					                      this.$message({
 | 
				
			||||||
 | 
					                        message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                        type: "success",
 | 
				
			||||||
 | 
					                        duration: 500,
 | 
				
			||||||
 | 
					                        onClose: () => {
 | 
				
			||||||
 | 
					                          this.visible = false;
 | 
				
			||||||
 | 
					                          this.$emit("refreshDataList")
 | 
				
			||||||
 | 
					                        }
 | 
				
			||||||
 | 
					                      })
 | 
				
			||||||
 | 
					                    })
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                  this.$message({
 | 
				
			||||||
 | 
					                    message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                    type: "success",
 | 
				
			||||||
 | 
					                    duration: 500,
 | 
				
			||||||
 | 
					                    onClose: () => {
 | 
				
			||||||
 | 
					                      this.visible = false;
 | 
				
			||||||
 | 
					                      this.$emit("refreshDataList")
 | 
				
			||||||
 | 
					                    }
 | 
				
			||||||
 | 
					                  })
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					                .catch(() => { });
 | 
				
			||||||
 | 
					            } else {
 | 
				
			||||||
              this.$message({
 | 
					              this.$message({
 | 
				
			||||||
                message: this.$t("prompt.success"),
 | 
					                message: this.$t("gage.batchTips"),
 | 
				
			||||||
                type: "success",
 | 
					                type: 'warning',
 | 
				
			||||||
                duration: 500,
 | 
					                duration: 500,
 | 
				
			||||||
                onClose: () => {
 | 
					              })
 | 
				
			||||||
                  console.log(1111);
 | 
					            }
 | 
				
			||||||
                  this.visible = false;
 | 
					          } else { 
 | 
				
			||||||
                  this.$emit("successSubmit");
 | 
					            this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
                },
 | 
					              .then(({ data: res }) => {
 | 
				
			||||||
              });
 | 
					                if (res.code !== 0) {
 | 
				
			||||||
            })
 | 
					                  return this.$message.error(res.msg);
 | 
				
			||||||
            .catch(() => {});
 | 
					                }
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.visible = false;
 | 
				
			||||||
 | 
					                    this.$emit("refreshDataList")
 | 
				
			||||||
 | 
					                  }
 | 
				
			||||||
 | 
					                })
 | 
				
			||||||
 | 
					              })
 | 
				
			||||||
 | 
					              .catch(() => { });
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      1000,
 | 
					 | 
				
			||||||
      { leading: true, trailing: false }
 | 
					 | 
				
			||||||
    ),
 | 
					 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										267
									
								
								src/views/modules/gage/components/verify-show.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										267
									
								
								src/views/modules/gage/components/verify-show.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,267 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2020-12-29 16:37:56
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-23 14:21:48
 | 
				
			||||||
 | 
					 * @remark: 报废原因--新增
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-drawer :title="$t('gage.verifyLog')" :visible.sync="visible" :direction="direction" size="50%"
 | 
				
			||||||
 | 
					    :close-on-press-escape="true">
 | 
				
			||||||
 | 
					    <div class="demo-drawer__content">
 | 
				
			||||||
 | 
					      <el-tabs v-model="tabValue" @tab-click="clickTabs" :tab-position="tabPosition" style="height: 200px;">
 | 
				
			||||||
 | 
					        <el-tab-pane name="0" :label="$t('gage.insideVerify')">
 | 
				
			||||||
 | 
					          <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					          </SearchBar>
 | 
				
			||||||
 | 
					          <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					            <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					              @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					          </base-table>
 | 
				
			||||||
 | 
					          <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					            @pagination="getDataList" />
 | 
				
			||||||
 | 
					        </el-tab-pane>
 | 
				
			||||||
 | 
					        <el-tab-pane name="1" :label="$t('gage.outsideVerify')">
 | 
				
			||||||
 | 
					          <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          </SearchBar>
 | 
				
			||||||
 | 
					          <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					            <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					              @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					          </base-table>
 | 
				
			||||||
 | 
					          <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					            @pagination="getDataList" />
 | 
				
			||||||
 | 
					        </el-tab-pane>
 | 
				
			||||||
 | 
					      </el-tabs>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel" append-to-body
 | 
				
			||||||
 | 
					      @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					      <verifyShow-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					      </verifyShow-add>
 | 
				
			||||||
 | 
					    </base-dialog>
 | 
				
			||||||
 | 
					  </el-drawer>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// import gage from '@/filters/gage'
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					import gage from '@/filters/gage'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import verifyShowAdd from './verifyShow-add'
 | 
				
			||||||
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'client',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.client"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'certificateNo',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.certificateCode"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'gageName',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.gageName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'parityBit',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.parityBit"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: gage('verifyType'),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'inspectionTime',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.inspectionTime"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'calibrationUnit',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.calibrationUnit"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'calibrationDepartment',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.calibrationDepartment"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'checker',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.checker"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'verificationResult',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.verificationResult"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'remark',
 | 
				
			||||||
 | 
					    label: i18n.t("gage.remark"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch, basicAdd],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    verifyShowAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/gage/qmsGageVerification/page",
 | 
				
			||||||
 | 
					        deleteURL: "/gage/qmsGageVerification",
 | 
				
			||||||
 | 
					        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      direction: 'ttb',
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      tabValue: 0,
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      gageId:null,
 | 
				
			||||||
 | 
					      tabPosition:'left',
 | 
				
			||||||
 | 
					      addOrUpdateVisible:false,
 | 
				
			||||||
 | 
					      showParameterVisible: false,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      addOrEditTitle:'',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    handleClose() {
 | 
				
			||||||
 | 
					      this.visible  = true
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    clickTabs(el) {
 | 
				
			||||||
 | 
					      this.listQuery.gageId =this.gageId
 | 
				
			||||||
 | 
					      this.listQuery.parityBit = Number(el.name)
 | 
				
			||||||
 | 
					      this.getDataList()
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    init(id,) {
 | 
				
			||||||
 | 
					      this.gageId = id || ""
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.listQuery.gageId = id ? id : ''
 | 
				
			||||||
 | 
					        this.listQuery.parityBit = Number(this.tabValue)
 | 
				
			||||||
 | 
					        this.getDataList()
 | 
				
			||||||
 | 
					        // this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        // if (this.dataForm.id) {
 | 
				
			||||||
 | 
					        //   this.getInfo()
 | 
				
			||||||
 | 
					        // } else {
 | 
				
			||||||
 | 
					        //   // this.getCode()
 | 
				
			||||||
 | 
					        // }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.page = 1
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = ' 修改'
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init(val.data.id)
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										255
									
								
								src/views/modules/gage/components/verifyShow-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										255
									
								
								src/views/modules/gage/components/verifyShow-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,255 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-22 16:25:01
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="client" :label="$t('gage.client')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.client" :placeholder="$t('gage.client')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="certificateNo" :label="$t('gage.certificateCode')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.certificateNo" :placeholder="$t('gage.certificateCode')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="verificationFee" :label="$t('gage.verificationFee')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.verificationFee" :placeholder="$t('gage.verificationFee')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="measure" :label="$t('gage.measure')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.measure" :placeholder="$t('gage.measure')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in measureList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="gageId" :label="$t('gage.gageName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in gageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="parityBit" :label="$t('gage.parityBit')">
 | 
				
			||||||
 | 
					      <el-radio-group v-model="dataForm.parityBit">
 | 
				
			||||||
 | 
					        <el-radio :label="0">内部校验</el-radio>
 | 
				
			||||||
 | 
					        <el-radio :label="1">外部校验</el-radio>
 | 
				
			||||||
 | 
					      </el-radio-group>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item :label="$t('gage.inspectionTime')" prop="inspectionTime">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.inspectionTime" size="small" type="datetime" format='yyyy-MM-dd HH:mm:ss'
 | 
				
			||||||
 | 
					        valueFormat='yyyy-MM-ddTHH:mm:ss' :placeholder="$t('gage.inspectionTime')" />
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="calibrationUnit" :label="$t('gage.calibrationUnit')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.calibrationUnit" :placeholder="$t('gage.calibrationUnit')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="calibrationDepartment" :label="$t('gage.calibrationDepartment')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.calibrationDepartment" :placeholder="$t('gage.calibrationDepartment')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="checker" :label="$t('gage.checker')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.checker" :placeholder="$t('gage.checker')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in checkerList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="verificationResult" :label="$t('gage.verificationResult')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.verificationResult" :placeholder="$t('gage.verificationResult')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="remark" :label="$t('gage.remark')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.remark" :placeholder="$t('gage.remark')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/gage/qmsGageVerification",
 | 
				
			||||||
 | 
					        infoURL: "/gage/qmsGageVerification/{ id }",
 | 
				
			||||||
 | 
					        getGageListURL: '/gage/qmsGage/page',
 | 
				
			||||||
 | 
					        getUserListURL: '/sys/user/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      checkerList:[],
 | 
				
			||||||
 | 
					      gageTypeList: [],
 | 
				
			||||||
 | 
					      measureList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: 'a'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: 'b'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: 'c'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],  
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      parameterList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '基准'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '校验'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        page: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        batchNumber:null,
 | 
				
			||||||
 | 
					        gageId: null,
 | 
				
			||||||
 | 
					        gageResumeId: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        measuringToolAccuracy: null,
 | 
				
			||||||
 | 
					        parameter: null,
 | 
				
			||||||
 | 
					        price: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageListURL, {
 | 
				
			||||||
 | 
					          params:this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.gageList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.checkerList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/gage/qmsGageVerification/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },  
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-05-10 15:54:33
 | 
					 * @LastEditTime: 2023-05-22 16:40:43
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -42,6 +42,7 @@
 | 
				
			|||||||
          </el-col>
 | 
					          </el-col>
 | 
				
			||||||
        </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </base-dialog>
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <verify-show v-if="verifyShowVisible" ref="verifyShowOrUpdate" @refreshDataList="getDataList" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
@@ -49,6 +50,8 @@
 | 
				
			|||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
import gapeAdd from "./components/gage-add"
 | 
					import gapeAdd from "./components/gage-add"
 | 
				
			||||||
 | 
					import verifyShow from "./components/verify-show"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// import gage from '@/filters/gage'
 | 
					// import gage from '@/filters/gage'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// import AddOrUpdate from './params-add-or-update'
 | 
					// import AddOrUpdate from './params-add-or-update'
 | 
				
			||||||
@@ -149,15 +152,16 @@ const tableBtn = [
 | 
				
			|||||||
    btnName: "删除",
 | 
					    btnName: "删除",
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    type: "parameter",
 | 
					    type: "verify",
 | 
				
			||||||
    btnName: "台差参数",
 | 
					    btnName: "校验",
 | 
				
			||||||
  },
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicPage, basicSearch],
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    gageSearch,
 | 
					    gageSearch,
 | 
				
			||||||
    gapeAdd
 | 
					    gapeAdd,
 | 
				
			||||||
 | 
					    verifyShow
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -168,6 +172,7 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
      tableBtn,
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      verifyShowVisible:false,
 | 
				
			||||||
      searchOrEditTitle: '',
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
      searchOrUpdateVisible: false,
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
@@ -264,36 +269,11 @@ export default {
 | 
				
			|||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
      } else if (val.type === 'parameter') {
 | 
					      } else if (val.type === 'verify') {
 | 
				
			||||||
        this.$router.push({
 | 
					        this.verifyShowVisible = true 
 | 
				
			||||||
          name: 'gage-qmsGageTypeDifferenceParameter',
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          query: {
 | 
					          this.$refs.verifyShowOrUpdate.init(val.data.id)
 | 
				
			||||||
            gageTypeId: val.data.gageTypeId
 | 
					        });
 | 
				
			||||||
          }
 | 
					 | 
				
			||||||
        })
 | 
					 | 
				
			||||||
      } else if (val.type === 'change') {
 | 
					 | 
				
			||||||
        const obj = {
 | 
					 | 
				
			||||||
          id: val.data.id,
 | 
					 | 
				
			||||||
          measurementType: val.data.measurementType,
 | 
					 | 
				
			||||||
          name: val.data.name,
 | 
					 | 
				
			||||||
          code: val.data.code,
 | 
					 | 
				
			||||||
          gageTypeStatus: val.data.gageTypeStatus === 0 ? 1: 0,
 | 
					 | 
				
			||||||
          parentId: val.data.parentId
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
        this.$http.put(this.urlOptions.submitURL, obj)
 | 
					 | 
				
			||||||
          .then(({ data: res }) => {
 | 
					 | 
				
			||||||
            if (res.code !== 0) {
 | 
					 | 
				
			||||||
              return this.$message.error(res.msg);
 | 
					 | 
				
			||||||
            }
 | 
					 | 
				
			||||||
            this.$message({
 | 
					 | 
				
			||||||
              message: this.$t("prompt.success"),
 | 
					 | 
				
			||||||
              type: "success",
 | 
					 | 
				
			||||||
              duration: 500,
 | 
					 | 
				
			||||||
              onClose: () => {
 | 
					 | 
				
			||||||
                this.getDataList()
 | 
					 | 
				
			||||||
              },
 | 
					 | 
				
			||||||
            });
 | 
					 | 
				
			||||||
          })
 | 
					 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-05-11 15:30:11
 | 
					 * @LastEditTime: 2023-05-12 14:29:12
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -22,9 +22,8 @@
 | 
				
			|||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
        <gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
					        <gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
        </gape-add>
 | 
					        </gapeGrs-add>
 | 
				
			||||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
					 | 
				
			||||||
      </base-dialog>
 | 
					      </base-dialog>
 | 
				
			||||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
@@ -48,116 +47,66 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
import gapeAdd from "./components/gage-add"
 | 
					import gapeGrsAdd from "./components/gageGrs-add"
 | 
				
			||||||
// import gage from '@/filters/gage'
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// import AddOrUpdate from './params-add-or-update'
 | 
					 | 
				
			||||||
import gageSearch from "./components/gageSearch"
 | 
					import gageSearch from "./components/gageSearch"
 | 
				
			||||||
// import available from "./components/gageAvailable.vue"
 | 
					 | 
				
			||||||
import basicSearch from "@/mixins/basic-search"
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
import i18n from "@/i18n"
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'client',
 | 
					    prop: 'itemNo',
 | 
				
			||||||
    label: i18n.t("gage.client"),
 | 
					    label: i18n.t("gage.itemNo"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'certificateCode',
 | 
					    prop: 'partName',
 | 
				
			||||||
    label: i18n.t("gage.certificateCode"),
 | 
					    label: i18n.t("gage.partName"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'certificateCodeBh',
 | 
					    prop: 'gageName',
 | 
				
			||||||
    label: i18n.t("gage.certificateCodeBh"),
 | 
					    label: i18n.t("gage.gageName"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'code',
 | 
					    prop: 'specification',
 | 
				
			||||||
    label: i18n.t("gage.code"),
 | 
					    label: i18n.t("gage.measuringToolSpecification"),
 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'name',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.name"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'gageTypeName',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.gageTypeName"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'internalInspectionCycle',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.internalInspectionCycle"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'internalInspectionTime',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.internalInspectionTime"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'nextInternalInspectionTime',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.nextInternalInspectionTime"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'externalInspectionCycle',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.externalInspectionCycle"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'externalInspectionTime',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.externalInspectionTime"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'nextExternalInspectionTime',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.nextExternalInspectionTime"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'description',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.description"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'gageStatus',
 | 
					 | 
				
			||||||
    label: i18n.t("gage.gageStatus"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  // {
 | 
					  // {
 | 
				
			||||||
  //   prop: 'gageStatus',
 | 
					  //   prop: 'measurementTime',
 | 
				
			||||||
  //   label: i18n.t("available"),
 | 
					  //   label: i18n.t("gage.measurementTime"),
 | 
				
			||||||
  //   subcomponent: available,
 | 
					 | 
				
			||||||
  //   align: 'center'
 | 
					  //   align: 'center'
 | 
				
			||||||
  // },
 | 
					  // },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'belongPersonName',
 | 
					    prop: 'measurementTime',
 | 
				
			||||||
    label: i18n.t("gage.belongPersonName"),
 | 
					    label: i18n.t("gage.measurementTime"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
const tableBtn = [
 | 
					const tableBtn = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    type: "edit",
 | 
					    type: "edit",
 | 
				
			||||||
    btnName: "编辑",
 | 
					    btnName: i18n.t("edit"),
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    type: "delete",
 | 
					    type: "delete",
 | 
				
			||||||
    btnName: "删除",
 | 
					    btnName: i18n.t("delete"),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    type: "parameter",
 | 
					    type: "parameter",
 | 
				
			||||||
    btnName: "台差参数",
 | 
					    btnName: i18n.t("parameter"),
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicPage, basicSearch],
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    gageSearch,
 | 
					    gageSearch,
 | 
				
			||||||
    gapeAdd
 | 
					    gapeGrsAdd
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-05-08 11:11:06
 | 
					 * @Date: 2023-05-08 11:11:06
 | 
				
			||||||
 * @LastEditTime: 2023-05-10 16:20:50
 | 
					 * @LastEditTime: 2023-05-23 14:33:55
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -29,30 +29,34 @@
 | 
				
			|||||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
        <gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
					        <gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
				
			||||||
          </gageResume-search>
 | 
					        </gageResume-search>
 | 
				
			||||||
          <el-row slot="footer" type="flex" justify="end">
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
            <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
              <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
                {{ $t("close") }}
 | 
					              {{ $t("close") }}
 | 
				
			||||||
              </el-button>
 | 
					            </el-button>
 | 
				
			||||||
              <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
				
			||||||
                $t("reset")
 | 
					              $t("reset")
 | 
				
			||||||
                }}</el-button>
 | 
					              }}</el-button>
 | 
				
			||||||
              <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
                {{ $t("search") }}
 | 
					              {{ $t("search") }}
 | 
				
			||||||
              </el-button>
 | 
					            </el-button>
 | 
				
			||||||
            </el-col>
 | 
					          </el-col>
 | 
				
			||||||
          </el-row>
 | 
					        </el-row>
 | 
				
			||||||
      </base-dialog>
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <parameter-show v-if="showParameterVisible" ref="showParameterOrUpdate" @refreshDataList="getDataList" />
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </el-card>
 | 
					  </el-card>
 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import parameterShow from './components/parameter-show'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import qmsGageResumeAdd from "./components/qmsGageResume-add"
 | 
					import qmsGageResumeAdd from "./components/qmsGageResume-add"
 | 
				
			||||||
// import gage from '@/filters/gage'
 | 
					// import gage from '@/filters/gage'
 | 
				
			||||||
import { timeFormatter } from '@/filters'
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					import gage from '@/filters/gage'
 | 
				
			||||||
// import AddOrUpdate from './params-add-or-update'
 | 
					// import AddOrUpdate from './params-add-or-update'
 | 
				
			||||||
import gageResumeSearch from "./components/gageResumeSearch"
 | 
					import gageResumeSearch from "./components/gageResumeSearch"
 | 
				
			||||||
// import available from "./components/available.vue"
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
@@ -72,7 +76,8 @@ const tableProps = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'measurToolEvent',
 | 
					    prop: 'measurToolEvent',
 | 
				
			||||||
    label: i18n.t("gage.measurToolEvent"),
 | 
					    label: i18n.t("gage.measurToolEvent"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: gage('eventList')
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'createDate',
 | 
					    prop: 'createDate',
 | 
				
			||||||
@@ -119,13 +124,24 @@ const tableBtn = [
 | 
				
			|||||||
  {
 | 
					  {
 | 
				
			||||||
    type: "parameter",
 | 
					    type: "parameter",
 | 
				
			||||||
    btnName: "台差参数",
 | 
					    btnName: "台差参数",
 | 
				
			||||||
 | 
					    showParam: {
 | 
				
			||||||
 | 
					      type: '&',
 | 
				
			||||||
 | 
					      data: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          name: 'measurToolEvent',
 | 
				
			||||||
 | 
					          type: 'equal',
 | 
				
			||||||
 | 
					          value: 5
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ]
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
];
 | 
					];
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicPage, basicSearch],
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    gageResumeSearch,
 | 
					    gageResumeSearch,
 | 
				
			||||||
    qmsGageResumeAdd
 | 
					    qmsGageResumeAdd,
 | 
				
			||||||
 | 
					    parameterShow
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -136,18 +152,10 @@ export default {
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
      tableBtn,
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      showParameterVisible:false,
 | 
				
			||||||
      searchOrEditTitle: '',
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
      searchOrUpdateVisible: false,
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
      formConfig: [
 | 
					      formConfig: [
 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   type: "",
 | 
					 | 
				
			||||||
        //   label: i18n.t("params.paramCode"),
 | 
					 | 
				
			||||||
        //   placeholder: i18n.t("params.paramCode"),
 | 
					 | 
				
			||||||
        //   param: "paramCode",
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        // {
 | 
					 | 
				
			||||||
        //   type: "separate",
 | 
					 | 
				
			||||||
        // },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          type: "button",
 | 
					          type: "button",
 | 
				
			||||||
          btnName: i18n.t('add'),
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
@@ -226,6 +234,12 @@ export default {
 | 
				
			|||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
 | 
					      } else if (val.type === 'parameter') {
 | 
				
			||||||
 | 
					        this.showParameterVisible = true
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          console.log(Object.prototype.toString.call(val.data.id) )
 | 
				
			||||||
 | 
					          this.$refs.showParameterOrUpdate.init(val.data.id)
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-05-09 15:47:41
 | 
					 * @LastEditTime: 2023-05-23 14:20:48
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-05-08 10:31:11
 | 
					 * @Date: 2023-05-08 10:31:11
 | 
				
			||||||
 * @LastEditTime: 2023-05-09 15:47:26
 | 
					 * @LastEditTime: 2023-05-17 14:41:23
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -22,8 +22,8 @@
 | 
				
			|||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
        <gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
					        <gageTypeDifferenceParameter-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
        </gageType-add>
 | 
					        </gageTypeDifferenceParameter-add>
 | 
				
			||||||
        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
					        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
      </base-dialog>
 | 
					      </base-dialog>
 | 
				
			||||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
@@ -48,7 +48,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
import gageTypeAdd from "./components/gageType-add"
 | 
					import gageTypeDifferenceParameterAdd from "./components/gageTypeDifferenceParameter-add"
 | 
				
			||||||
// import gage from '@/filters/gage'
 | 
					// import gage from '@/filters/gage'
 | 
				
			||||||
import available from "./components/available.vue"
 | 
					import available from "./components/available.vue"
 | 
				
			||||||
import basicSearch from "@/mixins/basic-search"
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
@@ -104,16 +104,20 @@ export default {
 | 
				
			|||||||
  mixins: [basicPage, basicSearch],
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    // failureTypeSearch,
 | 
					    // failureTypeSearch,
 | 
				
			||||||
    gageTypeAdd
 | 
					    gageTypeDifferenceParameterAdd
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      urlOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
 | 
					        getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
 | 
				
			||||||
        deleteURL: "/gage/qmsGageTypeDifferenceParameter",
 | 
					        deleteURL: "/gage/qmsGageTypeDifferenceParameter",
 | 
				
			||||||
        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      tableProps,
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 10,
 | 
				
			||||||
 | 
					        page: 1,
 | 
				
			||||||
 | 
					        gageTypeId: this.$route.query.gageTypeId ? this.$route.query.gageTypeId : null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      tableBtn,
 | 
					      tableBtn,
 | 
				
			||||||
      searchOrEditTitle: '',
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
      searchOrUpdateVisible: false,
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
@@ -145,12 +149,12 @@ export default {
 | 
				
			|||||||
  // components: {
 | 
					  // components: {
 | 
				
			||||||
  //   AddOrUpdate,
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
  // },
 | 
					  // },
 | 
				
			||||||
  mounted() {
 | 
					  // mounted() {
 | 
				
			||||||
    if (this.$route.query) {
 | 
					  //   if (this.$route.query) {
 | 
				
			||||||
      this.listQuery.gageTypeId = this.$route.query.gageTypeId
 | 
					  //     this.listQuery.gageTypeId = this.$route.query.gageTypeId
 | 
				
			||||||
      this.getDataList()
 | 
					  //     this.getDataList()
 | 
				
			||||||
    }
 | 
					  //   }
 | 
				
			||||||
  },
 | 
					  // },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
    //search-bar点击
 | 
					    //search-bar点击
 | 
				
			||||||
    handleProductCancel() {
 | 
					    handleProductCancel() {
 | 
				
			||||||
@@ -208,6 +212,26 @@ export default {
 | 
				
			|||||||
        });
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
 | 
					    getDataList() {
 | 
				
			||||||
 | 
					      this.dataListLoading = true;
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getDataListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery,
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            this.tableData = [];
 | 
				
			||||||
 | 
					            this.listQuery.total = 0;
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.tableData = res.data.list;
 | 
				
			||||||
 | 
					          this.listQuery.total = res.data.total;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    buttonClick(val) {
 | 
					    buttonClick(val) {
 | 
				
			||||||
      switch (val.btnName) {
 | 
					      switch (val.btnName) {
 | 
				
			||||||
        case "search":
 | 
					        case "search":
 | 
				
			||||||
@@ -218,7 +242,7 @@ export default {
 | 
				
			|||||||
        case "export":
 | 
					        case "export":
 | 
				
			||||||
          // this.listQuery.paramCode = val.paramCode;
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
          this.listQuery.page = 1
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
          this.exportHandl();
 | 
					          this.exportHandle();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										347
									
								
								src/views/modules/gage/qmsStationDeviationAnalysis.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										347
									
								
								src/views/modules/gage/qmsStationDeviationAnalysis.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,347 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-17 14:03:17
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					    <el-divider> {{ $t('gage.singleValueAnalysis') }} </el-divider>
 | 
				
			||||||
 | 
					    <div id="priceMain" :style="{width: '100%', height: '500px'}" />
 | 
				
			||||||
 | 
					    <el-divider> {{ $t('gage.stageDifferenceMeanAnalysis') }} </el-divider>
 | 
				
			||||||
 | 
					    <div id="averageStationDifferenceMapMain" :style="{width: '100%', height: '500px'}" />
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// import available from "./components/gageAvailable.vue"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					import * as echarts from 'echarts';
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      averageStationDifferenceMapBatchTail: null,
 | 
				
			||||||
 | 
					      averageStationDifferenceMapChecksums: null,
 | 
				
			||||||
 | 
					      averageStationDifferenceMapDifference: null,
 | 
				
			||||||
 | 
					      averageStationDifferenceMapReference: null,
 | 
				
			||||||
 | 
					      priceBatchTailArr: null,
 | 
				
			||||||
 | 
					      priceChecksumsArr: null,
 | 
				
			||||||
 | 
					      priceDifferenceArr: null,
 | 
				
			||||||
 | 
					      priceReferenceArr: null,
 | 
				
			||||||
 | 
					      myChart:null,
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/gage/qmsStationDeviationAnalysis/analzy",
 | 
				
			||||||
 | 
					        getGageURL: "/gage/qmsGage/page",
 | 
				
			||||||
 | 
					        getGageTypeURL: "/gage/qmsGageType/page",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        pageId: `1`,
 | 
				
			||||||
 | 
					        batchNumber:null,
 | 
				
			||||||
 | 
					        endTime: null,
 | 
				
			||||||
 | 
					        gageTypeId: null,
 | 
				
			||||||
 | 
					        parameter: null,
 | 
				
			||||||
 | 
					        startTime: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'select',
 | 
				
			||||||
 | 
					          label: i18n.t('gage.gageTypeName'),
 | 
				
			||||||
 | 
					          selectOptions: [],
 | 
				
			||||||
 | 
					          param: 'gageTypeId',
 | 
				
			||||||
 | 
					          clearable: true,
 | 
				
			||||||
 | 
					          filterable: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'select',
 | 
				
			||||||
 | 
					          label: i18n.t('gage.gageName'),
 | 
				
			||||||
 | 
					          selectOptions: [],
 | 
				
			||||||
 | 
					          param: 'gageId',
 | 
				
			||||||
 | 
					          clearable: true,
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'select',
 | 
				
			||||||
 | 
					          label: i18n.t('gage.analysisParameter'),
 | 
				
			||||||
 | 
					          selectOptions: [],
 | 
				
			||||||
 | 
					          param: 'parameter',
 | 
				
			||||||
 | 
					          selectOptions: [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              id: 0,
 | 
				
			||||||
 | 
					              name: '基准'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              id: 0,
 | 
				
			||||||
 | 
					              name: '否'
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              id: 1,
 | 
				
			||||||
 | 
					              name: '是'
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          ],
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          clearable: true,
 | 
				
			||||||
 | 
					          filterable: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'input',
 | 
				
			||||||
 | 
					          label: i18n.t('gage.batchTail'),
 | 
				
			||||||
 | 
					          placeholder: i18n.t('gage.batchTail'),
 | 
				
			||||||
 | 
					          param: 'batchNumber'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: 'datePicker',
 | 
				
			||||||
 | 
					          label: i18n.t('gage.inspectionTime'),
 | 
				
			||||||
 | 
					          dateType: 'datetimerange',
 | 
				
			||||||
 | 
					          format: 'yyyy-MM-dd HH:mm:ss',
 | 
				
			||||||
 | 
					          valueFormat: 'yyyy-MM-ddTHH:mm:ss',
 | 
				
			||||||
 | 
					          rangeSeparator: '-',
 | 
				
			||||||
 | 
					          startPlaceholder: '开始时间',
 | 
				
			||||||
 | 
					          endPlaceholder: '结束时间',
 | 
				
			||||||
 | 
					          param: 'timeSlot',
 | 
				
			||||||
 | 
					          width: 350
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('export'),
 | 
				
			||||||
 | 
					          name: "export",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData()
 | 
				
			||||||
 | 
					    this.getDict()
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getDict() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page:1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            this.formConfig[1].selectOptions = res.data.list 
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageTypeURL, {
 | 
				
			||||||
 | 
					          params: {
 | 
				
			||||||
 | 
					            limit: 999,
 | 
				
			||||||
 | 
					            page: 1
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            this.formConfig[0].selectOptions = res.data.list 
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getDataListURL, {
 | 
				
			||||||
 | 
					          params: this.listQuery,
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          this.dataListLoading = false;
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            let averageStationDifferenceMapBatchTail = []
 | 
				
			||||||
 | 
					            let averageStationDifferenceMapChecksums = []
 | 
				
			||||||
 | 
					            let averageStationDifferenceMapDifference = []
 | 
				
			||||||
 | 
					            let averageStationDifferenceMapReference = []
 | 
				
			||||||
 | 
					            let priceBatchTailArr = []
 | 
				
			||||||
 | 
					            let priceChecksumsArr = []
 | 
				
			||||||
 | 
					            let priceDifferenceArr = []
 | 
				
			||||||
 | 
					            let priceReferenceArr = []
 | 
				
			||||||
 | 
					            for (let i in res.data.averageStationDifferenceMap) {
 | 
				
			||||||
 | 
					              averageStationDifferenceMapBatchTail.push(i)
 | 
				
			||||||
 | 
					              averageStationDifferenceMapChecksums.push(res.data.averageStationDifferenceMap[i].checksums)
 | 
				
			||||||
 | 
					              averageStationDifferenceMapDifference.push(res.data.averageStationDifferenceMap[i].difference)
 | 
				
			||||||
 | 
					              averageStationDifferenceMapReference.push(res.data.averageStationDifferenceMap[i].reference)
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            for (let i in res.data.price) {
 | 
				
			||||||
 | 
					              res.data.price[i].forEach(ele => {
 | 
				
			||||||
 | 
					                priceBatchTailArr.push(i + '_' + ele.batchTail)
 | 
				
			||||||
 | 
					                priceChecksumsArr.push(ele.checksums)
 | 
				
			||||||
 | 
					                priceDifferenceArr.push(ele.difference)
 | 
				
			||||||
 | 
					                priceReferenceArr.push(ele.reference)
 | 
				
			||||||
 | 
					              })
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					            this.averageStationDifferenceMapBatchTail =  averageStationDifferenceMapBatchTail
 | 
				
			||||||
 | 
					            this.averageStationDifferenceMapChecksums = averageStationDifferenceMapChecksums
 | 
				
			||||||
 | 
					            this.averageStationDifferenceMapDifference = averageStationDifferenceMapDifference
 | 
				
			||||||
 | 
					            this.averageStationDifferenceMapReference = averageStationDifferenceMapReference
 | 
				
			||||||
 | 
					            this.priceBatchTailArr = priceBatchTailArr
 | 
				
			||||||
 | 
					            this.priceChecksumsArr = priceChecksumsArr
 | 
				
			||||||
 | 
					            this.priceDifferenceArr = priceDifferenceArr
 | 
				
			||||||
 | 
					            this.priceReferenceArr = priceReferenceArr
 | 
				
			||||||
 | 
					            this.priceLineCharts()
 | 
				
			||||||
 | 
					            this.averageStationDifferenceMapLineCharts()
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    priceLineCharts() {
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById('priceMain');
 | 
				
			||||||
 | 
					      var myChart = echarts.init(chartDom)
 | 
				
			||||||
 | 
					      this.myChart = myChart
 | 
				
			||||||
 | 
					      var option;
 | 
				
			||||||
 | 
					      // myChart.on('click', function (params) {
 | 
				
			||||||
 | 
					      //   console.log(params);
 | 
				
			||||||
 | 
					      // });
 | 
				
			||||||
 | 
					      myChart.on('click', 'xAxis.category', function (params) {
 | 
				
			||||||
 | 
					        console.log(params);
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					      option = {
 | 
				
			||||||
 | 
					        title: {
 | 
				
			||||||
 | 
					          text: i18n.t('gage.contrastiveAnalysis')
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'axis'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        legend: {
 | 
				
			||||||
 | 
					          data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: '3%',
 | 
				
			||||||
 | 
					          right: '4%',
 | 
				
			||||||
 | 
					          bottom: '3%',
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          data: this.priceBatchTailArr,
 | 
				
			||||||
 | 
					          type: 'category',
 | 
				
			||||||
 | 
					          axisLabel: {
 | 
				
			||||||
 | 
					            clickable: true
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          silent: false,
 | 
				
			||||||
 | 
					          triggerEvent: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: 'value'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(基准)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.priceReferenceArr
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(校验)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.priceChecksumsArr
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(台差)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.priceDifferenceArr
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      option && myChart.setOption(option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    averageStationDifferenceMapLineCharts() {
 | 
				
			||||||
 | 
					      var chartDom = document.getElementById('averageStationDifferenceMapMain');
 | 
				
			||||||
 | 
					      var myChart = echarts.init(chartDom);
 | 
				
			||||||
 | 
					      var option;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      option = {
 | 
				
			||||||
 | 
					        title: {
 | 
				
			||||||
 | 
					          text: i18n.t('gage.contrastiveAnalysis')
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        tooltip: {
 | 
				
			||||||
 | 
					          trigger: 'axis'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        legend: {
 | 
				
			||||||
 | 
					          data: ['大流量(基准)', '大流量(校验)', '大流量(台差)']
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        grid: {
 | 
				
			||||||
 | 
					          left: '3%',
 | 
				
			||||||
 | 
					          right: '4%',
 | 
				
			||||||
 | 
					          bottom: '3%',
 | 
				
			||||||
 | 
					          containLabel: true
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        xAxis: {
 | 
				
			||||||
 | 
					          type: 'category',
 | 
				
			||||||
 | 
					          boundaryGap: false,
 | 
				
			||||||
 | 
					          data: this.averageStationDifferenceMapBatchTail
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        yAxis: {
 | 
				
			||||||
 | 
					          type: 'value'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        series: [
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(基准)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.averageStationDifferenceMapReference
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(校验)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.averageStationDifferenceMapChecksums
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            name: '大流量(台差)',
 | 
				
			||||||
 | 
					            type: 'line',
 | 
				
			||||||
 | 
					            stack: 'Total',
 | 
				
			||||||
 | 
					            data: this.averageStationDifferenceMapDifference
 | 
				
			||||||
 | 
					          },
 | 
				
			||||||
 | 
					        ]
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					      option && myChart.setOption(option);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      console.log(val)
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          this.listQuery.batchNumber = val.batchNumber ? val.batchNumber : null
 | 
				
			||||||
 | 
					          this.listQuery.gageId = val.gageId ? val.gageId : null
 | 
				
			||||||
 | 
					          this.listQuery.gageTypeId = val.gageTypeId ? val.gageTypeId : null
 | 
				
			||||||
 | 
					          this.listQuery.parameter = val.parameter ? val.parameter :null
 | 
				
			||||||
 | 
					          this.listQuery.startTime = val.timeSlot ? val.timeSlot[0] : null
 | 
				
			||||||
 | 
					          this.listQuery.endTime = val.timeSlot ? val.timeSlot[1] : null
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,5 +1,4 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
 | 
					 | 
				
			||||||
    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
					    <el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
				
			||||||
      <el-form-item prop="beanName" :label="$t('schedule.beanName')">
 | 
					      <el-form-item prop="beanName" :label="$t('schedule.beanName')">
 | 
				
			||||||
        <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
 | 
					        <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
 | 
				
			||||||
@@ -17,20 +16,21 @@
 | 
				
			|||||||
        <el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
 | 
					        <el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
 | 
				
			||||||
      </el-form-item>
 | 
					      </el-form-item>
 | 
				
			||||||
    </el-form>
 | 
					    </el-form>
 | 
				
			||||||
    <template slot="footer">
 | 
					 | 
				
			||||||
      <el-button @click="visible = false">{{ $t('cancel') }}</el-button>
 | 
					 | 
				
			||||||
      <el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
 | 
					 | 
				
			||||||
    </template>
 | 
					 | 
				
			||||||
  </el-dialog>
 | 
					 | 
				
			||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script> 
 | 
					<script> 
 | 
				
			||||||
 | 
					import basicAdd from '@/mixins/basic-add'
 | 
				
			||||||
import debounce from 'lodash/debounce'
 | 
					import debounce from 'lodash/debounce'
 | 
				
			||||||
import { cron } from 'vue-cron'
 | 
					import { cron } from 'vue-cron'
 | 
				
			||||||
export default { 
 | 
					export default { 
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
  data () {
 | 
					  data () {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      visible: false, 
 | 
					      visible: false, 
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					          submitURL: '/sys/schedule/',
 | 
				
			||||||
 | 
					          infoURL: '/sys/schedule'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
      dataForm: {
 | 
					      dataForm: {
 | 
				
			||||||
        id: '',
 | 
					        id: '',
 | 
				
			||||||
        beanName: '',
 | 
					        beanName: '',
 | 
				
			||||||
@@ -58,7 +58,8 @@ export default {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: { 
 | 
					  methods: { 
 | 
				
			||||||
    init () {
 | 
					    init (id) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || "";
 | 
				
			||||||
      this.visible = true
 | 
					      this.visible = true
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
        this.$refs['dataForm'].resetFields()
 | 
					        this.$refs['dataForm'].resetFields()
 | 
				
			||||||
@@ -95,7 +96,7 @@ export default {
 | 
				
			|||||||
            duration: 500,
 | 
					            duration: 500,
 | 
				
			||||||
            onClose: () => {
 | 
					            onClose: () => {
 | 
				
			||||||
              this.visible = false 
 | 
					              this.visible = false 
 | 
				
			||||||
              this.$emit('refreshDataList')
 | 
					              this.$emit('successSubmit')
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
          })
 | 
					          })
 | 
				
			||||||
        }).catch(() => {})
 | 
					        }).catch(() => {})
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,71 +1,39 @@
 | 
				
			|||||||
<template>
 | 
					<template>
 | 
				
			||||||
  <el-card shadow="never" class="aui-card--fill">
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
    <div class="mod-job__schedule">
 | 
					    <div class="mod-job__schedule">
 | 
				
			||||||
      <el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
 | 
					      <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
 | 
				
			||||||
        <el-form-item>
 | 
					
 | 
				
			||||||
          <el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
 | 
					      <base-table
 | 
				
			||||||
        </el-form-item>
 | 
					        :table-props="tableProps"
 | 
				
			||||||
        <el-form-item>
 | 
					        :page="listQuery.page"
 | 
				
			||||||
          <el-button @click="getDataList()">{{ $t('query') }}</el-button>
 | 
					        :limit="listQuery.limit"
 | 
				
			||||||
        </el-form-item>
 | 
					        :table-data="tableData"
 | 
				
			||||||
        <el-form-item>
 | 
					      >
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
 | 
					        <method-btn
 | 
				
			||||||
        </el-form-item>
 | 
					          v-if="tableBtn.length"
 | 
				
			||||||
        <el-form-item>
 | 
					          slot="handleBtn"
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
 | 
					          :width="200"
 | 
				
			||||||
        </el-form-item>
 | 
					          label="操作"
 | 
				
			||||||
        <el-form-item>
 | 
					          :method-list="tableBtn"
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
 | 
					          @clickBtn="handleClick"
 | 
				
			||||||
        </el-form-item>
 | 
					        />
 | 
				
			||||||
        <el-form-item>
 | 
					      </base-table>
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
 | 
					      <pagination
 | 
				
			||||||
        </el-form-item>
 | 
					        :limit.sync="listQuery.limit"
 | 
				
			||||||
        <el-form-item>
 | 
					        :page.sync="listQuery.page"
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
 | 
					        :total="listQuery.total"
 | 
				
			||||||
        </el-form-item>
 | 
					        @pagination="getDataList"
 | 
				
			||||||
        <el-form-item>
 | 
					      />
 | 
				
			||||||
          <el-button v-if="$hasPermission('sys:schedule:log')" type="success" @click="logHandle()">{{ $t('schedule.log') }}</el-button>
 | 
					 | 
				
			||||||
        </el-form-item>
 | 
					 | 
				
			||||||
      </el-form>
 | 
					 | 
				
			||||||
      <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 prop="beanName" :label="$t('schedule.beanName')" header-align="center" align="center"></el-table-column>
 | 
					 | 
				
			||||||
        <el-table-column prop="params" :label="$t('schedule.params')" header-align="center" align="center"></el-table-column>
 | 
					 | 
				
			||||||
        <el-table-column prop="cronExpression" :label="$t('schedule.cronExpression')" header-align="center" align="center"></el-table-column>
 | 
					 | 
				
			||||||
        <el-table-column prop="remark" :label="$t('schedule.remark')" header-align="center" align="center"></el-table-column>
 | 
					 | 
				
			||||||
        <el-table-column prop="status" :label="$t('schedule.status')" sortable="custom" header-align="center" align="center">
 | 
					 | 
				
			||||||
          <template slot-scope="scope">
 | 
					 | 
				
			||||||
            <el-tag v-if="scope.row.status === 1" size="small">{{ $t('schedule.status1') }}</el-tag>
 | 
					 | 
				
			||||||
            <el-tag v-else size="small" type="danger">{{ $t('schedule.status0') }}</el-tag>
 | 
					 | 
				
			||||||
          </template>
 | 
					 | 
				
			||||||
        </el-table-column>
 | 
					 | 
				
			||||||
        <el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
 | 
					 | 
				
			||||||
          <template slot-scope="scope">
 | 
					 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
 | 
					 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:pause')" type="text" size="small" @click="pauseHandle(scope.row.id)">{{ $t('schedule.pause') }}</el-button>
 | 
					 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:resume')" type="text" size="small" @click="resumeHandle(scope.row.id)">{{ $t('schedule.resume') }}</el-button>
 | 
					 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:run')" type="text" size="small" @click="runHandle(scope.row.id)">{{ $t('schedule.run') }}</el-button>
 | 
					 | 
				
			||||||
            <el-button v-if="$hasPermission('sys:schedule:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
 | 
					 | 
				
			||||||
          </template>
 | 
					 | 
				
			||||||
        </el-table-column>
 | 
					 | 
				
			||||||
      </el-table>
 | 
					 | 
				
			||||||
      <el-pagination
 | 
					 | 
				
			||||||
        :current-page="page"
 | 
					 | 
				
			||||||
        :page-sizes="[10, 20, 50, 100]"
 | 
					 | 
				
			||||||
        :page-size="limit"
 | 
					 | 
				
			||||||
        :total="total"
 | 
					 | 
				
			||||||
        layout="total, sizes, prev, pager, next, jumper"
 | 
					 | 
				
			||||||
        @size-change="pageSizeChangeHandle"
 | 
					 | 
				
			||||||
        @current-change="pageCurrentChangeHandle">
 | 
					 | 
				
			||||||
      </el-pagination>
 | 
					 | 
				
			||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
      <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
 | 
					      <base-dialog
 | 
				
			||||||
 | 
					        :dialogTitle="addOrEditTitle"
 | 
				
			||||||
 | 
					        :dialogVisible="addOrUpdateVisible"
 | 
				
			||||||
 | 
					        @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm"
 | 
				
			||||||
 | 
					        :before-close="handleCancel"
 | 
				
			||||||
 | 
					      >
 | 
				
			||||||
 | 
					        <add-or-update ref="addOrUpdate" @successSubmit="successSubmit"></add-or-update>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
      <!-- 弹窗, 日志列表 -->
 | 
					      <!-- 弹窗, 日志列表 -->
 | 
				
			||||||
      <log v-if="logVisible" ref="log"></log>
 | 
					      <log v-if="logVisible" ref="log"></log>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
@@ -73,124 +41,255 @@
 | 
				
			|||||||
</template>
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import mixinViewModule from '@/mixins/view-module'
 | 
					import basicPage from "@/mixins/basic-page";
 | 
				
			||||||
import AddOrUpdate from './schedule-add-or-update'
 | 
					import AddOrUpdate from "./schedule-add-or-update";
 | 
				
			||||||
import Log from './schedule-log'
 | 
					import Log from "./schedule-log";
 | 
				
			||||||
 | 
					import i18n from "@/i18n";
 | 
				
			||||||
 | 
					import sysFilter from "@/filters/sys-filter";
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: "beanName",
 | 
				
			||||||
 | 
					    label: i18n.t("schedule.beanName"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: "params",
 | 
				
			||||||
 | 
					    label: i18n.t("schedule.params"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: "cronExpression",
 | 
				
			||||||
 | 
					    label: i18n.t("schedule.cronExpression"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: "remark",
 | 
				
			||||||
 | 
					    label: i18n.t("schedule.remark"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: "status",
 | 
				
			||||||
 | 
					    label: i18n.t("schedule.status"),
 | 
				
			||||||
 | 
					    filter: sysFilter("scheduleStatus"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "pause",
 | 
				
			||||||
 | 
					    btnName: "暂停",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "restore",
 | 
				
			||||||
 | 
					    btnName: "恢复",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "run",
 | 
				
			||||||
 | 
					    btnName: "执行",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [mixinViewModule],
 | 
					  mixins: [basicPage],
 | 
				
			||||||
  data () {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      mixinViewModuleOptions: {
 | 
					      urlOptions: {
 | 
				
			||||||
        getDataListURL: '/sys/schedule/page',
 | 
					        getDataListURL: "/sys/schedule/page",
 | 
				
			||||||
        getDataListIsPage: true,
 | 
					        deleteURL: "/sys/schedule",
 | 
				
			||||||
        deleteURL: '/sys/schedule',
 | 
					 | 
				
			||||||
        deleteIsBatch: true
 | 
					 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      dataForm: {
 | 
					      dataForm: {
 | 
				
			||||||
        beanName: ''
 | 
					        beanName: "",
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
      logVisible: false
 | 
					      tableProps,
 | 
				
			||||||
    }
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      addDeleteURL: true,
 | 
				
			||||||
 | 
					      logVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "input",
 | 
				
			||||||
 | 
					          label: i18n.t("schedule.beanName"),
 | 
				
			||||||
 | 
					          placeholder: i18n.t("schedule.beanName"),
 | 
				
			||||||
 | 
					          param: "beanName",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: "查询",
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: "新增",
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					          plain: true,
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: "日志",
 | 
				
			||||||
 | 
					          name: "log",
 | 
				
			||||||
 | 
					          color: "success",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    AddOrUpdate,
 | 
					    AddOrUpdate,
 | 
				
			||||||
    Log
 | 
					    Log,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  methods: {
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          this.listQuery.beanName = val.beanName;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1;
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = "新增";
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.addOrUpdateHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "log":
 | 
				
			||||||
 | 
					          this.logHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    btnFun(val) {
 | 
				
			||||||
 | 
					      if (val.type === "pause") {
 | 
				
			||||||
 | 
					        this.pauseHandle(val.data.id);
 | 
				
			||||||
 | 
					      } else if (val.type === "restore") {
 | 
				
			||||||
 | 
					        this.resumeHandle(val.data.id);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        this.runHandle(val.data.id);
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
    // 暂停
 | 
					    // 暂停
 | 
				
			||||||
    pauseHandle (id) {
 | 
					    pauseHandle(id) {
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
					      if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
        return this.$message({
 | 
					        return this.$message({
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
					          message: this.$t("prompt.deleteBatch"),
 | 
				
			||||||
          type: 'warning',
 | 
					          type: "warning",
 | 
				
			||||||
          duration: 500
 | 
					          duration: 500,
 | 
				
			||||||
        })
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
 | 
					      this.$confirm(
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
					        this.$t("prompt.info", { handle: this.$t("schedule.pause") }),
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
					        this.$t("prompt.title"),
 | 
				
			||||||
        type: 'warning'
 | 
					        {
 | 
				
			||||||
      }).then(() => {
 | 
					          confirmButtonText: this.$t("confirm"),
 | 
				
			||||||
        this.$http.put('/sys/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
					          cancelButtonText: this.$t("cancel"),
 | 
				
			||||||
          if (res.code !== 0) {
 | 
					          type: "warning",
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
					        }
 | 
				
			||||||
          }
 | 
					      )
 | 
				
			||||||
          this.$message({
 | 
					        .then(() => {
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
					          this.$http
 | 
				
			||||||
            type: 'success',
 | 
					            .put("/sys/schedule/pause", id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
            duration: 500,
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
            onClose: () => {
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
              this.getDataList()
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
            }
 | 
					              }
 | 
				
			||||||
          })
 | 
					              this.$message({
 | 
				
			||||||
        }).catch(() => {})
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
      }).catch(() => {})
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  this.getDataList();
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 恢复
 | 
					    // 恢复
 | 
				
			||||||
    resumeHandle (id) {
 | 
					    resumeHandle(id) {
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
					      if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
        return this.$message({
 | 
					        return this.$message({
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
					          message: this.$t("prompt.deleteBatch"),
 | 
				
			||||||
          type: 'warning',
 | 
					          type: "warning",
 | 
				
			||||||
          duration: 500
 | 
					          duration: 500,
 | 
				
			||||||
        })
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
 | 
					      this.$confirm(
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
					        this.$t("prompt.info", { handle: this.$t("schedule.resume") }),
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
					        this.$t("prompt.title"),
 | 
				
			||||||
        type: 'warning'
 | 
					        {
 | 
				
			||||||
      }).then(() => {
 | 
					          confirmButtonText: this.$t("confirm"),
 | 
				
			||||||
        this.$http.put('/sys/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
					          cancelButtonText: this.$t("cancel"),
 | 
				
			||||||
          if (res.code !== 0) {
 | 
					          type: "warning",
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
					        }
 | 
				
			||||||
          }
 | 
					      )
 | 
				
			||||||
          this.$message({
 | 
					        .then(() => {
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
					          this.$http
 | 
				
			||||||
            type: 'success',
 | 
					            .put("/sys/schedule/resume", id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
            duration: 500,
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
            onClose: () => {
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
              this.getDataList()
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
            }
 | 
					              }
 | 
				
			||||||
          })
 | 
					              this.$message({
 | 
				
			||||||
        }).catch(() => {})
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
      }).catch(() => {})
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  this.getDataList();
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 执行
 | 
					    // 执行
 | 
				
			||||||
    runHandle (id) {
 | 
					    runHandle(id) {
 | 
				
			||||||
      if (!id && this.dataListSelections.length <= 0) {
 | 
					      if (!id && this.dataListSelections.length <= 0) {
 | 
				
			||||||
        return this.$message({
 | 
					        return this.$message({
 | 
				
			||||||
          message: this.$t('prompt.deleteBatch'),
 | 
					          message: this.$t("prompt.deleteBatch"),
 | 
				
			||||||
          type: 'warning',
 | 
					          type: "warning",
 | 
				
			||||||
          duration: 500
 | 
					          duration: 500,
 | 
				
			||||||
        })
 | 
					        });
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
 | 
					      this.$confirm(
 | 
				
			||||||
        confirmButtonText: this.$t('confirm'),
 | 
					        this.$t("prompt.info", { handle: this.$t("schedule.run") }),
 | 
				
			||||||
        cancelButtonText: this.$t('cancel'),
 | 
					        this.$t("prompt.title"),
 | 
				
			||||||
        type: 'warning'
 | 
					        {
 | 
				
			||||||
      }).then(() => {
 | 
					          confirmButtonText: this.$t("confirm"),
 | 
				
			||||||
        this.$http.put('/sys/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
 | 
					          cancelButtonText: this.$t("cancel"),
 | 
				
			||||||
          if (res.code !== 0) {
 | 
					          type: "warning",
 | 
				
			||||||
            return this.$message.error(res.msg)
 | 
					        }
 | 
				
			||||||
          }
 | 
					      )
 | 
				
			||||||
          this.$message({
 | 
					        .then(() => {
 | 
				
			||||||
            message: this.$t('prompt.success'),
 | 
					          this.$http
 | 
				
			||||||
            type: 'success',
 | 
					            .put("/sys/schedule/run", id ? [id] : this.dataListSelections.map((item) => item.id))
 | 
				
			||||||
            duration: 500,
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
            onClose: () => {
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
              this.getDataList()
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
            }
 | 
					              }
 | 
				
			||||||
          })
 | 
					              this.$message({
 | 
				
			||||||
        }).catch(() => {})
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
      }).catch(() => {})
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  this.getDataList();
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 日志列表
 | 
					    // 日志列表
 | 
				
			||||||
    logHandle () {
 | 
					    logHandle() {
 | 
				
			||||||
      this.logVisible = true
 | 
					      this.logVisible = true;
 | 
				
			||||||
      this.$nextTick(() => {
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
        this.$refs.log.init()
 | 
					        this.$refs.log.init();
 | 
				
			||||||
      })
 | 
					      });
 | 
				
			||||||
    }
 | 
					    },
 | 
				
			||||||
  }
 | 
					  },
 | 
				
			||||||
}
 | 
					};
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,49 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:28:35
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    <el-button type="text" @click="getExperienceDetail">{{ $t('oss.type1') }}} </el-button>
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getExperienceDetail() {
 | 
				
			||||||
 | 
					      this.$router.push({
 | 
				
			||||||
 | 
					        name: 'laboratory-qmsLaboratoryTrainExperience',
 | 
				
			||||||
 | 
					        query: {
 | 
				
			||||||
 | 
					          laboratoryTesterId: this.injectData.userId
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										56
									
								
								src/views/modules/laboratory/components/experienceDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								src/views/modules/laboratory/components/experienceDetail.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,56 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-05-15 14:27:30
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:27:31
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:09:30
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    <el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getInspectionDetail() {
 | 
				
			||||||
 | 
					      this.$router.push({
 | 
				
			||||||
 | 
					        name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
 | 
				
			||||||
 | 
					        query: {
 | 
				
			||||||
 | 
					          laboratoryTesterId: this.injectData.userId
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										49
									
								
								src/views/modules/laboratory/components/inspectionDetail.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								src/views/modules/laboratory/components/inspectionDetail.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:09:30
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    <el-button type="text" @click="getInspectionDetail">{{ $t('oss.type1') }}} </el-button>
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getInspectionDetail() {
 | 
				
			||||||
 | 
					      this.$router.push({
 | 
				
			||||||
 | 
					        name: 'laboratory-qmsLaboratoryTesterInspectionQualification',
 | 
				
			||||||
 | 
					        query: {
 | 
				
			||||||
 | 
					          laboratoryTesterId: this.injectData.userId
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      })
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,229 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:35:31
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="department" :label="$t('laboratory.department')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.department" :placeholder="$t('laboratory.department')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="position" :label="$t('laboratory.position')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.position" :placeholder="$t('laboratory.position')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="responsibilitie" :label="$t('laboratory.responsibilitie')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.responsibilitie" :placeholder="$t('laboratory.responsibilitie')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="expectedReturnDate" :label="$t('gage.expectedReturnDate')">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('gage.expectedReturnDate')"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/gage/qmsLaboratoryEmployeeResume",
 | 
				
			||||||
 | 
					        infoURL: "/gage/qmsLaboratoryEmployeeResume/{ id }",
 | 
				
			||||||
 | 
					        dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
 | 
				
			||||||
 | 
					        getUserList: '/sys/user/page'
 | 
				
			||||||
 | 
					        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
				
			||||||
 | 
					        // getProductURL: '/basic/qmsProduct/gape',
 | 
				
			||||||
 | 
					        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      processList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '未审核'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '不同意'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '同意'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        gape: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      eventList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					        id: 0,
 | 
				
			||||||
 | 
					          name: '领用'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        id: 1,
 | 
				
			||||||
 | 
					        name: '归还'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '量具报废'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: '量具维修'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 4,
 | 
				
			||||||
 | 
					          name: '量具购买'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        department:null,
 | 
				
			||||||
 | 
					        endDate: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        laboratoryTesterId: null,
 | 
				
			||||||
 | 
					        position: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					        responsibilitie: null,
 | 
				
			||||||
 | 
					        startDate: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        laboratoryTesterId:null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(data) {
 | 
				
			||||||
 | 
					      this.dataForm.id = data.id ? data.id : ''
 | 
				
			||||||
 | 
					      this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserList, this.listQuery)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.userList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.dictionaryDetailList, this.listQuery)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.departmentList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/gage/qmsLaboratoryEmployeeResume/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										222
									
								
								src/views/modules/laboratory/components/laboratoryTester-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										222
									
								
								src/views/modules/laboratory/components/laboratoryTester-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,222 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-12 16:45:00
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="userId" :label="$t('laboratory.userName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.userId" :placeholder="$t('laboratory.userName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="remark" :label="$t('laboratory.remark')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/laboratory/qmsLaboratoryTester",
 | 
				
			||||||
 | 
					        infoURL: "/laboratory/qmsLaboratoryTester/{ id }",
 | 
				
			||||||
 | 
					        getUserList: '/sys/user/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      processList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '未审核'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '不同意'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '同意'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        gape: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageStatusList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name:'在用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '备用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '停用'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: '封存'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 4,
 | 
				
			||||||
 | 
					          name: '报废'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 5,
 | 
				
			||||||
 | 
					          name: '降级使用'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      certificateTypeList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '检定证书'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '校准证书'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '检测报告'
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: '自校报告'
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        userId:null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getUserList, this.listQuery)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.userList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/laboratory/qmsLaboratoryTester/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,202 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:24:05
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="code" :label="$t('laboratory.code')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.code" :placeholder="$t('laboratory.code')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="name" :label="$t('laboratory.name')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.name" :placeholder="$t('laboratory.name')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="getDate" :label="$t('laboratory.getDate')">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.getDate" type="datetime" :placeholder="$t('laboratory.getDate')"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="validDate" :label="$t('laboratory.validDate')">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.expectedReturnDate" type="datetime" :placeholder="$t('laboratory.validDate')"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="qualificationDescription" :label="$t('laboratory.qualificationDescription')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.qualificationDescription" :placeholder="$t('laboratory.qualificationDescription')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="remark" :label="$t('laboratory.remark')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.remark" :placeholder="$t('laboratory.remark')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/laboratory/qmsLaboratoryTesterInspectionQualification",
 | 
				
			||||||
 | 
					        infoURL: "/laboratory/qmsLaboratoryTesterInspectionQualification/{ id }",
 | 
				
			||||||
 | 
					        // getGageListURL: '/gage/qmsGage/page',
 | 
				
			||||||
 | 
					        // getTeamListURL: '/basic/qmsTeam/gape',
 | 
				
			||||||
 | 
					        // getProductURL: '/basic/qmsProduct/gape',
 | 
				
			||||||
 | 
					        // getSupplierListURL: '/supplier/qmsSupplier/gape'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList:[],
 | 
				
			||||||
 | 
					      // supplierList:[],
 | 
				
			||||||
 | 
					      // productList:[],
 | 
				
			||||||
 | 
					      // typeList: [],
 | 
				
			||||||
 | 
					      // teamList:[],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        gape: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        laboratoryTesterId:null,
 | 
				
			||||||
 | 
					        code:null,
 | 
				
			||||||
 | 
					        getDate: null,
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        laboratoryTesterId: null,
 | 
				
			||||||
 | 
					        name: null,
 | 
				
			||||||
 | 
					        qualificationDescription: null,
 | 
				
			||||||
 | 
					        remark: null,
 | 
				
			||||||
 | 
					        validDate: null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(data) {
 | 
				
			||||||
 | 
					      this.dataForm.id = data.id ? data.id: ''
 | 
				
			||||||
 | 
					      this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      // this.$http
 | 
				
			||||||
 | 
					      //   .get(this.urlOptions.getTypeListURL, this.listQuery)
 | 
				
			||||||
 | 
					      //   .then(({ data: res }) => {
 | 
				
			||||||
 | 
					      //     if (res.code === 0) {
 | 
				
			||||||
 | 
					      //       console.log(res.data);
 | 
				
			||||||
 | 
					      //       this.typeList = res.data.list
 | 
				
			||||||
 | 
					      //     }
 | 
				
			||||||
 | 
					      //   })
 | 
				
			||||||
 | 
					      //   .catch(() => {
 | 
				
			||||||
 | 
					      //   });
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(this.urlOptions.getGageListURL, this.listQuery)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res.data);
 | 
				
			||||||
 | 
					            this.gageList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/laboratory/qmsLaboratoryTesterInspectionQualification/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,197 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:30:34
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
 | 
				
			||||||
 | 
					    <el-form-item prop="title" :label="$t('laboratory.title')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.title" :placeholder="$t('laboratory.title')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="trainContent" :label="$t('laboratory.trainContent')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.trainContent" :placeholder="$t('laboratory.trainContent')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="trainDuration" :label="$t('laboratory.trainDuration')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.trainDuration" :placeholder="$t('laboratory.trainDuration')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="trainType" :label="$t('laboratory.trainType')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.trainType" :placeholder="$t('laboratory.trainType')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="result" :label="$t('laboratory.result')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.result" :placeholder="$t('laboratory.result')">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="trainDate" :label="$t('laboratory.trainDate')">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.trainDate" type="datetime" :placeholder="$t('laboratory.trainDate')"
 | 
				
			||||||
 | 
					        format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
 | 
				
			||||||
 | 
					      </el-date-picker>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/laboratory/qmsLaboratoryTrainExperience",
 | 
				
			||||||
 | 
					        infoURL: "/laboratory/qmsLaboratoryTrainExperience/{ id }",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      gageList: [],
 | 
				
			||||||
 | 
					      userList: [],
 | 
				
			||||||
 | 
					      customerList:[],
 | 
				
			||||||
 | 
					      gageTypeList:[],
 | 
				
			||||||
 | 
					      departmentList: [],
 | 
				
			||||||
 | 
					      listQuery: {
 | 
				
			||||||
 | 
					        limit: 999,
 | 
				
			||||||
 | 
					        page: 1
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        laboratoryTesterId:null,
 | 
				
			||||||
 | 
					        result: null,
 | 
				
			||||||
 | 
					        title: null,
 | 
				
			||||||
 | 
					        trainContent: null,
 | 
				
			||||||
 | 
					        trainDate: null,
 | 
				
			||||||
 | 
					        trainDuration: null,
 | 
				
			||||||
 | 
					        trainType: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // mounted () {
 | 
				
			||||||
 | 
					  //   this.getData();
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(data) {
 | 
				
			||||||
 | 
					      this.dataForm.id = data.id ? data.id : ''
 | 
				
			||||||
 | 
					      this.dataForm.laboratoryTesterId = data.laboratoryTesterId ? data.laboratoryTesterId : ''
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getData() {
 | 
				
			||||||
 | 
					    //   this.$http.get(this.urlOptions.getGageList, {
 | 
				
			||||||
 | 
					    //       params: this.listQuery,
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res.data)
 | 
				
			||||||
 | 
					    //         this.gageList = res.data.list
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(this.urlOptions.getUserList, this.listQuery)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res.data);
 | 
				
			||||||
 | 
					    //         this.userList = res.data.list
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/laboratory/qmsLaboratoryTrainExperience/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => { })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										231
									
								
								src/views/modules/laboratory/qmsLaboratoryEmployeeResume.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										231
									
								
								src/views/modules/laboratory/qmsLaboratoryEmployeeResume.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,231 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-05-08 11:11:06
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:32:17
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					        <!-- <el-badge :value="1" class="item">
 | 
				
			||||||
 | 
					          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
				
			||||||
 | 
					        </el-badge> -->
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					        <laboratoryEmployeeResume-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					          </laboratoryEmployeeResume-add>
 | 
				
			||||||
 | 
					          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
 | 
					        <!-- <gageResume-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
				
			||||||
 | 
					        </gageResume-search> -->
 | 
				
			||||||
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
 | 
					          <el-col :span="12">
 | 
				
			||||||
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
 | 
					              {{ $t("close") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
				
			||||||
 | 
					              $t("reset")
 | 
				
			||||||
 | 
					              }}</el-button>
 | 
				
			||||||
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
 | 
					              {{ $t("search") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import laboratoryEmployeeResumeAdd from "./components/laboratoryEmployeeResume-add"
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					// import gageResumeSearch from "./components/gageResumeSearch"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'startDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.startDate"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'endDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.endDate"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'department',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.department"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'position',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.position"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'responsibilitie',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.responsibilitie"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    // gageResumeSearch,
 | 
				
			||||||
 | 
					    laboratoryEmployeeResumeAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/laboratory/qmsLaboratoryEmployeeResume/page",
 | 
				
			||||||
 | 
					        deleteURL: "/laboratory/qmsLaboratoryEmployeeResume",
 | 
				
			||||||
 | 
					        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "",
 | 
				
			||||||
 | 
					        //   label: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   placeholder: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   param: "paramCode",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "separate",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    if (this.$route.query) {
 | 
				
			||||||
 | 
					      console.log(this.$route.query)
 | 
				
			||||||
 | 
					      this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
 | 
				
			||||||
 | 
					      this.getDataList()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.page = 1
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = '修改'
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.$nextTick(() => {
 | 
				
			||||||
 | 
					            this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										233
									
								
								src/views/modules/laboratory/qmsLaboratoryTester.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										233
									
								
								src/views/modules/laboratory/qmsLaboratoryTester.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,233 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:31:54
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					        <el-badge :value="6" class="item">
 | 
				
			||||||
 | 
					          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
				
			||||||
 | 
					        </el-badge>
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					        <laboratoryTester-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					          </laboratoryTester-add>
 | 
				
			||||||
 | 
					          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <!-- <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
 | 
					        <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search>
 | 
				
			||||||
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
 | 
					          <el-col :span="12">
 | 
				
			||||||
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
 | 
					              {{ $t("close") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
				
			||||||
 | 
					              }}</el-button>
 | 
				
			||||||
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
 | 
					              {{ $t("search") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </base-dialog> -->
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import laboratoryTesterAdd from "./components/laboratoryTester-add"
 | 
				
			||||||
 | 
					// import gageSearch from "./components/gageSearch"
 | 
				
			||||||
 | 
					import inspectionDetail from "./components/inspectionDetail.vue"
 | 
				
			||||||
 | 
					import experienceDetail from "./components/experienceDetail.vue"
 | 
				
			||||||
 | 
					import employeeResumeDetail from "./components/employeeResumeDetail.vue"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'userCode',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.userCode"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'userName',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.userName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'remark',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.remark"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'updateDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.inspectionQualification"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    subcomponent: inspectionDetail,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'valid',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.Experience"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    subcomponent: experienceDetail,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'userId',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.EmployeeResume"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    subcomponent: employeeResumeDetail,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: i18n.t("edit"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: i18n.t("delete"),
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    // gageSearch,
 | 
				
			||||||
 | 
					    laboratoryTesterAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/laboratory/qmsLaboratoryTester/page",
 | 
				
			||||||
 | 
					        deleteURL: "/laboratory/qmsLaboratoryTester",
 | 
				
			||||||
 | 
					        exportUrl: '/laboratory/qmsLaboratoryTester/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "",
 | 
				
			||||||
 | 
					        //   label: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   placeholder: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   param: "paramCode",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "separate",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('export'),
 | 
				
			||||||
 | 
					          name: "export",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -0,0 +1,235 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:29:47
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					        <!-- <el-badge :value="1" class="item">
 | 
				
			||||||
 | 
					          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
				
			||||||
 | 
					        </el-badge> -->
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					        <laboratoryTesterInspectionQualification-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					        </laboratoryTesterInspectionQualification-add>
 | 
				
			||||||
 | 
					        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
 | 
					        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
				
			||||||
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
 | 
					          <el-col :span="12">
 | 
				
			||||||
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
 | 
					              {{ $t("close") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
				
			||||||
 | 
					              }}</el-button>
 | 
				
			||||||
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
 | 
					              {{ $t("search") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import laboratoryTesterInspectionQualificationAdd from "./components/laboratoryTesterInspectionQualification-add"
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'code',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.code"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'name',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.name"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'qualificationDescription',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.qualificationDescription"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'validDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.validDate"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter:timeFormatter
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'getDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.getDate"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'remark',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.remark"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    // failureTypeSearch,
 | 
				
			||||||
 | 
					    laboratoryTesterInspectionQualificationAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/laboratory/qmsLaboratoryTesterInspectionQualification/page",
 | 
				
			||||||
 | 
					        deleteURL: "/laboratory/qmsLaboratoryTesterInspectionQualification",
 | 
				
			||||||
 | 
					        submitURL: '/laboratory/qmsLaboratoryTesterInspectionQualification'
 | 
				
			||||||
 | 
					        // exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "",
 | 
				
			||||||
 | 
					        //   label: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   placeholder: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   param: "paramCode",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "separate",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    if (this.$route.query) {
 | 
				
			||||||
 | 
					      console.log(this.$route.query)
 | 
				
			||||||
 | 
					      this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
 | 
				
			||||||
 | 
					      this.getDataList()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.code = dataForm.code
 | 
				
			||||||
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = '修改'
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init({ id:val.data.id })
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle()
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.$nextTick(() => {
 | 
				
			||||||
 | 
					            this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										240
									
								
								src/views/modules/laboratory/qmsLaboratoryTrainExperience.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										240
									
								
								src/views/modules/laboratory/qmsLaboratoryTrainExperience.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,240 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-15 14:32:25
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					        <!-- <el-badge :value="6" class="item">
 | 
				
			||||||
 | 
					          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
				
			||||||
 | 
					        </el-badge> -->
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					        <laboratoryTrainExperience-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					        </laboratoryTrainExperience-add>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
 | 
					        <!-- <gage-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></gage-search> -->
 | 
				
			||||||
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
 | 
					          <el-col :span="12">
 | 
				
			||||||
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
 | 
					              {{ $t("close") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{ $t("reset")
 | 
				
			||||||
 | 
					              }}</el-button>
 | 
				
			||||||
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
 | 
					              {{ $t("search") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import laboratoryTrainExperienceAdd from "./components/laboratoryTrainExperience-add"
 | 
				
			||||||
 | 
					// import gageSearch from "./components/gageSearch"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import { timeFormatter } from '@/filters'
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'title',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.title"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'trainContent',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.trainContent"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'result',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.result"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'trainDuration',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.trainDuration"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'trainType',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.trainType"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'trainDate',
 | 
				
			||||||
 | 
					    label: i18n.t("laboratory.trainDate"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    filter: timeFormatter,
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: i18n.t("edit"),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: i18n.t("delete"),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    // gageSearch,
 | 
				
			||||||
 | 
					    laboratoryTrainExperienceAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/laboratory/qmsLaboratoryTrainExperience/page",
 | 
				
			||||||
 | 
					        deleteURL: "/laboratory/qmsLaboratoryTrainExperience",
 | 
				
			||||||
 | 
					        exportUrl: '/laboratory/qmsLaboratoryTrainExperience/export'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "",
 | 
				
			||||||
 | 
					        //   label: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   placeholder: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   param: "paramCode",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "separate",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('add'),
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('export'),
 | 
				
			||||||
 | 
					          name: "export",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: i18n.t('search'),
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  mounted() {
 | 
				
			||||||
 | 
					    if (this.$route.query) {
 | 
				
			||||||
 | 
					      console.log(this.$route.query)
 | 
				
			||||||
 | 
					      this.listQuery.laboratoryTesterId = this.$route.query.laboratoryTesterId
 | 
				
			||||||
 | 
					      this.getDataList()
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.name}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					        this.addOrEditTitle = '修改'
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init({ id: val.data.id })
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "export":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1
 | 
				
			||||||
 | 
					          this.exportHandle();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = '新增'
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.$nextTick(() => {
 | 
				
			||||||
 | 
					            this.$refs.addOrUpdate.init({ laboratoryTesterId: this.$route.query.laboratoryTesterId })
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										40
									
								
								src/views/modules/quality/components/normalToRelaxed.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/views/modules/quality/components/normalToRelaxed.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 15:00:47
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    最近 {{ injectData.normalToRelaxedOne }} 批中{{ injectData.normalToRelaxedTwo }} 批检验不合格
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// import { addDynamicRoute } from '@/router'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										40
									
								
								src/views/modules/quality/components/normalToTightened.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/views/modules/quality/components/normalToTightened.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 14:42:35
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    最近 {{ injectData.normalToTightenedOne}} 批中{{ injectData.normalToTightenedTwo }} 批检验不合格
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// import { addDynamicRoute } from '@/router'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										40
									
								
								src/views/modules/quality/components/relaxedToNormal.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										40
									
								
								src/views/modules/quality/components/relaxedToNormal.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,40 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 15:05:00
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    最近 {{ injectData.relaxedToNormalOne }} 批中{{ injectData.relaxedToNormalTwo }} 批检验不合格
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// import { addDynamicRoute } from '@/router'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										47
									
								
								src/views/modules/quality/components/tightenedToNormal.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								src/views/modules/quality/components/tightenedToNormal.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,47 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-05-24 14:55:36
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 14:57:30
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-31 14:12:10
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 14:42:35
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <span>
 | 
				
			||||||
 | 
					    最近 {{ injectData.tightenedToNormalOne }} 批中{{ injectData.tightenedToNormalTwo }} 批检验不合格
 | 
				
			||||||
 | 
					  </span>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					// import { addDynamicRoute } from '@/router'
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  props: {
 | 
				
			||||||
 | 
					    injectData: {
 | 
				
			||||||
 | 
					      type: Object,
 | 
				
			||||||
 | 
					      default: () => ({}),
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // 子级
 | 
				
			||||||
 | 
					    // emitClick () {
 | 
				
			||||||
 | 
					    //   // 路由参数
 | 
				
			||||||
 | 
					    //   const routeParams = {
 | 
				
			||||||
 | 
					    //     routeName: `${this.$route.name}__${this.injectData.id}`,
 | 
				
			||||||
 | 
					    //     title: `${this.$route.meta.title} - ${this.injectData.dictType}`,
 | 
				
			||||||
 | 
					    //     path: 'sys/dict-data',
 | 
				
			||||||
 | 
					    //     params: {
 | 
				
			||||||
 | 
					    //       dictTypeId: this.injectData.id
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   }
 | 
				
			||||||
 | 
					    //   // 动态路由
 | 
				
			||||||
 | 
					    //   addDynamicRoute(routeParams, this.$router)
 | 
				
			||||||
 | 
					    // }
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										300
									
								
								src/views/modules/quality/components/transferRecords-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										300
									
								
								src/views/modules/quality/components/transferRecords-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,300 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 16:36:43
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="130px">
 | 
				
			||||||
 | 
					    <el-form-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="supplierId" :label="$t('quality.supplierName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.supplierId" :placeholder="$t('quality.supplierName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="productId" :label="$t('quality.productName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="transferOutId" :label="$t('quality.transferOutName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.transferOutId" :placeholder="$t('quality.transferOutName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="transferInId" :label="$t('quality.transferInName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.transferInId" :placeholder="$t('quality.transferInName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in transferSchemeList" :key="item.id" :label="item.transferSchemeName" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="dataSources" :label="$t('quality.dataSources')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.dataSources" :placeholder="$t('quality.dataSources')"></el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/quality/qmsTransferRecords",
 | 
				
			||||||
 | 
					        getSupplierList: "/supplier/qmsSupplier/page",
 | 
				
			||||||
 | 
					        getProductList: "/basic/qmsProduct/page",
 | 
				
			||||||
 | 
					        infoURL: "/quality/qmsTransferRecords/{id}",
 | 
				
			||||||
 | 
					        getTransferSchemeListURL: '/quality/qmsTransferScheme/page'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      supplierList: [],
 | 
				
			||||||
 | 
					      productList: [],
 | 
				
			||||||
 | 
					      transferSchemeList:[],
 | 
				
			||||||
 | 
					      options: [{
 | 
				
			||||||
 | 
					        value: 0,
 | 
				
			||||||
 | 
					        label: '不可用'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        value: 1,
 | 
				
			||||||
 | 
					        label: '可用'
 | 
				
			||||||
 | 
					        }],
 | 
				
			||||||
 | 
					      inspectionStageList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '进货检验 ',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '成品检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '出货检验',
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      inspectionTypeList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '监控',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '电芯来料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: 'IQC抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: 'IQC抽检2',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 4,
 | 
				
			||||||
 | 
					          name: '原料抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 5,
 | 
				
			||||||
 | 
					          name: '进货外观检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 6,
 | 
				
			||||||
 | 
					          name: '库内原料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 7,
 | 
				
			||||||
 | 
					          name: ' 来料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 8,
 | 
				
			||||||
 | 
					          name: '胶片',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 9,
 | 
				
			||||||
 | 
					          name: ' 抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 10,
 | 
				
			||||||
 | 
					          name: '巡检 ',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 11,
 | 
				
			||||||
 | 
					          name: '首检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 12,
 | 
				
			||||||
 | 
					          name: '末检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 13,
 | 
				
			||||||
 | 
					          name: '实时监测',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 14,
 | 
				
			||||||
 | 
					          name: 'FQC抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 16,
 | 
				
			||||||
 | 
					          name: 'OQC抽检',
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        inspectionStage:null,
 | 
				
			||||||
 | 
					        inspectionType: null,
 | 
				
			||||||
 | 
					        productId: null,
 | 
				
			||||||
 | 
					        supplierId: null,
 | 
				
			||||||
 | 
					        supplierName: null,
 | 
				
			||||||
 | 
					        dataSources: null,
 | 
				
			||||||
 | 
					        transferInId: null,
 | 
				
			||||||
 | 
					        transferInName: null,
 | 
				
			||||||
 | 
					        transferOutId: null,
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    dataRule() {
 | 
				
			||||||
 | 
					      return {
 | 
				
			||||||
 | 
					        // dictLabel: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // dictValue: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					        // sort: [
 | 
				
			||||||
 | 
					        //   {
 | 
				
			||||||
 | 
					        //     required: true,
 | 
				
			||||||
 | 
					        //     message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					        //     trigger: "blur",
 | 
				
			||||||
 | 
					        //   },
 | 
				
			||||||
 | 
					        // ],
 | 
				
			||||||
 | 
					      };
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          // this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getSupplierList)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.supplierList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getProductList)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.productList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getTransferSchemeListURL)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.transferSchemeList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // getCode() {
 | 
				
			||||||
 | 
					    //   this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code === 0) {
 | 
				
			||||||
 | 
					    //         console.log(res);
 | 
				
			||||||
 | 
					    //         this.dataForm.customSamplingCode = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {
 | 
				
			||||||
 | 
					    //     });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/quality/qmsTransferRecords/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										267
									
								
								src/views/modules/quality/components/transferRecordsSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										267
									
								
								src/views/modules/quality/components/transferRecordsSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,267 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2023-01-04 10:29:40
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 16:39:37
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
				
			||||||
 | 
					    <el-form-item :label="$t('quality.transferTime')" prop="timeSlot">
 | 
				
			||||||
 | 
					      <el-date-picker v-model="dataForm.timeSlot" size="small" type="datetimerange" format='yyyy-MM-dd HH:mm:ss'
 | 
				
			||||||
 | 
					        valueFormat='yyyy-MM-ddTHH:mm:ss' :start-placeholder="$t('gage.startTime')"
 | 
				
			||||||
 | 
					        :end-placeholder="$t('gage.endTime')" :range-separator="$t('gage.to')" clearable />
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="inspectionStage" :label="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.inspectionStage" :placeholder="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in inspectionStageList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="inspectionType" :label="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.inspectionType" :placeholder="$t('quality.inspectionStage')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in inspectionTypeList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="supplierId" :label="$t('quality.supplierName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.supplierId" :placeholder="$t('quality.supplierName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in supplierList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="productId" :label="$t('quality.productName')">
 | 
				
			||||||
 | 
					      <el-select v-model="dataForm.productId" :placeholder="$t('quality.productName')">
 | 
				
			||||||
 | 
					        <el-option v-for="item in productList" :key="item.id" :label="item.name" :value="item.id">
 | 
				
			||||||
 | 
					        </el-option>
 | 
				
			||||||
 | 
					      </el-select>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      // urlOptions: {
 | 
				
			||||||
 | 
					      //   submitURL: "/sys/params/",
 | 
				
			||||||
 | 
					      //   infoURL: "/sys/params",
 | 
				
			||||||
 | 
					      // },
 | 
				
			||||||
 | 
					      inspectionStageList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '进货检验 ',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '成品检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: '出货检验',
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      inspectionTypeList: [
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 0,
 | 
				
			||||||
 | 
					          name: '监控',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 1,
 | 
				
			||||||
 | 
					          name: '电芯来料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 2,
 | 
				
			||||||
 | 
					          name: 'IQC抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 3,
 | 
				
			||||||
 | 
					          name: 'IQC抽检2',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 4,
 | 
				
			||||||
 | 
					          name: '原料抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 5,
 | 
				
			||||||
 | 
					          name: '进货外观检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 6,
 | 
				
			||||||
 | 
					          name: '库内原料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 7,
 | 
				
			||||||
 | 
					          name: ' 来料检验',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 8,
 | 
				
			||||||
 | 
					          name: '胶片',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 9,
 | 
				
			||||||
 | 
					          name: ' 抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 10,
 | 
				
			||||||
 | 
					          name: '巡检 ',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 11,
 | 
				
			||||||
 | 
					          name: '首检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 12,
 | 
				
			||||||
 | 
					          name: '末检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 13,
 | 
				
			||||||
 | 
					          name: '实时监测',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 14,
 | 
				
			||||||
 | 
					          name: 'FQC抽检',
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          id: 16,
 | 
				
			||||||
 | 
					          name: 'OQC抽检',
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getSupplierList: "/supplier/qmsSupplier/page",
 | 
				
			||||||
 | 
					        getProductList: "/basic/qmsProduct/page",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      customerTypeList:{},
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        timeSlot:null,
 | 
				
			||||||
 | 
					        inspectionStage:null,
 | 
				
			||||||
 | 
					        inspectionTypeId: null,
 | 
				
			||||||
 | 
					        productId: null,
 | 
				
			||||||
 | 
					        supplierId: null,
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  mounted () {
 | 
				
			||||||
 | 
					    this.getData();
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    // dataRule() {
 | 
				
			||||||
 | 
					    //   return {
 | 
				
			||||||
 | 
					    //     paramCode: [
 | 
				
			||||||
 | 
					    //       {
 | 
				
			||||||
 | 
					    //         required: true,
 | 
				
			||||||
 | 
					    //         message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					    //         trigger: "blur",
 | 
				
			||||||
 | 
					    //       },
 | 
				
			||||||
 | 
					    //     ],
 | 
				
			||||||
 | 
					    //     paramValue: [
 | 
				
			||||||
 | 
					    //       {
 | 
				
			||||||
 | 
					    //         required: true,
 | 
				
			||||||
 | 
					    //         message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					    //         trigger: "blur",
 | 
				
			||||||
 | 
					    //       },
 | 
				
			||||||
 | 
					    //     ],
 | 
				
			||||||
 | 
					    //   };
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    getData() {
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getSupplierList)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.supplierList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getProductList)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.productList = res.data.list
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // init(id) {
 | 
				
			||||||
 | 
					    //   this.dataForm.id = id || "";
 | 
				
			||||||
 | 
					    //   this.visible = true;
 | 
				
			||||||
 | 
					    //   this.$nextTick(() => {
 | 
				
			||||||
 | 
					    //     this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					    //     if (this.dataForm.id) {
 | 
				
			||||||
 | 
					    //       this.getInfo();
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    // getInfo() {
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //         return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //       this.dataForm = {
 | 
				
			||||||
 | 
					    //         ...this.dataForm,
 | 
				
			||||||
 | 
					    //         ...res.data,
 | 
				
			||||||
 | 
					    //       };
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {});
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    // getDict() {
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
				
			||||||
 | 
					    //       params: this.listQuery,
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       this.dataListLoading = false;
 | 
				
			||||||
 | 
					    //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //         this.customerTypeList = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    handleConditionSearch() {
 | 
				
			||||||
 | 
					      this.$emit("successSubmit", this.dataForm);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					    //   function () {
 | 
				
			||||||
 | 
					    //     // console.log(1111);
 | 
				
			||||||
 | 
					    //     // this.visible = false;
 | 
				
			||||||
 | 
					    //     this.$emit("successSubmit", this.dataForm.key);
 | 
				
			||||||
 | 
					    //     // this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					    //     //   if (!valid) {
 | 
				
			||||||
 | 
					    //     //     return false;
 | 
				
			||||||
 | 
					    //     //   }
 | 
				
			||||||
 | 
					    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
				
			||||||
 | 
					    //     //     "/sys/params",
 | 
				
			||||||
 | 
					    //     //     this.dataForm
 | 
				
			||||||
 | 
					    //     //   )
 | 
				
			||||||
 | 
					    //     //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //     //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //     //         return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					    //     //       }
 | 
				
			||||||
 | 
					    //     //       this.$message({
 | 
				
			||||||
 | 
					    //     //         message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					    //     //         type: "success",
 | 
				
			||||||
 | 
					    //     //         duration: 500,
 | 
				
			||||||
 | 
					    //     //         onClose: () => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //     //         },
 | 
				
			||||||
 | 
					    //     //       });
 | 
				
			||||||
 | 
					    //     //     })
 | 
				
			||||||
 | 
					    //     //     .catch(() => {});
 | 
				
			||||||
 | 
					    //     // });
 | 
				
			||||||
 | 
					    //   },
 | 
				
			||||||
 | 
					    //   1000,
 | 
				
			||||||
 | 
					    //   { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    // ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										190
									
								
								src/views/modules/quality/components/transferScheme-add.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										190
									
								
								src/views/modules/quality/components/transferScheme-add.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,190 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-02-14 15:02:26
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 15:48:18
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :rules="dataRule" :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
 | 
				
			||||||
 | 
					    label-width="130px">
 | 
				
			||||||
 | 
					    <el-row>
 | 
				
			||||||
 | 
					      <el-col :span="12">
 | 
				
			||||||
 | 
					        <el-form-item prop="transferSchemeCode" :label="$t('quality.code')">
 | 
				
			||||||
 | 
					          <el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('quality.code')">
 | 
				
			||||||
 | 
					          </el-input>
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					      <el-col :span="12">
 | 
				
			||||||
 | 
					        <el-form-item prop="transferSchemeName" :label="$t('quality.name')">
 | 
				
			||||||
 | 
					          <el-input v-model="dataForm.transferSchemeName" :placeholder="$t('quality.name')"></el-input>
 | 
				
			||||||
 | 
					        </el-form-item>
 | 
				
			||||||
 | 
					      </el-col>
 | 
				
			||||||
 | 
					    </el-row>
 | 
				
			||||||
 | 
					    <el-form-item prop="criticalSampleSize">
 | 
				
			||||||
 | 
					      (1)正常检查转入放宽检查:最近
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.normalToRelaxedOne" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批中的
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.normalToRelaxedTwo" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批检验合格
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="criticalSampleSize">
 | 
				
			||||||
 | 
					      (2)放宽检查恢复正常检查:最近
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.relaxedToNormalOne" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批中的
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.relaxedToNormalTwo" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批检验合格
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="criticalSampleSize">
 | 
				
			||||||
 | 
					      (3)正常检查转入加严检查:最近
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.normalToTightenedOne" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批中的
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.normalToTightenedTwo" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批检验合格
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="criticalSampleSize">
 | 
				
			||||||
 | 
					      (4)加严检查恢复正常检查:最近
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.tightenedToNormalOne" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批中的
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.tightenedToNormalTwo" style="width: 10%;">
 | 
				
			||||||
 | 
					      </el-input>
 | 
				
			||||||
 | 
					      批检验合格
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        submitURL: "/quality/qmsTransferScheme",
 | 
				
			||||||
 | 
					        infoURL: "/quality/qmsTransferScheme/{id}",
 | 
				
			||||||
 | 
					        getCodeURL: "/quality/qmsTransferScheme/getCode"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      options: [{
 | 
				
			||||||
 | 
					        value: 0,
 | 
				
			||||||
 | 
					        label: '不可用'
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					        value: 1,
 | 
				
			||||||
 | 
					        label: '可用'
 | 
				
			||||||
 | 
					      }],
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      dataRule:{
 | 
				
			||||||
 | 
					          transferSchemeName: [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              required: true,
 | 
				
			||||||
 | 
					              message: this.$t("quality.name"),
 | 
				
			||||||
 | 
					              trigger: "blur",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ],
 | 
				
			||||||
 | 
					          transferSchemeCode: [
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              required: true,
 | 
				
			||||||
 | 
					              message: this.$t("quality.code"),
 | 
				
			||||||
 | 
					              trigger: "blur",
 | 
				
			||||||
 | 
					            },
 | 
				
			||||||
 | 
					          ]
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        id: null,
 | 
				
			||||||
 | 
					        transferSchemeCode: null,
 | 
				
			||||||
 | 
					        normalToRelaxedOne: null,
 | 
				
			||||||
 | 
					        normalToRelaxedTwo: null,
 | 
				
			||||||
 | 
					        normalToTightenedOne: null,
 | 
				
			||||||
 | 
					        normalToTightenedTwo: null,
 | 
				
			||||||
 | 
					        relaxedToNormalOne: null,
 | 
				
			||||||
 | 
					        relaxedToNormalTwo: null,
 | 
				
			||||||
 | 
					        tightenedToNormalOne: null,
 | 
				
			||||||
 | 
					        tightenedToNormalTwo: null,
 | 
				
			||||||
 | 
					        transferSchemeName: null
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // computed: {
 | 
				
			||||||
 | 
					   
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    init(id, ) {
 | 
				
			||||||
 | 
					      this.dataForm.id = id || ""
 | 
				
			||||||
 | 
					      // console.log(11111)
 | 
				
			||||||
 | 
					      // this.dataForm.dictTypeId = dictTypeId || "";
 | 
				
			||||||
 | 
					      this.visible = true
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					        if (this.dataForm.id) {
 | 
				
			||||||
 | 
					          this.getInfo()
 | 
				
			||||||
 | 
					        } else {
 | 
				
			||||||
 | 
					          this.getCode()
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    getCode() {
 | 
				
			||||||
 | 
					      this.$http.post(this.urlOptions.getCodeURL)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code === 0) {
 | 
				
			||||||
 | 
					            console.log(res);
 | 
				
			||||||
 | 
					            this.dataForm.transferSchemeCode = res.data
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    getInfo() {
 | 
				
			||||||
 | 
					      this.$http
 | 
				
			||||||
 | 
					        .get(`/quality/qmsTransferScheme/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					        .then(({ data: res }) => {
 | 
				
			||||||
 | 
					          if (res.code !== 0) {
 | 
				
			||||||
 | 
					            return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.dataForm = {
 | 
				
			||||||
 | 
					            ...this.dataForm,
 | 
				
			||||||
 | 
					            ...res.data,
 | 
				
			||||||
 | 
					          };
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					        .catch(() => {});
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					      function () {
 | 
				
			||||||
 | 
					        this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					          if (!valid) {
 | 
				
			||||||
 | 
					            return false;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
 | 
				
			||||||
 | 
					            .then(({ data: res }) => {
 | 
				
			||||||
 | 
					              if (res.code !== 0) {
 | 
				
			||||||
 | 
					                return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              this.$message({
 | 
				
			||||||
 | 
					                message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					                type: "success",
 | 
				
			||||||
 | 
					                duration: 500,
 | 
				
			||||||
 | 
					                onClose: () => {
 | 
				
			||||||
 | 
					                  console.log(1111);
 | 
				
			||||||
 | 
					                  this.visible = false;
 | 
				
			||||||
 | 
					                  this.$emit("successSubmit");
 | 
				
			||||||
 | 
					                },
 | 
				
			||||||
 | 
					              });
 | 
				
			||||||
 | 
					            })
 | 
				
			||||||
 | 
					            .catch(() => {});
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      1000,
 | 
				
			||||||
 | 
					      { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
							
								
								
									
										137
									
								
								src/views/modules/quality/components/transferSchemeSearch.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								src/views/modules/quality/components/transferSchemeSearch.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,137 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zwq
 | 
				
			||||||
 | 
					 * @Date: 2023-01-04 10:29:40
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 16:01:06
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
 | 
				
			||||||
 | 
					    <el-form-item prop="transferSchemeCode" :label="$t('basic.code')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.transferSchemeCode" :placeholder="$t('basic.code')"></el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					    <el-form-item prop="transferSchemeName" :label="$t('basic.code')">
 | 
				
			||||||
 | 
					      <el-input v-model="dataForm.transferSchemeName" :placeholder="$t('basic.code')"></el-input>
 | 
				
			||||||
 | 
					    </el-form-item>
 | 
				
			||||||
 | 
					  </el-form>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import debounce from "lodash/debounce";
 | 
				
			||||||
 | 
					import basicAdd from "@/mixins/basic-add";
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicAdd],
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      // urlOptions: {
 | 
				
			||||||
 | 
					      //   submitURL: "/sys/params/",
 | 
				
			||||||
 | 
					      //   infoURL: "/sys/params",
 | 
				
			||||||
 | 
					      // },
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getCustomerPageListURL: "/quality/qmsTransferScheme/page"
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      visible: false,
 | 
				
			||||||
 | 
					      customerTypeList:{},
 | 
				
			||||||
 | 
					      dataForm: {
 | 
				
			||||||
 | 
					        transferSchemeName: null,
 | 
				
			||||||
 | 
					        transferSchemeCode:null
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  computed: {
 | 
				
			||||||
 | 
					    // dataRule() {
 | 
				
			||||||
 | 
					    //   return {
 | 
				
			||||||
 | 
					    //     paramCode: [
 | 
				
			||||||
 | 
					    //       {
 | 
				
			||||||
 | 
					    //         required: true,
 | 
				
			||||||
 | 
					    //         message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					    //         trigger: "blur",
 | 
				
			||||||
 | 
					    //       },
 | 
				
			||||||
 | 
					    //     ],
 | 
				
			||||||
 | 
					    //     paramValue: [
 | 
				
			||||||
 | 
					    //       {
 | 
				
			||||||
 | 
					    //         required: true,
 | 
				
			||||||
 | 
					    //         message: this.$t("validate.required"),
 | 
				
			||||||
 | 
					    //         trigger: "blur",
 | 
				
			||||||
 | 
					    //       },
 | 
				
			||||||
 | 
					    //     ],
 | 
				
			||||||
 | 
					    //   };
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    // init(id) {
 | 
				
			||||||
 | 
					    //   this.dataForm.id = id || "";
 | 
				
			||||||
 | 
					    //   this.visible = true;
 | 
				
			||||||
 | 
					    //   this.$nextTick(() => {
 | 
				
			||||||
 | 
					    //     this.$refs["dataForm"].resetFields();
 | 
				
			||||||
 | 
					    //     if (this.dataForm.id) {
 | 
				
			||||||
 | 
					    //       this.getInfo();
 | 
				
			||||||
 | 
					    //     }
 | 
				
			||||||
 | 
					    //   });
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 获取信息
 | 
				
			||||||
 | 
					    // getInfo() {
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(`/sys/params/${this.dataForm.id}`)
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //         return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //       this.dataForm = {
 | 
				
			||||||
 | 
					    //         ...this.dataForm,
 | 
				
			||||||
 | 
					    //         ...res.data,
 | 
				
			||||||
 | 
					    //       };
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .catch(() => {});
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    // 表单提交
 | 
				
			||||||
 | 
					    // getDict() {
 | 
				
			||||||
 | 
					    //   this.$http
 | 
				
			||||||
 | 
					    //     .get(this.urlOptions.getCustomerPageListURL, {
 | 
				
			||||||
 | 
					    //       params: this.listQuery,
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //       this.dataListLoading = false;
 | 
				
			||||||
 | 
					    //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //         this.customerTypeList = res.data
 | 
				
			||||||
 | 
					    //       }
 | 
				
			||||||
 | 
					    //     })
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    handleConditionSearch() {
 | 
				
			||||||
 | 
					      this.$emit("successSubmit", this.dataForm);
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // dataFormSubmitHandle: debounce(
 | 
				
			||||||
 | 
					    //   function () {
 | 
				
			||||||
 | 
					    //     // console.log(1111);
 | 
				
			||||||
 | 
					    //     // this.visible = false;
 | 
				
			||||||
 | 
					    //     this.$emit("successSubmit", this.dataForm.key);
 | 
				
			||||||
 | 
					    //     // this.$refs["dataForm"].validate((valid) => {
 | 
				
			||||||
 | 
					    //     //   if (!valid) {
 | 
				
			||||||
 | 
					    //     //     return false;
 | 
				
			||||||
 | 
					    //     //   }
 | 
				
			||||||
 | 
					    //     //   this.$http[!this.dataForm.id ? "post" : "put"](
 | 
				
			||||||
 | 
					    //     //     "/sys/params",
 | 
				
			||||||
 | 
					    //     //     this.dataForm
 | 
				
			||||||
 | 
					    //     //   )
 | 
				
			||||||
 | 
					    //     //     .then(({ data: res }) => {
 | 
				
			||||||
 | 
					    //     //       if (res.code !== 0) {
 | 
				
			||||||
 | 
					    //     //         return this.$message.error(res.msg);
 | 
				
			||||||
 | 
					    //     //       }
 | 
				
			||||||
 | 
					    //     //       this.$message({
 | 
				
			||||||
 | 
					    //     //         message: this.$t("prompt.success"),
 | 
				
			||||||
 | 
					    //     //         type: "success",
 | 
				
			||||||
 | 
					    //     //         duration: 500,
 | 
				
			||||||
 | 
					    //     //         onClose: () => {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    //     //         },
 | 
				
			||||||
 | 
					    //     //       });
 | 
				
			||||||
 | 
					    //     //     })
 | 
				
			||||||
 | 
					    //     //     .catch(() => {});
 | 
				
			||||||
 | 
					    //     // });
 | 
				
			||||||
 | 
					    //   },
 | 
				
			||||||
 | 
					    //   1000,
 | 
				
			||||||
 | 
					    //   { leading: true, trailing: false }
 | 
				
			||||||
 | 
					    // ),
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 14:29:43
 | 
					 * @LastEditTime: 2023-05-24 15:54:21
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -255,7 +255,8 @@ export default {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          .catch(() => { });
 | 
					          .catch(() => { });
 | 
				
			||||||
      } else if (val.type === 'edit') {
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -272,7 +273,7 @@ export default {
 | 
				
			|||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
          this.addOrUpdateVisible = true;
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 16:21:38
 | 
					 * @LastEditTime: 2023-05-24 15:54:07
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -182,7 +182,8 @@ export default {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          .catch(() => { });
 | 
					          .catch(() => { });
 | 
				
			||||||
      } else if (val.type === 'edit') {
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -199,7 +200,7 @@ export default {
 | 
				
			|||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
          this.addOrUpdateVisible = true;
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 16:15:42
 | 
					 * @LastEditTime: 2023-05-24 15:53:39
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -176,7 +176,8 @@ export default {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          .catch(() => { });
 | 
					          .catch(() => { });
 | 
				
			||||||
      } else if (val.type === 'edit') {
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -193,7 +194,7 @@ export default {
 | 
				
			|||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
          this.addOrUpdateVisible = true;
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 15:54:53
 | 
					 * @LastEditTime: 2023-05-24 15:53:25
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -246,7 +246,8 @@ export default {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          .catch(() => { });
 | 
					          .catch(() => { });
 | 
				
			||||||
      } else if (val.type === 'edit') {
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -263,7 +264,7 @@ export default {
 | 
				
			|||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
          this.addOrUpdateVisible = true;
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										234
									
								
								src/views/modules/quality/qmsTransferRecords.vue
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										234
									
								
								src/views/modules/quality/qmsTransferRecords.vue
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,234 @@
 | 
				
			|||||||
 | 
					<!--
 | 
				
			||||||
 | 
					 * @Author: zhp
 | 
				
			||||||
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 | 
					 * @LastEditTime: 2023-05-24 16:38:23
 | 
				
			||||||
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 | 
					 * @Description: 
 | 
				
			||||||
 | 
					-->
 | 
				
			||||||
 | 
					<template>
 | 
				
			||||||
 | 
					  <el-card shadow="never" class="aui-card--fill">
 | 
				
			||||||
 | 
					    <div class="mod-sys__user">
 | 
				
			||||||
 | 
					      <SearchBar :formConfigs="formConfig" ref="ruleForm" @headBtnClick="buttonClick">
 | 
				
			||||||
 | 
					        <el-badge :value="1" class="item">
 | 
				
			||||||
 | 
					          <el-button type="primary" size="small" @click="conditionSearch">条件搜索</el-button>
 | 
				
			||||||
 | 
					        </el-badge>
 | 
				
			||||||
 | 
					      </SearchBar>
 | 
				
			||||||
 | 
					      <base-table :table-props="tableProps" :page="listQuery.page" :limit="listQuery.limit" :table-data="tableData">
 | 
				
			||||||
 | 
					        <method-btn v-if="tableBtn.length" slot="handleBtn" :width="100" label="操作" :method-list="tableBtn"
 | 
				
			||||||
 | 
					          @clickBtn="handleClick" />
 | 
				
			||||||
 | 
					      </base-table>
 | 
				
			||||||
 | 
					      <pagination :limit.sync="listQuery.limit" :page.sync="listQuery.page" :total="listQuery.total"
 | 
				
			||||||
 | 
					        @pagination="getDataList" />
 | 
				
			||||||
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
 | 
					        <transferRecords-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
 | 
					        </transferRecords-add>
 | 
				
			||||||
 | 
					        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
 | 
					        <transferRecords-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
				
			||||||
 | 
					        </transferRecords-search>
 | 
				
			||||||
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
 | 
					          <el-col :span="12">
 | 
				
			||||||
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
 | 
					              {{ $t("close") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					            <el-button size="small" class="btnTextStyle" type="primary" plain @click="handleSearchReset">{{
 | 
				
			||||||
 | 
					              $t("reset")
 | 
				
			||||||
 | 
					              }}</el-button>
 | 
				
			||||||
 | 
					            <el-button type="primary" size="small" class="btnTextStyle" @click="handleSearchConfirm">
 | 
				
			||||||
 | 
					              {{ $t("search") }}
 | 
				
			||||||
 | 
					            </el-button>
 | 
				
			||||||
 | 
					          </el-col>
 | 
				
			||||||
 | 
					        </el-row>
 | 
				
			||||||
 | 
					      </base-dialog>
 | 
				
			||||||
 | 
					    </div>
 | 
				
			||||||
 | 
					  </el-card>
 | 
				
			||||||
 | 
					</template>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<script>
 | 
				
			||||||
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
 | 
					import transferRecordsAdd from "./components/transferRecords-add"
 | 
				
			||||||
 | 
					// import AddOrUpdate from './params-add-or-update'
 | 
				
			||||||
 | 
					import transferRecordsSearch from "./components/transferRecordsSearch"
 | 
				
			||||||
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
 | 
					const tableProps = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'productName',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.productName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'supplierName',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.supplierName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'transferOutName',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.transferOutName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					     prop: 'transferInName',
 | 
				
			||||||
 | 
					     label: i18n.t("quality.transferInName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'dataSources',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.dataSources"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					   {
 | 
				
			||||||
 | 
					     prop: 'remark',
 | 
				
			||||||
 | 
					     label: i18n.t("quality.remark"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'userName',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.userName"),
 | 
				
			||||||
 | 
					    align: 'center'
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					]
 | 
				
			||||||
 | 
					const tableBtn = [
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "edit",
 | 
				
			||||||
 | 
					    btnName: "编辑",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    type: "delete",
 | 
				
			||||||
 | 
					    btnName: "删除",
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					];
 | 
				
			||||||
 | 
					export default {
 | 
				
			||||||
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
 | 
					  components: {
 | 
				
			||||||
 | 
					    transferRecordsSearch,
 | 
				
			||||||
 | 
					    transferRecordsAdd
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  data() {
 | 
				
			||||||
 | 
					    return {
 | 
				
			||||||
 | 
					      urlOptions: {
 | 
				
			||||||
 | 
					        getDataListURL: "/quality/qmsTransferRecords/page",
 | 
				
			||||||
 | 
					        deleteURL: "/quality/qmsTransferRecords",
 | 
				
			||||||
 | 
					      },
 | 
				
			||||||
 | 
					      tableProps,
 | 
				
			||||||
 | 
					      tableBtn,
 | 
				
			||||||
 | 
					      searchOrEditTitle: '',
 | 
				
			||||||
 | 
					      searchOrUpdateVisible: false,
 | 
				
			||||||
 | 
					      formConfig: [
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "",
 | 
				
			||||||
 | 
					        //   label: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   placeholder: i18n.t("params.paramCode"),
 | 
				
			||||||
 | 
					        //   param: "paramCode",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        // {
 | 
				
			||||||
 | 
					        //   type: "separate",
 | 
				
			||||||
 | 
					        // },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: "新增",
 | 
				
			||||||
 | 
					          name: "add",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        },
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          type: "button",
 | 
				
			||||||
 | 
					          btnName: "搜索",
 | 
				
			||||||
 | 
					          name: "search",
 | 
				
			||||||
 | 
					          color: "primary",
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      ],
 | 
				
			||||||
 | 
					    };
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  // components: {
 | 
				
			||||||
 | 
					  //   AddOrUpdate,
 | 
				
			||||||
 | 
					  // },
 | 
				
			||||||
 | 
					  methods: {
 | 
				
			||||||
 | 
					    //search-bar点击
 | 
				
			||||||
 | 
					    handleProductCancel() {
 | 
				
			||||||
 | 
					      this.productOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      this.productOrEditTitle = "";
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    // handleSearchCancel() {
 | 
				
			||||||
 | 
					    //   this.searchOrEditTitle = "";
 | 
				
			||||||
 | 
					    //   this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					    // },
 | 
				
			||||||
 | 
					    conditionSearch() {
 | 
				
			||||||
 | 
					      this.searchOrEditTitle = "搜索";
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = true;
 | 
				
			||||||
 | 
					      this.$nextTick(() => {
 | 
				
			||||||
 | 
					        this.$refs.searchOrUpdate.init();
 | 
				
			||||||
 | 
					      });
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
 | 
					      this.listQuery.startTime = dataForm.timeSlot ? dataForm.timeSlot[0] : ''
 | 
				
			||||||
 | 
					      this.listQuery.endTime = dataForm.timeSlot ? dataForm.timeSlot[1] : ''
 | 
				
			||||||
 | 
					      this.listQuery.inspectionStage = dataForm.inspectionStage
 | 
				
			||||||
 | 
					      this.listQuery.inspectionTypeId = dataForm.inspectionTypeId
 | 
				
			||||||
 | 
					      this.listQuery.productId = dataForm.productId
 | 
				
			||||||
 | 
					      this.listQuery.supplierId = dataForm.supplierId
 | 
				
			||||||
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
 | 
					      this.getDataList();
 | 
				
			||||||
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
 | 
					      // console.log(11111);
 | 
				
			||||||
 | 
					      // this.conditionSearchSubmit();
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    handleClick(val) {
 | 
				
			||||||
 | 
					      console.log(val);
 | 
				
			||||||
 | 
					      if (val.type === "delete") {
 | 
				
			||||||
 | 
					        this.$confirm(`确定对[名称=${val.data.failureTypeName}]进行删除操作?`, "提示", {
 | 
				
			||||||
 | 
					          confirmButtonText: "确定",
 | 
				
			||||||
 | 
					          cancelButtonText: "取消",
 | 
				
			||||||
 | 
					          type: "warning",
 | 
				
			||||||
 | 
					        })
 | 
				
			||||||
 | 
					          .then(() => {
 | 
				
			||||||
 | 
					            this.$http.delete(this.urlOptions.deleteURL, { data: [val.data.id] }).then(({ data }) => {
 | 
				
			||||||
 | 
					              if (data && data.code === 0) {
 | 
				
			||||||
 | 
					                this.$message({
 | 
				
			||||||
 | 
					                  message: "操作成功",
 | 
				
			||||||
 | 
					                  type: "success",
 | 
				
			||||||
 | 
					                  duration: 1500,
 | 
				
			||||||
 | 
					                  onClose: () => {
 | 
				
			||||||
 | 
					                    this.getDataList();
 | 
				
			||||||
 | 
					                  },
 | 
				
			||||||
 | 
					                });
 | 
				
			||||||
 | 
					              } else {
 | 
				
			||||||
 | 
					                this.$message.error(data.msg);
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					            });
 | 
				
			||||||
 | 
					          })
 | 
				
			||||||
 | 
					          .catch(() => { });
 | 
				
			||||||
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					    buttonClick(val) {
 | 
				
			||||||
 | 
					      switch (val.btnName) {
 | 
				
			||||||
 | 
					        case "search":
 | 
				
			||||||
 | 
					          // this.listQuery.paramCode = val.paramCode;
 | 
				
			||||||
 | 
					          this.listQuery.page = 1;
 | 
				
			||||||
 | 
					          this.listQuery.code = null
 | 
				
			||||||
 | 
					          this.listQuery.name = null
 | 
				
			||||||
 | 
					          this.listQuery.failureTypeStatus = null
 | 
				
			||||||
 | 
					          this.getDataList();
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        case "add":
 | 
				
			||||||
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
 | 
					          break;
 | 
				
			||||||
 | 
					        default:
 | 
				
			||||||
 | 
					          console.log(val)
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    },
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
 | 
					};
 | 
				
			||||||
 | 
					</script>
 | 
				
			||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-01-11 09:24:58
 | 
					 * @Date: 2023-01-11 09:24:58
 | 
				
			||||||
 * @LastEditTime: 2023-04-04 15:55:58
 | 
					 * @LastEditTime: 2023-05-24 16:01:20
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
@@ -22,13 +22,14 @@
 | 
				
			|||||||
      <!-- 弹窗, 新增 / 修改 -->
 | 
					      <!-- 弹窗, 新增 / 修改 -->
 | 
				
			||||||
      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
					      <base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
 | 
				
			||||||
        @confirm="handleConfirm" :before-close="handleCancel">
 | 
					        @confirm="handleConfirm" :before-close="handleCancel">
 | 
				
			||||||
        <samplingPlan-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
					        <transferScheme-add ref="addOrUpdate" @refreshDataList="successSubmit">
 | 
				
			||||||
          </samplingPlan-add>
 | 
					        </transferScheme-add>
 | 
				
			||||||
          <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
					        <!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
 | 
				
			||||||
      </base-dialog>
 | 
					      </base-dialog>
 | 
				
			||||||
      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
					      <base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
 | 
				
			||||||
        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
					        @confirm="handleSearchConfirm" :before-close="handleSearchCancel">
 | 
				
			||||||
        <!-- <failureType-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit"></failureType-search> -->
 | 
					        <transferScheme-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
 | 
				
			||||||
 | 
					        </transferScheme-search>
 | 
				
			||||||
        <el-row slot="footer" type="flex" justify="end">
 | 
					        <el-row slot="footer" type="flex" justify="end">
 | 
				
			||||||
          <el-col :span="12">
 | 
					          <el-col :span="12">
 | 
				
			||||||
            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
					            <el-button size="small" type="primary" plain class="btnTextStyle" @click="handleSearchCancel">
 | 
				
			||||||
@@ -48,98 +49,52 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
import basicPage from "@/mixins/basic-page"
 | 
					import basicPage from "@/mixins/basic-page"
 | 
				
			||||||
import samplingPlanAdd from "./components/samplingPlan-add"
 | 
					import transferSchemeAdd from "./components/transferScheme-add"
 | 
				
			||||||
 | 
					import normalToRelaxed from "./components/normalToRelaxed"
 | 
				
			||||||
 | 
					import normalToTightened from "./components/normalToTightened"
 | 
				
			||||||
 | 
					import relaxedToNormal from "./components/relaxedToNormal"
 | 
				
			||||||
 | 
					import tightenedToNormal from "./components/tightenedToNormal"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// import AddOrUpdate from './params-add-or-update'
 | 
					// import AddOrUpdate from './params-add-or-update'
 | 
				
			||||||
// import failureTypeSearch from "./components/failureTypeSearch"
 | 
					import transferSchemeSearch from "./components/transferSchemeSearch.vue"
 | 
				
			||||||
// import available from "./components/available.vue"
 | 
					// import available from "./components/available.vue"
 | 
				
			||||||
import basicSearch from "@/mixins/basic-search"
 | 
					import basicSearch from "@/mixins/basic-search"
 | 
				
			||||||
import i18n from "@/i18n"
 | 
					import i18n from "@/i18n"
 | 
				
			||||||
const tableProps = [
 | 
					const tableProps = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'sampleRange',
 | 
					    prop: 'transferSchemeCode',
 | 
				
			||||||
    label: i18n.t("quality.sampleRange"),
 | 
					    label: i18n.t("quality.code"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'fourPointZero',
 | 
					    prop: 'transferSchemeName',
 | 
				
			||||||
    label: i18n.t("quality.fourPointZero"),
 | 
					    label: i18n.t("quality.name"),
 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'onePointFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.onePointFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center'
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
   {
 | 
					   {
 | 
				
			||||||
     prop: 'onePointZero',
 | 
					     prop: 'onePointZero',
 | 
				
			||||||
     label: i18n.t("quality.onePointZero"),
 | 
					     label: i18n.t("quality.normalToTightened"),
 | 
				
			||||||
    align: 'center'
 | 
					     align: 'center',
 | 
				
			||||||
 | 
					     subcomponent: normalToTightened
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'onePointFive',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.tightenedToNormal"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    subcomponent: tightenedToNormal
 | 
				
			||||||
 | 
					  },
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    prop: 'ten',
 | 
				
			||||||
 | 
					    label: i18n.t("quality.normalToRelaxed"),
 | 
				
			||||||
 | 
					    align: 'center',
 | 
				
			||||||
 | 
					    subcomponent: normalToRelaxed
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    prop: 'sixPointFive',
 | 
					    prop: 'sixPointFive',
 | 
				
			||||||
    label: i18n.t("quality.sixPointFive"),
 | 
					    label: i18n.t("quality.relaxedToNormal"),
 | 
				
			||||||
    align: 'center'
 | 
					    align: 'center',
 | 
				
			||||||
  },
 | 
					    subcomponent: relaxedToNormal
 | 
				
			||||||
   {
 | 
					  }
 | 
				
			||||||
     prop: 'ten',
 | 
					 | 
				
			||||||
     label: i18n.t("quality.ten"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'twoPointFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.twoPointFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointFour',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointFour"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointOne',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointOne"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointOneFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointOneFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointSixFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointSixFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointTwoFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointTwoFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointZeroFour',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointZeroFour"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointZeroOne',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointZeroOne"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointZeroOneFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointZeroOneFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointZeroSixFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointZeroSixFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  {
 | 
					 | 
				
			||||||
    prop: 'zeroPointZeroTwoFive',
 | 
					 | 
				
			||||||
    label: i18n.t("quality.zeroPointZeroTwoFive"),
 | 
					 | 
				
			||||||
    align: 'center'
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
]
 | 
					]
 | 
				
			||||||
const tableBtn = [
 | 
					const tableBtn = [
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
@@ -154,8 +109,8 @@ const tableBtn = [
 | 
				
			|||||||
export default {
 | 
					export default {
 | 
				
			||||||
  mixins: [basicPage, basicSearch],
 | 
					  mixins: [basicPage, basicSearch],
 | 
				
			||||||
  components: {
 | 
					  components: {
 | 
				
			||||||
    // failureTypeSearch,
 | 
					    transferSchemeSearch,
 | 
				
			||||||
    samplingPlanAdd
 | 
					    transferSchemeAdd
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  data() {
 | 
					  data() {
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
@@ -213,7 +168,9 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    conditionSearchSubmit(dataForm) {
 | 
					    conditionSearchSubmit(dataForm) {
 | 
				
			||||||
      this.listQuery.code = dataForm.code
 | 
					      this.listQuery.transferSchemeCode = dataForm.transferSchemeCode
 | 
				
			||||||
 | 
					      this.listQuery.transferSchemeName = dataForm.transferSchemeName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      this.listQuery.page = 1;
 | 
					      this.listQuery.page = 1;
 | 
				
			||||||
      this.getDataList();
 | 
					      this.getDataList();
 | 
				
			||||||
      this.searchOrUpdateVisible = false;
 | 
					      this.searchOrUpdateVisible = false;
 | 
				
			||||||
@@ -246,7 +203,8 @@ export default {
 | 
				
			|||||||
          })
 | 
					          })
 | 
				
			||||||
          .catch(() => { });
 | 
					          .catch(() => { });
 | 
				
			||||||
      } else if (val.type === 'edit') {
 | 
					      } else if (val.type === 'edit') {
 | 
				
			||||||
        this.addOrUpdateVisible = true;
 | 
					        this.addOrUpdateVisible = true
 | 
				
			||||||
 | 
					        this.addOrEditTitle = this.$t('edit')
 | 
				
			||||||
        this.$nextTick(() => {
 | 
					        this.$nextTick(() => {
 | 
				
			||||||
          this.$refs.addOrUpdate.init(val.data.id);
 | 
					          this.$refs.addOrUpdate.init(val.data.id);
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@@ -263,7 +221,7 @@ export default {
 | 
				
			|||||||
          this.getDataList();
 | 
					          this.getDataList();
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
        case "add":
 | 
					        case "add":
 | 
				
			||||||
          this.addOrEditTitle = '新增'
 | 
					          this.addOrEditTitle = this.$t('add')
 | 
				
			||||||
          this.addOrUpdateVisible = true;
 | 
					          this.addOrUpdateVisible = true;
 | 
				
			||||||
          this.addOrUpdateHandle()
 | 
					          this.addOrUpdateHandle()
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
<!--
 | 
					<!--
 | 
				
			||||||
 * @Author: zhp
 | 
					 * @Author: zhp
 | 
				
			||||||
 * @Date: 2023-04-17 14:23:17
 | 
					 * @Date: 2023-04-17 14:23:17
 | 
				
			||||||
 * @LastEditTime: 2023-04-24 14:27:08
 | 
					 * @LastEditTime: 2023-05-12 14:14:39
 | 
				
			||||||
 * @LastEditors: zhp
 | 
					 * @LastEditors: zhp
 | 
				
			||||||
 * @Description: 
 | 
					 * @Description: 
 | 
				
			||||||
-->
 | 
					-->
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -117,7 +117,7 @@ export default {
 | 
				
			|||||||
      }).catch(() => {})
 | 
					      }).catch(() => {})
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    // 表单提交 
 | 
					    // 表单提交 
 | 
				
			||||||
    dataFormSubmitHandle: debounce(function () {
 | 
					    dataFormSubmit: debounce(function () {
 | 
				
			||||||
      this.$refs['dataForm'].validate((valid) => {
 | 
					      this.$refs['dataForm'].validate((valid) => {
 | 
				
			||||||
        if (!valid) {
 | 
					        if (!valid) {
 | 
				
			||||||
          return false
 | 
					          return false
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user