From e4b7845d0e3a67c01afc5a0c8a268fad898296fe Mon Sep 17 00:00:00 2001
From: zhouwx <1175765986@qq.com>
Date: Thu, 17 Apr 2025 14:04:03 +0800
Subject: [PATCH] 修改
---
.env.staging | 4
.env.development | 6
src/views/hazardousChemicals/accessRecords/index.vue | 13
src/layout/components/Sidebar/menu.js | 263 +++++-----------------------
src/views/hazardousChemicals/warehouseManage/index.vue | 20 +-
src/views/homePage.vue | 136 ++++----------
src/store/modules/user.js | 9
src/layout/components/Sidebar/Logo.vue | 24 +-
index.html | 2
package.json | 2
.env.production | 4
src/views/hazardousChemicals/electronicWarehouse/index.vue | 23 +-
12 files changed, 141 insertions(+), 365 deletions(-)
diff --git a/.env.development b/.env.development
index 855a986..7d8dc6d 100644
--- a/.env.development
+++ b/.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'
diff --git a/.env.production b/.env.production
index df2f8ee..5b35541 100644
--- a/.env.production
+++ b/.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/'
diff --git a/.env.staging b/.env.staging
index 8b08660..5484543 100644
--- a/.env.staging
+++ b/.env.staging
@@ -1,10 +1,10 @@
# 页面标题
-VITE_APP_TITLE = 危化品管理
+VITE_APP_TITLE = 危化品智慧管控平台
# 生产环境配置
VITE_APP_ENV = 'staging'
-# 危化品全生命周期管理/生产环境
+# 危化品智慧管控平台/生产环境
VITE_APP_BASE_API = '/stage-api'
# 是否在打包时开启压缩,支持 gzip 和 brotli
diff --git a/index.html b/index.html
index f763ad8..baba1fe 100644
--- a/index.html
+++ b/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,
diff --git a/package.json b/package.json
index 4c8d0be..dfdd5f0 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "ruoyi",
"version": "3.8.6",
- "description": "危化品全生命周期",
+ "description": "危化品智慧管控平台",
"author": "若依",
"license": "MIT",
"scripts": {
diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue
index ebaaa8a..ef99be2 100644
--- a/src/layout/components/Sidebar/Logo.vue
+++ b/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 {
- logoImg.value = logo
- }
- }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
- }
-
-
+ // }
});
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 {
diff --git a/src/layout/components/Sidebar/menu.js b/src/layout/components/Sidebar/menu.js
index cba7689..439cd80 100644
--- a/src/layout/components/Sidebar/menu.js
+++ b/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'}
- // } ,
]
},
],
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index 8461d2e..a4022f8 100644
--- a/src/store/modules/user.js
+++ b/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
diff --git a/src/views/hazardousChemicals/accessRecords/index.vue b/src/views/hazardousChemicals/accessRecords/index.vue
index 847b5ec..1b21ab8 100644
--- a/src/views/hazardousChemicals/accessRecords/index.vue
+++ b/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
- }
+ 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) =>{
diff --git a/src/views/hazardousChemicals/electronicWarehouse/index.vue b/src/views/hazardousChemicals/electronicWarehouse/index.vue
index e3f47ae..2237991 100644
--- a/src/views/hazardousChemicals/electronicWarehouse/index.vue
+++ b/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'
- }
+ showFinishPro.value = true
+ // 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(()=>{
diff --git a/src/views/hazardousChemicals/warehouseManage/index.vue b/src/views/hazardousChemicals/warehouseManage/index.vue
index 9d56cde..82176d0 100644
--- a/src/views/hazardousChemicals/warehouseManage/index.vue
+++ b/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{
- // data.activeName = showFinishPro.value ? 'finishPro' : 'rawMaterial'
- }
+ // }
+ // 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')
diff --git a/src/views/homePage.vue b/src/views/homePage.vue
index cb2c2a8..ff10ec5 100644
--- a/src/views/homePage.vue
+++ b/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 {
- sidebarRouters.value = menu.commonMenu
- }
- }else {
- // ElMessage.warning('请联系管理员完善企业配置')
+ if(userInfo.userType == 3){
sidebarRouters.value = menu.commonMenu
- }
- Cookies.set('routers',JSON.stringify(sidebarRouters.value))
+ 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.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
--
Gitblit v1.9.2