From ccb94f7ab1ff53feb9dc8bd5686303ad6de33b4e Mon Sep 17 00:00:00 2001 From: "han\\hanst" Date: Tue, 26 May 2026 09:44:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=A1=E6=AD=A3=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/eam/eam_object_list.js | 6 + .../modules/eam/com_eam_object_add_update.vue | 106 ++- src/views/modules/eam/eam_device_list.vue | 770 +++++++++++++++++- 3 files changed, 863 insertions(+), 19 deletions(-) diff --git a/src/api/eam/eam_object_list.js b/src/api/eam/eam_object_list.js index 9163147..cb8ee01 100644 --- a/src/api/eam/eam_object_list.js +++ b/src/api/eam/eam_object_list.js @@ -22,6 +22,12 @@ export const getHistoryOrderList = data => createAPI('pms/eamObject/getHistoryOr export const getFaultBehaviorList = data => createAPI('pms/eamObject/getFaultBehaviorList','post',data) /*删除当前设备*/ export const deleteEamObject = data => createAPI('pms/eamObject/deleteEamObject','post',data) +/*查询设备校正记录*/ +export const getCalibrationRecordList = data => createAPI('pms/eamObject/getCalibrationRecordList','post',data) +/*新增/修改设备校正记录*/ +export const saveCalibrationRecord = data => createAPI('pms/eamObject/saveCalibrationRecord','post',data) +/*删除设备校正记录*/ +export const deleteCalibrationRecord = data => createAPI('pms/eamObject/deleteCalibrationRecord','post',data) /*图片上传*/ export const uploadEamObjectFile = data => createAPI('/sys/file/upload','post',data) diff --git a/src/views/modules/eam/com_eam_object_add_update.vue b/src/views/modules/eam/com_eam_object_add_update.vue index 838a28d..f37485a 100644 --- a/src/views/modules/eam/com_eam_object_add_update.vue +++ b/src/views/modules/eam/com_eam_object_add_update.vue @@ -17,10 +17,13 @@ - + - + + + + @@ -112,6 +115,30 @@ + + + + + + + + + + + + + + + + + + 设备负责人 @@ -253,6 +280,7 @@ export default { deptID: '', deptName: '', assetNo: '', + modelNo: '', assetRemark: '', standardMaintenanceDuration: '', timeOutMaintenanceDuration: '', @@ -260,7 +288,11 @@ export default { timeOutResponseDuration: '', cycleTimeSend: undefined, mesType: '', - mesTypeList: [] + mesTypeList: [], + calibrationEnableFlag: 'N', + calibrationPeriod: undefined, + lastCalibrationDate: '', + nextCalibrationDate: '' }, dataListLoading: false, rules:{ @@ -325,6 +357,12 @@ export default { modalDisableFlag: false, } }, + computed: { + // 当前分类是否为委外校正设备 + isOutsourceCalibrationDevice () { + return this.pageData.familyDesc != null && this.pageData.familyDesc.indexOf('委外校正设备') !== -1 + } + }, methods: { // 获取用户的bu getSiteAndBuByUserName () { @@ -337,6 +375,38 @@ export default { } }) }, + // 根据分类处理校正字段状态 + handleCalibrationFamilyChange () { + if (!this.isOutsourceCalibrationDevice) { + this.pageData.calibrationEnableFlag = 'N' + this.pageData.calibrationPeriod = undefined + this.pageData.lastCalibrationDate = '' + this.pageData.nextCalibrationDate = '' + return + } + if (this.pageData.calibrationEnableFlag !== 'Y') { + this.pageData.calibrationEnableFlag = 'N' + } + if (this.pageData.calibrationEnableFlag !== 'Y') { + this.pageData.calibrationPeriod = undefined + } + }, + // 日期显示格式化 + formatDateValue (value) { + if (value == null || value === '') { + return '' + } + if (this.dayjs) { + return this.dayjs(value).format('YYYY-MM-DD') + } + let date = new Date(value) + if (isNaN(date.getTime())) { + return value + } + let month = (date.getMonth() + 1 + '').padStart(2, '0') + let day = (date.getDate() + '').padStart(2, '0') + return `${date.getFullYear()}-${month}-${day}` + }, addDeviceManager(){ this.detailData.bu = this.pageData.bu //查询角色列表 @@ -385,18 +455,25 @@ export default { init (currentRow) { //初始化参数 this.pageData = JSON.parse(JSON.stringify(currentRow)) + this.pageData.calibrationEnableFlag = this.pageData.calibrationEnableFlag === 'Y' ? 'Y' : 'N' + this.pageData.calibrationPeriod = this.pageData.calibrationPeriod == null || this.pageData.calibrationPeriod === '' ? undefined : Number(this.pageData.calibrationPeriod) + this.pageData.lastCalibrationDate = this.pageData.lastCalibrationDate || '' + this.pageData.nextCalibrationDate = this.pageData.nextCalibrationDate || '' //打开页面 this.visible = true //判断是否是新增 if (this.pageData.addFlag === 'Y') { this.modalDisableFlag = false - this.pageData.bu = this.userBuList[0].buNo + if (this.userBuList.length > 0) { + this.pageData.bu = this.userBuList[0].buNo + } } else { this.pageData.bu = this.pageData.site + '_' + this.pageData.buNo this.modalDisableFlag = true } //重置人员信息 this.pageData.username = this.userId + this.handleCalibrationFamilyChange() }, // 保存标签自定义的信息 @@ -433,6 +510,18 @@ export default { this.$message.warning("所属部门不能为空!"); return false } + if (this.isOutsourceCalibrationDevice) { + if (this.pageData.calibrationEnableFlag !== 'Y') { + this.pageData.calibrationEnableFlag = 'N' + this.pageData.calibrationPeriod = undefined + } else if (this.pageData.calibrationPeriod == null || this.pageData.calibrationPeriod === '' || this.pageData.calibrationPeriod <= 0) { + this.$message.warning("启用校正时,校正周期必须大于0天!"); + return false + } + } else { + this.pageData.calibrationEnableFlag = 'N' + this.pageData.calibrationPeriod = undefined + } this.pageData.mesType = this.pageData.mesTypeList.join(',') for (let i = 0; i < this.pageData.mesType.length; i++) { if(this.pageData.mesType[i] == 'D'){ @@ -511,6 +600,7 @@ export default { //设置参数 this.pageData.familyID = val.FamilyID; this.$set(this.pageData,'familyDesc',val.FamilyDesc) + this.handleCalibrationFamilyChange() } else if (this.tagNo === 28) { //设置参数 this.pageData.groupID = val.GroupID; @@ -623,6 +713,14 @@ export default { this.pageData.manufacturerID = this.pageData.manufacturerID.toUpperCase(); } }, + 'pageData.familyDesc': function () { + this.handleCalibrationFamilyChange() + }, + 'pageData.calibrationEnableFlag': function (newVal) { + if (newVal !== 'Y') { + this.pageData.calibrationPeriod = undefined + } + }, }, created() { // 获取用户的 site 和 bu diff --git a/src/views/modules/eam/eam_device_list.vue b/src/views/modules/eam/eam_device_list.vue index e1d39bb..06f68e1 100644 --- a/src/views/modules/eam/eam_device_list.vue +++ b/src/views/modules/eam/eam_device_list.vue @@ -42,6 +42,12 @@ + + + + + + 查询 新增 @@ -372,6 +378,82 @@ + + + 新增校正记录 + + 上一次校正日期:{{ formatDateValue(currentRow.lastCalibrationDate) || '-' }} + + + 预计下一次校正日期:{{ formatDateValue(currentRow.nextCalibrationDate) || '-' }} + + + + + + + + + + + + + + + + + + + @@ -823,6 +905,144 @@ + + + + + + + + + + + + + + + + + + + + + + 校验合格 + + + + + + +
将文件拖到此处,或点击上传
+
+
+
+ + 保存 + 关闭 + +
+ + + + + + + + + + + + + +
+ + +
将文件拖到此处,或点击上传
+
+ 上传附件 +
+ + + + + + + + + + + + + 关闭 + +
+ @@ -838,6 +1058,9 @@ getHistoryOrderList, getFaultBehaviorList, deleteEamObject, + getCalibrationRecordList, + saveCalibrationRecord, + deleteCalibrationRecord, uploadEamObjectFile, downLoadObjectFile, previewOssFileApi @@ -862,7 +1085,8 @@ eamObjectDefectDelete, deleteObjectFile, getFamilyTree, // 获取分类树形 - getSiteAndBuByUserName + getSiteAndBuByUserName, + eamSupplierSearch } from '@/api/eam/eam.js'; import {userFavoriteList, saveUserFavorite, removeUserFavorite} from '@/api/userFavorite.js' import {deleteResourceSpare} from '@/api/partspare/resourcespare.js' @@ -910,6 +1134,7 @@ familyID: '', familyDesc: '', active: 'Y', + calibrationEnableFlag: '', sonId: '', page: 1, limit: 10 @@ -927,6 +1152,7 @@ maintenancePlanList: [], historyOrderList: [], faultBehaviorList: [], + calibrationRecordList: [], columnFileContentArray: [ { columnProp: 'fileName', @@ -3296,6 +3522,33 @@ }, objectList: [], objectSelectionList: [], + calibrationRecordModalFlag: false, + calibrationRecordModalData: { + id: null, + site: '', + buNo: '', + objectID: '', + objectDesc: '', + supplierID: '', + supplierName: '', + calibrationDate: '', + qualifiedFlag: 'Y', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name, + }, + calibrationSupplierList: [], + calibrationSupplierLoading: false, + calibrationAttachmentModalFlag: false, + calibrationAttachmentModalData: { + id: '', + site: '', + objectID: '', + supplierName: '', + calibrationDate: '', + }, + calibrationCreateAttachmentUploadList: [], + calibrationAttachmentUploadList: [], + calibrationAttachmentList: [], defectModalFlag: false, defectModalData: { flag: '', @@ -3328,6 +3581,13 @@ Chooselist, }, + computed: { + // 当前设备是否为委外校正设备 + isOutsourceCalibrationDevice () { + return this.currentRow.familyDesc != null && this.currentRow.familyDesc.indexOf('委外校正设备') !== -1 + } + }, + mounted () { this.$nextTick(() => { this.height = window.innerHeight / 2 - 10 @@ -3429,6 +3689,413 @@ } }, + // 统一日期显示格式 + formatDateValue (value) { + if (value == null || value === '') { + return '' + } + if (this.dayjs) { + return this.dayjs(value).format('YYYY-MM-DD') + } + let date = new Date(value) + if (isNaN(date.getTime())) { + return value + } + let month = (date.getMonth() + 1 + '').padStart(2, '0') + let day = (date.getDate() + '').padStart(2, '0') + return `${date.getFullYear()}-${month}-${day}` + }, + + // 查询校正记录列表 + getCalibrationRecordData () { + if (!this.currentRow.objectID || !this.isOutsourceCalibrationDevice) { + this.calibrationRecordList = [] + return + } + let inData = { + site: this.currentRow.site, + buNo: this.currentRow.buNo, + objectID: this.currentRow.objectID, + } + getCalibrationRecordList(inData).then(({data}) => { + if (data && data.code === 0) { + this.calibrationRecordList = data.rows || [] + } else { + this.calibrationRecordList = [] + } + }).catch(() => { + this.calibrationRecordList = [] + }) + }, + + // 新增校正记录弹窗 + addCalibrationRecordModal () { + if (!this.currentRow.objectID) { + this.$message.warning('请先选择设备!') + return + } + this.calibrationRecordModalData = { + id: null, + site: this.currentRow.site, + buNo: this.currentRow.buNo, + objectID: this.currentRow.objectID, + objectDesc: this.currentRow.objectDesc, + supplierID: '', + supplierName: '', + calibrationDate: '', + qualifiedFlag: 'Y', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name, + } + this.calibrationCreateAttachmentUploadList = [] + this.$nextTick(() => { + if (this.$refs.calibrationCreateAttachmentUpload) { + this.$refs.calibrationCreateAttachmentUpload.clearFiles() + } + }) + this.calibrationSupplierList = [] + this.searchCalibrationSupplier('') + this.calibrationRecordModalFlag = true + }, + + // 修改校正记录弹窗 + updateCalibrationRecordModal (row) { + this.calibrationRecordModalData = { + ...row, + objectDesc: this.currentRow.objectDesc, + calibrationDate: this.formatDateValue(row.calibrationDate), + qualifiedFlag: row.qualifiedFlag === 'Y' ? 'Y' : 'N', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name, + } + this.calibrationCreateAttachmentUploadList = [] + this.calibrationSupplierList = row.supplierID ? [{ + supplierID: row.supplierID, + supplierName: row.supplierName, + }] : [] + this.searchCalibrationSupplier(row.supplierName || '') + this.calibrationRecordModalFlag = true + }, + + // 关闭校正记录弹窗并清理上传选择 + closeCalibrationRecordModal () { + this.calibrationRecordModalFlag = false + this.calibrationCreateAttachmentUploadList = [] + this.$nextTick(() => { + if (this.$refs.calibrationCreateAttachmentUpload) { + this.$refs.calibrationCreateAttachmentUpload.clearFiles() + } + }) + }, + + // 新增校正记录时选择附件 + changeCalibrationCreateAttachmentUpload (file, fileList) { + this.calibrationCreateAttachmentUploadList = fileList + }, + + // 按校正记录ID上传附件 + uploadCalibrationAttachmentById (recordId, site, objectID, uploadFileList) { + const formData = new FormData() + for (let i = 0; i < uploadFileList.length; i++) { + formData.append("file", uploadFileList[i].raw) + } + formData.append("folder", 'eamObject') + formData.append("site", site) + formData.append("objectID", String(recordId)) + formData.append("orderRef3", 'eamCalibrationRecord') + formData.append("orderRef4", objectID) + return uploadEamObjectFile(formData) + }, + + // 保存后兜底反查校正记录ID + getSavedCalibrationRecordId (inData) { + let queryData = { + site: inData.site, + buNo: inData.buNo, + objectID: inData.objectID, + } + return getCalibrationRecordList(queryData).then(({data}) => { + if (!data || data.code !== 0 || !data.rows || data.rows.length === 0) { + return null + } + const targetDate = this.formatDateValue(inData.calibrationDate) + const targetQualifiedFlag = inData.qualifiedFlag === 'Y' ? 'Y' : 'N' + const targetRow = data.rows.find(item => { + return item.supplierID === inData.supplierID && + this.formatDateValue(item.calibrationDate) === targetDate && + (item.qualifiedFlag === 'Y' ? 'Y' : 'N') === targetQualifiedFlag && + (!inData.createBy || item.createBy === inData.createBy) + }) + return targetRow && targetRow.id ? targetRow.id : null + }).catch(() => { + return null + }) + }, + + // 远程搜索校正供应商 + async searchCalibrationSupplier (query) { + if (!this.currentRow.site) { + this.calibrationSupplierList = [] + return + } + this.calibrationSupplierLoading = true + let baseData = { + site: this.currentRow.site, + buDesc: this.currentRow.buDesc, + userName: this.$store.state.user.name, + active: 'Y', + page: 1, + limit: 20, + supplierID: '', + supplierName: '', + } + try { + let requestList = [] + if (query != null && query !== '') { + requestList.push(eamSupplierSearch({ + ...baseData, + supplierID: query, + })) + requestList.push(eamSupplierSearch({ + ...baseData, + supplierName: query, + })) + } else { + requestList.push(eamSupplierSearch(baseData)) + } + let responseList = await Promise.all(requestList) + let supplierList = [] + responseList.forEach(({data}) => { + if (data && data.code === 0 && data.page) { + supplierList = supplierList.concat(data.page.list || []) + } + }) + let supplierMap = {} + this.calibrationSupplierList = supplierList.filter(item => { + if (!item.supplierID) { + return false + } + if (supplierMap[item.supplierID]) { + return false + } + supplierMap[item.supplierID] = true + return true + }) + } finally { + this.calibrationSupplierLoading = false + } + }, + + // 选择供应商后写入供应商名称 + changeCalibrationSupplier (supplierID) { + if (!supplierID) { + this.calibrationRecordModalData.supplierName = '' + return + } + let chooseData = this.calibrationSupplierList.find(item => item.supplierID === supplierID) + this.calibrationRecordModalData.supplierName = chooseData ? chooseData.supplierName : this.calibrationRecordModalData.supplierName + }, + + // 保存校正记录 + saveCalibrationRecordData () { + if (!this.calibrationRecordModalData.supplierID) { + this.$message.warning('请选择校正供应商!') + return + } + if (!this.calibrationRecordModalData.calibrationDate) { + this.$message.warning('请选择校正日期!') + return + } + let inData = { + id: this.calibrationRecordModalData.id ? this.calibrationRecordModalData.id : null, + site: this.currentRow.site, + buNo: this.currentRow.buNo, + objectID: this.currentRow.objectID, + supplierID: this.calibrationRecordModalData.supplierID, + supplierName: this.calibrationRecordModalData.supplierName, + calibrationDate: this.calibrationRecordModalData.calibrationDate, + qualifiedFlag: this.calibrationRecordModalData.qualifiedFlag === 'Y' ? 'Y' : 'N', + createBy: this.$store.state.user.name, + updateBy: this.$store.state.user.name, + } + let isAddMode = !inData.id + const uploadFileList = this.calibrationCreateAttachmentUploadList ? this.calibrationCreateAttachmentUploadList.slice() : [] + saveCalibrationRecord(inData).then(({data}) => { + if (data && data.code === 0) { + let savedRecordId = data.id || inData.id + // 新增时支持直接上传附件(保存后自动上传) + if (isAddMode && uploadFileList.length > 0) { + const uploadWithRecordId = (recordId) => { + this.uploadCalibrationAttachmentById(recordId, inData.site, inData.objectID, uploadFileList).then(({data: uploadData}) => { + if (uploadData && uploadData.code === 0) { + this.$message.success('校正记录与附件保存成功') + } else { + this.$message.error(uploadData.msg || '校正记录已保存,但附件上传失败') + } + this.getCalibrationRecordData() + this.closeCalibrationRecordModal() + }).catch(() => { + this.$message.error('校正记录已保存,但附件上传异常') + this.getCalibrationRecordData() + this.closeCalibrationRecordModal() + }) + } + if (savedRecordId) { + uploadWithRecordId(savedRecordId) + return + } + this.getSavedCalibrationRecordId(inData).then((fallbackRecordId) => { + if (!fallbackRecordId) { + this.$message.error('校正记录已保存,但未获取到记录ID,附件未上传') + this.getCalibrationRecordData() + this.closeCalibrationRecordModal() + return + } + uploadWithRecordId(fallbackRecordId) + }) + return + } + this.getCalibrationRecordData() + this.closeCalibrationRecordModal() + this.$message.success(data.msg || '操作成功') + } else { + this.$alert(data.msg || '保存失败', '错误', { + confirmButtonText: '确定' + }) + } + }) + }, + + // 删除校正记录 + deleteCalibrationRecordData (row) { + this.$confirm('是否删除该校正记录?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteCalibrationRecord({ + id: row.id, + site: row.site, + }).then(({data}) => { + if (data && data.code === 0) { + if (this.calibrationAttachmentModalData.id === row.id) { + this.calibrationAttachmentModalFlag = false + } + this.getCalibrationRecordData() + this.$message.success(data.msg || '操作成功') + } else { + this.$alert(data.msg || '删除失败', '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + + // 打开校正记录附件弹窗 + openCalibrationAttachmentModal (row) { + this.calibrationAttachmentModalData = { + id: row.id, + site: row.site, + objectID: row.objectID, + supplierName: row.supplierName, + calibrationDate: row.calibrationDate, + } + this.calibrationAttachmentUploadList = [] + this.calibrationAttachmentModalFlag = true + this.$nextTick(() => { + if (this.$refs.calibrationAttachmentUpload) { + this.$refs.calibrationAttachmentUpload.clearFiles() + } + }) + this.getCalibrationAttachmentList() + }, + + beforeCalibrationAttachmentUpload () {}, + + // 选择校正记录附件 + changeCalibrationAttachmentUpload (file, fileList) { + this.calibrationAttachmentUploadList = fileList + }, + + // 保存校正记录附件 + saveCalibrationAttachment () { + if (!this.calibrationAttachmentModalData.id) { + this.$message.warning('请先选择校正记录!') + return + } + if (!this.calibrationAttachmentUploadList || this.calibrationAttachmentUploadList.length === 0) { + this.$message.warning('请先上传附件!') + return + } + const formData = new FormData() + for (let i = 0; i < this.calibrationAttachmentUploadList.length; i++) { + formData.append("file", this.calibrationAttachmentUploadList[i].raw) + } + formData.append("folder", 'eamObject') + formData.append("site", this.calibrationAttachmentModalData.site) + formData.append("objectID", this.calibrationAttachmentModalData.id) + formData.append("orderRef3", 'eamCalibrationRecord') + formData.append("orderRef4", this.calibrationAttachmentModalData.objectID) + uploadEamObjectFile(formData).then(({data}) => { + if (data && data.code === 0) { + this.$message.success(data.msg || '上传成功') + this.calibrationAttachmentUploadList = [] + if (this.$refs.calibrationAttachmentUpload) { + this.$refs.calibrationAttachmentUpload.clearFiles() + } + this.getCalibrationAttachmentList() + } else { + this.$message.error(data.msg || '上传失败') + } + }) + }, + + // 查询校正记录附件列表 + getCalibrationAttachmentList () { + if (!this.calibrationAttachmentModalData.id) { + this.calibrationAttachmentList = [] + return + } + let inData = { + orderRef1: this.calibrationAttachmentModalData.site, + orderRef2: this.calibrationAttachmentModalData.id + '', + orderRef3: 'eamCalibrationRecord', + orderRef4: this.calibrationAttachmentModalData.objectID, + } + getFileContentList(inData).then(({data}) => { + if (data && data.code === 200) { + this.calibrationAttachmentList = data.rows || [] + } else { + this.calibrationAttachmentList = [] + } + }).catch(() => { + this.calibrationAttachmentList = [] + }) + }, + + // 删除校正记录附件 + deleteCalibrationAttachmentFile (row) { + this.$confirm('确定要删除此文件?', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + type: 'warning' + }).then(() => { + deleteObjectFile(row).then(({data}) => { + if (data && data.code === 0) { + this.getCalibrationAttachmentList() + this.$message.success(data.msg || '操作成功') + } else { + this.$alert(data.msg || '删除失败', '错误', { + confirmButtonText: '确定' + }) + } + }) + }).catch(() => { + }) + }, + async exportExcel() { this.searchData.limit = -1 this.searchData.page = 1 @@ -3644,6 +4311,8 @@ } else if (this.activeTable === 'device_part') { this.getDevicePartData() + } else if (this.activeTable === 'calibration_record') { + this.getCalibrationRecordData() } // else if (this.activeTable === 'check_item') { // this.getCheckItemData() @@ -3790,6 +4459,7 @@ addFlag: 'Y', deptID: '', assetNo: '', + modelNo: '', assetRemark: '', deptName: '', standardMaintenanceDuration: '', @@ -3798,7 +4468,11 @@ timeOutResponseDuration: '', cycleTimeSend: undefined, mesType: '', - mesTypeList: [] + mesTypeList: [], + calibrationEnableFlag: 'N', + calibrationPeriod: undefined, + lastCalibrationDate: '', + nextCalibrationDate: '', } //打开组件 去做新增业务 this.$nextTick(() => { @@ -3831,6 +4505,10 @@ mesType: row.mesType, mesTypeList: row.mesType == null || row.mesType === '' ? [] : row.mesType.split(','), cycleTimeSend: row.cycleTimeSend == null || row.cycleTimeSend === '' ? undefined : row.cycleTimeSend, + calibrationEnableFlag: row.calibrationEnableFlag === 'Y' ? 'Y' : 'N', + calibrationPeriod: row.calibrationPeriod == null || row.calibrationPeriod === '' ? undefined : Number(row.calibrationPeriod), + lastCalibrationDate: row.lastCalibrationDate || '', + nextCalibrationDate: row.nextCalibrationDate || '', } //打开组件 去做新增业务 this.$nextTick(() => { @@ -3874,6 +4552,12 @@ // 判断是否是获取焦点的事件 if (row) { this.currentRow = JSON.parse(JSON.stringify(row)) + if (!this.isOutsourceCalibrationDevice) { + this.calibrationRecordList = [] + if (this.activeTable === 'calibration_record') { + this.activeTable = 'file_content' + } + } this.eamObjectId = row.objectID this.uploadUrl = this.$http.adornUrl(`/api/sys/file/upload?token=${this.$cookie.get('token')}&folder=` + this.folder + `&objectId=` + this.eamObjectId) //刷新当前页表 @@ -4669,26 +5353,82 @@ padding: 0px !important; line-height: 20px; } -/*修改上传框的样式*/ -/deep/ .customer-upload .el-upload-dragger { - background-color: #fff; +.calibration-attachment-upload-row{ + display: grid; + grid-template-columns: 350px 120px; + column-gap: 18px; + align-items: end; + margin: -2px 7px 8px 7px; +} + +.calibration-attachment-upload { + width: 353px; +} + +/deep/ .calibration-attachment-upload .el-upload { + display: block; + width: 100%; +} + +/deep/ .calibration-attachment-upload .el-upload-dragger { + width: 100%; + height: 52px; border: 1px dashed #d9d9d9; border-radius: 6px; - -webkit-box-sizing: border-box; box-sizing: border-box; - margin-left: 10px; - width: 240px; - height: 42px; text-align: left; - position: relative; - overflow: hidden; } -/*修改上传文字的样式*/ -.customer-upload .el-upload__text{ - margin-top: -32px; - margin-left: 40px; +/deep/ .calibration-attachment-upload .el-upload-dragger .el-icon-upload { + font-size: 26px; + margin: 12px 10px; +} + +/deep/ .calibration-attachment-upload .el-upload__text { + margin-top: -30px; + margin-left: 44px; +} + +.calibration-upload-btn { + width: 120px; + height: 36px; +} + +.calibration-create-upload { + width: 500px; +} + +/deep/ .calibration-create-upload .el-upload { + display: block; + width: 100%; +} + +/deep/ .calibration-create-upload .el-upload-dragger { + width: 100%; + height: 62px; + box-sizing: border-box; +} + +.calibration-record-toolbar { + display: flex; + align-items: center; + flex-wrap: wrap; + column-gap: 16px; +} + +.calibration-date-inline { + display: inline-flex; + align-items: center; + font-size: 13px; + color: #606266; + font-weight: 500; + line-height: 32px; +} +.calibration-date-value { + margin-left: 2px; + color: #f9ae06; + font-weight: 600; } .down-tree{ height: 470px;