hejianhao
2025-05-08 3a26073dd1aae27cdecb21d096b718c51e680526
接口
12个文件已修改
3个文件已添加
1298 ■■■■ 已修改文件
culture/package.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/public/index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/layouts/components/HeaderNav.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/layouts/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/router/index.js 1148 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/utils/baseurl.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/utils/encryption.js 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/utils/request.js 34 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/utils/sm4.js 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/login/index.vue 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/login/service.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/projectList/index.vue 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/src/views/projectList/service.js 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/vue.config.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
culture/package.json
@@ -17,6 +17,7 @@
    "core-js": "^3.41.0",
    "element-ui": "^2.15.6",
    "moment": "^2.30.1",
    "sm-crypto": "^0.3.13",
    "vue": "^2.7.16",
    "vue-router": "^3.6.5",
    "vuex": "^3.6.2"
culture/public/index.html
@@ -7,7 +7,7 @@
  <meta name="viewport" content="width=device-width,initial-scale=1.0">
  <link rel="icon" href="<%= BASE_URL %>logo.jpg">
  <!-- <link rel="icon" href="data:,"> -->
  <title>实验室流程</title>
  <title>菌种库</title>
</head>
<body>
culture/src/layouts/components/HeaderNav.vue
@@ -57,7 +57,7 @@
    // 退出登录
    outLogin() {
      sessionStorage.clear()
      this.$router.replace({ path: "/" });
      this.$router.replace({ path: "/login" });
    },
    // 关闭标签
    closeTag(tag) {
culture/src/layouts/index.vue
@@ -9,7 +9,7 @@
            <div class="image">
              <img src="../assets/logo.jpg" alt="" srcset="" />
            </div>
            <div class="title">实验室流程</div>
            <div class="title">菌种库</div>
          </div>
          <!-- 左侧菜单 -->
          <div v-if="!isFold" class="sidebar-container">
culture/src/main.js
@@ -14,6 +14,7 @@
import "aieditor/dist/style.css"
import './assets/tailwind.css'
import './styles/element-variables.less'
import { fetchEncryptionKey } from './utils/encryption'
Vue.config.productionTip = false;
Vue.use(ElementUI, { size: 'small' })
@@ -62,6 +63,9 @@
  return height
}
// 获取加密密钥
// fetchEncryptionKey()
new Vue({
  router,
  store,
culture/src/router/index.js
@@ -24,552 +24,552 @@
 */
const routes = [{
        path: "/",
        redirect: "/projectList/list",
    path: "/",
    redirect: "/projectList/list",
},
{
    path: "/login",
    meta: {
        title: "登录",
        oneself: true,
        hide: true,
    },
    {
        path: "/login",
        meta: {
            title: "登录",
            oneself: true,
            hide: true,
        },
        component: () => import("../views/login"),
    component: () => import("../views/login"),
},
{
    path: "/projectList",
    meta: {
        title: "项目组管理",
    },
    {
        path: "/projectList",
    component: Layouts,
    children: [{
        path: "list",
        name: "ProjectList",
        meta: {
            title: "项目组管理",
        },
        component: Layouts,
        children: [{
                path: "list",
                name: "ProjectList",
                meta: {
                    title: "项目组管理",
                },
                component: () => import("../views/projectList"),
            },
            {
                path: "addProject",
                name: "AddProject",
                meta: {
                    title: "新增项目组",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/projectList/addProject"),
            }
        ]
        component: () => import("../views/projectList"),
    },
    {
        path: "/system",
        path: "addProject",
        name: "AddProject",
        meta: {
            title: "系统管理",
            title: "新增项目组",
            hide: true,
            keepAlive: true,
        },
        component: Layouts,
        children: [{
                path: "user",
                name: "User",
                meta: {
                    title: "人员管理",
                },
                component: () => import("../views/system/user"),
            },
            {
                path: "role",
                name: "Role",
                meta: {
                    title: "角色管理",
                },
                component: () => import("../views/system/role"),
            },
            {
                path: "add-role",
                name: "AddRole",
                meta: {
                    title: "新增角色",
                    hide: true,
                },
                component: () => import("../views/system/role/add"),
            },
            {
                path: "edit-role",
                name: "EditRole",
                meta: {
                    title: "编辑角色",
                    hide: true,
                },
                component: () => import("../views/system/role/edit"),
            },
            {
                path: "detail-role",
                name: "DetailRole",
                meta: {
                    title: "角色详情",
                    hide: true,
                },
                component: () => import("../views/system/role/detail"),
            },
            {
                path: "operation-log",
                meta: {
                    title: "操作日志",
                },
                component: () => import("../views/system/operation-log"),
            },
        ]
    },
    {
        path: "/strain",
        component: Layouts,
        meta: {
            title: "菌种库",
        },
        children: [{
                path: "/strain-library",
                component: Parent,
                meta: {
                    title: "菌种库管理",
                },
                children: [{
                        path: "strain-library-manage",
                        name: "StrainLibraryManage",
                        meta: {
                            title: "原始细胞库",
                            keepAlive: true,
                        },
                        component: () => import("../views/strain-library/strain-library-manage"),
                    },
                    {
                        path: "strain-library-manage/add",
                        name: "StrainLibraryManageAdd",
                        meta: {
                            title: "新增原始细胞库",
                            keepAlive: true,
                            hide: true
                        },
                        component: () => import("../views/strain-library/strain-library-manage/add.vue"),
                    },
                    {
                        path: "strain-library-manage/record",
                        name: "StrainRecord",
                        meta: {
                            title: "出入库记录",
                            keepAlive: true,
                            hide: true
                        },
                        component: () => import("../views/strain-library/strain-library-manage/record.vue"),
                    },
                    {
                        path: "main-cell-library",
                        name: "MainCellLibrary",
                        meta: {
                            title: "主细胞库",
                            keepAlive: true,
                        },
                        component: () => import("../views/strain-library/main-cell-library"),
                    },
                    {
                        path: "main-cell-library/add",
                        name: "MainCellLibraryAdd",
                        meta: {
                            title: "新增主细胞",
                            keepAlive: true,
                            hide: true
                        },
                        component: () => import("../views/strain-library/main-cell-library/add.vue"),
                    },
                    {
                        path: "production-cell-library",
                        name: "ProductionCellLibrary",
                        meta: {
                            title: "生产细胞库",
                            keepAlive: true,
                        },
                        component: () => import("../views/strain-library/production-cell-library"),
                    },
                    {
                        path: "production-cell-library/add",
                        name: "ProductionCellLibraryAdd",
                        meta: {
                            title: "新增生产细胞",
                            keepAlive: true,
                            hide: true
                        },
                        component: () => import("../views/strain-library/production-cell-library/add.vue"),
                    },
                    {
                        path: "strain-flow-chart",
                        name: "StrainFlowChart",
                        meta: {
                            title: "菌种传代产生流程图",
                            keepAlive: true,
                        },
                        component: () => import("../views/strain-library/strain-flow-chart"),
                    },
                ]
            },
            {
                path: 'pedigree-vhart',
                name: 'PedigreeChart',
                meta: {
                    title: "菌种传代生产谱系图",
                },
                component: () => import("../views/pedigree-chart"),
            }
        ]
    },
    {
        path: "/dataManagement",
        component: Layouts,
        meta: {
            title: "实验室数据管理",
        },
        children: [{
                path: "approvalPlan",
                meta: {
                    title: "项目课题方案审批",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/approvalPlan/list.vue"),
            },
            {
                path: "addPlan",
                name: "addPlan",
                meta: {
                    title: "新增项目课题方案",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/approvalPlan/addPlan"),
            },
            {
                path: "dispatching",
                meta: {
                    title: "实验调度管理",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/dispatching/list.vue"),
            },
            {
                path: "addDispatch",
                meta: {
                    title: "新增实验调度",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/dispatching/addDispatch"),
            },
            {
                path: "confirmation-sheet",
                name: "ConfirmationSheet",
                meta: {
                    title: "检验方法确认单",
                },
                component: () => import("../views/dataManagement/confirmation-sheet"),
            },
            {
                path: "confirmation-sheet/add",
                name: "AddConfirmationSheet",
                meta: {
                    title: "检验方法确认单",
                },
                component: () => import("../views/dataManagement/confirmation-sheet/components/add.vue"),
            },
            {
                path: "/sampleManage",
                meta: {
                    title: "样品管理",
                    // keepAlive: true,
                },
                component: Parent,
                children: [{
                        path: "manage",
                        meta: {
                            title: "样品管理",
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleManage/list.vue"),
                    },
                    {
                        path: "addSample",
                        name: "addPaddSamplelan",
                        meta: {
                            title: "新增样品",
                            hide: true,
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleManage/addSample"),
                    }, {
                        path: "record",
                        meta: {
                            title: "取样操作记录列表",
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleRecordList/list.vue"),
                    },
                    {
                        path: "changeRecord",
                        name: "changeRecord",
                        meta: {
                            title: "填写取样操作记录",
                            hide: true,
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleRecordList/changeRecord"),
                    }, {
                        path: "submissionList",
                        meta: {
                            title: "送样单列表",
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleSubmissionList/list.vue"),
                    },
                    {
                        path: "submission",
                        name: "submission",
                        meta: {
                            title: "送样单详情",
                            hide: true,
                            keepAlive: true,
                        },
                        component: () => import("../views/dataManagement/sampleSubmissionList/submission"),
                    },
                ]
            },
            {
                path: "deliveryRecord",
                meta: {
                    title: "取样送样记录",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/SampleDeliveryRecord/list.vue"),
            },
            {
                path: "delivery",
                name: "delivery",
                meta: {
                    title: "送样详情",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/SampleDeliveryRecord/deliveryRecord"),
            },
            {
                path: "originalRecordTest",
                meta: {
                    title: "原始检验记录",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/originalRecordTest/list.vue"),
            },
            {
                path: "originalRecordTest/detail",
                name: "OriginalRecordTestDetail",
                meta: {
                    title: "原始检验记录详情",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/originalRecordTest/detail.vue"),
            },
            {
                path: "inspectionReport",
                meta: {
                    title: "检验报告管理",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/inspectionReport/list.vue"),
            },
            {
                path: "inspectionReport/detail",
                name: "inspectionReportDetail",
                meta: {
                    title: "检验报告详情",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/inspectionReport/detail.vue"),
            },
            {
                path: "testResultReport",
                meta: {
                    title: "实验结果汇报",
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/testResultReport/list.vue"),
            },
            {
                path: "testResultReport/detail",
                name: "testResultReportDetail",
                meta: {
                    title: "实验结果详情",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/dataManagement/testResultReport/detail.vue"),
            },
        ],
    },
    {
        path: "/reportLibrary",
        component: Layouts,
        meta: {
            title: "专业报告库审批",
        },
        children: [{
                path: "feasibilityStudy",
                meta: {
                    title: "可研报告库",
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/feasibilityStudy/index.vue"),
            },
            {
                path: "add",
                meta: {
                    title: "新增可行报告",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/feasibilityStudy/add.vue"),
            },
            {
                path: "feasibilityReport",
                meta: {
                    title: "可行报告库",
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/feasibilityReport/index.vue"),
            },
            {
                path: "processDevelopment",
                meta: {
                    title: "工艺开发工具",
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/processDevelopment/index.vue"),
            },
            {
                path: "verificationRelease",
                meta: {
                    title: "验证与发布",
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/verificationRelease/index.vue"),
            },
            {
                path: "projectProposalLibrary",
                meta: {
                    title: "立项报告库",
                    keepAlive: true,
                },
                component: () => import("../views/reportLibrary/projectProposalLibrary/index.vue"),
            },
        ],
    }, {
        path: "/strainReportLibrary",
        component: Layouts,
        meta: {
            title: "菌种报告库",
        },
        children: [{
                path: "reportLibraryOne",
                meta: {
                    title: "报告库一",
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOne/index.vue"),
            },
            {
                path: "add",
                meta: {
                    title: "新增报告",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOne/add.vue"),
            },
            {
                path: "reportLibraryTwo",
                meta: {
                    title: "报告库二",
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/index.vue"),
            },
            {
                path: "addTwo",
                meta: {
                    title: "新增报告",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/add.vue"),
            },
            {
                path: "reportLibraryThree",
                meta: {
                    title: "报告库三",
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneThree/index.vue"),
            },
            {
                path: "addThree",
                meta: {
                    title: "新增报告",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneThree/add.vue"),
            },
            {
                path: "reportLibraryFour",
                meta: {
                    title: "报告库四",
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneFour/index.vue"),
            },
            {
                path: "addFour",
                meta: {
                    title: "新增报告",
                    hide: true,
                    keepAlive: true,
                },
                component: () => import("../views/strainReportLibrary/reportLibraryOneFour/add.vue"),
            },
        ],
    },
    {
        path: "/deliveryAssessment",
        component: Layouts,
        meta: {
            title: "菌种报告评定",
        },
        children: [{
                path: "projectTeamIntegral",
                meta: {
                    title: "菌种项目组评定表",
                },
                component: () => import("../views/deliveryAssessment/projectTeamIntegral"),
            },
            {
                path: "projectTeamIntegral-detail",
                meta: {
                    title: "评定详情",
                    hide: true
                },
                component: () => import("../views/deliveryAssessment/projectTeamIntegral/detail.vue"),
            },
        ]
        component: () => import("../views/projectList/addProject"),
    }
    ]
},
{
    path: "/system",
    meta: {
        title: "系统管理",
    },
    component: Layouts,
    children: [{
        path: "user",
        name: "User",
        meta: {
            title: "人员管理",
        },
        component: () => import("../views/system/user"),
    },
    {
        path: "role",
        name: "Role",
        meta: {
            title: "角色管理",
        },
        component: () => import("../views/system/role"),
    },
    {
        path: "add-role",
        name: "AddRole",
        meta: {
            title: "新增角色",
            hide: true,
        },
        component: () => import("../views/system/role/add"),
    },
    {
        path: "edit-role",
        name: "EditRole",
        meta: {
            title: "编辑角色",
            hide: true,
        },
        component: () => import("../views/system/role/edit"),
    },
    {
        path: "detail-role",
        name: "DetailRole",
        meta: {
            title: "角色详情",
            hide: true,
        },
        component: () => import("../views/system/role/detail"),
    },
    {
        path: "operation-log",
        meta: {
            title: "操作日志",
        },
        component: () => import("../views/system/operation-log"),
    },
    ]
},
{
    path: "/strain",
    component: Layouts,
    meta: {
        title: "菌种库",
    },
    children: [{
        path: "/strain-library",
        component: Parent,
        meta: {
            title: "菌种库管理",
        },
        children: [{
            path: "strain-library-manage",
            name: "StrainLibraryManage",
            meta: {
                title: "原始细胞库",
                keepAlive: true,
            },
            component: () => import("../views/strain-library/strain-library-manage"),
        },
        {
            path: "strain-library-manage/add",
            name: "StrainLibraryManageAdd",
            meta: {
                title: "新增原始细胞库",
                keepAlive: true,
                hide: true
            },
            component: () => import("../views/strain-library/strain-library-manage/add.vue"),
        },
        {
            path: "strain-library-manage/record",
            name: "StrainRecord",
            meta: {
                title: "出入库记录",
                keepAlive: true,
                hide: true
            },
            component: () => import("../views/strain-library/strain-library-manage/record.vue"),
        },
        {
            path: "main-cell-library",
            name: "MainCellLibrary",
            meta: {
                title: "主细胞库",
                keepAlive: true,
            },
            component: () => import("../views/strain-library/main-cell-library"),
        },
        {
            path: "main-cell-library/add",
            name: "MainCellLibraryAdd",
            meta: {
                title: "新增主细胞",
                keepAlive: true,
                hide: true
            },
            component: () => import("../views/strain-library/main-cell-library/add.vue"),
        },
        {
            path: "production-cell-library",
            name: "ProductionCellLibrary",
            meta: {
                title: "生产细胞库",
                keepAlive: true,
            },
            component: () => import("../views/strain-library/production-cell-library"),
        },
        {
            path: "production-cell-library/add",
            name: "ProductionCellLibraryAdd",
            meta: {
                title: "新增生产细胞",
                keepAlive: true,
                hide: true
            },
            component: () => import("../views/strain-library/production-cell-library/add.vue"),
        },
        {
            path: "strain-flow-chart",
            name: "StrainFlowChart",
            meta: {
                title: "菌种传代产生流程图",
                keepAlive: true,
            },
            component: () => import("../views/strain-library/strain-flow-chart"),
        },
        ]
    },
    {
        path: 'pedigree-vhart',
        name: 'PedigreeChart',
        meta: {
            title: "菌种传代生产谱系图",
        },
        component: () => import("../views/pedigree-chart"),
    }
    ]
},
{
    path: "/dataManagement",
    component: Layouts,
    meta: {
        title: "实验室数据管理",
    },
    children: [{
        path: "approvalPlan",
        meta: {
            title: "项目课题方案审批",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/approvalPlan/list.vue"),
    },
    {
        path: "addPlan",
        name: "addPlan",
        meta: {
            title: "新增项目课题方案",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/approvalPlan/addPlan"),
    },
    {
        path: "dispatching",
        meta: {
            title: "实验调度管理",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/dispatching/list.vue"),
    },
    {
        path: "addDispatch",
        meta: {
            title: "新增实验调度",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/dispatching/addDispatch"),
    },
    {
        path: "confirmation-sheet",
        name: "ConfirmationSheet",
        meta: {
            title: "检验方法确认单",
        },
        component: () => import("../views/dataManagement/confirmation-sheet"),
    },
    {
        path: "confirmation-sheet/add",
        name: "AddConfirmationSheet",
        meta: {
            title: "检验方法确认单",
        },
        component: () => import("../views/dataManagement/confirmation-sheet/components/add.vue"),
    },
    {
        path: "/sampleManage",
        meta: {
            title: "样品管理",
            // keepAlive: true,
        },
        component: Parent,
        children: [{
            path: "manage",
            meta: {
                title: "样品管理",
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleManage/list.vue"),
        },
        {
            path: "addSample",
            name: "addPaddSamplelan",
            meta: {
                title: "新增样品",
                hide: true,
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleManage/addSample"),
        }, {
            path: "record",
            meta: {
                title: "取样操作记录列表",
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleRecordList/list.vue"),
        },
        {
            path: "changeRecord",
            name: "changeRecord",
            meta: {
                title: "填写取样操作记录",
                hide: true,
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleRecordList/changeRecord"),
        }, {
            path: "submissionList",
            meta: {
                title: "送样单列表",
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleSubmissionList/list.vue"),
        },
        {
            path: "submission",
            name: "submission",
            meta: {
                title: "送样单详情",
                hide: true,
                keepAlive: true,
            },
            component: () => import("../views/dataManagement/sampleSubmissionList/submission"),
        },
        ]
    },
    {
        path: "deliveryRecord",
        meta: {
            title: "取样送样记录",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/SampleDeliveryRecord/list.vue"),
    },
    {
        path: "delivery",
        name: "delivery",
        meta: {
            title: "送样详情",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/SampleDeliveryRecord/deliveryRecord"),
    },
    {
        path: "originalRecordTest",
        meta: {
            title: "原始检验记录",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/originalRecordTest/list.vue"),
    },
    {
        path: "originalRecordTest/detail",
        name: "OriginalRecordTestDetail",
        meta: {
            title: "原始检验记录详情",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/originalRecordTest/detail.vue"),
    },
    {
        path: "inspectionReport",
        meta: {
            title: "检验报告管理",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/inspectionReport/list.vue"),
    },
    {
        path: "inspectionReport/detail",
        name: "inspectionReportDetail",
        meta: {
            title: "检验报告详情",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/inspectionReport/detail.vue"),
    },
    {
        path: "testResultReport",
        meta: {
            title: "实验结果汇报",
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/testResultReport/list.vue"),
    },
    {
        path: "testResultReport/detail",
        name: "testResultReportDetail",
        meta: {
            title: "实验结果详情",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/dataManagement/testResultReport/detail.vue"),
    },
    ],
},
{
    path: "/reportLibrary",
    component: Layouts,
    meta: {
        title: "专业报告库审批",
    },
    children: [{
        path: "feasibilityStudy",
        meta: {
            title: "可研报告库",
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/feasibilityStudy/index.vue"),
    },
    {
        path: "add",
        meta: {
            title: "新增可行报告",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/feasibilityStudy/add.vue"),
    },
    {
        path: "feasibilityReport",
        meta: {
            title: "可行报告库",
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/feasibilityReport/index.vue"),
    },
    {
        path: "processDevelopment",
        meta: {
            title: "工艺开发工具",
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/processDevelopment/index.vue"),
    },
    {
        path: "verificationRelease",
        meta: {
            title: "验证与发布",
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/verificationRelease/index.vue"),
    },
    {
        path: "projectProposalLibrary",
        meta: {
            title: "立项报告库",
            keepAlive: true,
        },
        component: () => import("../views/reportLibrary/projectProposalLibrary/index.vue"),
    },
    ],
}, {
    path: "/strainReportLibrary",
    component: Layouts,
    meta: {
        title: "菌种报告库",
    },
    children: [{
        path: "reportLibraryOne",
        meta: {
            title: "报告库一",
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOne/index.vue"),
    },
    {
        path: "add",
        meta: {
            title: "新增报告",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOne/add.vue"),
    },
    {
        path: "reportLibraryTwo",
        meta: {
            title: "报告库二",
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/index.vue"),
    },
    {
        path: "addTwo",
        meta: {
            title: "新增报告",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneTWO/add.vue"),
    },
    {
        path: "reportLibraryThree",
        meta: {
            title: "报告库三",
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneThree/index.vue"),
    },
    {
        path: "addThree",
        meta: {
            title: "新增报告",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneThree/add.vue"),
    },
    {
        path: "reportLibraryFour",
        meta: {
            title: "报告库四",
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneFour/index.vue"),
    },
    {
        path: "addFour",
        meta: {
            title: "新增报告",
            hide: true,
            keepAlive: true,
        },
        component: () => import("../views/strainReportLibrary/reportLibraryOneFour/add.vue"),
    },
    ],
},
{
    path: "/deliveryAssessment",
    component: Layouts,
    meta: {
        title: "菌种报告评定",
    },
    children: [{
        path: "projectTeamIntegral",
        meta: {
            title: "菌种项目组评定表",
        },
        component: () => import("../views/deliveryAssessment/projectTeamIntegral"),
    },
    {
        path: "projectTeamIntegral-detail",
        meta: {
            title: "评定详情",
            hide: true
        },
        component: () => import("../views/deliveryAssessment/projectTeamIntegral/detail.vue"),
    },
    ]
}
];
const router = new VueRouter({
@@ -584,50 +584,50 @@
    document.title = to.meta.title || '实验室流程';
    // 登录验证
    // if (to.path === "/login") {
    //     sessionStorage.removeItem('userInfo')
    //     next()
    // } else if (!sessionStorage.getItem('userInfo')) {
    //     next('/login')
    // } else {
    //     // 判断是否拥有要跳转菜单权限
    //     let menus = store.state.menus
    //     if (to.meta.hasOwnProperty('privilege') && !menus.includes(to.meta.privilege)) {
    //         return
    //     }
    if (to.path === "/login") {
        sessionStorage.clear();
        next()
    } else if (!sessionStorage.getItem('token')) {
        next('/login')
    } else {
        // 判断是否拥有要跳转菜单权限
        let menus = store.state.menus
        if (to.meta.hasOwnProperty('privilege') && !menus.includes(to.meta.privilege)) {
            return
        }
    // 设置标签列表
    if (!to.meta.hide || !to.meta.oneself) {
        let tagList = JSON.parse(sessionStorage.getItem('tagList') || '[]')
        // 判断是否存在
        let isExist = tagList.some(item => item.path === to.path)
        if (!isExist) {
            // 只保存必要的信息
            const tagInfo = {
                path: to.path,
                name: to.name,
                meta: to.meta
        // 设置标签列表
        if (!to.meta.hide || !to.meta.oneself) {
            let tagList = JSON.parse(sessionStorage.getItem('tagList') || '[]')
            // 判断是否存在
            let isExist = tagList.some(item => item.path === to.path)
            if (!isExist) {
                // 只保存必要的信息
                const tagInfo = {
                    path: to.path,
                    name: to.name,
                    meta: to.meta
                }
                tagList.push(tagInfo)
                sessionStorage.setItem('tagList', JSON.stringify(tagList))
                store.commit('SET_TAGLIST', tagList)
            }
            tagList.push(tagInfo)
            sessionStorage.setItem('tagList', JSON.stringify(tagList))
            store.commit('SET_TAGLIST', tagList)
        }
    }
    // 判断是否需要缓存
    if (to.meta.keepAlive) {
        let keepAliveList = JSON.parse(sessionStorage.getItem('keepAliveList') || '[]')
        // 判断是否已经缓存
        let isExist = keepAliveList.includes(to.name)
        if (!isExist) {
            keepAliveList.push(to.name)
            sessionStorage.setItem('keepAliveList', JSON.stringify(keepAliveList))
            store.commit('SET_KEEPALIVELIST', keepAliveList)
        // 判断是否需要缓存
        if (to.meta.keepAlive) {
            let keepAliveList = JSON.parse(sessionStorage.getItem('keepAliveList') || '[]')
            // 判断是否已经缓存
            let isExist = keepAliveList.includes(to.name)
            if (!isExist) {
                keepAliveList.push(to.name)
                sessionStorage.setItem('keepAliveList', JSON.stringify(keepAliveList))
                store.commit('SET_KEEPALIVELIST', keepAliveList)
            }
        }
    }
    next()
    // }
        next()
    }
});
export default router;
culture/src/utils/baseurl.js
@@ -1,7 +1,7 @@
const apiConfig = {
    // 开发环境
    development: {
        baseURL: "",
        baseURL: "http://192.168.110.34:8081",
        imgUrl: "",
    },
    // 生产环境
culture/src/utils/encryption.js
New file
@@ -0,0 +1,34 @@
import axios from 'axios'
import apiConfig from './baseurl'
let encryptionKey = '2022lab02ora12to' // 默认密钥
// 从接口获取密钥
export const fetchEncryptionKey = async () => {
    try {
        const response = await axios.get(`${apiConfig.baseURL}/api/system/getEncryptionKey`)
        if (response.data && response.data.code === 200) {
            // 转换为Buffer并验证字节长度
            const keyBuffer = Buffer.from(response.data.data, 'utf-8')
            if (keyBuffer.length !== 16) {
                console.warn('无效密钥长度,使用默认密钥')
                return encryptionKey // 保持原有密钥
            }
            // 存储原始字符串和Buffer两种格式
            encryptionKey = response.data.data
            return encryptionKey
        }
    } catch (error) {
        console.error('获取加密密钥失败:', error)
    }
}
// 新增方法获取Buffer格式的密钥
export const getEncryptionKeyBuffer = () => {
    return Buffer.from(encryptionKey, 'utf-8')
}
// 获取当前密钥(保持字符串格式)
export const getEncryptionKey = () => encryptionKey
culture/src/utils/request.js
@@ -1,13 +1,10 @@
import axios from 'axios'
import apiConfig from './baseurl'
import {
  Message
} from 'element-ui'
import { Message } from 'element-ui'
import { encryptBySM4, decryptBySM4 } from './sm4'  // 添加decryptBySM4
const service = axios.create({
  baseURL: apiConfig.baseURL,
  // baseURL: apiConfig.baseURL,
  withCredentials: false, // 当跨域请求时发送cookie
  timeout: 30000, // request timeout
})
@@ -16,6 +13,10 @@
service.interceptors.request.use(
  config => {
    config['headers']['Authorization'] = `${sessionStorage.getItem('token')}`
    // 判断是否需要加密(只对/api开头的请求进行加密)
    const needEncrypt = config.url.startsWith('/api');
    if (config.method == 'get') {
      if (!config.params) config.params = {};
      config.params = {
@@ -24,8 +25,8 @@
    }
    if (config.method == 'post') {
      if (!config.data) config.data = {};
      config.data = {
        ...config.data,
      if (needEncrypt) {
        config.data = { param: encryptBySM4(config.data) };
      }
    }
    return config
@@ -42,11 +43,24 @@
      return
    }
    const res = response;
    // 新增解密处理:仅处理/api路径的POST响应
    if (res.config.method === 'post' && res.config.url.startsWith('/api')) {
      try {
        if (res.data && res.data.data) {
          // 这里假设使用decryptBySM4进行解密
          res.data.data = decryptBySM4(res.data.data);
        }
      } catch (e) {
        console.error('数据解密失败:', e);
      }
    }
    if (res.data.code == 200) {
      if (!res.data.data) {
      if (!res.data) {
        return Promise.resolve({})
      }
      return Promise.resolve(res.data.data)
      return Promise.resolve(res.data)
    } else {
      if (res.data.code == 103 || res.data.code == 401) {
        Message({
culture/src/utils/sm4.js
New file
@@ -0,0 +1,14 @@
import { sm4 } from 'sm-crypto';
import { getEncryptionKey, fetchEncryptionKey, getEncryptionKeyBuffer } from './encryption';
// SM4加密函数
export const encryptBySM4 = (data) => {
    const key = getEncryptionKeyBuffer(); // 获取当前密钥
    return sm4.encrypt(JSON.stringify(data), key);
};
// SM4解密函数
export const decryptBySM4 = (data) => {
    const key = getEncryptionKeyBuffer(); // 获取当前密钥
    return JSON.parse(sm4.decrypt(data, key));
};
culture/src/views/login/index.vue
@@ -11,7 +11,7 @@
      <div class="login-form">
        <div class="form-item flex">
          <img class="form-item-icon" :src="require('../../assets/login/account@2x.png')" alt="">
          <el-input v-model="loginForm.account" placeholder="请输入账号"></el-input>
          <el-input v-model="loginForm.username" placeholder="请输入账号"></el-input>
        </div>
        <div class="form-item flex mt-40">
@@ -28,6 +28,7 @@
  </div>
</template>
<script>
import { loginReq } from './service'
export default {
  name: 'Login',
  data() {
@@ -35,7 +36,7 @@
      windowWidth: window.innerWidth,
      loginForm: {
        account: '',
        username: '',
        password: ''
      },
      viewWidth: '',
@@ -78,8 +79,19 @@
      console.log(this.viewWidth)
    },
    login() {
      this.$router.push('/')
      console.log(this.loginForm)
      if (this.loginForm.username == '') {
        this.$message.warning('请输入账号')
        return
      }
      if (this.loginForm.password == '') {
        this.$message.warning('请输入密码')
        return
      }
      loginReq(this.loginForm).then(res => {
        sessionStorage.setItem('token', res.token)
        sessionStorage.setItem('userInfo', JSON.stringify(res.userInfo.user))
        this.$router.push('/')
      })
    }
  }
}
culture/src/views/login/service.js
@@ -1,6 +1,6 @@
import axios from '@/utils/request';
// 登录
export const login = (data) => {
export const loginReq = (data) => {
    return axios.post('/login', { ...data })
}
culture/src/views/projectList/index.vue
@@ -3,16 +3,16 @@
        <TableCustom :queryForm="queryForm" :tableData="tableData" :total="total" @currentChange="handleCurrentChange"
            @sizeChange="handleSizeChange">
            <template #search>
                <el-form :model="form" label-width="140px" inline>
                <el-form label-width="140px" inline>
                    <el-form-item label="项目组名称:">
                        <el-input v-model="form.name" placeholder="请输入"></el-input>
                        <el-input v-model="queryForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="项目负责人:">
                        <el-input v-model="form.name" placeholder="请输入"></el-input>
                        <el-input v-model="queryForm.name" placeholder="请输入"></el-input>
                    </el-form-item>
                    <el-form-item label="创建日期:">
                        <el-date-picker v-model="value1" 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">
@@ -54,13 +54,11 @@
</template>
<script>
import { getProjectList } from './service'
export default {
    name: 'ProjectList',
    data() {
        return {
            form: {
                name: ''
            },
            showDelConfirm: false,
            rowId: '',
            changeStatus: false,
@@ -73,6 +71,9 @@
            },
            total: 0
        }
    },
    created() {
        this.getList()
    },
    methods: {
        handleAddProject() {
@@ -113,7 +114,9 @@
            this.getList()
        },
        getList() {
            getProjectList(this.queryForm).then(res => {
                console.log(res);
            })
        }
    }
}
culture/src/views/projectList/service.js
New file
@@ -0,0 +1,6 @@
import axios from '@/utils/request';
// 列表
export const getProjectList = (data) => {
    return axios.post('/api/t-project-team/pageList', { ...data })
}
culture/vue.config.js
@@ -3,18 +3,18 @@
    return path.join(__dirname, dir)
}
module.exports = {
    outputDir: 'laboratory', // 配置打包后的文件夹名称
    outputDir: 'culture', // 配置打包后的文件夹名称
    lintOnSave: false,
    publicPath: '/',
    devServer: {
        disableHostCheck: true, //禁用主机检查 
        proxy: {
            "/api": { // 设置以什么前缀开头的请求用来代理
                target: "http://localhost:8080", //要访问的跨域的域名
                target: "http://192.168.110.34:8081", //要访问的跨域的域名
                secure: false, // 使用的是http协议则设置为false,https协议则设置为true
                changOrigin: true, //开启代理
                pathRewrite: {
                    "^/api": "",
                    "^/api": "/api",
                },
            },
        },