| | |
| | | <template> |
| | | <el-dialog |
| | | :visible.sync="visible" |
| | | title="签字确认" |
| | | width="520px" |
| | | @open="handleOpen" |
| | | :close-on-click-modal="false" |
| | | custom-class="record-detail-dialog" |
| | | @close="handleClose" |
| | | > |
| | | <el-dialog :visible.sync="visible" title="签字确认" width="520px" @open="handleOpen" :close-on-click-modal="false" |
| | | custom-class="record-detail-dialog" @close="handleClose"> |
| | | <div class="dialog-content"> |
| | | <div class="confirm-tip"> |
| | | {{ text }} |
| | |
| | | <el-form-item required> |
| | | <template #label> |
| | | <span>{{ name }}</span> |
| | | <el-button |
| | | type="primary" |
| | | class="sign-btn" |
| | | @click="showSignature = true" |
| | | >签名</el-button |
| | | > |
| | | <el-button type="primary" class="sign-btn" @click="showSignature = true">签名</el-button> |
| | | </template> |
| | | <div class="signature-area" :class="{ waiting: !form.signature }"> |
| | | <template v-if="form.signature"> |
| | | <img :src="form.signature" :alt="name" /> |
| | | <el-image :src="getFullUrl(form.signature)" :preview-src-list="[getFullUrl(form.signature)]" :alt="name" /> |
| | | </template> |
| | | <template v-else> |
| | | <span class="waiting-text">等待确认</span> |
| | |
| | | </el-form> |
| | | </div> |
| | | <div class="footer-btns"> |
| | | <el-button @click="handleClose" style="margin-right: 16px" |
| | | >取消</el-button |
| | | > |
| | | <el-button @click="handleClose" style="margin-right: 16px">取消</el-button> |
| | | <el-button type="primary" @click="handleConfirm" :disabled="!form.signature">确认</el-button> |
| | | </div> |
| | | <signature-canvas |
| | | :visible.sync="showSignature" |
| | | @confirm="handleSignatureConfirm" |
| | | /> |
| | | <signature-canvas :visible.sync="showSignature" @confirm="handleSignatureConfirm" /> |
| | | </el-dialog> |
| | | </template> |
| | | |
| | | <script> |
| | | import SignatureCanvas from "@/components/SignatureCanvas.vue"; |
| | | import { getFullUrl } from '@/utils/utils' |
| | | import { queryDetail } from '../service' |
| | | export default { |
| | | name: "ConfirmStorageDialog", |
| | | components: { SignatureCanvas }, |
| | |
| | | }, |
| | | handleSignature: { |
| | | type: String, |
| | | default:"", |
| | | default: "", |
| | | } |
| | | }, |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | getFullUrl(url) { |
| | | if (url) { |
| | | return getFullUrl(url); |
| | | } |
| | | }, |
| | | |
| | | handleOpen() { |
| | | this.form.signature = this.handleSignature; |
| | | if (!this.handleSignature) { |
| | | queryDetail().then(res => { |
| | | console.log('///////////////////////'); |
| | | this.form.signature = res.signPicture |
| | | }) |
| | | } else { |
| | | this.form.signature = this.handleSignature; |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.$emit("update:visible", false); |
| | |
| | | color: #f5222d; |
| | | font-size: 16px; |
| | | margin-bottom: 24px; |
| | | |
| | | .danger { |
| | | margin-left: 12px; |
| | | } |
| | | } |
| | | |
| | | .signature-area { |
| | | height: 120px; |
| | | width: 100%; |
| | |
| | | overflow: hidden; |
| | | padding: 0; |
| | | } |
| | | |
| | | .signature-area.waiting { |
| | | border-style: dashed; |
| | | background: #fafafa; |
| | | } |
| | | |
| | | .signature-area img { |
| | | width: 100%; |
| | | height: 100%; |
| | | object-fit: cover; |
| | | display: block; |
| | | } |
| | | |
| | | .waiting-text { |
| | | color: #909399; |
| | | font-size: 14px; |
| | | } |
| | | |
| | | .sign-btn { |
| | | height: 32px; |
| | | border-radius: 4px; |
| | |
| | | font-weight: 400; |
| | | margin-left: 12px; |
| | | } |
| | | |
| | | .footer-btns { |
| | | display: flex; |
| | | justify-content: center; |
| | | padding: 24px; |
| | | padding-top: 0; |
| | | |
| | | .el-button { |
| | | width: 150px; |
| | | } |
| | |
| | | return; |
| | | } |
| | | const nodeModel = this.selectedNode; |
| | | console.log(nodeModel); |
| | | |
| | | if (nodeModel.label === "母代") { |
| | | this.$refs.parentForm.openInitData({ |
| | |
| | | reloadData() { |
| | | this.getList(); |
| | | getDetail({ id: this.$route.query.id }).then((res) => { |
| | | console.log(JSON.stringify(res.pedigreeChartParentAllDetailDTO)); |
| | | |
| | | const nodeMap = new Map(); |
| | | const calculateLevel = (node) => { |
| | |
| | | }); |
| | | }, |
| | | addNodeSign(value, type) { |
| | | console.log('/////8415454545',value); |
| | | this.nodeData = value; |
| | | this.nodeType = type; |
| | | // this.$refs.addAncestor.closeDialog() |
| | |
| | | }, |
| | | one: buildTree(this.graphData.nodes, this.graphData.edges), |
| | | }; |
| | | console.log("提交的数据:", baseData, this.graphData); |
| | | add(baseData).then((res) => { |
| | | if (res.code == 200) { |
| | | this.$message.success("保存成功"); |
| | |
| | | }, |
| | | handleDraft() { |
| | | // 实现存草稿逻辑 |
| | | console.log("save draft", this.form); |
| | | }, |
| | | handleCancel() { |
| | | this.$router.back(); |
| | |
| | | }, |
| | | })), |
| | | }; |
| | | |
| | | console.log('//////////////',processedData); |
| | | |
| | | |
| | | // 更新图表数据 |
| | |
| | | handleAddPlan(value) { |
| | | if (value.formStatus == 'edit') { |
| | | |
| | | console.log(value, 'params'); |
| | | updateChild(value).then((res) => { |
| | | if (res.code === 200) { |
| | | this.$message.success("操作成功"); |
| | |
| | | (n) => n.nodeId === nodeModel.nodeId |
| | | ); |
| | | if (this.graphData.nodes[nodeIndex - 1].label === "子代") { |
| | | console.log(123); |
| | | |
| | | this.$refs.addSublevelPlan.openInitData({ |
| | | strainSourceStart: this.form.strainSourceStart, |
| | |
| | | status: "detail", |
| | | }); |
| | | } else { |
| | | console.log(123); |
| | | |
| | | this.$refs.planForm.openInitData({ |
| | | strainSourceStart: this.form.strainSourceStart, |
| | |
| | | </div> |
| | | </div> |
| | | <div class="card" style="margin-top: 30px; display: block" v-if="roleType != 4"> |
| | | <div class="title" style="padding: 25px 0">菌种传代生产谱系图</div> |
| | | <div class="title" style="padding: 25px 0">待确认入库菌种列表</div> |
| | | <Table |
| | | :height="null" |
| | | :total="total" |
| | |
| | | <div class="header"> |
| | | <div class="title">菌种传代生产谱系图</div> |
| | | <div class="option-btn"> |
| | | <el-button type="primary" class="el-icon-plus" @click="addNode"> |
| | | <el-button type="primary" class="el-icon-plus" @click="addNode" v-if="$route.query.type != 1" > |
| | | 新增</el-button |
| | | > |
| | | <el-button type="primary" @click="setGenerationPlan" |
| | | <el-button type="primary" v-if="$route.query.type != 1" @click="setGenerationPlan" |
| | | >设置传代计划数</el-button |
| | | > |
| | | <el-button type="primary" @click="showDetail">详情</el-button> |
| | |
| | | }, |
| | | handleDraft() { |
| | | // 实现存草稿逻辑 |
| | | console.log("save draft", this.form); |
| | | }, |
| | | handleCancel() { |
| | | this.$router.back(); |
| | |
| | | this.$message.warning("该节点已经存在传代计划数节点"); |
| | | return; |
| | | } |
| | | console.log({ |
| | | ...nodeModel.data, |
| | | label: nodeModel.label, |
| | | }); |
| | | |
| | | this.$refs.planForm.openInitData({ |
| | | ...nodeModel.data, |
| | |
| | | <template> |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | :visible.sync="dialogVisible" |
| | | width="40%" |
| | | @close="closeDialog" |
| | | :close-on-click-modal="false" |
| | | > |
| | | <el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%" @close="closeDialog" |
| | | :close-on-click-modal="false"> |
| | | <el-form :model="form" :rules="rules" ref="form" label-position="top"> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="接种菌种编号" prop="strainCode"> |
| | | <el-input |
| | | :disabled="dialogTitle.includes('详情')" |
| | | v-model="form.strainCode" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | <el-input :disabled="dialogTitle.includes('详情')" v-model="form.strainCode" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="10"> |
| | | <el-form-item label="接种菌种名称" prop="strainName"> |
| | | <el-input |
| | | :disabled="dialogTitle.includes('详情')" |
| | | v-model="form.strainName" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | <el-input :disabled="dialogTitle.includes('详情')" v-model="form.strainName" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | | <el-form-item v-if="form.status === 2" label="废弃原因说明" required> |
| | | <el-input |
| | | :disabled="dialogTitle.includes('详情')" |
| | | v-model="form.discardReason" |
| | | placeholder="请输入" |
| | | ></el-input> |
| | | <el-input :disabled="dialogTitle.includes('详情')" v-model="form.discardReason" placeholder="请输入"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row :gutter="20"> |
| | | <el-col :span="10"> |
| | | <el-form-item label="菌种入库时间" prop="confirmTime" > |
| | | <el-form-item label="菌种入库时间" prop="confirmTime"> |
| | | <el-input disabled v-model="form.confirmTime"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | <el-row v-if="!dialogTitle.includes('新增')" :gutter="20"> |
| | | <el-col v-if="form.vaccinateSignature" :span="10"> |
| | | <el-form-item label="接种操作人签字"> |
| | | <el-image :src="form.vaccinateSignature" /> |
| | | <el-image :src="getFullUrl(form.vaccinateSignature)" |
| | | :preview-src-list="[getFullUrl(form.vaccinateSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="form.preserveSignature" :span="10"> |
| | | <el-form-item label="菌种保藏人签字"> |
| | | <el-image :src="form.preserveSignature" /> |
| | | <el-image :src="getFullUrl(form.preserveSignature)" |
| | | :preview-src-list="[getFullUrl(form.preserveSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { getFullUrl } from '@/utils/utils'; |
| | | import moment from 'moment'; |
| | | export default { |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | |
| | | getFullUrl(url) { |
| | | if (url) { |
| | | return getFullUrl(url); |
| | | } |
| | | }, |
| | | openInitData(value) { |
| | | |
| | | this.dialogTitle = value.title; |
| | | // 获取用户信息 |
| | | const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}"); |
| | |
| | | ).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}:${String( |
| | | now.getSeconds() |
| | | ).padStart(2, "0")}`; |
| | | console.log(value); |
| | | |
| | | |
| | | this.form = { |
| | | parentId: value.parentId, |
| | | ...this.form, |
| | |
| | | formStatus: value.formStatus, |
| | | strainCode1: value.strainCode1, |
| | | strainName1: value.strainName1, |
| | | thisName: userInfo.nickName || "", |
| | | thisName: value.createBy ? value.createBy : userInfo.nickName, |
| | | thisTime: value.form.vaccinateTime |
| | | ? value.form.vaccinateTime |
| | | : formatTime, |
| | | confirmTime: value.confirmTime ? moment(value.confirmTime).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss') |
| | | confirmTime: value.confirmTime ? moment(value.confirmTime).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss') |
| | | }; |
| | | this.dialogVisible = true; |
| | | }, |
| | | close(){ |
| | | close() { |
| | | this.dialogVisible = false; |
| | | }, |
| | | closeDialog() { |
| | |
| | | </el-col> |
| | | <el-col v-if="planForm.vaccinateSignature && planForm.formStatus == 'detail'" :span="10"> |
| | | <el-form-item label="接种操作人签字"> |
| | | <el-image :src="planForm.vaccinateSignature" /> |
| | | <el-image :src="getFullUrl(planForm.vaccinateSignature)" :preview-src-list="[getFullUrl(planForm.vaccinateSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="planForm.preserveSignature && planForm.formStatus == 'detail'" :span="10"> |
| | | <el-form-item label="菌种保藏人签字"> |
| | | <el-image :src="planForm.preserveSignature" /> |
| | | <el-image :src="getFullUrl(planForm.preserveSignature)" :preview-src-list="[getFullUrl(planForm.preserveSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | <div v-if="planForm.formStatus == 'add'" class="dialog-footer"> |
| | |
| | | </el-dialog> |
| | | </template> |
| | | <script> |
| | | import {getFullUrl} from '@/utils/utils' |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getFullUrl(url) { |
| | | if (url) { |
| | | return getFullUrl(url); |
| | | } |
| | | }, |
| | | openInitData(value) { |
| | | |
| | | this.planForm = { |
| | | ...this.planForm, |
| | | ...value, |
| | |
| | | handleSubmit() { |
| | | this.$refs.planForm.validate((valid) => { |
| | | if (valid) { |
| | | console.log(this.planForm, "22"); |
| | | |
| | | this.$emit("addNodeSign", this.planForm, 1); |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | openInitData(value) { |
| | | console.log(value); |
| | | |
| | | this.planForm = { |
| | | ...this.planForm, |
| | |
| | | }, |
| | | handleApproveSubmit(data) { |
| | | // 处理审批通过 |
| | | console.log("审批通过:", data); |
| | | this.approvalDialogVisible = false; |
| | | this.$message.success("审批通过成功"); |
| | | this.getTableData(); |
| | | }, |
| | | handleRejectSubmit(data) { |
| | | // 处理审批驳回 |
| | | console.log("审批驳回:", data); |
| | | this.approvalDialogVisible = false; |
| | | this.$message.success("审批驳回成功"); |
| | | this.getTableData(); |
| | | }, |
| | | handleRevokeApprove(row) { |
| | | // 实现撤销审批逻辑 |
| | | console.log("撤销审批数据:", row); |
| | | }, |
| | | handleEdit(row) { |
| | | // 实现编辑逻辑 |
| | | console.log("编辑数据:", row); |
| | | }, |
| | | handleDelete(row) { |
| | | // 实现删除逻辑 |
| | |
| | | <el-row v-if="planForm.formStatus == 'detail'" :gutter="20"> |
| | | <el-col v-if="planForm.vaccinateSignature" :span="10"> |
| | | <el-form-item label="接种操作人签字"> |
| | | <el-image :src="planForm.vaccinateSignature" /> |
| | | <el-image :src="getFullUrl(planForm.vaccinateSignature)" :preview-src-list="[getFullUrl(planForm.vaccinateSignature)]" /> |
| | | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="planForm.preserveSignature" :span="10"> |
| | | <el-form-item label="菌种保藏人签字"> |
| | | <el-image :src="planForm.preserveSignature" /> |
| | | <el-image :src="getFullUrl(planForm.preserveSignature)" :preview-src-list="[getFullUrl(planForm.preserveSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | <script> |
| | | import moment from 'moment' |
| | | import { getFullUrl } from "@/utils/utils"; |
| | | export default { |
| | | name: "AddAncestor", |
| | | data() { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getFullUrl(url){ |
| | | if(url){ |
| | | return getFullUrl(url); |
| | | } |
| | | }, |
| | | openInitData(value) { |
| | | console.log('45646545645',value) |
| | | // 赋值当前时间 |
| | | const now = new Date(); |
| | | const pad = (n) => n.toString().padStart(2, "0"); |
| | |
| | | <el-row v-if="!dialogTitle.includes('新增')" :gutter="20"> |
| | | <el-col v-if="form.vaccinateSignature" :span="10"> |
| | | <el-form-item label="接种操作人签字"> |
| | | <el-image :src="form.vaccinateSignature" /> |
| | | <el-image :src="getFullUrl(form.vaccinateSignature)" :preview-src-list="[getFullUrl(form.vaccinateSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col v-if="form.preserveSignature" :span="10"> |
| | | <el-form-item label="菌种保藏人签字"> |
| | | <el-image :src="form.preserveSignature" /> |
| | | <el-image :src="getFullUrl(form.preserveSignature)" :preview-src-list="[getFullUrl(form.vaccinateSignature)]" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </template> |
| | | <script> |
| | | import moment from 'moment' |
| | | import { getFullUrl } from "@/utils/utils"; |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getFullUrl(url) { |
| | | if (url) { |
| | | return getFullUrl(url); |
| | | } |
| | | }, |
| | | openInitData(value) { |
| | | console.log(value); |
| | | this.dialogTitle = value.title; |
| | | // 获取用户信息 |
| | | console.log('qweqwwqr4qw4rqw854',sessionStorage.getItem("userInfo")); |
| | | const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}"); |
| | | |
| | | |
| | |
| | | ).padStart(2, "0")}:${String(now.getMinutes()).padStart(2, "0")}:${String( |
| | | now.getSeconds() |
| | | ).padStart(2, "0")}`; |
| | | console.log('qweqweqwe///////', value) |
| | | this.form = { |
| | | ...this.form, |
| | | ...value.form, |
| | | formStatus: value.formStatus || '', |
| | | thisName: userInfo.nickName || "", |
| | | thisName: value.form.createBy ? value.form.createBy : userInfo.nickName, |
| | | thisTime: value.form && value.form.vaccinateTime |
| | | ? value.form && value.form.vaccinateTime |
| | | : formatTime, |
| | | type: 1, |
| | | confirmTime: value.confirmTime ? moment(value.confirmTime).format('YYYY-MM-DD HH:mm:ss') : moment().format('YYYY-MM-DD HH:mm:ss') |
| | | }; |
| | | console.log('485484848', this.form); |
| | | this.$forceUpdate() |
| | | |
| | | this.dialogVisible = true; |
| | | }, |
| | | closeDialog() { |
| | | console.log('78978998789798'); |
| | | this.dialogVisible = false; |
| | | }, |
| | | handleSubmit() { |
| | |
| | | export const deleteProgenitor = (params) => { |
| | | return axios.delete('/open/t-pedigree-chart/deleteProgenitor', { params }) |
| | | } |
| | | |
| | | |
| | | // 获取用户详情 |
| | | export const queryDetail = (data) => { |
| | | return axios.get('/system/user/queryDetail',) |
| | | } |
| | |
| | | } |
| | | }, |
| | | mounted() { |
| | | console.log('123123123',this.list); |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | id: this.currentRecord.id, |
| | | preserveSignature: data.preserveSignature, |
| | | }).then((res) => { |
| | | console.log(res); |
| | | |
| | | if (res.code == 200) { |
| | | this.$message.success("操作成功"); |
| | | this.dialogVisible = false; |
| | |
| | | |
| | | // 编辑 |
| | | export const edit = (data) => { |
| | | console.log('qweqweqweqw',data); |
| | | |
| | | return axios.post('/api/t-train-library/update', { ...data }) |
| | | } |
| | | |