| | |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <EditConditionDialog |
| | | :visible.sync="dialogVisible" |
| | | :isEdit="dialogIsEdit" |
| | | :isFixed="dialogIsFixed" |
| | | :value="dialogValue" |
| | | @ok="handleDialogOk" |
| | | /> |
| | | |
| | | <div class="section-card" style="margin-top: 12px"> |
| | | <el-table |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import EditConditionDialog from "./EditConditionDialog.vue"; |
| | | import DetailConditionDialog from "./DetailConditionDialog.vue"; |
| | | export default { |
| | | name: "DetailConditionDialog", |
| | | components: { EditConditionDialog, DetailConditionDialog }, |
| | | components: { DetailConditionDialog }, |
| | | props: { |
| | | visible: Boolean, |
| | | value: { |
| | |
| | | <div>新增原始细胞</div> |
| | | </div> |
| | | </div> --> |
| | | <el-form |
| | | :model="form" |
| | | :rules="rules" |
| | | ref="strainForm" |
| | | label-position="top" |
| | | class="strain-form" |
| | | > |
| | | |
| | | <el-form :model="form" :rules="rules" ref="strainForm" label-position="top" class="strain-form"> |
| | | <div class="form-row"> |
| | | <el-form-item label="菌种来源" prop="identificationMethod" required> |
| | | <el-input v-model="form.identificationMethod" placeholder="请输入"></el-input> |
| | | <el-form-item label="菌种来源" prop="strainSource"> |
| | | <el-input v-model="form.strainSource" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="form-row three-columns"> |
| | | <el-form-item label="鉴别菌株编号" prop="storageLocation" required> |
| | | <el-input v-model="form.storageLocation" placeholder="请输入"></el-input> |
| | | <el-form-item label="鉴别菌株编号" prop="identifyingStrainCode"> |
| | | <el-input v-model="form.identifyingStrainCode" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="鉴别菌株名称" prop="preservationMethod" required> |
| | | <el-input v-model="form.preservationMethod" placeholder="请输入"></el-input> |
| | | <el-form-item label="鉴别菌株名称" prop="identifyingStrainName"> |
| | | <el-input v-model="form.identifyingStrainName" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <div class="form-item-placeholder"></div> |
| | | </div> |
| | | <div class="form-row three-columns"> |
| | | <el-form-item label="验证实验编号" prop="storageLocation" required> |
| | | <el-input v-model="form.storageLocation" placeholder="请输入"></el-input> |
| | | <el-form-item label="验证实验编号" prop="validationExperimentCode"> |
| | | <el-input v-model="form.validationExperimentCode" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="实验时间" prop="preservationMethod" required> |
| | | <el-input v-model="form.preservationMethod" placeholder="请输入"></el-input> |
| | | <el-form-item label="实验时间" prop="experimentTime"> |
| | | <el-date-picker :prefix-icon="' '" style="width: 290px;" v-model="form.experimentTime" type="date" |
| | | placeholder="请选择实验时间"></el-date-picker> |
| | | </el-form-item> |
| | | <div class="form-item-placeholder"></div> |
| | | </div> |
| | |
| | | </div> |
| | | </el-form> |
| | | |
| | | <!-- 批量新增弹窗 --> |
| | | <el-dialog |
| | | title="批量新增" |
| | | :visible.sync="batchAddDialogVisible" |
| | | width="520px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | custom-class="batch-add-dialog" |
| | | > |
| | | <div class="dialog-content"> |
| | | <el-form :model="batchForm" ref="batchFormRef" label-position="top" class="batch-form"> |
| | | <el-form-item |
| | | label="批量新增数量" |
| | | prop="count" |
| | | required |
| | | :rules="[{ required: true, message: '请输入批量新增数量', trigger: 'blur' }]" |
| | | > |
| | | <el-input v-model.number="batchForm.count" placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div class="dialog-notice"> |
| | | <p>注意:操作批量新增后,系统会自动生成对应数量的菌种数据,</p> |
| | | <p>这些菌种的基础信息内容都是一致的,唯独菌种编号内容系统</p> |
| | | <p>不会自动生成,需要操作员自行编辑</p> |
| | | </div> |
| | | </div> |
| | | <template #footer> |
| | | <div class="end-btn"> |
| | | <el-button type="primary" @click="handleConfirmBatchAdd">确认新增</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | |
| | | <!-- 签字确认组件 --> |
| | | <ConfirmStorageDialog |
| | | :visible.sync="signatureVisible" |
| | | @confirm="handleSignatureConfirm" |
| | | name="操作人签字" |
| | | text="是否确认提交该项原始细胞库资料信息?" |
| | | /> |
| | | <ConfirmStorageDialog :visible.sync="signatureVisible" @confirm="handleSignatureConfirm" name="操作人签字" |
| | | text="是否确认提交该项原始细胞库资料信息?" /> |
| | | </Card> |
| | | </template> |
| | | |
| | | <script> |
| | | import ConfirmStorageDialog from '@/components/confirm-storage-dialog/index.vue' |
| | | import { add, edit, detail } from './service' |
| | | import moment from 'moment' |
| | | |
| | | export default { |
| | | name: 'AddprimitiveCell', |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | batchAddDialogVisible: false, |
| | | signatureVisible: false, |
| | | currentAction: '', // 'submit' or 'batchAdd' |
| | | batchForm: { |
| | | count: '' |
| | | }, |
| | | form: { |
| | | strainNo: '', |
| | | strainName: '', |
| | | source: '', |
| | | identificationMethod: '', |
| | | characteristics: '', |
| | | storageLocation: '', |
| | | preservationMethod: '', |
| | | remarks: '' |
| | | strainSource: '', // 菌种来源 |
| | | identifyingStrainCode: '', // 鉴别菌株编号 |
| | | identifyingStrainName: '', // 鉴别菌株名称 |
| | | validationExperimentCode: '', // 验证实验编号 |
| | | experimentTime: '' // 实验时间 |
| | | }, |
| | | rules: { |
| | | strainNo: [{ required: true, message: '请输入菌种编号', trigger: 'blur' }], |
| | | strainName: [{ required: true, message: '请输入菌种名称', trigger: 'blur' }], |
| | | source: [{ required: true, message: '请输入菌种来源', trigger: 'blur' }], |
| | | identificationMethod: [{ required: true, message: '请输入鉴定方法', trigger: 'blur' }], |
| | | characteristics: [{ required: true, message: '请输入特征描述', trigger: 'blur' }], |
| | | storageLocation: [{ required: true, message: '请输入保存位置', trigger: 'blur' }], |
| | | preservationMethod: [{ required: true, message: '请输入菌种保存方法', trigger: 'blur' }] |
| | | strainSource: [{ required: true, message: '请输入菌种来源', trigger: 'blur' }], |
| | | identifyingStrainCode: [{ required: true, message: '请输入鉴别菌株编号', trigger: 'blur' }], |
| | | identifyingStrainName: [{ required: true, message: '请输入鉴别菌株名称', trigger: 'blur' }], |
| | | validationExperimentCode: [{ required: true, message: '请输入验证实验编号', trigger: 'blur' }], |
| | | experimentTime: [{ required: true, message: '请输入实验时间', trigger: 'blur' }] |
| | | } |
| | | } |
| | | }, |
| | |
| | | } |
| | | }) |
| | | }, |
| | | handleBatchAdd() { |
| | | this.batchAddDialogVisible = true |
| | | }, |
| | | handleConfirmBatchAdd() { |
| | | this.$refs.batchFormRef.validate((valid) => { |
| | | if (valid) { |
| | | this.currentAction = 'batchAdd' |
| | | this.batchAddDialogVisible = false |
| | | this.signatureVisible = true |
| | | } |
| | | }) |
| | | }, |
| | | handleDraft() { |
| | | // 实现存草稿逻辑 |
| | | console.log('save draft', this.form) |
| | | this.signatureVisible = true |
| | | this.currentAction = 'draft' |
| | | }, |
| | | handleSignatureConfirm(signatureImage) { |
| | | this.signatureVisible = false |
| | | this.$router.back() |
| | | this.signatureVisible = false; |
| | | const id = this.$route.query.id || this.$route.params.id; |
| | | const submitData = { ...this.form, strainType: 1, isDraft: this.currentAction == 'submit' ? 0 : 1, handleSignature: signatureImage.signature, experimentTime: moment(this.form.experimentTime).format('YYYY-MM-DD') }; |
| | | if (this.currentAction === 'submit') { |
| | | // 处理提交逻辑 |
| | | console.log('submit form with signature:', this.form, signatureImage) |
| | | } else if (this.currentAction === 'batchAdd') { |
| | | // 处理批量新增逻辑 |
| | | console.log('batch add with signature:', this.batchForm.count, signatureImage) |
| | | if (id) { |
| | | // 编辑 |
| | | edit({ ...submitData, id }).then(() => { |
| | | this.$router.back(); |
| | | }); |
| | | } else { |
| | | // 新增 |
| | | add(submitData).then(() => { |
| | | this.$router.back(); |
| | | }); |
| | | } |
| | | } else { |
| | | // 存草稿 |
| | | add(submitData).then(() => { |
| | | this.$router.back(); |
| | | }); |
| | | } |
| | | }, |
| | | mounted() { |
| | | const id = this.$route.query.id || this.$route.params.id; |
| | | if (id) { |
| | | // 编辑或详情回显 |
| | | detail({ id }).then(res => { |
| | | if (res && res.data) { |
| | | // 这里根据实际接口返回字段做适配 |
| | | Object.assign(this.form, res.data); |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | &-left { |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | |
| | | img { |
| | | width: 20px; |
| | | height: 20px; |
| | |
| | | } |
| | | } |
| | | } |
| | | .end-btn{ |
| | | |
| | | .end-btn { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | gap: 10px; |
| | | |
| | | button{ |
| | | button { |
| | | width: 180px; |
| | | height: 36px; |
| | | // background: #409EFF; |
| | | } |
| | | } |
| | | |
| | | .strain-form { |
| | | padding: 0 40px; |
| | | |
| | |
| | | margin-bottom: 24px; |
| | | |
| | | &.three-columns { |
| | | .el-form-item, .form-item-placeholder { |
| | | |
| | | .el-form-item, |
| | | .form-item-placeholder { |
| | | flex: 1; |
| | | min-width: 280px; |
| | | |
| | | |
| | | @media screen and (max-width: 1200px) { |
| | | min-width: calc(50% - 12px); |
| | | } |
| | | |
| | | |
| | | @media screen and (max-width: 768px) { |
| | | min-width: 100%; |
| | | } |
| | |
| | | padding: 20px; |
| | | text-align: center; |
| | | border-bottom: 1px solid #EBEEF5; |
| | | |
| | | |
| | | .el-dialog__title { |
| | | font-size: 16px; |
| | | font-weight: 600; |
| | |
| | | color: #606266; |
| | | font-weight: normal; |
| | | padding-bottom: 8px; |
| | | |
| | | &::before { |
| | | color: #F56C6C; |
| | | } |
| | |
| | | |
| | | :deep(.el-input) { |
| | | width: 100%; |
| | | |
| | | input { |
| | | width: 100%; |
| | | width: 100%; |
| | | } |
| | | } |
| | | } |
| | |
| | | .dialog-notice { |
| | | margin-top: 16px; |
| | | text-align: center; |
| | | |
| | | p { |
| | | margin: 0; |
| | | line-height: 22px; |
| | |
| | | :deep(.el-dialog__footer) { |
| | | padding: 0 20px 20px; |
| | | text-align: center; |
| | | |
| | | |
| | | .el-button { |
| | | width: 180px; |
| | | height: 36px; |
| | |
| | | <script> |
| | | import EditConditionDialog from './EditConditionDialog.vue' |
| | | import DetailConditionDialog from './DetailConditionDialog.vue' |
| | | import { detail } from './service' |
| | | export default { |
| | | name: 'ConfirmDetail', |
| | | components: { EditConditionDialog, DetailConditionDialog }, |
| | |
| | | detailDialogValue: {} |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.getDetail() |
| | | }, |
| | | methods: { |
| | | getDetail() { |
| | | detail({id: this.$route.query.id}).then(res => { |
| | | this.detail = res.data |
| | | }) |
| | | }, |
| | | handleEdit(row) { |
| | | const idx = this.tableData.indexOf(row) |
| | | this.dialogVisible = true |
| | |
| | | <template> |
| | | <div class="list"> |
| | | <!-- Table --> |
| | | <TableCustom |
| | | :queryForm="queryForm" |
| | | :tableData="tableData" |
| | | :total="total" |
| | | @currentChange="handleCurrentChange" |
| | | @sizeChange="handleSizeChange" |
| | | > |
| | | <TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange" |
| | | @sizeChange="handleSizeChange"> |
| | | <template #search> |
| | | <el-form :model="form" label-width="auto" inline> |
| | | <el-form-item label="鉴别菌株编号:"> |
| | | <el-input v-model="form.strainNo" placeholder="请输入"></el-input> |
| | | <el-input v-model="form.identifyingStrainCode" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="鉴别菌株名称:"> |
| | | <el-input v-model="form.strainName" placeholder="请输入"></el-input> |
| | | <el-input v-model="form.identifyingStrainName" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="验证实验编号:"> |
| | | <el-input v-model="form.strainName" placeholder="请输入"></el-input> |
| | | <el-input v-model="form.validationExperimentCode" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item class="search-btn-box"> |
| | | <el-button type="default" @click="resetForm">重置</el-button> |
| | | <el-button type="primary" @click="searchData">查询</el-button> |
| | |
| | | <template #setting> |
| | | <div class="tableTitle"> |
| | | <div class="flex a-center"> |
| | | <div |
| | | class="title" |
| | | :class="{ active: currentType === 'list' }" |
| | | @click="handleTypeChange('list')" |
| | | > |
| | | <div class="title" :class="{ active: currentType === 'list' }" @click="handleTypeChange('list')"> |
| | | 原始细胞库验证资料 |
| | | </div> |
| | | <div |
| | | class="drafts" |
| | | :class="{ active: currentType === 'draft' }" |
| | | @click="handleTypeChange('draft')" |
| | | > |
| | | <div class="drafts" :class="{ active: currentType === 'draft' }" @click="handleTypeChange('draft')"> |
| | | 草稿箱 |
| | | </div> |
| | | </div> |
| | | <div class="flex a-center"> |
| | | <el-button |
| | | @click="handleNewStrain" |
| | | class="el-icon-plus" |
| | | type="primary" |
| | | style="margin-right: 12px" |
| | | >新增原始细胞库资料</el-button |
| | | > |
| | | <el-button @click="handleNewStrain" class="el-icon-plus" type="primary" |
| | | style="margin-right: 12px">新增原始细胞库资料</el-button> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #table> |
| | | <el-table-column prop="source" label="菌种来源" /> |
| | | <el-table-column prop="method" label="鉴别菌株编号" /> |
| | | <el-table-column prop="certificate" label="鉴别菌株名称" /> |
| | | <el-table-column prop="storage" label="验证实验编号" /> |
| | | <el-table-column prop="amount" label="创建人" /> |
| | | <el-table-column prop="inventory" label="创建时间" /> |
| | | <el-table-column prop="status" label="状态"> |
| | | <el-table-column prop="strainSource" label="菌种来源" /> |
| | | <el-table-column prop="identifyingStrainCode" label="鉴别菌株编号" /> |
| | | <el-table-column prop="identifyingStrainName" label="鉴别菌株名称" /> |
| | | <el-table-column prop="validationExperimentCode" label="验证实验编号" /> |
| | | <el-table-column prop="createBy" label="创建人" /> |
| | | <el-table-column prop="createTime" label="创建时间" /> |
| | | <el-table-column prop="status" label="状态" v-if="currentType == 'list'"> |
| | | <template #default="{ row }"> |
| | | <el-tag :type="getStatusType(row.status)">{{ |
| | | getStatusText(row.status) |
| | | }}</el-tag> |
| | | <el-tag v-if="row.status == 1" type="info">待确认</el-tag> |
| | | <el-tag v-if="row.status == 2" type="success">已提交</el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="200"> |
| | | <template #default="{ row }"> |
| | | <el-button |
| | | type="text" |
| | | @click="$router.push('/strain/validation/confirm-detail')" |
| | | >确认</el-button |
| | | > |
| | | <el-button type="text" @click="handleDetail(row)">详情1</el-button> |
| | | <el-button type="text" @click="handleDetail2(row)">详情2</el-button> |
| | | <el-button type="text" @click="$router.push('/strain/validation/confirm-detail')">确认</el-button> |
| | | <el-button type="text" @click="handleDetail(row)">详情</el-button> |
| | | <el-button type="text" @click="handleDetail2(row)">详情</el-button> |
| | | <el-button type="text" @click="handleEdit(row)">编辑</el-button> |
| | | <el-button type="text" @click="handleRecord(row)">删除</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </template> |
| | | </TableCustom> |
| | | <PrimitiveCellDetailDialog |
| | | :visible.sync="detailVisible" |
| | | :detail="currentDetail" |
| | | /> |
| | | <DetailConditionDialog |
| | | :visible.sync="detailDialogVisible" |
| | | :value="detailDialogValue" |
| | | /> |
| | | <PrimitiveCellDetailDialog :visible.sync="detailVisible" :detail="currentDetail" /> |
| | | <DetailConditionDialog :visible.sync="detailDialogVisible" :value="detailDialogValue" /> |
| | | <EditConditionDialog :visible.sync="editDialogVisible" :value="editDialogValue" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import PrimitiveCellDetailDialog from "./primitive-cell-detail-dialog.vue"; |
| | | import DetailConditionDialog from "./DetailConditionDialog.vue"; |
| | | import EditConditionDialog from "./EditConditionDialog.vue"; |
| | | |
| | | import { getList } from "./service"; |
| | | export default { |
| | | name: "PrimitiveCell", |
| | | components: { |
| | | PrimitiveCellDetailDialog, |
| | | DetailConditionDialog, |
| | | EditConditionDialog, |
| | | }, |
| | | data() { |
| | | return { |
| | | detailDialogVisible: false, |
| | | detailDialogValue: {}, |
| | | detailDialogVisible: false, |
| | | detailDialogValue: {}, |
| | | dialogVisible: false, |
| | | currentType: "list", |
| | | detailVisible: false, |
| | | currentDetail: {}, |
| | | form: { |
| | | strainNo: "", |
| | | strainName: "", |
| | | status: "", |
| | | identifyingStrainCode: "", |
| | | identifyingStrainName: "", |
| | | validationExperimentCode: "", |
| | | startTime: "", |
| | | endTime: "", |
| | | isDraft: 0, |
| | | strainType: 1, |
| | | }, |
| | | queryForm: { |
| | | pageSize: 10, |
| | | pageNum: 1, |
| | | }, |
| | | total: 800, |
| | | tableData: [ |
| | | { |
| | | strainNo: "YX-2024001", |
| | | strainName: "大肠杆菌", |
| | | source: "实验室分离", |
| | | method: "形态学鉴定、生理生化试验", |
| | | certificate: "革兰氏阴性杆菌,可发酵葡萄糖产酸产气,IMViC试验++--", |
| | | storage: "斜面培养", |
| | | amount: "A区-01-001", |
| | | inventory: "50", |
| | | notes: "用于质粒转化", |
| | | status: "1", |
| | | }, |
| | | { |
| | | strainNo: "YX-2024002", |
| | | strainName: "枯草芽孢杆菌", |
| | | source: "菌种保藏中心", |
| | | method: "16S rDNA测序", |
| | | certificate: "革兰氏阳性芽孢杆菌,可水解淀粉,产生溶菌素", |
| | | storage: "冷冻保存", |
| | | amount: "B区-02-005", |
| | | inventory: "30", |
| | | notes: "工业发酵菌种", |
| | | status: "1", |
| | | }, |
| | | { |
| | | strainNo: "YX-2024003", |
| | | strainName: "酿酒酵母", |
| | | source: "发酵工厂", |
| | | method: "显微镜观察、生理特性", |
| | | certificate: "椭圆形单细胞真菌,可发酵葡萄糖产生乙醇", |
| | | storage: "甘油管保存", |
| | | amount: "A区-03-002", |
| | | inventory: "40", |
| | | notes: "发酵工艺优化", |
| | | status: "2", |
| | | }, |
| | | { |
| | | strainNo: "YX-2024004", |
| | | strainName: "乳酸菌", |
| | | source: "乳制品分离", |
| | | method: "生化鉴定、API条", |
| | | certificate: "革兰氏阳性球菌,产生乳酸,耐酸性强", |
| | | storage: "冷冻干燥", |
| | | amount: "C区-01-003", |
| | | inventory: "25", |
| | | notes: "益生菌研究", |
| | | status: "3", |
| | | }, |
| | | { |
| | | strainNo: "YX-2024005", |
| | | strainName: "青霉菌", |
| | | source: "环境样本", |
| | | method: "形态学特征、ITS测序", |
| | | certificate: "丝状真菌,产生蓝绿色分生孢子,可产青霉素", |
| | | storage: "斜面培养", |
| | | amount: "B区-04-001", |
| | | inventory: "35", |
| | | notes: "次级代谢产物研究", |
| | | status: "1", |
| | | }, |
| | | ], |
| | | total: 0, |
| | | tableData: [], |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | this.detailVisible = true; |
| | | }, |
| | | handleDetail2(row) { |
| | | this.detailDialogValue = row; |
| | | this.detailDialogVisible = true; |
| | | this.detailDialogValue = row; |
| | | this.detailDialogVisible = true; |
| | | }, |
| | | handleViewMore() { |
| | | this.dialogVisible = true; |
| | | }, |
| | | resetForm() { |
| | | this.form = { |
| | | strainNo: "", |
| | | strainName: "", |
| | | status: "", |
| | | identifyingStrainCode: "", |
| | | identifyingStrainName: "", |
| | | startTime: "", |
| | | endTime: "", |
| | | validationExperimentCode: "", |
| | | isDraft: this.currentType === 'draft' ? 1 : 0, |
| | | strainType: 1, |
| | | }; |
| | | this.searchData(); |
| | | }, |
| | | searchData() { |
| | | // 模拟搜索逻辑 |
| | | const { strainNo, strainName, status } = this.form; |
| | | let filteredData = [...this.tableData]; |
| | | |
| | | if (strainNo) { |
| | | filteredData = filteredData.filter((item) => |
| | | item.strainNo.toLowerCase().includes(strainNo.toLowerCase()) |
| | | ); |
| | | async searchData() { |
| | | const params = { |
| | | ...this.form, |
| | | pageNum: this.queryForm.pageNum, |
| | | pageSize: this.queryForm.pageSize, |
| | | }; |
| | | try { |
| | | const res = await getList(params); |
| | | this.tableData = res.data?.records || []; |
| | | this.total = res.data?.total || 0; |
| | | } catch (e) { |
| | | this.tableData = []; |
| | | this.total = 0; |
| | | } |
| | | if (strainName) { |
| | | filteredData = filteredData.filter((item) => |
| | | item.strainName.toLowerCase().includes(strainName.toLowerCase()) |
| | | ); |
| | | } |
| | | if (status) { |
| | | filteredData = filteredData.filter((item) => item.status === status); |
| | | } |
| | | |
| | | this.total = filteredData.length; |
| | | // 实际项目中这里应该调用API |
| | | console.log("搜索条件:", this.form); |
| | | console.log("分页信息:", this.queryForm); |
| | | }, |
| | | handleNewStrain() { |
| | | this.$router.push("/strain/validation/add-primitive-cell"); |
| | |
| | | }, |
| | | handleCurrentChange(page) { |
| | | this.queryForm.pageNum = page; |
| | | // Implement page change logic |
| | | this.searchData(); |
| | | }, |
| | | handleSizeChange(size) { |
| | | this.queryForm.pageSize = size; |
| | | // Implement size change logic |
| | | this.searchData(); |
| | | }, |
| | | handleTypeChange(type) { |
| | | this.currentType = type; |
| | | // Implement type change logic |
| | | this.form.isDraft = type === "draft" ? 1 : 0; |
| | | this.form.strainType = 1; // 1: 原始细胞库 |
| | | this.searchData(); |
| | | }, |
| | | getStatusType(status) { |
| | | const types = { |
| | | 1: "success", |
| | | 2: "info", |
| | | 3: "warning", |
| | | }; |
| | | return types[status] || "info"; |
| | | }, |
| | | getStatusText(status) { |
| | | const texts = { |
| | | 1: "已入库", |
| | | 2: "已出库", |
| | | 3: "入库待确认", |
| | | }; |
| | | return texts[status] || "未知状态"; |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.searchData(); |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="菌种源"> |
| | | <el-input v-model="detail.source" disabled placeholder="请输入" /> |
| | | <el-input v-model="detail.strainSource" disabled placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="24"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="菌种编号"> |
| | | <el-input v-model="detail.strainNo" disabled placeholder="请输入" /> |
| | | <el-input v-model="detail.identifyingStrainCode" disabled placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="菌种名称"> |
| | | <el-input v-model="detail.strainName" disabled placeholder="请输入" /> |
| | | <el-input v-model="detail.identifyingStrainName" disabled placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="验证实验编号"> |
| | | <el-input v-model="detail.verifyNo" disabled placeholder="请输入" /> |
| | | <el-input v-model="detail.validationExperimentCode" disabled placeholder="请输入" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | |
| | | <el-col :span="12"> |
| | | <el-form-item label="菌种实验员签字"> |
| | | <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> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="签字时间"> |
| | | <el-input v-model="detail.signTime" disabled /> |
| | | <el-input v-model="detail.handleTime" disabled /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | detail: { |
| | | type: Object, |
| | | default: () => ({ |
| | | source: '', |
| | | strainNo: '', |
| | | strainName: '', |
| | | verifyNo: '', |
| | | strainSource: '', |
| | | identifyingStrainCode: '', |
| | | identifyingStrainName: '', |
| | | validationExperimentCode: '', |
| | | experimentTime: '', |
| | | signature: '', |
| | | signTime: '' |
| | | handleSignature: '', |
| | | handleTime: '' |
| | | }) |
| | | } |
| | | }, |
New file |
| | |
| | | import axios from '@/utils/request'; |
| | | |
| | | // 列表 |
| | | export const getList = (data) => { |
| | | return axios.post('/api/t-strain-validation-data/pageList', { ...data }) |
| | | } |
| | | |
| | | //新增 |
| | | export const add = (data) => { |
| | | console.log('data', data) |
| | | return axios.post('/api/t-strain-validation-data/add', { ...data }) |
| | | } |
| | | |
| | | //编辑 |
| | | export const edit = (data) => { |
| | | return axios.post('/api/t-strain-validation-data/edit', { ...data }) |
| | | } |
| | | |
| | | //详情 |
| | | export const detail = (data) => { |
| | | return axios.get('/api/t-strain-validation-data/detail', { params: { id: data.id } }) |
| | | } |
| | | |
| | | //主细胞删除 |
| | | export const delOne = (data) => { |
| | | return axios.delete('/open/t-strain-validation-data/deleteMain', { params: { id: data.id }}) |
| | | } |
| | | |
| | | //原始细胞删除 |
| | | export const delTwo = (data) => { |
| | | return axios.delete('/open/t-strain-validation-data/deleteOriginal', { params: { id: data.id }}) |
| | | } |
| | | |
| | | |
| | | |