From 1a61525947d43fd7c8a6df637bf5c1c8f9cc37f3 Mon Sep 17 00:00:00 2001 From: 董国庆 <364620639@qq.com> Date: 星期四, 26 六月 2025 14:24:32 +0800 Subject: [PATCH] Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory --- culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue | 62 ++++++++++++++----------------- 1 files changed, 28 insertions(+), 34 deletions(-) diff --git a/culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue b/culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue index 7d70901..2787802 100644 --- a/culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue +++ b/culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue @@ -1,11 +1,6 @@ <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"> @@ -30,20 +25,12 @@ </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> @@ -59,16 +46,8 @@ </el-form-item> <el-row :gutter="20"> <el-col :span="10"> - <el-form-item - v-if="form.status === 2" - label="废弃原因说明" - prop="remark" - > - <el-input - :disabled="dialogTitle.includes('详情')" - v-model="form.remark" - placeholder="请输入" - ></el-input> + <el-form-item v-if="form.status === 2" label="废弃原因说明" prop="remark"> + <el-input :disabled="dialogTitle.includes('详情')" v-model="form.remark" placeholder="请输入"></el-input> </el-form-item> </el-col> </el-row> @@ -106,6 +85,17 @@ dialogTitle: "", form: { status: 1, + thisName: '', + thisTime: '', + strainCode: '', + strainName: '', + strainCode1: '', + strainName1: '', + remark: '', + vaccinateSignature: '', + preserveSignature: '', + confirmTime: '', + type: 1, }, rules: { status: [ @@ -126,10 +116,12 @@ methods: { openInitData(value) { console.log(value); - this.dialogTitle = value.title; // 获取用户信息 + console.log('qweqwwqr4qw4rqw854',sessionStorage.getItem("userInfo")); const userInfo = JSON.parse(sessionStorage.getItem("userInfo") || "{}"); + + // 获取当前时间并格式化 const now = new Date(); const formatTime = `${now.getFullYear()}-${String( @@ -139,19 +131,21 @@ ).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, + formStatus: value.formStatus || '', thisName: userInfo.nickName || "", - thisTime: value.form.vaccinateTime - ? value.form.vaccinateTime + 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') + 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() { -- Gitblit v1.7.1