| | |
| | | <el-card class="top-card"> |
| | | <el-row :gutter="24" class="top-info-row"> |
| | | <el-col :span="8" class="info-col"> |
| | | <div class="info-item"><span class="label">菌种来源:</span>{{ detail.source }}</div> |
| | | <div class="info-item"><span class="label">鉴别菌株编号:</span>{{ detail.strainNo }}</div> |
| | | <div class="info-item"><span class="label">鉴别菌株名称:</span>{{ detail.strainName }}</div> |
| | | <div class="info-item"><span class="label">菌种来源:</span>{{ detail.strainSource }}</div> |
| | | <div class="info-item"><span class="label">鉴别菌株编号:</span>{{ detail.identifyingStrainCode }}</div> |
| | | <div class="info-item"><span class="label">鉴别菌株名称:</span>{{ detail.identifyingStrainName }}</div> |
| | | </el-col> |
| | | <el-col :span="8" class="info-col"> |
| | | <div class="info-item"><span class="label">验证实验编号:</span>{{ detail.verifyNo }}</div> |
| | | <div class="info-item"><span class="label">验证实验编号:</span>{{ detail.validationExperimentCode }}</div> |
| | | <div class="info-item"><span class="label">实验时间:</span>{{ detail.experimentTime }}</div> |
| | | <div class="info-item"></div> |
| | | </el-col> |
| | |
| | | <div class="info-item sign-label"><span class="label">菌种实验员签字</span></div> |
| | | <div class="info-item signature-item"> |
| | | <div class="signature-area"> |
| | | <img v-if="detail.signature" :src="detail.signature" alt="签字" /> |
| | | <img v-if="detail.handleSignature" :src="detail.handleSignature" alt="签字" /> |
| | | <span v-else class="waiting-text">暂无签名</span> |
| | | </div> |
| | | </div> |
| | |
| | | </el-row> |
| | | </el-card> |
| | | <div class="section-card" style="margin-top: 24px;"> |
| | | <el-form label-width="100px" label-position="top"> |
| | | <el-form-item label="实验结论"> |
| | | <el-input type="textarea" v-model="detail.conclusion" :rows="3" placeholder="请输入" /> |
| | | <el-form ref="form" label-width="100px" :model="detail" :rules="rules" label-position="top"> |
| | | <el-form-item label="实验结论" prop="result"> |
| | | <el-input type="textarea" v-model="detail.result" :rows="3" placeholder="请输入" /> |
| | | </el-form-item> |
| | | <el-form-item label="批准菌株用途"> |
| | | <el-checkbox-group v-model="detail.usage"> |
| | | <el-checkbox label="传代" /> |
| | | <el-checkbox label="菌种保藏" /> |
| | | <el-checkbox label="废弃" /> |
| | | <el-form-item label="批准菌株用途" prop="purpose"> |
| | | <el-checkbox-group v-model="detail.purpose"> |
| | | <el-checkbox :label="1">传代</el-checkbox> |
| | | <el-checkbox :label="2">菌种保藏</el-checkbox> |
| | | <el-checkbox :label="3">废弃</el-checkbox> |
| | | </el-checkbox-group> |
| | | </el-form-item> |
| | | </el-form> |
| | |
| | | |
| | | <div class="section-card" style="margin-top: 12px;"> |
| | | <el-table :data="tableData" border style="width: 100%;" :row-class-name="getRowClassName"> |
| | | <el-table-column prop="condition" label="菌种培养工艺条件" /> |
| | | <el-table-column prop="conditions" label="菌种培养工艺条件" /> |
| | | <el-table-column prop="record" label="菌种培养工艺实况记录" /> |
| | | <el-table-column prop="process" label="菌种培养标准工艺" /> |
| | | <el-table-column prop="workmanship" label="菌种培养标准工艺" /> |
| | | <el-table-column label="操作" width="120"> |
| | | <template #default="{ row }"> |
| | | <el-button type="text" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情2</el-button> |
| | | <el-button type="text" @click="handleEdit(row)">详情</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | <el-button type="primary" @click="handleSave">保存</el-button> |
| | | <el-button @click="handleDraft">存稿</el-button> |
| | | </div> |
| | | <DetailConditionDialog |
| | | <!-- <DetailConditionDialog |
| | | :visible.sync="detailDialogVisible" |
| | | :value="detailDialogValue" |
| | | /> |
| | | /> --> |
| | | </Card> |
| | | </template> |
| | | |
| | | <script> |
| | | import EditConditionDialog from './EditConditionDialog.vue' |
| | | import DetailConditionDialog from './DetailConditionDialog.vue' |
| | | import { detail } from './service' |
| | | import { detail,confirm } from './service' |
| | | export default { |
| | | name: 'ConfirmDetail', |
| | | components: { EditConditionDialog, DetailConditionDialog }, |
| | | data() { |
| | | return { |
| | | detail: { |
| | | source: '内容的内容内容内容', |
| | | strainNo: '3411234', |
| | | strainName: '名称名称名称', |
| | | verifyNo: '34133214', |
| | | experimentTime: '2025-1-23 11:10:28', |
| | | signature: '', // 签名图片url |
| | | conclusion: '', |
| | | usage: [] |
| | | strainSource: '', |
| | | identifyingStrainCode: '', |
| | | identifyingStrainName: '', |
| | | validationExperimentCode: '', |
| | | experimentTime: '', |
| | | handleSignature: '', // 签名图片url |
| | | result:'', |
| | | purpose: [] |
| | | }, |
| | | activeTab: 'condition', |
| | | activeTab: 'conditions', |
| | | rules: { |
| | | result: [ |
| | | { required: true, message: '请输入实验结论', trigger: 'blur' } |
| | | ], |
| | | purpose: [ |
| | | { required: true, message: '请选择菌种用途', trigger: 'change' } |
| | | ] |
| | | }, |
| | | initialTableData: [ |
| | | { condition: '平板培养基', record: '文字内容文字内容文字内容文字内容文字内容文字内容', process: '文字内容文字内容文字内容文字内容文字内容文字内容' }, |
| | | { condition: '培养温度', record: '', process: '' }, |
| | | { condition: '培养时间', record: '', process: '' }, |
| | | { condition: '摇瓶培养基', record: '', process: '' }, |
| | | { condition: '接种量', record: '', process: '' }, |
| | | { condition: '培养时间', record: '', process: '' }, |
| | | { condition: '发酵时间', record: '', process: '' }, |
| | | { condition: '检测数据及结果', record: '', process: '' } |
| | | { conditions: '平板培养基', record: '', workmanship: '' }, |
| | | { conditions: '培养温度', record: '', workmanship: '' }, |
| | | { conditions: '培养时间', record: '', workmanship: '' }, |
| | | { conditions: '摇瓶培养基', record: '', workmanship: '' }, |
| | | { conditions: '接种量', record: '', workmanship: '' }, |
| | | { conditions: '培养时间', record: '', workmanship: '' }, |
| | | { conditions: '发酵时间', record: '', workmanship: '' }, |
| | | { conditions: '检测数据及结果', record: '', workmanship: '' } |
| | | ], |
| | | tableData: [ |
| | | { condition: '平板培养基', record: '文字内容文字内容文字内容文字内容文字内容文字内容', process: '文字内容文字内容文字内容文字内容文字内容文字内容' }, |
| | | { condition: '培养温度', record: '', process: '' }, |
| | | { condition: '培养时间', record: '', process: '' }, |
| | | { condition: '摇瓶培养基', record: '', process: '' }, |
| | | { condition: '接种量', record: '', process: '' }, |
| | | { condition: '培养时间', record: '', process: '' }, |
| | | { condition: '发酵时间', record: '', process: '' }, |
| | | { condition: '检测数据及结果', record: '', process: '' } |
| | | { conditions: '平板培养基', record: '', workmanship: '' }, |
| | | { conditions: '培养温度', record: '', workmanship: '' }, |
| | | { conditions: '培养时间', record: '', workmanship: '' }, |
| | | { conditions: '摇瓶培养基', record: '', workmanship: '' }, |
| | | { conditions: '接种量', record: '', workmanship: '' }, |
| | | { conditions: '培养时间', record: '', workmanship: '' }, |
| | | { conditions: '发酵时间', record: '', workmanship: '' }, |
| | | { conditions: '检测数据及结果', record: '', workmanship: '' } |
| | | ], |
| | | dialogVisible: false, |
| | | dialogIsEdit: false, |
| | |
| | | methods: { |
| | | getDetail() { |
| | | detail({id: this.$route.query.id}).then(res => { |
| | | this.detail = res.data |
| | | this.detail = { |
| | | ...res, |
| | | handleSignature: res.handleSignature || '', // 处理签名为空的情况 |
| | | purpose: res.purpose || [] // 处理 purpose 为空的情况 |
| | | } |
| | | }) |
| | | }, |
| | | handleEdit(row) { |
| | | const idx = this.tableData.indexOf(row) |
| | | this.dialogVisible = true |
| | | this.dialogIsEdit = true |
| | | this.dialogIsFixed = idx < this.initialTableData.length |
| | | this.dialogIsFixed = idx < this.initialTableData?.length |
| | | this.dialogValue = { ...row } |
| | | this.dialogIndex = idx |
| | | }, |
| | |
| | | this.detailDialogValue = { ...row } |
| | | }, |
| | | handleSave() { |
| | | this.dialogVisible = true |
| | | this.dialogIsEdit = false |
| | | this.dialogIsFixed = false |
| | | this.dialogValue = { condition: '', record: '', process: '' } |
| | | this.dialogIndex = null |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | this.detail.list = this.tableData || [] |
| | | this.detail.purpose = this.detail.purpose.join(',') |
| | | confirm({...this.detail}).then(res => { |
| | | if (res.code == 200) { |
| | | this.$message.success('保存成功'); |
| | | this.$router.back() |
| | | } else { |
| | | this.$message.error(res.msg); |
| | | } |
| | | }) |
| | | } else { |
| | | this.$message.error('请填写必填项'); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | handleDraft() { |
| | | // 存稿逻辑 |
| | |
| | | } |
| | | }, |
| | | getRowClassName({ rowIndex }) { |
| | | return rowIndex < this.initialTableData.length ? 'fixed-row' : ''; |
| | | return rowIndex < this.initialTableData?.length ? 'fixed-row' : ''; |
| | | } |
| | | } |
| | | } |