独墅湖高教创新区危化品智慧管控平台(新危化品)
zhouwx
2025-04-17 e4b7845d0e3a67c01afc5a0c8a268fad898296fe
修改
已修改12个文件
498 ■■■■ 文件已修改
.env.development 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.production 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.staging 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
index.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/Logo.vue 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/layout/components/Sidebar/menu.js 263 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/modules/user.js 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hazardousChemicals/accessRecords/index.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hazardousChemicals/electronicWarehouse/index.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/hazardousChemicals/warehouseManage/index.vue 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/homePage.vue 134 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.env.development
@@ -1,17 +1,17 @@
# 页面标题
VITE_APP_TITLE = 危化品管理
VITE_APP_TITLE = 危化品智慧管控平台
# 开发环境配置
VITE_APP_ENV = 'development'
# 危化品全生命周期管理/开发环境
# 危化品智慧管控平台/开发环境
#孔哥
#VITE_APP_BASE_API = 'http://192.168.2.15:8083/api'
VITE_APP_RESOURCE_API = 'http://192.168.2.16:9000/trainexam/'
#董
VITE_APP_BASE_API = 'http://192.168.2.24:8083/api'
VITE_APP_BASE_API = 'http://192.168.2.37:8083/api'
#贺
#VITE_APP_BASE_API = 'http://192.168.2.11:5812/api'
.env.production
@@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 危化品管理
VITE_APP_TITLE = 危化品智慧管控平台
# 生产环境配置
VITE_APP_ENV = 'production'
# 危化品全生命周期管理/生产环境
# 危化品智慧管控平台/生产环境
VITE_APP_BASE_API = '/api'
VITE_APP_RESOURCE_API = 'http://47.108.222.15:9000/trainexam/'
.env.staging
@@ -1,10 +1,10 @@
# 页面标题
VITE_APP_TITLE = 危化品管理
VITE_APP_TITLE = 危化品智慧管控平台
# 生产环境配置
VITE_APP_ENV = 'staging'
# 危化品全生命周期管理/生产环境
# 危化品智慧管控平台/生产环境
VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
index.html
@@ -7,7 +7,7 @@
  <meta name="renderer" content="webkit">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <link rel="icon" href="/favicon.ico">
  <title>危化品全生命周期</title>
  <title>危化品智慧管控平台</title>
  <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]-->
  <style>
    html,
