| | |
| | | <el-form :model="form" :rules="rules" ref="pedigreeForm" label-position="top" class="strain-form"> |
| | | <div class="card"> |
| | | <div class="form-items-row"> |
| | | <el-form-item label="菌种源" prop="strainSource" required> |
| | | <el-form-item label="菌种源" required> |
| | | <div class="flex-row"> |
| | | <div class="input-wrapper"> |
| | | <el-input v-model="form.strainSource" placeholder="请输入" class="fixed-width-input"></el-input> |
| | | <el-form-item prop="strainSourceStart" style="margin-bottom: 0;"> |
| | | <el-input v-model="form.strainSourceStart" placeholder="请输入" class="fixed-width-input"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <span class="form-text">代—</span> |
| | | <div class="input-wrapper"> |
| | | <el-input v-model="form.generation" placeholder="请输入" class="fixed-width-input"></el-input> |
| | | <el-form-item prop="strainSourceEnd" style="margin-bottom: 0;"> |
| | | <el-input v-model="form.strainSourceEnd" placeholder="请输入" class="fixed-width-input"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <span class="form-text">细胞库</span> |
| | | </div> |
| | |
| | | <div class="strain-flow-chart"> |
| | | <div id="mountNode"></div> |
| | | </div> |
| | | <el-button type="primary" @click="handleSubmit" style="width: 150px;">保存</el-button> |
| | | |
| | | </div> |
| | | <div class="end-btn"> |
| | | <el-button type="primary" @click="handleSubmit">提交</el-button> |
| | | <el-button @click="handleDraft">存草稿</el-button> |
| | | <el-button @click="handleCancel">取消</el-button> |
| | | <!-- <el-button @click="handleDraft">存草稿</el-button> |
| | | <el-button @click="handleCancel">取消</el-button> --> |
| | | </div> |
| | | </el-form> |
| | | |
| | |
| | | return { |
| | | signatureVisible: false, |
| | | form: { |
| | | strainSource: "", |
| | | generation: "", |
| | | strainSourceStart: "", |
| | | strainSourceEnd: "", |
| | | cellBank: "", |
| | | strainNo: "", |
| | | strainName: "", |
| | | remarks: "", |
| | | }, |
| | | rules: { |
| | | strainSource: [ |
| | | strainSourceStart: [ |
| | | { required: true, message: "请输入菌种源", trigger: "blur" }, |
| | | ], |
| | | strainSourceEnd: [ |
| | | { required: true, message: "请输入菌种源", trigger: "blur" }, |
| | | ], |
| | | strainNo: [ |
| | |
| | | }, |
| | | handleSignatureConfirm(signatureImage) { |
| | | this.confirmStorageDialogVisible = false; |
| | | console.log("submit form with signature:", signatureImage); |
| | | if (this.nodeType === 1) { |
| | | this.handleAddParent(this.nodeData) |
| | | this.handleAddParent({...this.nodeData,signature:signatureImage.signature}) |
| | | } else if (this.nodeType === 2) { |
| | | this.handleAddPlan(this.nodeData) |
| | | } else if (this.nodeType === 3) { |
| | |
| | | this.$refs.parentForm.openInitData({ |
| | | strainName: this.form.strainName, |
| | | strainNo: this.form.strainNo, |
| | | strainSource: this.form.strainSource, |
| | | generation: this.form.generation, |
| | | strainSourceStart: this.form.strainSourceStart, |
| | | strainSourceEnd: this.form.strainSourceEnd, |
| | | }); |
| | | } |
| | | }) |
| | |
| | | } |
| | | }, |
| | | handleAddParent(value) { |
| | | console.log(value); |
| | | |
| | | const parentId = `parent-${++this.nodeCount}`; |
| | | this.graphData.nodes.push({ |
| | | id: parentId, |
| | |
| | | label: nodeModel.label, |
| | | strainName: this.form.strainName, |
| | | strainNo: this.form.strainNo, |
| | | strainSource: this.form.strainSource, |
| | | generation: this.form.generation, |
| | | strainSourceStart: this.form.strainSourceStart, |
| | | strainSourceEnd: this.form.strainSourceEnd, |
| | | }) |
| | | } else { |
| | | this.$refs.planForm.openInitData({ |
| | |
| | | label: nodeModel.label, |
| | | strainName: this.form.strainName, |
| | | strainNo: this.form.strainNo, |
| | | strainSource: this.form.strainSource, |
| | | generation: this.form.generation, |
| | | strainSourceStart: this.form.strainSourceStart, |
| | | strainSourceEnd: this.form.strainSourceEnd, |
| | | }) |
| | | } |
| | | }, |