董国庆
2025-06-16 c67b37d706daedbc7c4efc74ddadc8f591524b46
Merge branch 'main' of http://120.76.84.145:10101/gitblit/r/H5/leshan-laboratory
13个文件已修改
432 ■■■■■ 已修改文件
culture/src/App.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/components/SelectMember/index.vue 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/main.js 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/utils/request.js 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/middleground/index.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/pedigree-chart/index.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/projectList/addProject.vue 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/projectList/index.vue 209 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/breeding-record/add.vue 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strain-library/breeding-record/service.js 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/strainReportLibrary/reportLibraryOne/add.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/system/user/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/App.vue
@@ -52,6 +52,7 @@
</script>
<style lang="less">
::-webkit-scrollbar {
  display: none;
}
culture/src/components/SelectMember/index.vue
@@ -1,5 +1,5 @@
<template>
    <el-dialog @open="openDialog" class="select-member" :visible.sync="visible" width="53.33%"
    <el-dialog @open="openDialog" class="select-member" :z-index="1000"  :visible.sync="visible" width="53.33%"
        :close-on-click-modal="false" :show-close="false">
        <template #title>
            <div>选择参与人员</div>
@@ -17,12 +17,12 @@
                                        src="@/assets/public/close-circle-fill@2x.png" />
                                </div>
                            </div>
                            <el-button type="primary">搜索</el-button>
                            <el-button type="primary" @click="filterRoleList">搜索</el-button>
                        </div>
                        <div class="select-member-content-left-list">
                            <div class="select-member-content-left-list-title">角色列表</div>
                            <div class="select-member-content-left-list-itemBox">
                                <div @click="searchUserList(item.roleId)" v-for="item in roleList" :key="item.roleId"
                                <div @click="searchUserList(item.roleId)" v-for="item in filteredRoleList" :key="item.roleId"
                                    class="select-member-content-left-list-itemBox-item"
                                    :class="roleId == item.roleId && 'active'">
                                    {{ item.roleName }}
@@ -36,8 +36,8 @@
                        <div class="select-member-content-right-header">
                            <div class="select-member-content-right-header-text">人员列表</div>
                            <div class="select-member-content-right-header-search">
                                <el-input clearable v-model="nickNameOrPhone" placeholder="请输入姓名/手机号" />
                                <el-button type="primary">搜索</el-button>
                                <el-input clearable v-model="nickNameOrPhone" placeholder="请输入姓名/手机号" @keyup.enter.native="searchUserList(roleId)" />
                                <el-button type="primary" @click="searchUserList(roleId)">搜索</el-button>
                            </div>
                        </div>
                        <Table ref="memberTable" :row-key="row => row.userId" :data="tableData" :total="0"
@@ -79,7 +79,8 @@
            nickNameOrPhone: '',
            tableData: [],
            selectData: [],
            roleList: [],
            roleList: [], // 原始角色列表
            filteredRoleList: [], // 过滤后的角色列表
            roleId: null,
        }
    },