package.json
@@ -1,7 +1,7 @@
{
  "name": "ruoyi",
  "version": "3.8.6",
  "description": "危化品全生命周期",
  "description": "危化品智慧管控平台",
  "author": "若依",
  "license": "MIT",
  "scripts": {
src/layout/components/Sidebar/Logo.vue
@@ -35,20 +35,16 @@
      firstPage.value = routers[0].path;
    }
  console.log(routers,'firstPage.value')
    console.log(firstPage.value,'firstPage.value')
    if(Cookies.get('configInfo')){
      const config = JSON.parse(Cookies.get('configInfo'))
      if(config && config.logoPath != ''){
        logoImg.value = import.meta.env.VITE_APP_BASE_API + "/" +  config.logoPath
      }else {
    // if(Cookies.get('configInfo')){
    //   const config = JSON.parse(Cookies.get('configInfo'))
    //   if(config && config.logoPath != ''){
    //     logoImg.value = import.meta.env.VITE_APP_BASE_API + "/" +  config.logoPath
    //   }else {
    //     logoImg.value = logo
    //   }
    // }else {
        logoImg.value = logo
      }
    }else {
      logoImg.value = logo
    }
    // }
});
const title = import.meta.env.VITE_APP_TITLE;
const settingsStore = useSettingsStore();
@@ -72,7 +68,7 @@
  line-height: 50px;
  background: #2b2f3a;
  //text-align: center;
  margin-left: 20%;
  margin-left: 8%;
  overflow: hidden;
  & .sidebar-logo-link {
src/layout/components/Sidebar/menu.js
@@ -1,45 +1,54 @@
import Layout from '@/layout'
const menu = {
    adminMenu: [
        // {
        //     path: '/homePageIndex',
        //     redirect: '/homePageIndex',
        //     meta: { title: '首页',icon: 'server'},
        //     children: [
        //
        //         {
        //             path: 'homePageIndex',
        //             name: 'homePageIndex',
        //             meta: { title: '工作台',icon: 'server'}
        //         } ,
        //     ]
        // },
        // {
        //     path: '/warehouseManage',
        //     name: 'warehouseManage',
        //     meta: { title: '入库管理',icon: 'form',affix: true }
        // },
        //
        // {
        //     path: '/electronicWarehouse',
        //     name: 'electronicWarehouse',
        //     meta: { title: '电子仓库',icon: 'build',affix: true }
        // },
        // {
        //     path: '/accessRecords',
        //     name: 'accessRecords',
        //     meta: { title: '取用记录',icon: 'job',affix: true }
        // },
        // {
        //     path: '/traceableQuery',
        //     name: 'traceableQuery',
        //     meta: { title: '溯源查询',icon: 'log',affix: true }
        // },
        // {
        //     path: '/overdueWarning',
        //     name: 'overdueWarning',
        //     meta: { title: '超期预警',icon: 'peoples',affix: true }
        // },
    commonMenu: [
        {
            path: '/homePageIndex',
            redirect: '/homePageIndex',
            meta: { title: '首页',icon: 'server'},
            children: [
                {
                    path: 'homePageIndex',
                    name: 'homePageIndex',
                    meta: { title: '工作台',icon: 'server'}
                } ,
            ]
        },
        {
            path: '/warehouseManage',
            name: 'warehouseManage',
            meta: { title: '入库管理',icon: 'warehousing',affix: true }
        },
        {
            path: '/electronicWarehouse',
            name: 'electronicWarehouse',
            meta: { title: '电子仓库',icon: 'build',affix: true }
        },
        {
            path: '/useCount',
            name: 'useCount',
            meta: { title: '用量统计',icon: 'analysis',affix: true }
        },
        {
            path: '/accessRecords',
            name: 'accessRecords',
            meta: { title: '取用记录',icon: 'job',affix: true }
        },
        {
            path: '/traceableQuery',
            name: 'traceableQuery',
            meta: { title: '溯源查询',icon: 'log',affix: true }
        },
        {
            path: '/overdueWarning',
            name: 'overdueWarning',
            meta: { title: '超期预警',icon: 'alarm',affix: true }
        },
        {
            path: '/avoidWarning',
            name: 'avoidWarning',
            meta: { title: '危化品相忌报警',icon: 'caution',affix: true }
        },
        {
            path: '/basicInfo',
            name: 'basicInfo',
@@ -82,190 +91,16 @@
                    name: 'user',
                    meta: { title: '用户管理',icon: 'peoples'}
                } ,
            ]
        },
    ],
    companyMenu: [
        {
            path: '/homePageIndex',
            redirect: '/homePageIndex',
            meta: { title: '首页',icon: 'server'},
            children: [
                {
                    path: 'homePageIndex',
                    name: 'homePageIndex',
                    meta: { title: '工作台',icon: 'server'}
                } ,
            ]
        },
        {
            path: '/warehouseManage',
            name: 'warehouseManage',
            meta: { title: '入库管理',icon: 'warehousing',affix: true }
        },
        {
            path: '/electronicWarehouse',
            name: 'electronicWarehouse',
            meta: { title: '电子仓库',icon: 'build',affix: true }
        },
        {
            path: '/useCount',
            name: 'useCount',
            meta: { title: '用量统计',icon: 'analysis',affix: true }
        },
        // {
        //     path: '/detailList',
        //     name: 'detailList',
        //     meta: { title: '危化品详单',icon: 'education',affix: true }
        // },
        {
            path: '/accessRecords',
            name: 'accessRecords',
            meta: { title: '取用记录',icon: 'job',affix: true }
        },
        {
            path: '/traceableQuery',
            name: 'traceableQuery',
            meta: { title: '溯源查询',icon: 'log',affix: true }
        },
        {
            path: '/overdueWarning',
            name: 'overdueWarning',
            meta: { title: '超期预警',icon: 'alarm',affix: true }
        },
        {
            path: '/avoidWarning',
            name: 'avoidWarning',
            meta: { title: '危化品相忌报警',icon: 'caution',affix: true }
        },
        {
            path: '/basicInfo',
            name: 'basicInfo',
            meta: { title: '危化品基础信息',icon: 'monitor',affix: true }
        },
        {
            path: '/finishedBasicInfo',
            name: 'finishedBasicInfo',
            meta: { title: '成品基础信息',icon: 'monitor',affix: true }
        },
        {
            path: '/systemManage',
            redirect: '/systemManage/warehouse',
            meta: { title: '系统管理',icon: 'dict'},
            children: [
                {
                    path: 'warehouse',
                    name: 'warehouse',
                    meta: { title: '仓库管理',icon: 'form'}
                } ,
                // {
                //     path: 'company',
                //     name: 'company',
                //     meta: { title: '企业管理',icon: 'form'}
                // } ,
                {
                    path: 'user',
                    name: 'user',
                    meta: { title: '用户管理',icon: 'list'}
                } ,
                {
                    path: 'department',
                    name: 'department',
                    meta: { title: '部门管理',icon: 'logininfor'}
                } ,
            ]
        },
    ],
    commonMenu: [
        {
            path: '/homePageIndex',
            redirect: '/homePageIndex',
            meta: { title: '首页',icon: 'server'},
            children: [
                {
                    path: 'homePageIndex',
                    name: 'homePageIndex',
                    meta: { title: '工作台',icon: 'server'}
                } ,
            ]
        },
        {
            path: '/warehouseManage',
            name: 'warehouseManage',
            meta: { title: '入库管理',icon: 'warehousing',affix: true }
        },
        {
            path: '/electronicWarehouse',
            name: 'electronicWarehouse',
            meta: { title: '电子仓库',icon: 'build',affix: true }
        },
        {
            path: '/useCount',
            name: 'useCount',
            meta: { title: '用量统计',icon: 'analysis',affix: true }
        },
        // {
        //     path: '/detailList',
        //     name: 'detailList',
        //     meta: { title: '危化品详单',icon: 'education',affix: true }
        // },
        {
            path: '/accessRecords',
            name: 'accessRecords',
            meta: { title: '取用记录',icon: 'job',affix: true }
        },
        {
            path: '/traceableQuery',
            name: 'traceableQuery',
            meta: { title: '溯源查询',icon: 'log',affix: true }
        },
        {
            path: '/overdueWarning',
            name: 'overdueWarning',
            meta: { title: '超期预警',icon: 'alarm',affix: true }
        },
        {
            path: '/avoidWarning',
            name: 'avoidWarning',
            meta: { title: '危化品相忌报警',icon: 'caution',affix: true }
        },
        {
            path: '/basicInfo',
            name: 'basicInfo',
            meta: { title: '危化品基础信息',icon: 'monitor',affix: true }
        },
        {
            path: '/finishedBasicInfo',
            name: 'finishedBasicInfo',
            meta: { title: '成品基础信息',icon: 'monitor',affix: true }
        },
        {
            path: '/systemManage',
            redirect: '/systemManage/warehouse',
            meta: { title: '系统管理',icon: 'dict'},
            children: [
                {
                    path: 'warehouse',
                    name: 'warehouse',
                    meta: { title: '仓库管理',icon: 'form'}
                } ,
                // {
                //     path: 'company',
                //     name: 'company',
                //     meta: { title: '企业管理',icon: 'form'}
                // } ,
                // {
                //     path: 'user',
                //     name: 'user',
                //     meta: { title: '用户管理',icon: 'list'}
                // } ,
                // {
                //     path: 'department',
                //     name: 'department',
                //     meta: { title: '部门管理',icon: 'logininfor'}
                // } ,
            ]
        },
    ],
src/store/modules/user.js
@@ -32,10 +32,11 @@
                Cookies.set('userInfo',JSON.stringify(info.data))
              }
              if(info.data.userType != 0){
                const con = await getConfigById(res.data.companyId);
                if(con.code === 200){
                  Cookies.set('configInfo',JSON.stringify(con.data))
                }
                Cookies.set('configInfo',{})
                // const con = await getConfigById(res.data.companyId);
                // if(con.code === 200){
                //   Cookies.set('configInfo',JSON.stringify(con.data))
                // }
              }
            }
            this.token = res.data.token
