| | |
| | | title="仪器设备量值溯源管理总体计划" width="80%" @close="closeDialog"> |
| | | <div style="display: flex;align-items: center;"> |
| | | <el-button v-if="operationType !== 'check'" size="small" type="primary" @click="addTableRow">添加</el-button> |
| | | <span style="width: 60px">年份:</span> |
| | | <span style="width: 60px;margin-left: 10px">年份:</span> |
| | | <el-date-picker v-model="form.planYear" type="year" value-format="yyyy" clearable size="small" format="yyyy" |
| | | placeholder="选择年"> |
| | | </el-date-picker> |
| | |
| | | <div style="margin: 10px 0"> |
| | | <el-table ref="yearTable" :data="deviceTraceabilityManagementDetails" height="300px" id="templateParamTable" |
| | | :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border |
| | | row-key="deviceId" style="width: 100% ;"> |
| | | row-key="deviceId" v-loading="yearTableLoading"> |
| | | <el-table-column align="center" header-align="center" label="序号" type="index" width="60"></el-table-column> |
| | | <el-table-column label="设备名称" min-width="170" prop="deviceId"> |
| | | <template slot-scope="scope"> |
| | |
| | | notificationLoading: false, |
| | | auditId: '', |
| | | traceabilityManagementId: '', |
| | | yearTableLoading: false |
| | | } |
| | | }, |
| | | mounted() { |
| | |
| | | this.form = { |
| | | planYear: '', |
| | | deviceTraceabilityManagementDetails: [] |
| | | }, |
| | | this.deviceTraceabilityManagementDetails = [] |
| | | } |
| | | this.deviceTraceabilityManagementDetails = [] |
| | | if (row) { |
| | | this.traceabilityManagementId = row.traceabilityManagementId |
| | | this.yearTableLoading = true |
| | | getTraceabilityManagementDetail({ traceabilityManagementId: this.traceabilityManagementId }).then(res => { |
| | | this.yearTableLoading = false |
| | | if (res.code === 200) { |
| | | this.form = res.data |
| | | this.deviceTraceabilityManagementDetails = this.form.deviceTraceabilityManagementDetails |
| | | } |
| | | }).catch(error => { |
| | | console.error(error) |
| | | this.yearTableLoading = false |
| | | }) |
| | | } |
| | | }, |
| | |
| | | changeMachineName() { |
| | | this.deviceTraceabilityManagementDetails = [] |
| | | this.selectionRows.map(val => { |
| | | this.deviceTraceabilityManagementDetails.push({ deviceId: val.id, managementNumber: val.value, deviceName: val.label, specificationModel: val.specificationModel }) |
| | | this.deviceTraceabilityManagementDetails.push({ |
| | | deviceId: val.id, |
| | | managementNumber: val.value, |
| | | deviceName: val.label, |
| | | specificationModel: val.specificationModel, |
| | | verificationUnit: val.calibrationServices, |
| | | verificationCycle: val.calibrationDate |
| | | }) |
| | | }) |
| | | this.addEquipDia = false |
| | | this.rowDrop() |