@@ -98,18 +99,26 @@
        openDialog() {
            // 获取角色列表并根据项目组ID进行过滤
            getRoleList().then(res => {
                let roles = [];
                if (this.projectId) {
                    // 过滤出实验员和化验师角色
                    this.roleList = res.filter(item => item.roleId == 4 || item.roleId == 5);
                    roles = res.filter(item => item.roleId == 4 || item.roleId == 5);
                } else {
                    this.roleList = res;
                    roles = res.filter(item => item.roleId !== 1); // 排除 roleId 为 1 的角色
                }
                this.roleList = roles;
                this.filterRoleList(); // 获取后先进行一次过滤
            });
            this.searchUserList(null);
        },
        handleSelectionChange(val) {
            if (!this.singleSelect) {
                this.selectData = val;
                // 获取当前表格中未被选中的用户ID
                const unselectedInCurrentTable = this.tableData.filter(row => !val.some(selected => selected.userId === row.userId)).map(row => row.userId);
                // 从总的selectData中移除这些未选中的用户,保留其他角色已选中的用户
                const otherSelected = this.selectData.filter(item => !unselectedInCurrentTable.includes(item.userId));
                // 合并当前表格的选中项和其他角色已选中的项
                this.selectData = [...otherSelected.filter(item => !val.some(v => v.userId === item.userId)), ...val];
            }
        },
        async searchUserList(roleId) {
@@ -117,7 +126,7 @@
            // 根据是否有项目组ID来决定调用不同的接口
            const params = {
                roleIds: roleId ? [roleId] : [],
                nickNameOrPhone: this.searchName,
                nickNameOrPhone: this.nickNameOrPhone, // 使用 nickNameOrPhone 进行搜索
                pageSize: 9999,
                pageNum: 1
            };
@@ -139,7 +148,15 @@
            })
        },
        searchRole() {
            this.search = ''
            this.search = '';
            this.filterRoleList(); // 清空搜索词后重新过滤
        },
        filterRoleList() {
            if (this.search) {
                this.filteredRoleList = this.roleList.filter(item => item.roleName.includes(this.search));
            } else {
                this.filteredRoleList = [...this.roleList];
            }
        },
        open() {
            this.visible = true
@@ -173,6 +190,8 @@
</script>
<style scoped lang="less">
// to fix el-message弹框被el-dialog覆盖的问题。
.select-member-content {
    .select-member-content-left {
        box-shadow: 0px 4px 12px 4px rgba(0, 0, 0, 0.08);
culture/src/main.js
@@ -3,6 +3,7 @@
import "element-ui/lib/theme-chalk/index.css";
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';
import zhCN from 'ant-design-vue/lib/locale-provider/zh_CN';
import '@/assets/font/font.css'
import App from "./App.vue";
import router from "./router";
@@ -72,5 +73,9 @@
new Vue({
  router,
  store,
  render: (h) => h(App),
  render: (h) => (
    <a-config-provider locale={zhCN}>
      <App />
    </a-config-provider>
  ),
}).$mount("#app");
culture/src/utils/request.js
@@ -60,12 +60,11 @@
      if (!res.data) {
        return Promise.resolve({})
      }
      console.log('res', res.data.data || res.data)
      return Promise.resolve(res.data.data || res.data)
    } else {
      if (res.data.code == 103 || res.data.code == 401) {
      if (res.data.data.code == 103 || res.data.data.code == 401) {
        Message({
          message: res.data.msg || '登录已过期,请重新登录',
          message: res.data.data.msg || '登录已过期,请重新登录',
          type: 'warning',
          duration: 2000
        })
@@ -74,7 +73,7 @@
        return Promise.reject(res.data.data)
      }
      Message({
        message: res.data.msg || '服务器错误',
        message: res.data.data.msg || '服务器错误',
        type: 'error',
        duration: 2000
      })
culture/src/views/middleground/index.vue
@@ -66,8 +66,6 @@
<script>
import { loginReq } from './service'
import HeaderNav from '../../layouts/components/HeaderNav.vue'
// 引入 Element UI 的日历组件
// import { ElCalendar } from 'element-ui';
export default {
  name: 'Login',
  components: {
@@ -78,7 +76,6 @@
  data() {
    return {
      windowWidth: window.innerWidth,
      loginForm: {
        username: '',
        password: ''
@@ -136,7 +133,7 @@
        {
          text: '项目组管理',
          icon: require('../../assets/login/img5.png'),
          path: '/projectList'
          path: '/projectList/list'
        },
        {
          text: '系统管理',
culture/src/views/pedigree-chart/index.vue
@@ -9,7 +9,7 @@
          <el-form-item label="菌种名称:">
            <el-input v-model="form.strainName" placeholder="请输入"></el-input>
          </el-form-item>
          <el-form-item label="起传类型">
          <el-form-item v-if="roleType != 1" label="起传类型">
            <el-select v-model="form.generationType" placeholder="请选择">
              <el-option label="母代" :value="1"></el-option>
              <el-option label="祖代" :value="2"></el-option>
@@ -25,13 +25,13 @@
        <div class="tableTitle">
          <div class="flex a-center">
            <div class="title" :class="{ active: currentType === 'list' }" @click="handleTypeChange('list')">
              菌种选育保藏记录列表
              菌种传代生产谱系图
            </div>
            <!-- <div class="drafts" :class="{ active: currentType === 'draft' }" @click="handleTypeChange('draft')">
              草稿箱
            </div> -->
          </div>
          <div class="flex a-center">
          <div class="flex a-center" v-if="roleType == 4">
            <el-button @click="handleNewStrain" class="el-icon-plus" type="primary"
              style="margin-right: 12px">新增祖代起传</el-button>
            <el-button @click="handleBatchAdd" class="el-icon-plus" type="primary">新增母代起传</el-button>
@@ -82,61 +82,10 @@
      },
      tableData: [],
      total: 0,
      roleType: JSON.parse(sessionStorage.getItem('userInfo')).roleType || 1,  // 1.超级管理员 2.审批人 3.工程师 4.实验员
      // 模拟数据
      mockListData: [
        {
          planCode: "PLAN-2024-001",
          planName: "2024年度实验室设备升级方案",
          stage: "规划阶段",
          creator: "张三",
          createTime: "2024-03-15",
          status: "pending",
          approver: "李四",
          approveTime: "2024-03-16",
        },
        {
          planCode: "PLAN-2024-002",
          planName: "实验室安全管理制度更新方案",
          stage: "实施阶段",
          creator: "王五",
          createTime: "2024-03-14",
          status: "approved",
          approver: "赵六",
          approveTime: "2024-03-15",
        },
        {
          planCode: "PLAN-2024-003",
          planName: "实验室人员培训计划",
          stage: "准备阶段",
          creator: "孙七",
          createTime: "2024-03-13",
          status: "rejected",
          approver: "周八",
          approveTime: "2024-03-14",
        },
      ],
      mockDraftData: [
        {
          planCode: "DRAFT-2024-001",
          planName: "实验室设备采购计划(草稿)",
          stage: "规划阶段",
          creator: "张三",
          createTime: "2024-03-16",
          status: "draft",
          approver: "",
          approveTime: "",
        },
        {
          planCode: "DRAFT-2024-002",
          planName: "实验室改造方案(草稿)",
          stage: "准备阶段",
          creator: "李四",
          createTime: "2024-03-15",
          status: "draft",
          approver: "",
          approveTime: "",
        },
      ],
      mockListData: [],
      mockDraftData: [],
      approvalDialogVisible: false,
      approvalDialogType: "approve",
      currentApprovalData: null,
culture/src/views/pedigree-chart/progenitorComponents/AddSublevelForm.vue
@@ -124,6 +124,7 @@
  },
  methods: {
    openInitData(value) {
      console.log(value);
      this.dialogTitle = value.title;
      // 获取用户信息
@@ -141,8 +142,6 @@
      this.form = {
        ...this.form,
        ...value.form,
        strainCode1: value.strainCode1,
        strainName1: value.strainName1,
        formStatus:value.formStatus,
        thisName: userInfo.nickName || "",
        thisTime: value.form.vaccinateTime
culture/src/views/projectList/addProject.vue
@@ -44,12 +44,15 @@
    name: 'AddProject',
    data() {
        return {
            form: {},
            form: {
                teamName: '',
                personCharge: ''
            },
            rules: {
                teamName: [{ required: true, message: '请输入项目组名称', trigger: 'blur' }],
                personCharge: [{ required: true, message: '请输入项目组描述', trigger: 'blur' }]
            },
            selectMemberData: [],
            selectMemberData: [], // 初始化为空数组
            // 角色配置常量
            ROLE_CONFIG: {
                1: { key: 'approver', limit: 1, label: '菌种审批人' },
@@ -61,9 +64,17 @@
        submitForm() {
            this.$refs.form.validate((valid) => {
                if (valid) {
                    const requiredRoles = ['菌种审批人', '菌种工程师', '菌种实验员'];
                    const selectedRoleNames = this.selectMemberData.map(member => member.roleName);
                    for (const role of requiredRoles) {
                        if (!selectedRoleNames.includes(role)) {
                            this.$message.error(`请选择${role}`);
                            return;
                        }
                    }
                    if (this.selectMemberData.length == 0) {
                        this.$message.error('请选择项目组成员')
                        return
                        this.$message.error('请选择项目组成员');
                        return;
                    }
                    const ROLE_NAME_TO_TYPE = {
                        '菌种审批人': 1,
@@ -80,8 +91,11 @@
                    }
                    addProject(data).then(res => {
                        if (res.code == 200) {
                            this.$message.success('添加成功')
                            this.$router.push({ name: 'ProjectList' })
                            this.$message.success('添加成功');
                            this.resetForm(); // 添加成功后重置表单
                            this.$router.back(); // 跳转到上一个页面
                            // Optionally, navigate away or give other feedback
                            // this.$router.push({ name: 'ProjectList' });
                        }
                    })
                }
@@ -118,6 +132,16 @@
            this.$nextTick(() => {
                this.$refs.selectMember.setSelection(this.selectMemberData);
            });
        },
        resetForm() {
            this.form = {
                teamName: '',
                personCharge: ''
            };
            this.selectMemberData = [];
            this.$nextTick(() => {
                this.$refs.form.resetFields();
            });
        }
    }
}
culture/src/views/projectList/index.vue
@@ -1,18 +1,34 @@
<template>
    <div class="list">
        <TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange"
            @sizeChange="handleSizeChange">
    <TableCustom
      :queryForm="queryForm"
      :tableData="tableData"
      :total="total"
      @currentChange="handleCurrentChange"
      @sizeChange="handleSizeChange"
    >
            <template #search>
                <el-form label-width="140px" inline>
                    <el-form-item label="项目组名称:">
                        <el-input v-model="queryForm.teamName" placeholder="请输入"></el-input>
            <el-input
              v-model="queryForm.teamName"
              placeholder="请输入"
            ></el-input>
                    </el-form-item>
                    <el-form-item label="项目负责人:">
                        <el-input v-model="queryForm.personCharge" placeholder="请输入"></el-input>
            <el-input
              v-model="queryForm.personCharge"
              placeholder="请输入"
            ></el-input>
                    </el-form-item>
                    <el-form-item label="创建日期:">
                        <el-date-picker v-model="queryForm.createdDate" type="daterange" range-separator="至"
                            start-placeholder="开始日期" end-placeholder="结束日期">
            <el-date-picker
              v-model="queryForm.createdDate"
              type="daterange"
              range-separator="至"
              start-placeholder="开始日期"
              end-placeholder="结束日期"
            >
                        </el-date-picker>
                    </el-form-item>
                    <el-form-item class="search-btn-box">
@@ -22,8 +38,13 @@
                </el-form>
            </template>
            <template #setting>
                <el-button @click="handleProject('add')" class="el-icon-plus" type="primary">
                    新增菌种库项目组</el-button>
        <el-button
          @click="handleProject('add')"
          class="el-icon-plus"
          type="primary"
        >
          新增菌种库项目组</el-button
        >
            </template>
            <template #table>
                <el-table-column prop="teamName" label="菌种库项目组名称" />
@@ -38,135 +59,163 @@
                </el-table-column>
                <el-table-column label="操作">
                    <template #default="{ row }">
                        <el-button v-if="row.status == 1" type="text" @click="handleChangeStatus(row, 2)">封存</el-button>
                        <el-button v-if="row.status == 2" type="text" @click="handleChangeStatus(row, 1)">解封</el-button>
                        <el-button type="text" @click="handleProject('edit', row.id)">编辑</el-button>
                        <el-button type="text" @click="handleProject('detail', row.id)">详情</el-button>
            <el-button
              v-if="row.status == 1"
              type="text"
              @click="handleChangeStatus(row, 2)"
              >封存</el-button
            >
            <el-button
              v-if="row.status == 2"
              type="text"
              @click="handleChangeStatus(row, 1)"
              >解封</el-button
            >
            <el-button type="text" @click="handleProject('edit', row.id)"
              >编辑</el-button
            >
            <el-button type="text" @click="handleProject('detail', row.id)"
              >详情</el-button
            >
                        <el-button type="text" @click="handleDel(row)">删除</el-button>
                    </template>
                </el-table-column>
            </template>
        </TableCustom>
        <ShowDelConfirm :show="showDelConfirm" @close="showDelConfirm = false" @confirm="handleDelConfirm" />
        <ShowDelConfirm :title="changeStatusTitle" :tip="changeStatusTip" :show="changeStatus"
            @close="changeStatus = false" @confirm="handleChangeStatusConfirm" />
    <ShowDelConfirm
      :show="showDelConfirm"
      @close="showDelConfirm = false"
      @confirm="handleDelConfirm"
    />
    <ShowDelConfirm
      :title="changeStatusTitle"
      :tip="changeStatusTip"
      :show="changeStatus"
      @close="changeStatus = false"
      @confirm="handleChangeStatusConfirm"
    />
    </div>
</template>
<script>
import { getProjectList, changeStatus, deleteProject } from './service'
import { getProjectList, changeStatus, deleteProject } from "./service";
export default {
    name: 'ProjectList',
  name: "ProjectList",
    data() {
        return {
            showDelConfirm: false,
            rowId: '',
      rowId: "",
            changeStatus: false,
            changeStatusTitle: '',
            changeStatusTip: '',
      changeStatusTitle: "",
      changeStatusTip: "",
            tableData: [],
            queryForm: {
                pageSize: 10,
                pageNum: 1
        pageNum: 1,
            },
            total: 0
        }
      total: 0,
    };
    },
    created() {
        this.getList()
    this.getList();
    },
    methods: {
        handleProject(type, id) {
            if (type == 'add') {
      if (type == "add") {
                this.$router.push({
                    path: '/projectList/addProject'
                })
                return
          path: "/projectList/addProject",
        });
        return;
            }
            if (type == 'edit') {
      if (type == "edit") {
                this.$router.push({
                    path: '/projectList/editProject',
          path: "/projectList/editProject",
                    query: {
                        id
            id,
          },
        });
        return;
                    }
                })
                return
            }
            if (type == 'detail') {
      if (type == "detail") {
                this.$router.push({
                    path: '/projectList/detailProject',
          path: "/projectList/detailProject",
                    query: {
                        id
                    }
                })
                return
            id,
          },
        });
        return;
            }
        },
        handleDel(row) {
            this.rowId = row.id
            this.showDelConfirm = true
      this.rowId = row.id;
      this.showDelConfirm = true;
        },
        handleDelConfirm() {
            deleteProject({ id: this.rowId }).then(res => {
                this.showDelConfirm = false
                this.msgsuccess('删除成功')
                this.rowId = ''
                this.getList()
            })
      deleteProject({ id: this.rowId }).then((res) => {
        this.showDelConfirm = false;
        this.$message.success("删除成功");
        this.rowId = "";
        this.getList();
      });
        },
        handleChangeStatus(row, status) {
            this.rowId = row.id
            this.changeStatusTitle = status == 1 ? '确认要封存这个项目组吗?' : '确认要解封该项目组吗?'
            this.changeStatusTip = status == 1 ? '封存后项目组内人员看不到数据,审批人仍然可见数据。' : '解封后项目组内人员数据恢复。'
            this.changeStatus = true
      this.rowId = row.id;
      this.changeStatusTitle =
        status == 2 ? "确认要封存这个项目组吗?" : "确认要解封该项目组吗?";
      this.changeStatusTip =
        status == 2
          ? "封存后项目组内人员看不到数据,审批人仍然可见数据。"
          : "解封后项目组内人员数据恢复。";
      this.changeStatus = true;
        },
        handleChangeStatusConfirm() {
            changeStatus({ id: this.rowId, status: this.status }).then(res => {
                this.changeStatus = false
                this.msgsuccess('操作成功')
                this.rowId = ''
                this.changeStatusTitle = ''
                this.changeStatusTip = ''
                this.getList()
            })
      changeStatus({ id: this.rowId, status: this.status }).then((res) => {
        this.changeStatus = false;
        this.$message.success("操作成功");
        this.rowId = "";
        this.changeStatusTitle = "";
        this.changeStatusTip = "";
        this.getList();
      });
        },
        handleCurrentChange(page) {
            this.queryForm.pageNum = page
            this.getList()
      this.queryForm.pageNum = page;
      this.getList();
        },
        handleSizeChange(size) {
            this.queryForm.pageSize = size
            this.getList()
      this.queryForm.pageSize = size;
      this.getList();
        },
        getList() {
            let obj = {
                ...this.queryForm
            }
        ...this.queryForm,
      };
            if (obj.createdDate) {
                obj.startTime = moment(obj.createdDate[0]).format('YYYY-MM-DD')
                obj.endTime = moment(obj.createdDate[1]).format('YYYY-MM-DD')
                delete obj.createdDate
        obj.startTime = moment(obj.createdDate[0]).format("YYYY-MM-DD");
        obj.endTime = moment(obj.createdDate[1]).format("YYYY-MM-DD");
        delete obj.createdDate;
            }
            getProjectList(obj).then(res => {
                this.tableData = res.data.records
                this.total = res.data.total
            })
      getProjectList(obj).then((res) => {
        this.tableData = res.data.records;
        this.total = res.data.total;
      });
        },
        reset() {
            this.queryForm = {
                pageSize: 10,
                pageNum: 1
            }
            this.getList()
        pageNum: 1,
      };
      this.getList();
        },
        search() {
            this.getList()
        }
    }
}
      this.getList();
    },
  },
};
</script>
<style scoped lang="less">
.list {
    height: 100%;
}
culture/src/views/strain-library/breeding-record/add.vue
@@ -188,12 +188,13 @@
            </template>
          </el-table-column>
          <el-table-column prop="preserveTime" label="入库保藏/废弃时间" />
          <el-table-column label="操作" v-if="[1, 3].includes(roleType) && $route.query.isDetail || (!$route.query.isDetail &&  [4].includes(roleType))">
          <el-table-column label="操作"
            v-if="[1, 3].includes(roleType) && $route.query.isDetail&& !scope.row.preserveSignature || (!$route.query.isDetail && [4].includes(roleType))">
            <template slot-scope="scope">
              <el-button type="text" @click="handleEditInoculation(scope.row, scope.$index)"
                v-if="!$route.query.isDetail && [1, 4].includes(roleType)">编辑</el-button>
              <el-button type="text" @click="handleConfirmStorageClick(scope.row, scope.$index)"
                v-if="$route.query.isDetail && [3].includes(roleType)">确认入库</el-button>
                v-if="$route.query.isDetail && [3].includes(roleType) && !scope.row.preserveSignature">确认入库</el-button>
              <el-button type="text" @click="handleDeleteInoculation(scope.$index)"
                v-if="!$route.query.isDetail && !scope.row.preserveSignature && [1, 4].includes(roleType)">删除</el-button>
            </template>
@@ -229,12 +230,13 @@
            </template>
          </el-table-column>
          <el-table-column prop="preserveTime" label="保藏时间" />
          <el-table-column label="操作" v-if="[1, 3].includes(roleType) && $route.query.isDetail || (!$route.query.isDetail &&  [4].includes(roleType))">
          <el-table-column label="操作"
            v-if="[1, 3].includes(roleType) && $route.query.isDetail&& !scope.row.preserveSignature || (!$route.query.isDetail && [4].includes(roleType))">
            <template slot-scope="scope">
              <el-button type="text" @click="handleEditPreserve(scope.row, scope.$index)"
                v-if="!$route.query.isDetail && [1, 4].includes(roleType)">编辑</el-button>
              <el-button type="text" @click="handleConfirmPreserve(scope.row, scope.$index)"
                v-if="$route.query.isDetail && [3].includes(roleType)">确认入库</el-button>
                v-if="$route.query.isDetail && [3].includes(roleType) && !scope.row.preserveSignature">确认入库</el-button>
              <el-button type="text" @click="handleDeletePreserve(scope.$index)"
                v-if="!$route.query.isDetail && !scope.row.preserveSignature && [1, 4].includes(roleType)">删除</el-button>
            </template>
@@ -253,7 +255,7 @@
          @confirm="handleConfirmStorage" />
        <ConfirmPreserveDialog :visible.sync="showConfirmPreserveDialog" :editData="editPreserveData"
          @confirm="handleConfirmPreserveSubmit" />
        <div class="end-btn" style="margin-top: 20px;" v-if="$route.query.isDetail&& [3, 4].includes(roleType)">
        <div class="end-btn" style="margin-top: 20px;" v-if="!$route.query.isDetail && [3, 4].includes(roleType)">
          <el-button type="primary" @click="handleSubmit(1)">提交</el-button>
          <el-button type="primary" @click="handleSubmit(3)">同步给保藏人</el-button>
          <el-button type="default" @click="handleSubmit(2)">存草稿</el-button>
@@ -271,7 +273,7 @@
import ConfirmStorageDialog from "./confirm-storage-dialog.vue";
import ConfirmPreserveDialog from "./confirm-preserve-dialog.vue";
import { add, detail, edit } from './service'
import { add, detail, edit, vaccinationSlopesConfirm, culturePreservationsConfirm } from './service'
export default {
  components: {
    AiEditor,
@@ -281,6 +283,7 @@
    PreserveStrainRecordDialog,
    ConfirmStorageDialog,
    ConfirmPreserveDialog,
  },
  name: "AddBreedingRecord",
  data() {
@@ -460,9 +463,9 @@
      if (type == 1) {
        this.form.status = 1
      } else if (type == 3) {
        this.form.isDraft = 2
        this.form.status = 2
      } else {
        this.form.isDraft = 3
        this.form.status = 3
      }
      this.$refs.form.validate(async (valid) => {
@@ -548,7 +551,8 @@
      this.showConfirmStorageDialog = true;
    },
    handleConfirmStorage(data) {
      // 更新对应行的数据,保留原有数据并更新签名
      if (data.preserveSignature) {
        vaccinationSlopesConfirm({ id: this.form.vaccinationSlopes[this.editInoculationIndex].id, preserveSignature: data.preserveSignature }).then(res => {
      if (this.editInoculationIndex !== null) {
        this.$set(this.form.vaccinationSlopes, this.editInoculationIndex, {
          ...this.form.vaccinationSlopes[this.editInoculationIndex],
@@ -559,6 +563,8 @@
      this.showConfirmStorageDialog = false;
      this.editInoculationIndex = null;
      this.editInoculationData = null;
        })
      }
    },
    handleDeleteInoculation(index) {
      this.form.vaccinationSlopes.splice(index, 1);
@@ -595,8 +601,8 @@
      this.showConfirmPreserveDialog = true;
    },
    handleConfirmPreserveSubmit(data) {
      console.log('确认保藏', data)
      // 更新对应行的数据,保留原有数据并更新签名
      if (data.preserveSignature) {
        culturePreservationsConfirm({ id: this.form.culturePreservations[this.editPreserveIndex].id, preserveSignature: data.preserveSignature }).then(res => {
      if (this.editPreserveIndex !== null) {
        this.$set(this.form.culturePreservations, this.editPreserveIndex, {
          ...this.form.culturePreservations[this.editPreserveIndex],
@@ -607,6 +613,9 @@
      this.showConfirmPreserveDialog = false;
      this.editPreserveIndex = null;
      this.editPreserveData = null;
        })
      }
    },
  },
};
culture/src/views/strain-library/breeding-record/service.js
@@ -41,3 +41,18 @@
    params: data
  })
}
//接种斜面记录确认入库
export const vaccinationSlopesConfirm = (data) => {
  return axios.post('/api/t-breeding-and-preservation/vaccinationSlopesConfirm', {
    ...data
  })
}
//菌种保藏记录确认入库
export const culturePreservationsConfirm = (data) => {
  return axios.post('/api/t-breeding-and-preservation/culturePreservationsConfirm', {
   ...data
  })
}
culture/src/views/strainReportLibrary/reportLibraryOne/add.vue
@@ -197,7 +197,7 @@
                {
                    category: '1.该分题的菌种专业知识',
                    selectedScore: 0,
                    criteria: '1.1 能讲生物学基础,掌握各类微生物形态特性、生化特性及鉴定方法。1.2 菌种选育技术,了解掌握自然选育、诱变选育、基因工程育种。',
                    criteria: '1.1 微生物学基础,掌握各类微生物形态特性、生化特性及鉴定方法。1.2 菌种选育技术,了解掌握自然选育、诱变选育、基因工程育种。',
                    desc: '',
                    rule: ''
                },
culture/src/views/system/user/index.vue
@@ -146,7 +146,7 @@
    delConfirm() {
      delDept(this.delId).then(() => {
        this.delShow = false
        this.msgsuccess('删除成功')
        this.$message.success('删除成功')
        this.getListData()
      })
    },
@@ -154,7 +154,7 @@
      changeStatus({ ...form, status: 1 }).then(() => {
        this.disbDialogVisible = false
        this.disbRow = {}
        this.msgsuccess('禁用成功')
        this.$message.success('禁用成功')
        this.getListData()
      })
    },
@@ -163,14 +163,14 @@
        edit(form).then(() => {
          this.row = {}
          this.dialogVisible = false
          this.msgsuccess('修改成功')
          this.$message.success('修改成功')
          this.getListData()
        })
      } else {
        add(form).then(() => {
          this.row = {}
          this.dialogVisible = false
          this.msgsuccess('添加成功')
          this.$message.success('添加成功')
          this.getListData()
        })
      }
@@ -179,7 +179,7 @@
      updatePwd(form).then(() => {
        this.row = {}
        this.passwordVisible = false
        this.msgsuccess('修改密码成功')
        this.$message.success('修改密码成功')
        this.getListData()
      })
    },
@@ -198,7 +198,7 @@
    updateStatus(row, type) {
      if (type) {
        changeStatus({ ...row, status: 0 }).then(() => {
          this.msgsuccess('启用成功')
          this.$message.success('启用成功')
          this.getListData()
        })
      } else {