| | |
| | | <el-button @click="handleDraft">存草稿</el-button> |
| | | <el-button @click="handleCancel">取消</el-button> |
| | | </div> |
| | | |
| | | <!-- 签字确认组件 --> |
| | | <SignatureCanvas :visible.sync="signatureVisible" @confirm="handleSignatureConfirm" /> |
| | | </el-form> |
| | | |
| | | <ParentForm ref="parentForm" @addNodeSign="addNodeSign" /> |
| | | <PlanForm ref="planForm" @addNodeSign="addNodeSign" /> |
| | | <AddSublevelForm ref="addSublevelForm" @addNodeSign="addNodeSign" /> |
| | | <AddSublevelPlan ref="addSublevelPlan" @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 ParentForm from "./components/ParentForm.vue"; |
| | | import PlanForm from "./components/PlanForm.vue"; |
| | | import AddSublevelForm from "./components/AddSublevelForm.vue"; |
| | | import AddSublevelPlan from "./components/AddSublevelPlan.vue"; |
| | | import ConfirmStorageDialog from "@/components/confirm-storage-dialog"; |
| | | |
| | | export default { |
| | | name: "AddPedigree", |
| | | components: { |
| | | SignatureCanvas, |
| | | ParentForm, |
| | | PlanForm, |
| | | AddSublevelForm, |
| | | AddSublevelPlan |
| | | AddSublevelPlan, |
| | | 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) |