| | |
| | | <tr> |
| | | <th>标准名称</th> |
| | | <td> |
| | | <el-input v-model="form.standardName"/> |
| | | <el-input v-model="form.standardName" :disabled="isView"/> |
| | | </td> |
| | | <th>标准编号</th> |
| | | <td> |
| | | <el-input v-model="form.standardCode"/> |
| | | <el-input v-model="form.standardCode" :disabled="isView"/> |
| | | </td> |
| | | </tr> |
| | | <tr> |
| | | <th>验证项目</th> |
| | | <td colspan="3"> |
| | | <el-input v-model="form.verifyItem"/> |
| | | <el-input v-model="form.verifyItem" :disabled="isView"/> |
| | | </td> |
| | | </tr> |
| | | </tbody> |
| | |
| | | <tr v-for="(item, index) in content.checks" :key="item.key"> |
| | | <th>{{ index < 7 ? `${index + 1}. ${item.label}` : item.label }}</th> |
| | | <td> |
| | | <el-input v-model="item.requirement" type="textarea" :rows="3"/> |
| | | <el-input v-model="item.requirement" type="textarea" :rows="3" :disabled="isView"/> |
| | | </td> |
| | | <td> |
| | | <el-input v-model="item.capability" type="textarea" :rows="3"/> |
| | | <el-input v-model="item.capability" type="textarea" :rows="3" :disabled="isView"/> |
| | | <div v-if="item.key === 'personnel'" class="row-extra"> |
| | | <span>检测人员</span> |
| | | <el-select v-model="form.confirmUser" multiple :multiple-limit="5" placeholder="请选择检测人员"> |
| | | <el-select v-model="form.confirmUser" multiple :multiple-limit="5" placeholder="请选择检测人员" :disabled="isView"> |
| | | <el-option v-for="user in userList" :key="user.id" :label="user.name" :value="user.id"/> |
| | | </el-select> |
| | | <el-link v-if="operationType !== 'add'" type="primary" @click="viewWorkPermit">查看上岗证</el-link> |
| | |
| | | </div> |
| | | </td> |
| | | <td class="choice-cell"> |
| | | <el-radio-group v-model="item.satisfied"> |
| | | <el-radio-group v-model="item.satisfied" :disabled="isView"> |
| | | <el-radio :value="1">是</el-radio> |
| | | <el-radio :value="0">否</el-radio> |
| | | </el-radio-group> |
| | |
| | | <tr> |
| | | <th>验证结论</th> |
| | | <td colspan="3"> |
| | | <el-input v-model="content.conclusion" type="textarea" :rows="4"/> |
| | | <el-input v-model="content.conclusion" type="textarea" :rows="4" :disabled="isView"/> |
| | | </td> |
| | | </tr> |
| | | <tr v-for="decision in decisions" :key="decision.key"> |
| | | <th>{{ decision.label }}</th> |
| | | <td colspan="3"> |
| | | <div class="decision-row"> |
| | | <el-radio-group v-model="content[decision.key]"> |
| | | <el-radio-group v-model="content[decision.key]" :disabled="isView"> |
| | | <el-radio value="同意使用">同意使用</el-radio> |
| | | <el-radio value="不能使用">不能使用</el-radio> |
| | | <el-radio value="限制使用">限制使用</el-radio> |
| | | </el-radio-group> |
| | | <span>{{ decision.personLabel }}</span> |
| | | <el-input v-model="content[decision.personKey]" class="person-input"/> |
| | | <el-input v-model="content[decision.personKey]" class="person-input" :disabled="isView"/> |
| | | <span>日期</span> |
| | | <el-date-picker v-model="content[decision.dateKey]" type="date" value-format="YYYY-MM-DD" |
| | | placeholder="选择日期"/> |
| | | placeholder="选择日期" :disabled="isView"/> |
| | | </div> |
| | | </td> |
| | | </tr> |
| | |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <el-button @click="closeDia">取消</el-button> |
| | | <el-button @click="closeDia">{{ isView ? '关闭' : '取消' }}</el-button> |
| | | <el-button v-if="operationType !== 'view'" :loading="loading" type="primary" @click="submit">提交</el-button> |
| | | </template> |
| | | </el-dialog> |
| | | <ViewDeviceDialog v-if="deviceVisible" ref="device" @closDeviceDia="deviceVisible = false" |
| | | <ViewDeviceDialog v-if="deviceVisible" ref="device" :read-only="isView" @closDeviceDia="deviceVisible = false" |
| | | @handleDeviceInfo="setDevices"/> |
| | | <ViewTestRecord v-if="recordVisible" ref="record"/> |
| | | <ViewTestRecord v-if="recordVisible" ref="record" :read-only="isView"/> |
| | | <ViewWorkPermitDia v-if="permitVisible" ref="permit"/> |
| | | <CalibrationsFileDia v-if="calibrationVisible" ref="calibration"/> |
| | | </div> |
| | |
| | | components: {ViewDeviceDialog, ViewTestRecord, ViewWorkPermitDia, CalibrationsFileDia}, |
| | | props: {operationType: {type: String, default: 'add'}}, |
| | | computed: { |
| | | isView() { |
| | | return this.operationType === 'view' |
| | | }, |
| | | dialogTitle() { |
| | | if (this.operationType === 'view') return '查看方法验证' |
| | | return this.operationType === 'edit' ? '编辑方法验证' : '新增方法验证' |
| | |
| | | }) |
| | | }, |
| | | submit() { |
| | | if (this.isView) return |
| | | if (!this.form.standardName?.trim() || !this.form.standardCode?.trim() || !this.form.verifyItem?.trim()) { |
| | | this.$message.warning('请填写标准名称、标准编号和验证项目') |
| | | return |
| | |
| | | this.openChild('recordVisible', 'record', this.info) |
| | | }, |
| | | setDevices(list) { |
| | | if (this.isView) return |
| | | this.deviceVisible = false; |
| | | this.form.machineAttachmentList = list |
| | | }, |