Compare commits
No commits in common. "52ad4588d33956aa22b7d89ca762ccfdf611c005" and "fcd9576fd9df6dcc1a34ff88a80f84b38494d481" have entirely different histories.
52ad4588d3
...
fcd9576fd9
2
.gitignore
vendored
2
.gitignore
vendored
@ -19,5 +19,3 @@ yarn-error.log*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw*
|
||||
/public/index.html
|
||||
/package-lock.json
|
||||
|
14283
package-lock.json
generated
14283
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -15,9 +15,9 @@
|
||||
"axios": "^0.19.2",
|
||||
"babel-eslint": "^8.0.1",
|
||||
"babel-plugin-component": "^1.1.1",
|
||||
"code-brick-zj": "0.0.7",
|
||||
"code-brick-zj": "0.0.4",
|
||||
"core-js": "^3.6.5",
|
||||
"echarts": "^5.4.2",
|
||||
"echarts": "^5.3.3",
|
||||
"element-theme": "^2.0.1",
|
||||
"element-ui": "^2.15.7",
|
||||
"js-cookie": "^2.2.1",
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-22 14:57:50
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-12 14:03:44
|
||||
* @LastEditTime: 2023-01-31 09:41:18
|
||||
* @Description:
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -390,7 +390,7 @@ img {
|
||||
}
|
||||
.aui-navbar__icon-menu {
|
||||
vertical-align: middle;
|
||||
font-size: 24px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.el-dropdown {
|
||||
color: $--color-text-secondary;
|
||||
|
@ -1,29 +1,16 @@
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-23 14:36:20
|
||||
* @LastEditTime: 2023-05-08 10:26:39
|
||||
* @FilePath: \basic-admin\src\filters\DataDict\index.js
|
||||
* @Description: 部分常量的数据字典定义
|
||||
*/
|
||||
import i18n from "@/i18n"
|
||||
|
||||
const table = {
|
||||
measurementType: {
|
||||
0: '计量',
|
||||
1:'计数',
|
||||
},
|
||||
VerifyType: {
|
||||
0: i18n.t('gage.insideVerify'),
|
||||
1: i18n.t('gage.outsideVerify')
|
||||
},
|
||||
eventList: {
|
||||
0: '领用',
|
||||
1: '归还',
|
||||
2: '量具报废',
|
||||
3: '量具维修',
|
||||
4: '量具购买',
|
||||
5: '量具检测',
|
||||
6: '量具转移'
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export default function (dictTable) {
|
||||
|
@ -2,7 +2,7 @@
|
||||
/*
|
||||
* @Date: 2020-12-29 16:49:28
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 12:39:26
|
||||
* @LastEditTime: 2023-01-05 15:49:17
|
||||
* @FilePath: \basic-admin\src\filters\basicData\index.js
|
||||
* @Description:
|
||||
*/
|
||||
@ -29,10 +29,6 @@ const table = {
|
||||
'0': i18n.t('logLogin.status0'),
|
||||
'1': i18n.t('logLogin.status1')
|
||||
},
|
||||
scheduleStatus: {
|
||||
'0': i18n.t('schedule.status0'),
|
||||
'1': i18n.t('schedule.status1')
|
||||
},
|
||||
}
|
||||
|
||||
export default function(dictTable) {
|
||||
|
267
src/i18n/en.js
267
src/i18n/en.js
@ -1,267 +0,0 @@
|
||||
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
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* @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',
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* @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,17 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2023-05-12 12:37:21
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 12:40:16
|
||||
* @Description:
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
import Cookies from 'js-cookie'
|
||||
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN'
|
||||
import zhCN from './zh-CN'
|
||||
import EnLocale from 'element-ui/lib/locale/lang/en'
|
||||
import en from './en'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
|
||||
@ -19,13 +10,8 @@ export const messages = {
|
||||
'zh-CN': {
|
||||
'_lang': '简体中文',
|
||||
...zhCN,
|
||||
...zhCNLocale,
|
||||
},
|
||||
'en': {
|
||||
'_lang': 'English',
|
||||
...en,
|
||||
...EnLocale
|
||||
},
|
||||
...zhCNLocale
|
||||
}
|
||||
}
|
||||
|
||||
export default new VueI18n({
|
||||
|
@ -1,19 +1,11 @@
|
||||
|
||||
import module from './zh'
|
||||
|
||||
const t = {}
|
||||
|
||||
t.module = module
|
||||
|
||||
t.loading = '加载中...'
|
||||
|
||||
t.brand = {}
|
||||
t.brand.lg = 'QMS'
|
||||
t.brand.mini = 'qms'
|
||||
|
||||
t.public = {}
|
||||
t.public.operation = '操作'
|
||||
|
||||
t.add = '新增'
|
||||
t.delete = '删除'
|
||||
t.deleteBatch = '删除'
|
||||
@ -41,8 +33,6 @@ t.all = '全部'
|
||||
t.available = '可用'
|
||||
t.notAvailable = '不可用'
|
||||
t.time = '时间段'
|
||||
t.parameter = '台差参数'
|
||||
|
||||
|
||||
|
||||
|
||||
@ -297,7 +287,6 @@ t.basic.client = '服务对象'
|
||||
|
||||
t.quality = {}
|
||||
t.quality.name = '名称'
|
||||
t.quality.code = '编号'
|
||||
t.quality.planCategory = '计划类别'
|
||||
t.quality.fatalFlaw = '致命缺陷'
|
||||
t.quality.acceptable = '可接受'
|
||||
@ -328,25 +317,6 @@ t.quality.disposalMethodCode = '编码'
|
||||
t.quality.judgmentMark = '判断标识'
|
||||
t.quality.disposalMethodStatus = '状态'
|
||||
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 = {}
|
||||
@ -441,7 +411,7 @@ t.gage.createDate = '发生日期'
|
||||
t.gage.userDepartment = '使用部门'
|
||||
t.gage.useLocation = '使用位置'
|
||||
t.gage.remark = '备注'
|
||||
t.gage.measuringToolSpecification = '量具规格'
|
||||
t.gage.measuringToolSpecification = '规格'
|
||||
t.gage.client = '委托单位'
|
||||
t.gage.certificateCodeBh = '证书编号Bh'
|
||||
t.gage.certificateCode = '证书编号'
|
||||
@ -474,72 +444,13 @@ t.gage.client ='委托单位'
|
||||
t.gage.measure = '测'
|
||||
t.gage.inspectionTime = '校验时间'
|
||||
t.gage.measurementTime = '测定时间'
|
||||
t.gage.measurementTime = '测定时间'
|
||||
t.gage.corporation = '公司'
|
||||
t.gage.itemNo = '料号'
|
||||
t.gage.measurementNumber = '测定次数'
|
||||
t.gage.partNumber = '零件数量'
|
||||
t.gage.precisionDecimalPlace = '精度小数位数'
|
||||
t.gage.connection = '客户'
|
||||
t.gage.publicErrand = '公差'
|
||||
t.gage.tester = '测试者'
|
||||
t.gage.partName = '品名 '
|
||||
t.gage.specification = '规格'
|
||||
t.gage.parentId = '父类型'
|
||||
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 = '培训类型'
|
||||
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
t.gage.partName = '品名'
|
||||
|
||||
|
||||
|
||||
|
@ -1,14 +0,0 @@
|
||||
/*
|
||||
* @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: '添加时间',
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
/*
|
||||
* @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,
|
||||
}
|
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 6.6 KiB |
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-22 14:57:50
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 13:41:20
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-04-03 14:37:45
|
||||
* @Description:
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-24 11:19:43
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2023-05-16 14:55:04
|
||||
* @LastEditTime: 2023-04-18 14:28:38
|
||||
* @Description:
|
||||
*/
|
||||
export default {
|
||||
@ -51,7 +51,7 @@ export default {
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
});
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle(val) {
|
||||
@ -103,16 +103,12 @@ export default {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === "delete") {
|
||||
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)
|
||||
this.deleteHandle(val.data.id,val.data.name)
|
||||
}
|
||||
},
|
||||
// 删除
|
||||
deleteHandle(id, name,index) {
|
||||
this.$confirm(`确定对${name?'[名称='+name+']':'[序号='+index+']'}进行删除操作?`, "提示", {
|
||||
deleteHandle(id, name) {
|
||||
this.$confirm(`确定对[名称=${name}]进行删除操作?`, "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
|
@ -1,8 +1,8 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-06 10:13:07
|
||||
* @LastEditTime: 2023-05-12 12:42:15
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-02-22 16:52:30
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
import axios from 'axios'
|
||||
@ -23,11 +23,7 @@ const http = axios.create({
|
||||
*/
|
||||
http.interceptors.request.use(config => {
|
||||
config.headers['Accept-Language'] = Cookies.get('language') || 'zh-CN'
|
||||
if (config.url === "/login") {
|
||||
config.headers['token'] = ''
|
||||
} else {
|
||||
config.headers['token'] = Cookies.get('token') || ''
|
||||
}
|
||||
// 默认参数
|
||||
var defaults = {}
|
||||
// 防止缓存,GET请求默认带_t参数
|
||||
|
@ -2,85 +2,47 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2022-08-22 14:57:51
|
||||
* @LastEditors: zwq
|
||||
* @LastEditTime: 2023-05-12 12:46:50
|
||||
* @LastEditTime: 2023-01-06 09:44:17
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||
<div class="aui-navbar__header">
|
||||
<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-mini" href="javascript:;">{{ $t("brand.mini") }}</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>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="aui-navbar__body">
|
||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||
<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 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>
|
||||
<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>
|
||||
<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>
|
||||
<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="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 index="5" class="aui-navbar__avatar">
|
||||
<el-dropdown placement="bottom" :show-timeout="0">
|
||||
<span class="el-dropdown-link">
|
||||
<img src="~@/assets/img/avatar.png" />
|
||||
<img src="~@/assets/img/avatar.png">
|
||||
<span>{{ $store.state.user.name }}</span>
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">
|
||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
|
||||
<use xlink:href="#修改密码"></use>
|
||||
</svg>
|
||||
{{ $t("updatePassword.title") }}</el-dropdown-item
|
||||
>
|
||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#修改密码"></use></svg>
|
||||
{{ $t('updatePassword.title') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">
|
||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true">
|
||||
<use xlink:href="#tuichu"></use>
|
||||
</svg>
|
||||
{{ $t("logout") }}</el-dropdown-item
|
||||
>
|
||||
<svg class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#tuichu"></use></svg>
|
||||
{{ $t('logout') }}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
@ -91,77 +53,55 @@
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
import screenfull from "screenfull";
|
||||
import UpdatePassword from "./main-navbar-update-password";
|
||||
import { clearLoginInfo } from "@/utils";
|
||||
import { messages } from '@/i18n'
|
||||
import Cookies from "js-cookie";
|
||||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
export default {
|
||||
inject: ["refresh"],
|
||||
data() {
|
||||
inject: ['refresh'],
|
||||
data () {
|
||||
return {
|
||||
updatePasswordVisible: false,
|
||||
messageTip: false,
|
||||
};
|
||||
messageTip: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
UpdatePassword,
|
||||
},
|
||||
computed: {
|
||||
language() {
|
||||
return Cookies.get("language");
|
||||
},
|
||||
UpdatePassword
|
||||
},
|
||||
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) {
|
||||
return this.$message({
|
||||
message: this.$t("fullscreen.prompt"),
|
||||
type: "warning",
|
||||
duration: 500,
|
||||
});
|
||||
message: this.$t('fullscreen.prompt'),
|
||||
type: 'warning',
|
||||
duration: 500
|
||||
})
|
||||
}
|
||||
screenfull.toggle();
|
||||
screenfull.toggle()
|
||||
},
|
||||
// 修改密码
|
||||
updatePasswordHandle() {
|
||||
this.updatePasswordVisible = true;
|
||||
updatePasswordHandle () {
|
||||
this.updatePasswordVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updatePassword.init();
|
||||
});
|
||||
this.$refs.updatePassword.init()
|
||||
})
|
||||
},
|
||||
// 退出
|
||||
logoutHandle() {
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("logout") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.post("/logout")
|
||||
.then(({ data: res }) => {
|
||||
logoutHandle () {
|
||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('logout') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.post('/logout').then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
clearLoginInfo();
|
||||
this.$router.push({ name: "login" });
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
clearLoginInfo()
|
||||
this.$router.push({ name: 'login' })
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-31 09:49:36
|
||||
* @LastEditTime: 2023-05-17 15:00:50
|
||||
* @LastEditTime: 2023-04-04 14:56:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -44,11 +44,11 @@ export default {
|
||||
type: "success",
|
||||
duration: 1500,
|
||||
onClose: () => {
|
||||
this.$message.error(data.msg);
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
} else {
|
||||
this.$message.error(data.msg)
|
||||
this.$message.error(data.msg);
|
||||
}
|
||||
});
|
||||
// 路由参数
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-17 14:21:45
|
||||
* @LastEditTime: 2023-05-10 14:17:09
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -87,7 +87,8 @@
|
||||
</el-form-item>
|
||||
<el-form-item prop="userDepartment" :label="$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" :value="item.id">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
@ -95,8 +96,8 @@
|
||||
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="recipient" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
|
||||
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -208,7 +209,7 @@ export default {
|
||||
],
|
||||
visible: false,
|
||||
dataForm: {
|
||||
belongPerson:'1067246875800000001',
|
||||
belongPerson:null,
|
||||
benchmarkMeasurTool: null,
|
||||
certificateCode: null,
|
||||
certificateCodeBh: null,
|
||||
@ -230,7 +231,7 @@ export default {
|
||||
name: null,
|
||||
nextExternalInspectionTime: null,
|
||||
nextInternalInspectionTime: null,
|
||||
recipient: '1067246875800000001',
|
||||
recipient: null,
|
||||
remark: null,
|
||||
updateDate: null,
|
||||
useLocation: null,
|
||||
|
@ -1,327 +0,0 @@
|
||||
<!--
|
||||
* @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
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-17 14:40:50
|
||||
* @LastEditTime: 2023-05-08 10:34:55
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -129,9 +129,7 @@ export default {
|
||||
// .catch(() => {
|
||||
// });
|
||||
this.$http
|
||||
.get(this.urlOptions.getGageListURL, {
|
||||
params: this.listQuery
|
||||
})
|
||||
.get(this.urlOptions.getGageListURL, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code === 0) {
|
||||
console.log(res.data);
|
||||
|
@ -1,221 +0,0 @@
|
||||
<!--
|
||||
* @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 prop="parityBit" :label="$t('gage.parityBit')">
|
||||
<el-radio-group v-model="dataForm.parityBit">
|
||||
<el-radio :label="0">{{ $t('gage.outsideVerify') }}</el-radio>
|
||||
<el-radio :label="1"> {{ $t('gage.outsideVerify') }}</el-radio>
|
||||
<el-radio :label="0">内部校验</el-radio>
|
||||
<el-radio :label="1">外部校验</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item prop="checker" :label="$t('gage.checker')">
|
||||
|
@ -1,218 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,200 +0,0 @@
|
||||
<!--
|
||||
* @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,12 +1,11 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-02-14 15:02:26
|
||||
* @LastEditTime: 2023-05-18 15:30:28
|
||||
* @LastEditTime: 2023-05-10 13:45:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div>
|
||||
<el-form :model="dataForm" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="150px">
|
||||
<el-form-item prop="gageId" :label="$t('gage.gageName')">
|
||||
<el-select v-model="dataForm.gageId" :placeholder="$t('gage.gageName')">
|
||||
@ -14,42 +13,39 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item prop="gageCode" :label="$t('gage.gageCode')">
|
||||
<el-form-item prop="gageCode" :label="$t('gage.gageCode')">
|
||||
<el-input v-model="dataForm.gageCode" :placeholder="$t('gage.gageCode')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="measuringToolSpecification" :label="$t('gage.measuringToolSpecification')">
|
||||
<el-input v-model="dataForm.measuringToolSpecification" :placeholder="$t('gage.measuringToolSpecification')">
|
||||
</el-input>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item prop="measurToolEvent" :label="$t('gage.measurToolEvent')">
|
||||
<el-select @change="changeShow" v-model="dataForm.measurToolEvent" :placeholder="$t('gage.measurToolEvent')">
|
||||
<el-select 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>
|
||||
</el-select>
|
||||
<el-tooltip class="item" effect="dark" :content="$t('gage.tips')" placement="top">
|
||||
<i class="el-icon-warning"></i>
|
||||
</el-tooltip>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="receiveShow || returnShow || maintainShow || transferShow || detectionShow"
|
||||
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-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id">
|
||||
<el-option v-for="item in departmentList" :key="item.id" :label="item.name"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="receiveShow || returnShow || maintainShow" prop="useLocation" :label="$t('gage.useLocation')">
|
||||
<el-form-item prop="useLocation" :label="$t('gage.useLocation')">
|
||||
<el-input v-model="dataForm.useLocation" :placeholder="$t('gage.useLocation')">
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="!scrapShow" prop="recipient" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipient" :placeholder="$t('gage.recipientName')">
|
||||
<el-form-item prop="recipientName" :label="$t('gage.recipientName')">
|
||||
<el-select v-model="dataForm.recipientName" :placeholder="$t('gage.recipientName')">
|
||||
<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="processUserId" :label="$t('gage.processUserName')">
|
||||
<el-select v-model="dataForm.processUserId" :placeholder="$t('gage.processUserName')">
|
||||
<el-form-item prop="processUserName" :label="$t('gage.processUserName')">
|
||||
<el-select v-model="dataForm.processUserName" :placeholder="$t('gage.processUserName')">
|
||||
<el-option v-for="item in userList" :key="item.id" :label="item.realName" :value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
@ -60,13 +56,12 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="receiveShow || maintainShow || detectionShow" 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-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-item v-if="transferShow" prop="transferDate" :label="$t('gage.transferDate')">
|
||||
<el-form-item prop="transferDate" :label="$t('gage.transferDate')">
|
||||
<el-date-picker v-model="dataForm.transferDate" type="datetime" :placeholder="$t('gage.transferDate')"
|
||||
format='yyyy-MM-dd HH:mm:ss' valueFormat='yyyy-MM-ddTHH:mm:ss'>
|
||||
</el-date-picker>
|
||||
@ -76,59 +71,26 @@
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
// import basicAdd from "@/mixins/basic-add";
|
||||
import basicAdd from "@/mixins/basic-add";
|
||||
export default {
|
||||
// mixins: [basicAdd],
|
||||
mixins: [basicAdd],
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
submitURL: "/gage/qmsGageResume",
|
||||
infoURL: "/gage/qmsGageResume/{ id }",
|
||||
dictionaryDetailList: '/mutual/qmsDataDictionaryDetail/page',
|
||||
getUserList: '/sys/user/page',
|
||||
getGageList: '/gage/qmsGage/page',
|
||||
submitStationDeviationAnalysisURL: '/gage/qmsStationDeviationAnalysis',
|
||||
getUserList: '/sys/user/page'
|
||||
// getTeamListURL: '/basic/qmsTeam/gape',
|
||||
// getProductURL: '/basic/qmsProduct/gape',
|
||||
// getSupplierListURL: '/supplier/qmsSupplier/gape'
|
||||
},
|
||||
gageList: [],
|
||||
gageResumeList: [],
|
||||
userList: [],
|
||||
showForm:true,
|
||||
receiveShow: false,
|
||||
returnShow: false,
|
||||
scrapShow: false,
|
||||
maintainShow: false,
|
||||
purchaseShow: false,
|
||||
detectionShow: false,
|
||||
transferShow: false,
|
||||
userList:[],
|
||||
departmentList: [],
|
||||
processList: [
|
||||
{
|
||||
@ -144,19 +106,9 @@ export default {
|
||||
name: '同意'
|
||||
}
|
||||
],
|
||||
parameterList: [
|
||||
{
|
||||
id: 0,
|
||||
name: '基准 '
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: '校验'
|
||||
}
|
||||
],
|
||||
listQuery: {
|
||||
limit: 999,
|
||||
page: 1
|
||||
gape: 1
|
||||
},
|
||||
eventList: [
|
||||
{
|
||||
@ -179,34 +131,18 @@ export default {
|
||||
id: 4,
|
||||
name: '量具购买'
|
||||
},
|
||||
{
|
||||
id: 5,
|
||||
name: '量具检测'
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
name: '量具转移'
|
||||
},
|
||||
],
|
||||
visible: false,
|
||||
parameterData: {
|
||||
gageResumeId:null,
|
||||
batchNumber: null,
|
||||
measuringToolAccuracy: null,
|
||||
parameter: null,
|
||||
price: null,
|
||||
remark: null,
|
||||
},
|
||||
dataForm: {
|
||||
id: null,
|
||||
expectedReturnDate:null,
|
||||
gageCode: null,
|
||||
gageId: '',
|
||||
gageId: null,
|
||||
measuringToolSpecification:null,
|
||||
measurToolEvent: null,
|
||||
process: null,
|
||||
processUserId: '1067246875800000001',
|
||||
recipient: '1067246875800000001',
|
||||
processUserId: null,
|
||||
recipient: null,
|
||||
remark: null,
|
||||
transferDate: null,
|
||||
useLocation: null,
|
||||
@ -245,80 +181,9 @@ export default {
|
||||
mounted () {
|
||||
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: {
|
||||
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, ) {
|
||||
this.dataForm.id = id || ""
|
||||
if (id) {
|
||||
this.showForm = false
|
||||
}
|
||||
// console.log(11111)
|
||||
// this.dataForm.dictTypeId = dictTypeId || "";
|
||||
this.visible = true
|
||||
@ -341,19 +206,7 @@ export default {
|
||||
}
|
||||
})
|
||||
.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
|
||||
.get(this.urlOptions.dictionaryDetailList, this.listQuery)
|
||||
.then(({ data: res }) => {
|
||||
@ -391,60 +244,13 @@ export default {
|
||||
})
|
||||
.catch(() => { })
|
||||
},
|
||||
formClear() {
|
||||
this.$refs.dataForm.resetFields()
|
||||
this.tableData = []
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
if (this.dataForm.measurToolEvent === 5) {
|
||||
var pattern = /^[0-9]+(_)[0-9]+$/
|
||||
if (pattern.test(this.parameterData.batchNumber)) {
|
||||
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({
|
||||
message: this.$t("gage.batchTips"),
|
||||
type: 'warning',
|
||||
duration: 500,
|
||||
})
|
||||
}
|
||||
} else {
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](this.urlOptions.submitURL, this.dataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
@ -455,15 +261,18 @@ export default {
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
console.log(1111);
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList")
|
||||
}
|
||||
this.$emit("successSubmit");
|
||||
},
|
||||
});
|
||||
})
|
||||
})
|
||||
.catch(() => { });
|
||||
}
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -1,267 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,255 +0,0 @@
|
||||
<!--
|
||||
* @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
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-22 16:40:43
|
||||
* @LastEditTime: 2023-05-10 15:54:33
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -42,7 +42,6 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<verify-show v-if="verifyShowVisible" ref="verifyShowOrUpdate" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
@ -50,8 +49,6 @@
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gapeAdd from "./components/gage-add"
|
||||
import verifyShow from "./components/verify-show"
|
||||
|
||||
// import gage from '@/filters/gage'
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
@ -152,16 +149,15 @@ const tableBtn = [
|
||||
btnName: "删除",
|
||||
},
|
||||
{
|
||||
type: "verify",
|
||||
btnName: "校验",
|
||||
}
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageSearch,
|
||||
gapeAdd,
|
||||
verifyShow
|
||||
gapeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -172,7 +168,6 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
verifyShowVisible:false,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
formConfig: [
|
||||
@ -269,11 +264,36 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
} else if (val.type === 'verify') {
|
||||
this.verifyShowVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.verifyShowOrUpdate.init(val.data.id)
|
||||
} else if (val.type === 'parameter') {
|
||||
this.$router.push({
|
||||
name: 'gage-qmsGageTypeDifferenceParameter',
|
||||
query: {
|
||||
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) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-12 14:29:12
|
||||
* @LastEditTime: 2023-05-11 15:30:11
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,8 +22,9 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<gapeGrs-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gapeGrs-add>
|
||||
<gape-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gape-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">
|
||||
@ -47,66 +48,116 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gapeGrsAdd from "./components/gageGrs-add"
|
||||
import gapeAdd from "./components/gage-add"
|
||||
// import gage from '@/filters/gage'
|
||||
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import gageSearch from "./components/gageSearch"
|
||||
// import available from "./components/gageAvailable.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import { timeFormatter } from '@/filters'
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'itemNo',
|
||||
label: i18n.t("gage.itemNo"),
|
||||
prop: 'client',
|
||||
label: i18n.t("gage.client"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'partName',
|
||||
label: i18n.t("gage.partName"),
|
||||
prop: 'certificateCode',
|
||||
label: i18n.t("gage.certificateCode"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'gageName',
|
||||
label: i18n.t("gage.gageName"),
|
||||
prop: 'certificateCodeBh',
|
||||
label: i18n.t("gage.certificateCodeBh"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'specification',
|
||||
label: i18n.t("gage.measuringToolSpecification"),
|
||||
prop: 'code',
|
||||
label: i18n.t("gage.code"),
|
||||
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'
|
||||
},
|
||||
// {
|
||||
// prop: 'measurementTime',
|
||||
// label: i18n.t("gage.measurementTime"),
|
||||
// prop: 'gageStatus',
|
||||
// label: i18n.t("available"),
|
||||
// subcomponent: available,
|
||||
// align: 'center'
|
||||
// },
|
||||
{
|
||||
prop: 'measurementTime',
|
||||
label: i18n.t("gage.measurementTime"),
|
||||
align: 'center',
|
||||
filter: timeFormatter,
|
||||
|
||||
prop: 'belongPersonName',
|
||||
label: i18n.t("gage.belongPersonName"),
|
||||
align: 'center'
|
||||
},
|
||||
|
||||
]
|
||||
const tableBtn = [
|
||||
{
|
||||
type: "edit",
|
||||
btnName: i18n.t("edit"),
|
||||
btnName: "编辑",
|
||||
},
|
||||
{
|
||||
type: "delete",
|
||||
btnName: i18n.t("delete"),
|
||||
|
||||
btnName: "删除",
|
||||
},
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: i18n.t("parameter"),
|
||||
btnName: "台差参数",
|
||||
},
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageSearch,
|
||||
gapeGrsAdd
|
||||
gapeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 11:11:06
|
||||
* @LastEditTime: 2023-05-23 14:33:55
|
||||
* @LastEditTime: 2023-05-10 16:20:50
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -44,19 +44,15 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
</base-dialog>
|
||||
<parameter-show v-if="showParameterVisible" ref="showParameterOrUpdate" @refreshDataList="getDataList" />
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import parameterShow from './components/parameter-show'
|
||||
|
||||
import qmsGageResumeAdd from "./components/qmsGageResume-add"
|
||||
// import gage from '@/filters/gage'
|
||||
import { timeFormatter } from '@/filters'
|
||||
import gage from '@/filters/gage'
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import gageResumeSearch from "./components/gageResumeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
@ -76,8 +72,7 @@ const tableProps = [
|
||||
{
|
||||
prop: 'measurToolEvent',
|
||||
label: i18n.t("gage.measurToolEvent"),
|
||||
align: 'center',
|
||||
filter: gage('eventList')
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'createDate',
|
||||
@ -124,24 +119,13 @@ const tableBtn = [
|
||||
{
|
||||
type: "parameter",
|
||||
btnName: "台差参数",
|
||||
showParam: {
|
||||
type: '&',
|
||||
data: [
|
||||
{
|
||||
name: 'measurToolEvent',
|
||||
type: 'equal',
|
||||
value: 5
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
];
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
gageResumeSearch,
|
||||
qmsGageResumeAdd,
|
||||
parameterShow
|
||||
qmsGageResumeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -152,10 +136,18 @@ export default {
|
||||
},
|
||||
tableProps,
|
||||
tableBtn,
|
||||
showParameterVisible:false,
|
||||
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'),
|
||||
@ -234,12 +226,6 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
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) {
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-23 14:20:48
|
||||
* @LastEditTime: 2023-05-09 15:47:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-05-08 10:31:11
|
||||
* @LastEditTime: 2023-05-17 14:41:23
|
||||
* @LastEditTime: 2023-05-09 15:47:26
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,8 +22,8 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<gageTypeDifferenceParameter-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gageTypeDifferenceParameter-add>
|
||||
<gageType-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</gageType-add>
|
||||
<!-- <el-row slot="footer" type="flex" justify="end"> </el-row> -->
|
||||
</base-dialog>
|
||||
<base-dialog :dialogTitle="searchOrEditTitle" :dialogVisible="searchOrUpdateVisible" @cancel="handleSearchCancel"
|
||||
@ -48,7 +48,7 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
import gageTypeDifferenceParameterAdd from "./components/gageTypeDifferenceParameter-add"
|
||||
import gageTypeAdd from "./components/gageType-add"
|
||||
// import gage from '@/filters/gage'
|
||||
import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
@ -104,20 +104,16 @@ export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
// failureTypeSearch,
|
||||
gageTypeDifferenceParameterAdd
|
||||
gageTypeAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/gage/qmsGageTypeDifferenceParameter/page",
|
||||
deleteURL: "/gage/qmsGageTypeDifferenceParameter",
|
||||
// exportUrl: '/nonconform/qmsNonconformityReviewSheet/export'
|
||||
},
|
||||
tableProps,
|
||||
listQuery: {
|
||||
limit: 10,
|
||||
page: 1,
|
||||
gageTypeId: this.$route.query.gageTypeId ? this.$route.query.gageTypeId : null
|
||||
},
|
||||
tableBtn,
|
||||
searchOrEditTitle: '',
|
||||
searchOrUpdateVisible: false,
|
||||
@ -149,12 +145,12 @@ export default {
|
||||
// components: {
|
||||
// AddOrUpdate,
|
||||
// },
|
||||
// mounted() {
|
||||
// if (this.$route.query) {
|
||||
// this.listQuery.gageTypeId = this.$route.query.gageTypeId
|
||||
// this.getDataList()
|
||||
// }
|
||||
// },
|
||||
mounted() {
|
||||
if (this.$route.query) {
|
||||
this.listQuery.gageTypeId = this.$route.query.gageTypeId
|
||||
this.getDataList()
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
//search-bar点击
|
||||
handleProductCancel() {
|
||||
@ -212,26 +208,6 @@ 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) {
|
||||
switch (val.btnName) {
|
||||
case "search":
|
||||
@ -242,7 +218,7 @@ export default {
|
||||
case "export":
|
||||
// this.listQuery.paramCode = val.paramCode;
|
||||
this.listQuery.page = 1
|
||||
this.exportHandle();
|
||||
this.exportHandl();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = '新增'
|
||||
|
@ -1,347 +0,0 @@
|
||||
<!--
|
||||
* @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,4 +1,5 @@
|
||||
<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-item prop="beanName" :label="$t('schedule.beanName')">
|
||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanNameTips')"></el-input>
|
||||
@ -16,21 +17,20 @@
|
||||
<el-input v-model="dataForm.remark" :placeholder="$t('schedule.remark')"></el-input>
|
||||
</el-form-item>
|
||||
</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>
|
||||
|
||||
<script>
|
||||
import basicAdd from '@/mixins/basic-add'
|
||||
import debounce from 'lodash/debounce'
|
||||
import { cron } from 'vue-cron'
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
urlOptions: {
|
||||
submitURL: '/sys/schedule/',
|
||||
infoURL: '/sys/schedule'
|
||||
},
|
||||
dataForm: {
|
||||
id: '',
|
||||
beanName: '',
|
||||
@ -58,8 +58,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init (id) {
|
||||
this.dataForm.id = id || "";
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
@ -96,7 +95,7 @@ export default {
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('successSubmit')
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
|
@ -1,39 +1,71 @@
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-job__schedule">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
|
||||
<base-table
|
||||
:table-props="tableProps"
|
||||
:page="listQuery.page"
|
||||
:limit="listQuery.limit"
|
||||
:table-data="tableData"
|
||||
>
|
||||
<method-btn
|
||||
v-if="tableBtn.length"
|
||||
slot="handleBtn"
|
||||
:width="200"
|
||||
label="操作"
|
||||
:method-list="tableBtn"
|
||||
@clickBtn="handleClick"
|
||||
/>
|
||||
</base-table>
|
||||
<pagination
|
||||
:limit.sync="listQuery.limit"
|
||||
:page.sync="listQuery.page"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList"
|
||||
/>
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.beanName" :placeholder="$t('schedule.beanName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:pause')" type="danger" @click="pauseHandle()">{{ $t('schedule.pauseBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:resume')" type="danger" @click="resumeHandle()">{{ $t('schedule.resumeBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:schedule:run')" type="danger" @click="runHandle()">{{ $t('schedule.runBatch') }}</el-button>
|
||||
</el-form-item>
|
||||
<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>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<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>
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
<!-- 弹窗, 日志列表 -->
|
||||
<log v-if="logVisible" ref="log"></log>
|
||||
</div>
|
||||
@ -41,255 +73,124 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page";
|
||||
import AddOrUpdate from "./schedule-add-or-update";
|
||||
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: "删除",
|
||||
},
|
||||
];
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './schedule-add-or-update'
|
||||
import Log from './schedule-log'
|
||||
export default {
|
||||
mixins: [basicPage],
|
||||
data() {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: "/sys/schedule/page",
|
||||
deleteURL: "/sys/schedule",
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/sys/schedule/page',
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '/sys/schedule',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
dataForm: {
|
||||
beanName: "",
|
||||
beanName: ''
|
||||
},
|
||||
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",
|
||||
},
|
||||
],
|
||||
};
|
||||
logVisible: false
|
||||
}
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
Log,
|
||||
Log
|
||||
},
|
||||
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) {
|
||||
return this.$message({
|
||||
message: this.$t("prompt.deleteBatch"),
|
||||
type: "warning",
|
||||
duration: 500,
|
||||
});
|
||||
message: this.$t('prompt.deleteBatch'),
|
||||
type: 'warning',
|
||||
duration: 500
|
||||
})
|
||||
}
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("schedule.pause") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.put("/sys/schedule/pause", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||
.then(({ data: res }) => {
|
||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.pause') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/pause', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 恢复
|
||||
resumeHandle(id) {
|
||||
resumeHandle (id) {
|
||||
if (!id && this.dataListSelections.length <= 0) {
|
||||
return this.$message({
|
||||
message: this.$t("prompt.deleteBatch"),
|
||||
type: "warning",
|
||||
duration: 500,
|
||||
});
|
||||
message: this.$t('prompt.deleteBatch'),
|
||||
type: 'warning',
|
||||
duration: 500
|
||||
})
|
||||
}
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("schedule.resume") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.put("/sys/schedule/resume", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||
.then(({ data: res }) => {
|
||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.resume') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/resume', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 执行
|
||||
runHandle(id) {
|
||||
runHandle (id) {
|
||||
if (!id && this.dataListSelections.length <= 0) {
|
||||
return this.$message({
|
||||
message: this.$t("prompt.deleteBatch"),
|
||||
type: "warning",
|
||||
duration: 500,
|
||||
});
|
||||
message: this.$t('prompt.deleteBatch'),
|
||||
type: 'warning',
|
||||
duration: 500
|
||||
})
|
||||
}
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("schedule.run") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.put("/sys/schedule/run", id ? [id] : this.dataListSelections.map((item) => item.id))
|
||||
.then(({ data: res }) => {
|
||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('schedule.run') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.put('/sys/schedule/run', id ? [id] : this.dataListSelections.map(item => item.id)).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
this.getDataList()
|
||||
}
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 日志列表
|
||||
logHandle() {
|
||||
this.logVisible = true;
|
||||
logHandle () {
|
||||
this.logVisible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.log.init();
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
this.$refs.log.init()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -1,49 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,56 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,49 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,229 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,222 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,202 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,197 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,231 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,233 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,235 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,240 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,40 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,40 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,40 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,47 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,300 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,267 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,190 +0,0 @@
|
||||
<!--
|
||||
* @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>
|
@ -1,137 +0,0 @@
|
||||
<!--
|
||||
* @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
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 15:54:21
|
||||
* @LastEditTime: 2023-04-04 14:29:43
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -255,8 +255,7 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -273,7 +272,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 15:54:07
|
||||
* @LastEditTime: 2023-04-04 16:21:38
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -182,8 +182,7 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -200,7 +199,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 15:53:39
|
||||
* @LastEditTime: 2023-04-04 16:15:42
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -176,8 +176,7 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -194,7 +193,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 15:53:25
|
||||
* @LastEditTime: 2023-04-04 15:54:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -246,8 +246,7 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -264,7 +263,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,234 +0,0 @@
|
||||
<!--
|
||||
* @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
|
||||
* @Date: 2023-01-11 09:24:58
|
||||
* @LastEditTime: 2023-05-24 16:01:20
|
||||
* @LastEditTime: 2023-04-04 15:55:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -22,14 +22,13 @@
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<base-dialog :dialogTitle="addOrEditTitle" :dialogVisible="addOrUpdateVisible" @cancel="handleCancel"
|
||||
@confirm="handleConfirm" :before-close="handleCancel">
|
||||
<transferScheme-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</transferScheme-add>
|
||||
<samplingPlan-add ref="addOrUpdate" @refreshDataList="successSubmit">
|
||||
</samplingPlan-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">
|
||||
<transferScheme-search ref="searchOrUpdate" @refreshDataList="conditionSearchSubmit">
|
||||
</transferScheme-search>
|
||||
<!-- <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">
|
||||
@ -49,52 +48,98 @@
|
||||
|
||||
<script>
|
||||
import basicPage from "@/mixins/basic-page"
|
||||
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 samplingPlanAdd from "./components/samplingPlan-add"
|
||||
// import AddOrUpdate from './params-add-or-update'
|
||||
import transferSchemeSearch from "./components/transferSchemeSearch.vue"
|
||||
// import failureTypeSearch from "./components/failureTypeSearch"
|
||||
// import available from "./components/available.vue"
|
||||
import basicSearch from "@/mixins/basic-search"
|
||||
import i18n from "@/i18n"
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'transferSchemeCode',
|
||||
label: i18n.t("quality.code"),
|
||||
prop: 'sampleRange',
|
||||
label: i18n.t("quality.sampleRange"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'transferSchemeName',
|
||||
label: i18n.t("quality.name"),
|
||||
prop: 'fourPointZero',
|
||||
label: i18n.t("quality.fourPointZero"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointFive',
|
||||
label: i18n.t("quality.onePointFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'onePointZero',
|
||||
label: i18n.t("quality.normalToTightened"),
|
||||
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
|
||||
label: i18n.t("quality.onePointZero"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
prop: 'sixPointFive',
|
||||
label: i18n.t("quality.relaxedToNormal"),
|
||||
align: 'center',
|
||||
subcomponent: relaxedToNormal
|
||||
}
|
||||
label: i18n.t("quality.sixPointFive"),
|
||||
align: 'center'
|
||||
},
|
||||
{
|
||||
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 = [
|
||||
{
|
||||
@ -109,8 +154,8 @@ const tableBtn = [
|
||||
export default {
|
||||
mixins: [basicPage, basicSearch],
|
||||
components: {
|
||||
transferSchemeSearch,
|
||||
transferSchemeAdd
|
||||
// failureTypeSearch,
|
||||
samplingPlanAdd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
@ -168,9 +213,7 @@ export default {
|
||||
});
|
||||
},
|
||||
conditionSearchSubmit(dataForm) {
|
||||
this.listQuery.transferSchemeCode = dataForm.transferSchemeCode
|
||||
this.listQuery.transferSchemeName = dataForm.transferSchemeName
|
||||
|
||||
this.listQuery.code = dataForm.code
|
||||
this.listQuery.page = 1;
|
||||
this.getDataList();
|
||||
this.searchOrUpdateVisible = false;
|
||||
@ -203,8 +246,7 @@ export default {
|
||||
})
|
||||
.catch(() => { });
|
||||
} else if (val.type === 'edit') {
|
||||
this.addOrUpdateVisible = true
|
||||
this.addOrEditTitle = this.$t('edit')
|
||||
this.addOrUpdateVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.init(val.data.id);
|
||||
});
|
||||
@ -221,7 +263,7 @@ export default {
|
||||
this.getDataList();
|
||||
break;
|
||||
case "add":
|
||||
this.addOrEditTitle = this.$t('add')
|
||||
this.addOrEditTitle = '新增'
|
||||
this.addOrUpdateVisible = true;
|
||||
this.addOrUpdateHandle()
|
||||
break;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-04-17 14:23:17
|
||||
* @LastEditTime: 2023-05-12 14:14:39
|
||||
* @LastEditTime: 2023-04-24 14:27:08
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
|
@ -117,7 +117,7 @@ export default {
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmit: debounce(function () {
|
||||
dataFormSubmitHandle: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
|
Loading…
Reference in New Issue
Block a user