src/views/hazardousChemicals/accessRecords/index.vue
@@ -31,12 +31,13 @@
})
onMounted(()=>{
  const config = JSON.parse(Cookies.get('configInfo'))
  if(config){
    showFinishPro.value = config.useProd === 1;
  }else {
    showFinishPro.value = true
  }
  // const config = JSON.parse(Cookies.get('configInfo'))
  // if(config){
  //   showFinishPro.value = config.useProd === 1;
  // }else {
  //   showFinishPro.value = true
  // }
  // data.activeName = showFinishPro.value ? 'finishPro' : 'rawMaterial'
})
const clickTab = (tab,event) =>{
src/views/hazardousChemicals/electronicWarehouse/index.vue
@@ -30,17 +30,18 @@
})
onMounted(()=>{
  const config = JSON.parse(Cookies.get('configInfo'))
  if(config){
    showFinishPro.value = config.useProd === 1;
  }else {
    showFinishPro.value = true
  }
  if(Cookies.get('type')){
    data.activeName = showFinishPro.value && Cookies.get('type') ==='pro' ? 'finishPro' : 'rawMaterial'
  }else{
    // data.activeName = showFinishPro.value ? 'finishPro' : 'rawMaterial'
  }
  // const config = JSON.parse(Cookies.get('configInfo'))
  // if(config){
  //   showFinishPro.value = config.useProd === 1;
  // }else {
  //   showFinishPro.value = true
  // }
  // if(Cookies.get('type')){
  //   data.activeName = showFinishPro.value && Cookies.get('type') ==='pro' ? 'finishPro' : 'rawMaterial'
  // }else{
  //   // data.activeName = showFinishPro.value ? 'finishPro' : 'rawMaterial'
  // }
})
onUnmounted(()=>{
src/views/hazardousChemicals/warehouseManage/index.vue
@@ -30,17 +30,17 @@
})
onMounted(()=>{
  const config = JSON.parse(Cookies.get('configInfo'))
  if(config){
    showFinishPro.value = config.useProd === 1;
  }else {
  // const config = JSON.parse(Cookies.get('configInfo'))
  // if(config){
  //   showFinishPro.value = config.useProd === 1;
  // }else {
    showFinishPro.value = true
  }
  if(Cookies.get('typeWh')){
    data.activeName = showFinishPro.value && Cookies.get('typeWh') ==='pro' ? 'finishPro' : 'rawMaterial'
  }else{
  // }
  // if(Cookies.get('typeWh')){
  //   data.activeName = showFinishPro.value && Cookies.get('typeWh') ==='pro' ? 'finishPro' : 'rawMaterial'
  // }else{
    // data.activeName = showFinishPro.value ? 'finishPro' : 'rawMaterial'
  }
  // }
})
onUnmounted(()=>{
  Cookies.remove('typeWh')
src/views/homePage.vue
@@ -1,12 +1,6 @@
<template>
  <div class="login">
    <div class="title">
<!--      <div class="logo">-->
<!--        <img class="pics2" :src="logoPng">-->
<!--        <span style="font-size: 40px;color: black"></span>-->
<!--        <div style="width: 2px;height: 40px;background-color: #1C68A7;margin-top: 5px;margin-left: 15px;margin-right: 15px"></div>-->
<!--        <span style="font-size: 28px;color: white">危化品全生命周期管理系统</span>-->
<!--      </div>-->
      <div class="content">
        <div class="imgBox">
          <div class="imG">
@@ -14,7 +8,7 @@
          </div>
        </div>
        <div class="formBox">
          <div class="loginTitle">危化品全生命周期<br/>管理系统</div>
          <div class="loginTitle">独墅湖高教创新区<br/>危化品智慧管控平台</div>
          <div style="padding: 25px 0;">
            <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">
              <el-form-item>
@@ -88,66 +82,6 @@
    <div class="el-login-footer">
      <span>Copyright ©2024-{{nowYear}} All Rights Reserved.</span>
    </div>
<!--    <img class="pics1" :src="dataPng">-->
<!--    <img class="pics2" :src="searchPng">-->
<!--    <div class="login-panel">-->
<!--      <el-form ref="loginRef" :model="loginForm" :rules="loginRules" class="login-form">-->
<!--        <h3 class="title">安全在线教育平台</h3>-->
<!--        <el-form-item prop="username">-->
<!--          <el-input-->
<!--              v-model="loginForm.username"-->
<!--              type="text"-->
<!--              size="large"-->
<!--              auto-complete="off"-->
<!--              placeholder="账号"-->
<!--          >-->
<!--            <template #prefix><svg-icon icon-class="user" class="el-input__icon input-icon" /></template>-->
<!--          </el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item prop="password">-->
<!--          <el-input-->
<!--              v-model="loginForm.password"-->
<!--              type="password"-->
<!--              size="large"-->
<!--              auto-complete="off"-->
<!--              placeholder="密码"-->
<!--              @keyup.enter="handleLogin"-->
<!--              show-password-->
<!--          >-->
<!--            <template #prefix><svg-icon icon-class="password" class="el-input__icon input-icon" /></template>-->
<!--          </el-input>-->
<!--        </el-form-item>-->
<!--        <el-form-item prop="code" v-if="captchaEnabled">-->
<!--          <el-input-->
<!--              v-model="loginForm.code"-->
<!--              size="large"-->
<!--              auto-complete="off"-->
<!--              placeholder="验证码"-->
<!--              style="width: 63%"-->
<!--              @keyup.enter="handleLogin"-->
<!--          >-->
<!--            <template #prefix><svg-icon icon-class="validCode" class="el-input__icon input-icon" /></template>-->
<!--          </el-input>-->
<!--          <div class="login-code">-->
<!--            <img :src="codeUrl" @click="getCode" class="login-code-img"/>-->
<!--          </div>-->
<!--        </el-form-item>-->
<!--        <el-form-item style="width:100%;">-->
<!--          <el-button-->
<!--              :loading="loading"-->
<!--              size="large"-->
<!--              type="primary"-->
<!--              style="width:100%;"-->
<!--              @click.prevent="handleLogin"-->
<!--          >-->
<!--            <span v-if="!loading">登 录</span>-->
<!--            <span v-else>登 录 中...</span>-->
<!--          </el-button>-->
<!--        </el-form-item>-->
<!--      </el-form>-->
<!--    </div>-->
  </div>
</template>
@@ -262,38 +196,46 @@
        //   Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        // }
        const userInfo = JSON.parse(Cookies.get('userInfo'))
        if(userInfo.userType === 0) {
          sidebarRouters.value =  menu.adminMenu
          Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        }else if(userInfo.userType === 1){
          const config = JSON.parse(Cookies.get('configInfo'))
          if(config){
            if(config.useProd === 0){
              sidebarRouters.value =  menu.companyMenu.filter(item => item.path != '/finishedBasicInfo')
            }else {
              sidebarRouters.value =  menu.companyMenu
            }
          }else {
            ElMessage.warning('请联系管理员完善企业配置')
            sidebarRouters.value =  menu.companyMenu
          }
          Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        }else if(userInfo.userType === 2){
          const config = JSON.parse(Cookies.get('configInfo'))
          if(config){
            if(config.useProd === 0){
              sidebarRouters.value =  menu.commonMenu.filter(item => item.path != '/finishedBasicInfo')
            }else {
        if(userInfo.userType == 3){
              sidebarRouters.value =  menu.commonMenu
            }
            Cookies.set('routers',JSON.stringify(sidebarRouters.value))
          }else {
          ElMessage.warning('仅限监管部门账号登录')
          loading.value = false
          return
        }
        // if(userInfo.userType === 0) {
        //   sidebarRouters.value =  menu.adminMenu
        //   Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        // }else if(userInfo.userType === 1){
        //   const config = JSON.parse(Cookies.get('configInfo'))
        //   if(config){
        //     if(config.useProd === 0){
        //       sidebarRouters.value =  menu.companyMenu.filter(item => item.path != '/finishedBasicInfo')
        //     }else {
        //       sidebarRouters.value =  menu.companyMenu
        //
        //     }
        //   }else {
            // ElMessage.warning('请联系管理员完善企业配置')
            sidebarRouters.value =  menu.commonMenu
          }
          Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        }
        //     sidebarRouters.value =  menu.companyMenu
        //   }
        //   Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        // }else if(userInfo.userType === 2){
        //   const config = JSON.parse(Cookies.get('configInfo'))
        //   if(config){
        //     if(config.useProd === 0){
        //       sidebarRouters.value =  menu.commonMenu.filter(item => item.path != '/finishedBasicInfo')
        //     }else {
        //       sidebarRouters.value =  menu.commonMenu
        //     }
        //   }else {
        //     // ElMessage.warning('请联系管理员完善企业配置')
        //     sidebarRouters.value =  menu.commonMenu
        //   }
        //   Cookies.set('routers',JSON.stringify(sidebarRouters.value))
        // }
        let path = ""
        if(sidebarRouters.value[0].children && sidebarRouters.value[0].children.length > 0){
          path = sidebarRouters.value[0].path + '/'+ sidebarRouters.value[0].children[0].path