撤回设备模块其他标签页的草稿自动保存,仅保留设备核查计划标签页:核查计划主页面、核查录入弹窗、核查记录弹窗、新增年计划弹窗 4 处保留编辑退出自动保存/恢复,其余 21 个组件恢复原状;
management.vue(数采配置旧弹窗)与 calibration.vue(被注释导出按钮)仅保留此前已报备的死代码清理,草稿接线一并移除
| | |
| | | updateDeviceAcceptance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "acceptance-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.acceptanceId) { |
| | | this.searchInfo() |
| | | } else if (this.operationType !== 'view') { |
| | | this.draftRestore('acceptanceForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | getDeviceAcceptance({ acceptanceId: this.form.acceptanceId }).then(res => { |
| | | if (res.code === 200) { |
| | | const id = this.form.acceptanceId |
| | | this.form = { ...res.data } |
| | | if (this.operationType !== 'view') { |
| | | this.draftRestore('acceptanceForm', 'form', id, 'dialogVisible') |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | |
| | | addDeviceAcceptance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('acceptanceForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | updateDeviceAcceptance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.draftClear('acceptanceForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('acceptanceForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | getDeviceAccidentReport, |
| | | addDeviceAccidentReport, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "accident-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.accidentReportId) { |
| | | this.searchInfo() |
| | | } else { |
| | | this.draftRestore('accidentForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | getDeviceAccidentReport({ accidentReportId: this.form.accidentReportId }).then(res => { |
| | | if (res.code === 200) { |
| | | const id = this.form.accidentReportId |
| | | this.form = { ...res.data } |
| | | this.draftRestore('accidentForm', 'form', id, 'dialogVisible') |
| | | if (res.data.isFinish === 0) { |
| | | if (this.form.assessorUserId) { |
| | | this.currentStep = 1 |
| | |
| | | addDeviceAccidentReport(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('accidentForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('accidentForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | getNoConfigProduct, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "dataAcquisitionConfig", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {limsTable}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | deviceId: { |
| | | type: Number, |
| | |
| | | this.configForm["sampleCode"] = res.data.sampleCode; |
| | | this.configForm["dbFileName"] = res.data.dbFileName; |
| | | this.configForm["fiberOpticRibbon"] = res.data.fiberOpticRibbon |
| | | this.$nextTick(() => { |
| | | this.draftRestore('acquisitionConfig4', 'configForm', this.deviceId, 'dialogVisible4') |
| | | }) |
| | | }) |
| | | }, |
| | | // 提交文件配置 |
| | |
| | | this.upLoad4 = true; |
| | | saveDeviceFileConfiguration({ deviceId: this.deviceId, ...obj }).then(res => { |
| | | if (res.code == 200) { |
| | | this.draftClear('acquisitionConfig4') |
| | | this.dialogVisible4 = false; |
| | | this.init(); |
| | | this.$message.success("操作成功"); |
| | |
| | | }); |
| | | }); |
| | | } |
| | | this.$nextTick(() => { |
| | | this.draftRestore('acquisitionConfig3', 'configForm', row.structureItemParameterId, 'dialogVisible3') |
| | | this.draftRestore('acquisitionConfig3Domains', 'domains', row.structureItemParameterId, 'dialogVisible3') |
| | | }) |
| | | }); |
| | | }, |
| | | // 提交数采配置 |
| | |
| | | dataConfigList: this.domains, |
| | | isDevice: false |
| | | }).then(res => { |
| | | this.draftClear('acquisitionConfig3') |
| | | this.draftClear('acquisitionConfig3Domains') |
| | | this.dialogVisible3 = false; |
| | | this.domains = [ |
| | | { |
| | |
| | | this.page.current = val; |
| | | }, |
| | | closeForm() { |
| | | this.draftStop('acquisitionConfig3') |
| | | this.draftStop('acquisitionConfig3Domains') |
| | | this.deleteList = []; |
| | | this.domains = [ |
| | | { |
| | |
| | | deviceScopeSearch |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import Sortable from "sortablejs"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | |
| | | export default { |
| | | name: "addYearPlanDia", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | calibrationPlanDetailList: [], |
| | | } |
| | | this.calibrationPlanDetailList = [] |
| | | this.$nextTick(() => { |
| | | this.draftRestore('addYearPlanDiaForm', 'form', '', 'applicationForm') |
| | | this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', '', 'applicationForm') |
| | | }) |
| | | } else { |
| | | this.getRowInfo(row) |
| | | } |
| | |
| | | this.form.planName = res.data.planName |
| | | this.form.planYear = res.data.planYear |
| | | this.form.planId = res.data.planId |
| | | this.$nextTick(() => { |
| | | this.draftRestore('addYearPlanDiaForm', 'form', this.form.planId, 'applicationForm') |
| | | this.draftRestore('addYearPlanDiaRows', 'calibrationPlanDetailList', this.form.planId, 'applicationForm') |
| | | }) |
| | | } |
| | | }).catch(err => { |
| | | this.yearTableLoading = false |
| | |
| | | addDeviceCalibrationPlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('addYearPlanDiaForm') |
| | | this.draftClear('addYearPlanDiaRows') |
| | | this.closeDialog() |
| | | this.$emit('closeDia') |
| | | } |
| | |
| | | updateDeviceCalibrationPlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('addYearPlanDiaForm') |
| | | this.draftClear('addYearPlanDiaRows') |
| | | this.closeDialog() |
| | | this.$emit('closeDia') |
| | | } |
| | |
| | | } |
| | | }, |
| | | closeDialog() { |
| | | this.draftStop('addYearPlanDiaForm') |
| | | this.draftStop('addYearPlanDiaRows') |
| | | this.applicationForm = false |
| | | }, |
| | | // 获取所有设备 |
| | |
| | | addDeviceExternalApply, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "applicationForm", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.externalApplyId) { |
| | | this.searchInfo() |
| | | } else { |
| | | this.$nextTick(() => { |
| | | this.draftRestore('applicationForm', 'form', '', 'dialogVisible') |
| | | }) |
| | | } |
| | | }, |
| | | // 查询详情 |
| | | searchInfo() { |
| | | getDeviceExternalApply({ externalApplyId: this.form.externalApplyId }).then(res => { |
| | | if (res.code === 200) { |
| | | const externalApplyId = this.form.externalApplyId |
| | | this.form = { ...res.data } |
| | | if (res.data.isFinish === 0) { |
| | | if (this.form.departmentHeadUserId) { |
| | |
| | | this.currentStep = 4 |
| | | this.showStep = 3 |
| | | } |
| | | this.$nextTick(() => { |
| | | this.draftRestore('applicationForm', 'form', externalApplyId, 'dialogVisible') |
| | | }) |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | |
| | | addDeviceExternalApply(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('applicationForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('applicationForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.draftStop('borrow') |
| | | this.form = {} |
| | | this.currentStep = 0 // 步骤条显示第几步 |
| | | this.currentStepClick = 0 // 点击步骤条变化 |
| | |
| | | saveDeviceBorrow(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功') |
| | | this.draftClear('borrow') |
| | | this.dialogVisible = false |
| | | this.refreshTable() |
| | | } |
| | |
| | | this.currentStepClick = i |
| | | } |
| | | console.log(this.currentStepClick) |
| | | if (this.currentStep < 2) { |
| | | this.draftRestore('borrow', 'form', this.form.id, 'dialogVisible') |
| | | } |
| | | this.dialogVisible = true |
| | | } |
| | | }) |
| | |
| | | } |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.form.deviceId = this.clickNodeVal.value |
| | | this.draftRestore('borrow', 'form', this.clickNodeVal.value, 'dialogVisible') |
| | | }, |
| | | //导出 |
| | | handleDown() { |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | } |
| | | } |
| | | }, |
| | | mixins: [draftSave], |
| | | data() { |
| | | return { |
| | | value: "", |
| | |
| | | add(type) { |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | this.draftRestore('calibrationRecord', 'calibrationRecord', '', 'dialogVisible1') |
| | | this.getXmsg().then(() => { |
| | | this.draftRestore('calibrationRecordParams', 'calibrateParams', '', 'dialogVisible1') |
| | | }) |
| | | this.getXmsg() |
| | | }, |
| | | // 查看详情 |
| | | handleViewClick(type, row) { |
| | |
| | | calibrationMaintenance() { |
| | | this.dialogVisible0 = true |
| | | this.getXmsg(); |
| | | this.$nextTick(() => { |
| | | this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0') |
| | | }) |
| | | }, |
| | | // 获取设备校准参数table信息 |
| | | async getXmsg() { |
| | |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.$refs['form0'].resetFields() |
| | | this.draftClear('calibrationMaintain') |
| | | this.draftRestore('calibrationMaintain', 'form0', this.clickNodeVal.value, 'dialogVisible0') |
| | | this.getXmsg() // 刷新设备校准参数表格 |
| | | } |
| | | this.calibrateParamsLoading = false |
| | |
| | | addOrUpdateDeviceMetricRecord(this.calibrationRecord).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('添加成功') |
| | | this.draftClear('calibrationRecord') |
| | | this.draftClear('calibrationRecordParams') |
| | | this.dialogVisible1 = false |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (newVal === false) { |
| | | this.draftStop('calibrationRecord') |
| | | this.draftStop('calibrationRecordParams') |
| | | this.calibrateParams = [] |
| | | this.calibrationRecord = { |
| | | unitOfMeasure: '', // 计量单位 |
| | |
| | | <script> |
| | | import file from '@/utils/file'; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | // 校准项目维护 |
| | | calibrationMaintenance() { |
| | | this.dialogVisible0 = true |
| | | this.draftRestore('checkMaintenanceDia', 'form0', this.clickNodeVal.value, 'dialogVisible0') |
| | | this.getXmsg(); |
| | | }, |
| | | addCalibrate() { |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.draftClear('checkMaintenanceDia') |
| | | this.$refs['form0'].resetFields() |
| | | this.getXmsg() // 刷新设备校准参数表格 |
| | | } |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('添加成功') |
| | | this.draftClear('checkAddRecordDia') |
| | | this.dialogVisible1 = false |
| | | this.getTableList(this.clickNodeVal.value) |
| | | } |
| | |
| | | }) |
| | | }, |
| | | resetcalibrationRecord() { |
| | | this.draftStop('checkAddRecordDia') |
| | | this.$refs.calibrationRecord.resetFields() |
| | | }, |
| | | // 附件上传 |
| | |
| | | add(type) { |
| | | this.operationType = type |
| | | this.dialogVisible1 = true |
| | | this.draftRestore('checkAddRecordDia', 'calibrationRecord', this.clickNodeVal.value, 'dialogVisible1') |
| | | this.getXmsg() |
| | | }, |
| | | // 查看详情 |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/performance/class"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "equipment-calibration-plan", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: { AddVerificationYearPlanDia, AddYearPlanDia }, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | if (this.operationType !== 'add') { |
| | | this.$nextTick(() => { |
| | | this.form = this.HaveJson(row) |
| | | if (this.operationType !== 'view') { |
| | | this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planDetailId, 'dialogVisible') |
| | | } |
| | | }) |
| | | } else { |
| | | this.form = { |
| | |
| | | planId: this.currentRow.planId, |
| | | planDetailId: '', |
| | | } |
| | | this.draftRestore('equipmentCalibrationPlan', 'form', this.form.planId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 提交表单 |
| | |
| | | addDeviceCalibrationPlanDetail(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentCalibrationPlan') |
| | | this.dialogVisible = false |
| | | this.getYearTableData() |
| | | } |
| | |
| | | updateDeviceCalibrationPlanDetail(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentCalibrationPlan') |
| | | this.dialogVisible = false |
| | | this.getYearTableData() |
| | | } |
| | |
| | | }) |
| | | }, |
| | | resetForm() { |
| | | this.draftStop('equipmentCalibrationPlan') |
| | | this.$refs.modelForm.resetFields(); |
| | | this.dialogVisible = false |
| | | }, |
| | |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import limsTable from "@/components/Table/lims-table.vue"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | |
| | | export default { |
| | | name: '', |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {limsTable}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | this.form = {...row} |
| | | this.form['maintenanceContentArr'] = this.form.maintenanceContent.split(',') |
| | | } |
| | | if (this.operationType !== 'view') { |
| | | this.draftRestore('equipmentMaintenance', 'form', this.operationType === 'edit' ? this.form.id : this.clickNodeVal.value, 'dialogVisible') |
| | | } |
| | | }) |
| | | this.getDictS() |
| | | this.getUserList() |
| | |
| | | addDeviceMaintenance(this.form).then(res => { |
| | | this.buttonLoading = false; |
| | | this.$message.success('新增成功') |
| | | this.draftClear('equipmentMaintenance') |
| | | this.closeDia() |
| | | this.getTableList() |
| | | }).catch(err => { |
| | |
| | | }) |
| | | }, |
| | | closeDia () { |
| | | this.draftStop('equipmentMaintenance') |
| | | this.$refs['form'].resetFields(); |
| | | this.dialogVisible = false |
| | | this.refreshTableList() |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "equipment-maintenance-plan", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | if (res.code === 200) { |
| | | this.form = res.data |
| | | this.deviceMaintenancePlanDetails = this.form.deviceMaintenancePlanDetails |
| | | this.restoreMaintenancePlanDraft() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | } else { |
| | | this.restoreMaintenancePlanDraft() |
| | | } |
| | | this.getEquipOptions() |
| | | }, |
| | | restoreMaintenancePlanDraft() { |
| | | if (this.operationType === 'add' || this.operationType === 'edit') { |
| | | const rid = this.operationType === 'edit' ? this.maintenancePlanId : '' |
| | | this.draftRestore('maintenancePlanForm', 'form', rid, 'applicationForm') |
| | | this.draftRestore('maintenancePlanRows', 'deviceMaintenancePlanDetails', rid, 'applicationForm') |
| | | } |
| | | }, |
| | | // 添加设备 |
| | | addTableRow() { |
| | |
| | | addMaintenancePlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('maintenancePlanForm') |
| | | this.draftClear('maintenancePlanRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |
| | |
| | | updateMaintenancePlan(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.draftClear('maintenancePlanForm') |
| | | this.draftClear('maintenancePlanRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |
| | |
| | | addDeviceBreakdownMaintenance, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "failure-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.maintenanceId) { |
| | | this.searchInfo() |
| | | } else { |
| | | this.draftRestore('failureForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 查询详情 |
| | |
| | | maintenanceId: this.form.maintenanceId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | const id = this.form.maintenanceId |
| | | this.form = { ...res.data } |
| | | this.draftRestore('failureForm', 'form', id, 'dialogVisible') |
| | | if (this.form.isFinish === 0) { |
| | | if (this.form.departmentHeadUserId) { |
| | | this.currentStep = 1 |
| | |
| | | addDeviceBreakdownMaintenance(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('failureForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('failureForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | <script> |
| | | import { dateFormat } from '@/utils/date' |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功') |
| | | this.draftClear('fault') |
| | | this.getTableList(this.clickNodeVal.value) |
| | | this.dialogVisible = false |
| | | } |
| | |
| | | this.form.manufacturer = res.data.manufacturer |
| | | this.form.specificationModel = res.data.specificationModel |
| | | this.form.managementNumber = res.data.managementNumber |
| | | if (!this.form.id) { |
| | | this.draftRestore('fault', 'form', this.clickNodeVal.value, 'dialogVisible') |
| | | } else if (this.currentStep === 0) { |
| | | this.draftRestore('fault', 'form', this.form.id, 'dialogVisible') |
| | | } |
| | | }); |
| | | // 获取负责人信息 |
| | | this.getUserList() |
| | |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.draftStop('fault') |
| | | this.form = {} |
| | | this.closeLoading() |
| | | this.currentStep = 0 // 步骤条显示第几步 |
| | |
| | | <h4><span class="line"></span><span>设备档案</span></h4> |
| | | <div class="btns"> |
| | | <el-button type="primary" size="small" @click="openEditForm" style="">修订档案</el-button> |
| | | <el-button type="primary" size="small" @click="openAddFileDia" style="">添加附件</el-button> |
| | | <el-button type="primary" size="small" @click="dialogVisible1 = true" style="">添加附件</el-button> |
| | | <el-button type="primary" size="small" @click="deviceDialog = true" style="">查看设备二维码</el-button> |
| | | <el-button type="primary" size="small" @click="handleDownOne" style="">导出</el-button> |
| | | </div> |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }) |
| | | this.fileList.push(obj) |
| | | } |
| | | this.draftRestore('fileAdd', 'addFile', row.id, 'dialogVisible1') |
| | | }, |
| | | // 打开添加附件弹窗 |
| | | openAddFileDia() { |
| | | this.dialogVisible1 = true |
| | | this.$nextTick(() => { |
| | | this.draftRestore('fileAdd', 'addFile', this.clickNodeVal.value, 'dialogVisible1') |
| | | }) |
| | | }, |
| | | handleDeleteClick(row) { |
| | | // 删除逻辑 |
| | |
| | | updateDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('更新成功') |
| | | this.draftClear('fileAdd') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | |
| | | addDocument(this.addFile).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.draftClear('fileAdd') |
| | | this.dialogVisible1 = false; |
| | | this.getPage() |
| | | } |
| | |
| | | this.editData = JSON.parse(JSON.stringify(this.Mdata)) |
| | | this.$nextTick(() => { |
| | | this.dialogVisible = true |
| | | this.draftRestore('fileRevision', 'editData', this.clickNodeVal.value, 'dialogVisible') |
| | | }) |
| | | }, |
| | | // 下次日期 = 最近日期 + 周期(月),自动计算 |
| | |
| | | upDeviceParameter(formData).then(res => { |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.draftClear('fileRevision') |
| | | this.getList(this.clickNodeVal.value) |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | |
| | | }, |
| | | dialogVisible1(newVal) { |
| | | if (newVal == false) { |
| | | this.draftStop('fileAdd') |
| | | this.isAddFileUpdate = false |
| | | this.addFile = {} |
| | | this.fileList = [] |
| | |
| | | reviewDeviceInspectionRecord, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "inspection-form", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.inspectionRecordId) { |
| | | this.searchInfo() |
| | | } else if (this.operationType !== 'check') { |
| | | this.draftRestore('inspectionForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | searchInfo() { |
| | |
| | | inspectionRecordId: this.form.inspectionRecordId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | const id = this.form.inspectionRecordId |
| | | this.form = { ...res.data } |
| | | this.details = this.form.details || [] |
| | | if (this.operationType !== 'check') { |
| | | this.draftRestore('inspectionForm', 'form', id, 'dialogVisible') |
| | | } |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | |
| | | addDeviceInspectionRecord(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('inspectionForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | updateDeviceInspectionRecord(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('inspectionForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }) |
| | | }, |
| | | resetForm() { |
| | | this.draftStop('inspectionForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | </el-form> |
| | | </div> |
| | | <div> |
| | | <el-button size="small" type="primary" @click="openAdd2">新增</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible2 = true">新增</el-button> |
| | | <el-button size="small" type="primary" @click="handleDownOne">导出</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import dayjs from 'dayjs' |
| | | import { selectQualifiedSupplierManagementPage } from '@/api/cnas/externalService/supplierManage/supplierManage' |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | props: { |
| | | clickNodeVal: { |
| | |
| | | limsTable, |
| | | dataAcquisitionConfig, |
| | | }, |
| | | mixins: [draftSave], |
| | | data() { |
| | | return { |
| | | dateFormat: 'yyyy-MM-dd', |
| | |
| | | }) |
| | | }) |
| | | }, |
| | | openAdd2() { |
| | | this.dialogVisible2 = true |
| | | this.$nextTick(() => { |
| | | this.draftRestore('managementAdd', 'formData2', '', 'dialogVisible2') |
| | | }) |
| | | }, |
| | | handleClose() { |
| | | this.draftStop('management') |
| | | this.formData = { |
| | | authorizedPerson: [] |
| | | } |
| | |
| | | this.upLoad = false; |
| | | }, |
| | | handleClose2() { |
| | | this.draftStop('managementAdd') |
| | | this.formData = { |
| | | authorizedPerson: [] |
| | | } |
| | |
| | | this.formData[key] = `${this.formData[key]} 00:00:00` |
| | | } |
| | | }) |
| | | this.draftRestore('management', 'formData', this.formData.id, 'dialogVisible') |
| | | }, |
| | | beforeUpload(file) { |
| | | if (file.size > 1024 * 1024 * 10) { |
| | |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.refreshTable('page') |
| | | this.draftClear('management') |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | |
| | | this.$message.success('提交成功') |
| | | this.upLoad2 = false |
| | | this.refreshTable('page') |
| | | this.draftClear('managementAdd') |
| | | this.dialogVisible2 = false |
| | | this.formData2 = { |
| | | imageUpload: '', |
| | |
| | | <div> |
| | | <div style="margin: 10px 0;text-align: right"> |
| | | <el-button size="small" type="primary" @click="getList">刷新</el-button> |
| | | <el-button size="small" type="primary" @click="openInstructionDia">受控申请</el-button> |
| | | <el-button size="small" type="primary" @click="dialogVisible = true">受控申请</el-button> |
| | | </div> |
| | | <el-table :data="tableData" border height="calc(100vh - 18em)" |
| | | > |
| | |
| | | pageByPageQueryOfHomeworkInstructions, |
| | | selectDeviceParameter, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (newVal === false) { |
| | | this.draftStop('instructionForm') |
| | | this.draftStop('instructionRows') |
| | | this.instructionForm = {} |
| | | this.documentTableData = [] |
| | | this.fileList1 = [] |
| | |
| | | this.documentTableData.forEach((v, k) => { |
| | | v.index = k |
| | | }) |
| | | this.draftRestore('instructionForm', 'instructionForm', row.instructionId, 'dialogVisible') |
| | | this.draftRestore('instructionRows', 'documentTableData', row.instructionId, 'dialogVisible') |
| | | } |
| | | }) |
| | | }, |
| | | // 打开受控申请弹窗(新增) |
| | | openInstructionDia() { |
| | | this.dialogVisible = true |
| | | this.$nextTick(() => { |
| | | this.draftRestore('instructionForm', 'instructionForm', '', 'dialogVisible') |
| | | this.draftRestore('instructionRows', 'documentTableData', '', 'dialogVisible') |
| | | }) |
| | | }, |
| | | handleSizeChange(val) { |
| | |
| | | newHomeworkGuidebookAdded(this.instructionForm).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('操作成功!') |
| | | this.draftClear('instructionForm') |
| | | this.draftClear('instructionRows') |
| | | this.dialogVisible = false |
| | | this.getList() |
| | | } |
| | |
| | | addFile() { |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.draftClear('instructionRowForm') |
| | | if (this.tableDataIndex !== undefined) { |
| | | this.documentTableData[this.tableDataIndex] = this.form |
| | | this.dialogVisible1 = false; |
| | |
| | | this.form.deviceName = this.clickNodeVal.label |
| | | this.onDeviceNameChange() |
| | | this.fileList = [] |
| | | this.draftRestore('instructionRowForm', 'form', '', 'dialogVisible1') |
| | | |
| | | }, |
| | | editFun(row, index) { |
| | | this.form = { ...row } |
| | |
| | | this.fileList.push({ name: this.form.fileName }) |
| | | } |
| | | this.dialogVisible1 = true |
| | | this.draftRestore('instructionRowForm', 'form', row.id !== undefined ? row.id : ('row' + index), 'dialogVisible1') |
| | | }, |
| | | closeDia() { |
| | | this.draftStop('instructionRowForm') |
| | | this.dialogVisible1 = false |
| | | this.$refs['form'].resetFields() |
| | | this.fileList = [] |
| | |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "quantity-value-traceability-plan", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | if (res.code === 200) { |
| | | this.form = res.data |
| | | this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails |
| | | this.restoreTraceabilityDraft() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.yearTableLoading = false |
| | | }) |
| | | } else { |
| | | this.restoreTraceabilityDraft() |
| | | } |
| | | }, |
| | | restoreTraceabilityDraft() { |
| | | if (this.operationType === 'add' || this.operationType === 'edit') { |
| | | const rid = this.operationType === 'edit' ? this.traceabilityManagementId : '' |
| | | this.draftRestore('traceabilityForm', 'form', rid, 'applicationForm') |
| | | this.draftRestore('traceabilityRows', 'deviceTraceabilityManagementDetails', rid, 'applicationForm') |
| | | } |
| | | }, |
| | | // 添加设备 |
| | |
| | | addTraceabilityManagement(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('traceabilityForm') |
| | | this.draftClear('traceabilityRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |
| | |
| | | updateTraceabilityManagement(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.draftClear('traceabilityForm') |
| | | this.draftClear('traceabilityRows') |
| | | this.applicationForm = false |
| | | this.getYearTableDetailData() |
| | | } |
| | |
| | | deleteDeviceRecord, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | this.form.managementNumber = res.data.managementNumber |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | this.draftRestore('record', 'form', '', 'dialogVisible') |
| | | }) |
| | | }); |
| | | }, |
| | |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.getTableList(this.clickNodeVal.value) |
| | | this.draftClear('record') |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.getTableList(this.clickNodeVal.value) |
| | | this.draftClear('record') |
| | | this.dialogVisible = false |
| | | } |
| | | }) |
| | |
| | | list.push(row.useStartDate) |
| | | list.push(row.useEndDate) |
| | | this.form['useDateList'] = list |
| | | if (type === 'edit') { |
| | | this.draftRestore('record', 'form', this.form.id, 'dialogVisible') |
| | | } |
| | | }, |
| | | handleDeleteClick(index, row) { |
| | | this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', { |
| | |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (newVal === false) { |
| | | this.draftStop('record') |
| | | this.form = { |
| | | // deviceId:'', |
| | | sampleCode: '', |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | this.addReservation.reservationTime = this.yuyuetime + " " + this.yuyue.time; |
| | | this.addReservation.specificTime = this.yuyue.time; |
| | | this.addReservation.deviceNumber = 'TX-ABC-01'+Math.floor(Math.random() * 10 + 1); |
| | | this.draftRestore('reservation', 'addReservation', this.yuyue.id + '_' + this.yuyuetime, 'addVisiable') |
| | | }, |
| | | handleSelectionChange(selected) { |
| | | this.selectedRow = selected.length > 0 ? selected : null; |
| | |
| | | this.$axios.post(this.$api.deviceReservate.save, this.addReservation).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功') |
| | | this.draftClear('reservation') |
| | | this.addVisiable = false |
| | | this.getList(); |
| | | this.query(); |
| | |
| | | addDeviceScrapped, |
| | | } from '@/api/cnas/resourceDemand/device.js' |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | name: "scrapApplicationForm", |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {}, |
| | | mixins: [draftSave], |
| | | data() { |
| | | // 这里存放数据 |
| | | return { |
| | |
| | | this.getUserList() |
| | | if (this.form.scrappedId) { |
| | | this.searchInfo() |
| | | } else { |
| | | this.draftRestore('scrapApplicationForm', 'form', this.form.deviceId, 'dialogVisible') |
| | | } |
| | | }, |
| | | // 查询详情 |
| | |
| | | scrappedId: this.form.scrappedId |
| | | }).then(res => { |
| | | if (res.code === 200) { |
| | | const id = this.form.scrappedId |
| | | this.form = { ...res.data } |
| | | this.draftRestore('scrapApplicationForm', 'form', id, 'dialogVisible') |
| | | if (this.form.isFinish === 0) { |
| | | if (this.form.departmentHeadUserId) { |
| | | this.currentStep = 1 |
| | |
| | | addDeviceScrapped(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('scrapApplicationForm') |
| | | this.resetForm() |
| | | } |
| | | this.submitFormLoading = false |
| | |
| | | }, |
| | | // 关闭弹框 |
| | | resetForm() { |
| | | this.draftStop('scrapApplicationForm') |
| | | this.dialogVisible = false |
| | | this.$emit('closeDialog') |
| | | }, |
| | |
| | | import { selectUserCondition } from "@/api/business/inspectionTask"; |
| | | import { dateFormat } from '@/utils/date' |
| | | import { mapGetters } from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | export default { |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | if (res.code == 200) { |
| | | this.$message.success('提交成功') |
| | | this.getDeviceStatePage(this.clickNodeVal.value) |
| | | this.draftClear('deviceState') |
| | | this.dialogVisible = false |
| | | this.closeLoading() |
| | | } |
| | |
| | | this.form.managementNumber = res.data.managementNumber |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | if (!this.form.stateId) { |
| | | this.draftRestore('deviceState', 'form', '', 'dialogVisible') |
| | | } |
| | | }) |
| | | }); |
| | | // 获取负责人信息 |
| | |
| | | this.currentStepClick = this.currentStep === 4 ? 0 : this.currentStep |
| | | this.$nextTick(() => { |
| | | this.$refs['form'].clearValidate() |
| | | if (this.currentStep === 0) { |
| | | this.draftRestore('deviceState', 'form', this.form.stateId, 'dialogVisible') |
| | | } |
| | | }) |
| | | this.dialogVisible = true |
| | | }, |
| | |
| | | }, |
| | | dialogVisible(newVal) { |
| | | if (!newVal) { |
| | | this.draftStop('deviceState') |
| | | this.form = { |
| | | } |
| | | this.closeLoading() |
| | |
| | | } from "@/api/cnas/resourceDemand/device"; |
| | | import {selectUserCondition} from "@/api/system/user"; |
| | | import {mapGetters} from "@/utils/store-compat"; |
| | | import draftSave from '@/mixins/draftSave' |
| | | |
| | | export default { |
| | | name: '', |
| | | // import 引入的组件需要注入到对象中才能使用 |
| | | components: {limsTable}, |
| | | mixins: [draftSave], |
| | | props: { |
| | | clickNodeVal: { |
| | | type: Object, |
| | |
| | | this.deviceImpowerDetails.forEach(item => { |
| | | item['delegatedUserArr'] = item.delegatedUser.split(',') |
| | | }) |
| | | this.restoreImpowerDraft() |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | }) |
| | | } else { |
| | | this.restoreImpowerDraft() |
| | | } |
| | | this.getEquipOptions() |
| | | this.getUserList() |
| | | }, |
| | | restoreImpowerDraft() { |
| | | if (this.operationType === 'add' || this.operationType === 'edit') { |
| | | const rid = this.operationType === 'edit' ? this.impowerId : '' |
| | | this.draftRestore('usageAuthorizationForm', 'form', rid, 'usageTableDia') |
| | | this.draftRestore('usageAuthorizationRows', 'deviceImpowerDetails', rid, 'usageTableDia') |
| | | } |
| | | }, |
| | | closeDialog () { |
| | | this.usageTableDia = false |
| | |
| | | addImpower(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('新增成功') |
| | | this.draftClear('usageAuthorizationForm') |
| | | this.draftClear('usageAuthorizationRows') |
| | | this.usageTableDia = false |
| | | this.refreshTableList() |
| | | } |
| | |
| | | updateImpower(this.form).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('修改成功') |
| | | this.draftClear('usageAuthorizationForm') |
| | | this.draftClear('usageAuthorizationRows') |
| | | this.usageTableDia = false |
| | | this.refreshTableList() |
| | | } |