Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
02c301f527
BIN
god-ui/public/images/cjcx.png
Normal file
BIN
god-ui/public/images/cjcx.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.8 MiB |
@ -1,5 +1,11 @@
|
||||
<template>
|
||||
<div class="sidebar-logo-container" :class="{'collapse':collapse}" :style="{ backgroundColor: sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<div
|
||||
class="sidebar-logo-container"
|
||||
:class="{'collapse':collapse}"
|
||||
:style="{
|
||||
backgroundColor: sideTheme === 'theme-dark' ? CJCXBgColor : variables.menuLightBackground
|
||||
}"
|
||||
>
|
||||
<transition name="sidebarLogoFade">
|
||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
@ -7,7 +13,12 @@
|
||||
</router-link>
|
||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||
<h1 class="sidebar-title" :style="{ color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor }">{{ title }} </h1>
|
||||
<h1
|
||||
class="sidebar-title"
|
||||
:style="{
|
||||
color: sideTheme === 'theme-dark' ? variables.logoTitleColor : variables.logoLightTitleColor
|
||||
}"
|
||||
>{{ title }}</h1>
|
||||
</router-link>
|
||||
</transition>
|
||||
</div>
|
||||
@ -31,6 +42,9 @@ export default {
|
||||
},
|
||||
sideTheme() {
|
||||
return this.$store.state.settings.sideTheme
|
||||
},
|
||||
CJCXBgColor() {
|
||||
return this.isCJCXPro ? '#003e92' : this.variables.menuBackground
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -152,6 +166,10 @@ export default {
|
||||
this.title = '工业视觉平台'
|
||||
document.title = '工业视觉平台'
|
||||
break;
|
||||
case '9408':
|
||||
this.title = '车间产线出入库管理系统'
|
||||
document.title = '车间产线出入库管理系统'
|
||||
break;
|
||||
default:
|
||||
|
||||
this.title = ' '
|
||||
@ -162,7 +180,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
title: process.env.VUE_APP_TITLE,
|
||||
logo: ''
|
||||
logo: '',
|
||||
isCJCXPro: window.location.port === '9408'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,7 +2,10 @@
|
||||
<div v-if="!item.hidden">
|
||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
||||
<app-link v-if="onlyOneChild.meta" :to="resolvePath(onlyOneChild.path, onlyOneChild.query)">
|
||||
<el-menu-item :index="resolvePath(onlyOneChild.path)" :class="{'submenu-title-noDropdown':!isNest}">
|
||||
<el-menu-item
|
||||
:index="resolvePath(onlyOneChild.path)"
|
||||
:class="{ 'submenu-title-noDropdown': !isNest }"
|
||||
>
|
||||
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||
</el-menu-item>
|
||||
</app-link>
|
||||
@ -18,7 +21,6 @@
|
||||
:is-nest="true"
|
||||
:item="child"
|
||||
:base-path="resolvePath(child.path)"
|
||||
class="nest-menu"
|
||||
/>
|
||||
</el-submenu>
|
||||
</div>
|
||||
@ -50,9 +52,16 @@ export default {
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
CJCXBgColor() {
|
||||
return this.isCJCXPro ? 'cjcx-bg' : ''
|
||||
}
|
||||
},
|
||||
data() {
|
||||
this.onlyOneChild = null
|
||||
return {}
|
||||
return {
|
||||
isCJCXPro: window.location.port === '9408'
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
hasOneShowingChild(children = [], parent) {
|
||||
@ -98,3 +107,8 @@ export default {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.cjcx-bg {
|
||||
background-color: #003e92 !important;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,11 +1,16 @@
|
||||
<template>
|
||||
<div :class="{'has-logo':showLogo}" :style="{ backgroundColor: settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground }">
|
||||
<div
|
||||
:class="{'has-logo':showLogo}"
|
||||
:style="{
|
||||
backgroundColor: settings.sideTheme === 'theme-dark' ? CJCXBgColor : variables.menuLightBackground
|
||||
}"
|
||||
>
|
||||
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||
<el-menu
|
||||
:default-active="activeMenu"
|
||||
:collapse="isCollapse"
|
||||
:background-color="settings.sideTheme === 'theme-dark' ? variables.menuBackground : variables.menuLightBackground"
|
||||
:background-color="settings.sideTheme === 'theme-dark' ? CJCXBgColor : variables.menuLightBackground"
|
||||
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
||||
:unique-opened="true"
|
||||
:active-text-color="settings.theme"
|
||||
@ -31,6 +36,22 @@ import variables from "@/assets/styles/variables.scss";
|
||||
|
||||
export default {
|
||||
components: { SidebarItem, Logo },
|
||||
data() {
|
||||
return {
|
||||
isCJCXPro: window.location.port === '9408'
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const val = true
|
||||
this.$store.dispatch('settings/changeSetting', {
|
||||
key: 'topNav',
|
||||
value: val
|
||||
})
|
||||
if (!val) {
|
||||
this.$store.dispatch('app/toggleSideBarHide', false);
|
||||
this.$store.commit("SET_SIDEBAR_ROUTERS", this.$store.state.permission.defaultRoutes);
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState(["settings"]),
|
||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
||||
@ -51,6 +72,9 @@ export default {
|
||||
},
|
||||
isCollapse() {
|
||||
return !this.sidebar.opened;
|
||||
},
|
||||
CJCXBgColor() {
|
||||
return this.isCJCXPro ? '#003e92' : this.variables.menuBackground
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -23,6 +23,7 @@
|
||||
<cdapChart v-else-if="port === '9404'" />
|
||||
<interface-home v-else-if="port === '9406'" />
|
||||
<machine v-else-if="port === '9407'" />
|
||||
<interface-home v-else-if="port === '9408'" />
|
||||
<operate-home v-else-if="port === '80' || port === ''"></operate-home>
|
||||
<home-page v-else></home-page>
|
||||
</div>
|
||||
|
@ -71,7 +71,7 @@ export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
title: '欢迎登录',
|
||||
codeUrl: "",
|
||||
loginForm: {
|
||||
username: "",
|
||||
@ -117,6 +117,7 @@ export default {
|
||||
handlePort() {
|
||||
// 根据端口号动态修改登录页样式
|
||||
let port = window.location.port;
|
||||
console.log("PORT", port);
|
||||
const loginDom = document.getElementById('loginDom');
|
||||
switch (port) {
|
||||
case '9130':
|
||||
@ -295,6 +296,27 @@ export default {
|
||||
const dom31 = document.querySelector('.login-form')
|
||||
dom31.style.marginLeft = '64vw'
|
||||
break;
|
||||
case '9408':
|
||||
document.title = '车间产线出入库管理系统'
|
||||
loginDom.style.backgroundImage = 'url(/images/cjcx.png)'
|
||||
this.redirect = '/index'
|
||||
const dom311 = document.querySelector('.login-form')
|
||||
dom311.style.marginLeft = '39vw'
|
||||
const _title1 = document.createElement('div');
|
||||
_title1.innerHTML = '车间产线出入库管理系统';
|
||||
_title1.style.position = 'fixed';
|
||||
_title1.style.width = '33rem';
|
||||
_title1.style.left = '3vw';
|
||||
_title1.style.top = '4vh'
|
||||
_title1.style.color = 'transparent'
|
||||
_title1.style.textAlign = 'center'
|
||||
_title1.style.fontSize = '3rem'
|
||||
_title1.style.backgroundImage = 'linear-gradient(to top, #1890ff, #1890ff80)'
|
||||
_title1.style.webkitBackgroundClip = 'text'
|
||||
|
||||
_title1.style.fontFamily = 'BiaoTiFont'
|
||||
loginDom.appendChild(_title1)
|
||||
break;
|
||||
default:
|
||||
document.title = ''
|
||||
loginDom.style.backgroundImage = 'url(/images/gangyin-bg.png)'
|
||||
|
Loading…
Reference in New Issue
Block a user