wenminjie
2026-07-15 3b1a66c6340b87b087da93c131e9bb04b78057b7
修复了菌种库的已知BUG
7个文件已修改
102 ■■■■■ 已修改文件
culture/src/views/strain-library/main-cell-library/add.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/production-cell-grandson/add.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/production-cell-library/add.vue 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/strain-library-manage/add.vue 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/validation/primitive-cell/add.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strainReportLibrary/reportLibraryOneFour/index.vue 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strainReportLibrary/reportLibraryOneThree/add.vue 4 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/main-cell-library/add.vue
@@ -168,6 +168,10 @@
    this.resetForm()
    if (this.cacheForm) {
      this.form = this.cacheForm;
      if (this.cacheForm.displayStrainSeq) {
        this.displayStrainSeq = this.cacheForm.displayStrainSeq;
      }
    }
    if (this.$route.query.id && !this.cacheForm) {
      getDetail({ id: this.$route.query.id }).then(res => {
@@ -188,6 +192,7 @@
  },
  deactivated() {
    this.cacheForm = JSON.parse(JSON.stringify(this.form));
    this.cacheForm.displayStrainSeq = this.displayStrainSeq
  },
  watch: {
    '$route.query.id'() {
@@ -246,12 +251,7 @@
          this.form.strainSeq = String(num);
          // 显示时补零到3位
          this.displayStrainSeq = String(num).padStart(3, '0');
        } else {
          this.form.strainSeq = '';
          this.displayStrainSeq = '';
        }
      } else {
        this.displayStrainSeq = '';
      }
      console.log('格式化后存储值:', this.form.strainSeq);
@@ -265,8 +265,6 @@
      if (this.form.strainSeq) {
        // 显示原始数字,去除前导零
        this.displayStrainSeq = this.form.strainSeq;
      } else {
        this.displayStrainSeq = '';
      }
    },
    getFullStrainCode() {
@@ -365,6 +363,8 @@
        } else {
          await add(requestData);
        }
        this.cacheForm = null
        this.displayStrainSeq = null
        this.signatureVisible = false;
        this.$router.push({ path: '/strain-library/main-cell-library' });
        this.$message.success('操作成功');
culture/src/views/strain-library/production-cell-grandson/add.vue
@@ -181,6 +181,10 @@
      if (this.cacheForm) {
        this.form = this.cacheForm;
        if (this.cacheForm.displayStrainSeq) {
          this.displayStrainSeq = this.cacheForm.displayStrainSeq;
        }
      }
      if (this.$route.query.id && !this.cacheForm) {
@@ -202,6 +206,7 @@
    },
  deactivated() {
    this.cacheForm = JSON.parse(JSON.stringify(this.form));
    this.cacheForm.displayStrainSeq = this.displayStrainSeq
  },
    watch: {
        '$route.query.id'() {
@@ -260,12 +265,7 @@
            this.form.strainSeq = String(num);
            // 显示时补零到3位
            this.displayStrainSeq = String(num).padStart(3, '0');
          } else {
            this.form.strainSeq = '';
            this.displayStrainSeq = '';
          }
        } else {
          this.displayStrainSeq = '';
        }
        console.log('格式化后存储值:', this.form.strainSeq);
@@ -279,8 +279,6 @@
        if (this.form.strainSeq) {
          // 显示原始数字,去除前导零
          this.displayStrainSeq = this.form.strainSeq;
        } else {
          this.displayStrainSeq = '';
        }
      },
      getFullStrainCode() {
@@ -366,6 +364,10 @@
                } else {
                    await add(requestData);
                }
              this.cacheForm = null
              this.displayStrainSeq = null
                this.signatureVisible = false;
                this.$router.push({ path: '/strain-library/production-cell-grandson' });
                this.$message.success('操作成功');
culture/src/views/strain-library/production-cell-library/add.vue
@@ -113,7 +113,7 @@
<script>
import SignatureCanvas from '@/components/SignatureCanvas.vue'
import { add, edit, getDetail, addBatch } from './service'
import {add, addBatch, edit, getDetail} from './service'
import {myTeamPageList} from "@/components/chooseProject/servce";
export default {
@@ -167,6 +167,7 @@
    },
  deactivated() {
    this.cacheForm = JSON.parse(JSON.stringify(this.form));
    this.cacheForm.displayStrainSeq = this.displayStrainSeq
  },
    async activated() {
      await this.fetchTeamList();
@@ -184,6 +185,10 @@
      if (this.cacheForm) {
        this.form = this.cacheForm;
        if (this.cacheForm.displayStrainSeq) {
          this.displayStrainSeq = this.cacheForm.displayStrainSeq;
        }
      }
      if (this.$route.query.id && !this.cacheForm) {
@@ -261,12 +266,7 @@
            this.form.strainSeq = String(num);
            // 显示时补零到3位
            this.displayStrainSeq = String(num).padStart(3, '0');
          } else {
            this.form.strainSeq = '';
            this.displayStrainSeq = '';
          }
        } else {
          this.displayStrainSeq = '';
        }
        console.log('格式化后存储值:', this.form.strainSeq);
