| | |
| | | <el-button @click="handleDraft">存草稿</el-button> |
| | | <el-button @click="handleCancel">取消</el-button> |
| | | </div> |
| | | |
| | | <!-- 签字确认组件 --> |
| | | <SignatureCanvas :visible.sync="signatureVisible" @confirm="handleSignatureConfirm" /> |
| | | </el-form> |
| | | |
| | | <AddAncestor ref="addAncestor" @addNodeSign="addNodeSign" /> |
| | | <PlanForm ref="planForm" @addNodeSign="addNodeSign" /> |
| | | <AddSublevelForm ref="addSublevelForm" @addNodeSign="addNodeSign" /> |
| | | <ConfirmStorageDialog name="接种操作人签字" :visible.sync="confirmStorageDialogVisible" |
| | | @confirm="handleSignatureConfirm" /> |
| | | <!-- 菌种工程师 --> |
| | | <ConfirmStorageDialog name="菌种保藏人签字" text="是否确认该项菌种信息入库" :visible.sync="storageVisible" |
| | | @confirm="handleSignatureConfirm" /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import SignatureCanvas from "@/components/SignatureCanvas.vue"; |
| | | import G6 from '@antv/g6'; |
| | | import PlanForm from "./progenitorComponents/PlanForm.vue"; |
| | | import AddAncestor from "./progenitorComponents/AddAncestor.vue"; |
| | | import AddSublevelForm from "./progenitorComponents/AddSublevelForm.vue"; |
| | | import ConfirmStorageDialog from "@/components/confirm-storage-dialog"; |
| | | |
| | | export default { |
| | | name: "AddPedigree", |
| | | components: { |
| | | SignatureCanvas, |
| | | PlanForm, |
| | | AddAncestor, |
| | | AddSublevelForm |
| | | AddSublevelForm, |
| | | ConfirmStorageDialog |
| | | }, |
| | | data() { |
| | | return { |
| | |
| | | isAddingNode: false, |
| | | nodeData: {}, |
| | | nodeType: '',//1祖代 2计划数 3母代 |
| | | tableData: [], |
| | | confirmStorageDialogVisible: false, |
| | | storageVisible: false |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | addNodeSign(value, type) { |
| | | this.nodeData = value |
| | | this.nodeType = type |
| | | this.signatureVisible = true; |
| | | this.confirmStorageDialogVisible = true; |
| | | }, |
| | | handleSubmit() { |
| | | this.$refs.pedigreeForm.validate((valid) => { |
| | | if (valid) { |
| | | this.signatureVisible = true; |
| | | this.confirmStorageDialogVisible = true; |
| | | } |
| | | }); |
| | | }, |
| | |
| | | this.$router.back(); |
| | | }, |
| | | handleSignatureConfirm(signatureImage) { |
| | | this.signatureVisible = false; |
| | | this.confirmStorageDialogVisible = false; |
| | | console.log("submit form with signature:", signatureImage); |
| | | if (this.nodeType === 1) { |
| | | this.handleAddParent(this.nodeData) |
| | |
| | | strainName: this.form.strainName, |
| | | strainNo: this.form.strainNo, |
| | | status: 'add', |
| | | activeType: null, |
| | | activeType: 1, |
| | | isDiscarded: true, |
| | | }); |
| | | return |
| | |
| | | this.$refs.addSublevelForm.openInitData({ |
| | | title: '新增菌种传代项', |
| | | form: { |
| | | strainName: this.form.strainName, |
| | | strainNo: this.form.strainNo, |
| | | isDiscarded: true |
| | | isDiscarded: true, |
| | | ...nodeModel.data |
| | | } |
| | | }) |
| | | } else { |