@@ -280,8 +280,6 @@
        if (this.form.strainSeq) {
          // 显示原始数字,去除前导零
          this.displayStrainSeq = this.form.strainSeq;
        } else {
          this.displayStrainSeq = '';
        }
      },
      getFullStrainCode() {
@@ -367,6 +365,10 @@
                } else {
                    await add(requestData);
                }
              this.cacheForm = null
              this.displayStrainSeq = null
                this.signatureVisible = false;
                this.$router.push({ path: '/strain-library/production-cell-library' });
                this.$message.success('操作成功');
culture/src/views/strain-library/strain-library-manage/add.vue
@@ -188,6 +188,7 @@
  },
  deactivated() {
    this.cacheForm = JSON.parse(JSON.stringify(this.form));
    this.cacheForm.displayStrainSeq = this.displayStrainSeq
  },
  async activated() {
    console.log('mounted')
@@ -204,29 +205,35 @@
      preservationMethod: '',
      remark: ''
    }
    this.displayStrainSeq = 0
    console.log('this.cacheForm', this.cacheForm)
    if (this.cacheForm) {
      this.form = this.cacheForm;
      if (this.cacheForm.displayStrainSeq) {
        this.displayStrainSeq = this.cacheForm.displayStrainSeq;
      }
      return
    }
    console.log('this.$route.query.id', this.$route.query.id)
    if (this.$route.query.id && !this.cacheForm) {
      getDetail({id: this.$route.query.id}).then(res => {
        this.form = {...res}
      const res = await getDetail({id: this.$route.query.id});
      this.form = {...res}
        console.log('projectId =', this.form.projectId, typeof this.form.projectId)
      console.log('projectId =', this.form.projectId, typeof this.form.projectId)
        if (res.strainCode) {
          const parts = res.strainCode.split('-');
          if (parts.length > 1) {
            const seq = parts.pop();
            this.displayStrainSeq = seq.replace(/^0+/, '');
            this.form.strainCode = parts.join('-');
          } else {
            this.form.strainCode = res.strainCode;
          }
      if (res.strainCode) {
        const parts = res.strainCode.split('-');
        if (parts.length > 1) {
          const seq = parts.pop();
          this.displayStrainSeq = seq.replace(/^0+/, '');
          this.form.strainCode = parts.join('-');
        } else {
          this.form.strainCode = res.strainCode;
        }
      })
      }
      this.$forceUpdate();
    }
  },
  watch: {
@@ -287,12 +294,7 @@
          this.form.strainSeq = String(num);
          // 显示时补零到3位
          this.displayStrainSeq = String(num).padStart(3, '0');
        } else {
          this.form.strainSeq = '';
          this.displayStrainSeq = '';
        }
      } else {
        this.displayStrainSeq = '';
      }
      console.log('格式化后存储值:', this.form.strainSeq);
@@ -306,8 +308,6 @@
      if (this.form.strainSeq) {
        // 显示原始数字,去除前导零
        this.displayStrainSeq = this.form.strainSeq;
      } else {
        this.displayStrainSeq = '';
      }
    },
    getFullStrainCode() {
@@ -399,6 +399,8 @@
        } else {
          await add(requestData);
        }
        this.cacheForm = null
        this.displayStrainSeq = null
        this.signatureVisible = false;
        this.$router.push({ path: '/strain-library/strain-library-manage' });
        this.$message.success('操作成功');
culture/src/views/strain-library/validation/primitive-cell/add.vue
@@ -149,17 +149,20 @@
                if (id) {
                    // 编辑
                    edit({ ...submitData, id }).then(() => {
                      this.cacheForm = null
                        this.$router.back();
                    });
                } else {
                    // 新增
                    add(submitData).then(() => {
                      this.cacheForm = null
                        this.$router.back();
                    });
                }
            } else {
                // 存草稿
                add(submitData).then(() => {
                  this.cacheForm = null
                    this.$router.back();
                });
            }
culture/src/views/strainReportLibrary/reportLibraryOneFour/index.vue
@@ -143,7 +143,8 @@
    },
    mounted() {
        this.getLists()
    },activated() {
    },
    activated() {
        this.getLists()
    },
    methods: {
culture/src/views/strainReportLibrary/reportLibraryOneThree/add.vue
@@ -506,6 +506,7 @@
                    params.id = this.$route.query.id
                    update(params).then(res => {
                        if (res.code == 200) {
                          this.cacheData = null
                            this.$message.success('编辑成功');
                            this.$router.back()
                        } else {
@@ -523,6 +524,7 @@
                    update(params).then(res => {
                        this.submitLoading = false;
                        if (res.code == 200) {
                          this.cacheData = null
                            this.$message.success('编辑成功');
                            this.$router.back()
                          this.cacheData = null;
@@ -535,6 +537,7 @@
                add(params).then(res => {
                    if (res.code == 200) {
                      this.cacheData = null
                        this.$message.success('发送成功');
                        this.$router.push('/strainReportLibrary/reportLibraryThree');
                      this.cacheData = null;
@@ -580,6 +583,7 @@
                    add(params).then(res => {
                      console.log('8', res);
                      if (res.code == 200) {
                        this.cacheData = null
                            this.$message.success('保存成功');
                            this.$router.back()
                        } else {