Compare commits
3 Commits
fa36f03d20
...
0f6c1724be
Author | SHA1 | Date | |
---|---|---|---|
0f6c1724be | |||
1eefd8299d | |||
97621d8a18 |
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>
|
<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">
|
<transition name="sidebarLogoFade">
|
||||||
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
<router-link v-if="collapse" key="collapse" class="sidebar-logo-link" to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
||||||
@ -7,7 +13,12 @@
|
|||||||
</router-link>
|
</router-link>
|
||||||
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
|
||||||
<img v-if="logo" :src="logo" class="sidebar-logo" />
|
<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>
|
</router-link>
|
||||||
</transition>
|
</transition>
|
||||||
</div>
|
</div>
|
||||||
@ -31,6 +42,9 @@ export default {
|
|||||||
},
|
},
|
||||||
sideTheme() {
|
sideTheme() {
|
||||||
return this.$store.state.settings.sideTheme
|
return this.$store.state.settings.sideTheme
|
||||||
|
},
|
||||||
|
CJCXBgColor() {
|
||||||
|
return this.isCJCXPro ? '#003e92' : this.variables.menuBackground
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -152,6 +166,10 @@ export default {
|
|||||||
this.title = '工业视觉平台'
|
this.title = '工业视觉平台'
|
||||||
document.title = '工业视觉平台'
|
document.title = '工业视觉平台'
|
||||||
break;
|
break;
|
||||||
|
case '9408':
|
||||||
|
this.title = '车间产线出入库管理系统'
|
||||||
|
document.title = '车间产线出入库管理系统'
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
||||||
this.title = ' '
|
this.title = ' '
|
||||||
@ -162,7 +180,8 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: process.env.VUE_APP_TITLE,
|
title: process.env.VUE_APP_TITLE,
|
||||||
logo: ''
|
logo: '',
|
||||||
|
isCJCXPro: window.location.port === '9408'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,10 @@
|
|||||||
<div v-if="!item.hidden">
|
<div v-if="!item.hidden">
|
||||||
<template v-if="hasOneShowingChild(item.children,item) && (!onlyOneChild.children||onlyOneChild.noShowingChildren)&&!item.alwaysShow">
|
<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)">
|
<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" />
|
<item :icon="onlyOneChild.meta.icon||(item.meta&&item.meta.icon)" :title="onlyOneChild.meta.title" />
|
||||||
</el-menu-item>
|
</el-menu-item>
|
||||||
</app-link>
|
</app-link>
|
||||||
@ -18,7 +21,6 @@
|
|||||||
:is-nest="true"
|
:is-nest="true"
|
||||||
:item="child"
|
:item="child"
|
||||||
:base-path="resolvePath(child.path)"
|
:base-path="resolvePath(child.path)"
|
||||||
class="nest-menu"
|
|
||||||
/>
|
/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</div>
|
</div>
|
||||||
@ -50,9 +52,16 @@ export default {
|
|||||||
default: ''
|
default: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
computed: {
|
||||||
|
CJCXBgColor() {
|
||||||
|
return this.isCJCXPro ? 'cjcx-bg' : ''
|
||||||
|
}
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
this.onlyOneChild = null
|
this.onlyOneChild = null
|
||||||
return {}
|
return {
|
||||||
|
isCJCXPro: window.location.port === '9408'
|
||||||
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
hasOneShowingChild(children = [], parent) {
|
hasOneShowingChild(children = [], parent) {
|
||||||
@ -98,3 +107,8 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<style>
|
||||||
|
.cjcx-bg {
|
||||||
|
background-color: #003e92 !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
@ -1,11 +1,16 @@
|
|||||||
<template>
|
<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" />
|
<logo v-if="showLogo" :collapse="isCollapse" />
|
||||||
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
|
||||||
<el-menu
|
<el-menu
|
||||||
:default-active="activeMenu"
|
:default-active="activeMenu"
|
||||||
:collapse="isCollapse"
|
: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"
|
:text-color="settings.sideTheme === 'theme-dark' ? variables.menuColor : variables.menuLightColor"
|
||||||
:unique-opened="true"
|
:unique-opened="true"
|
||||||
:active-text-color="settings.theme"
|
:active-text-color="settings.theme"
|
||||||
@ -31,6 +36,22 @@ import variables from "@/assets/styles/variables.scss";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: { SidebarItem, Logo },
|
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: {
|
computed: {
|
||||||
...mapState(["settings"]),
|
...mapState(["settings"]),
|
||||||
...mapGetters(["sidebarRouters", "sidebar"]),
|
...mapGetters(["sidebarRouters", "sidebar"]),
|
||||||
@ -51,6 +72,9 @@ export default {
|
|||||||
},
|
},
|
||||||
isCollapse() {
|
isCollapse() {
|
||||||
return !this.sidebar.opened;
|
return !this.sidebar.opened;
|
||||||
|
},
|
||||||
|
CJCXBgColor() {
|
||||||
|
return this.isCJCXPro ? '#003e92' : this.variables.menuBackground
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
<cdapChart v-else-if="port === '9404'" />
|
<cdapChart v-else-if="port === '9404'" />
|
||||||
<interface-home v-else-if="port === '9406'" />
|
<interface-home v-else-if="port === '9406'" />
|
||||||
<machine v-else-if="port === '9407'" />
|
<machine v-else-if="port === '9407'" />
|
||||||
|
<interface-home v-else-if="port === '9408'" />
|
||||||
<operate-home v-else-if="port === '80' || port === ''"></operate-home>
|
<operate-home v-else-if="port === '80' || port === ''"></operate-home>
|
||||||
<workshop v-else-if="port === '9408'"></workshop>
|
<workshop v-else-if="port === '9408'"></workshop>
|
||||||
<home-page v-else></home-page>
|
<home-page v-else></home-page>
|
||||||
|
@ -71,7 +71,7 @@ export default {
|
|||||||
name: "Login",
|
name: "Login",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '欢迎登录',
|
||||||
codeUrl: "",
|
codeUrl: "",
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: "",
|
username: "",
|
||||||
@ -117,6 +117,7 @@ export default {
|
|||||||
handlePort() {
|
handlePort() {
|
||||||
// 根据端口号动态修改登录页样式
|
// 根据端口号动态修改登录页样式
|
||||||
let port = window.location.port;
|
let port = window.location.port;
|
||||||
|
console.log("PORT", port);
|
||||||
const loginDom = document.getElementById('loginDom');
|
const loginDom = document.getElementById('loginDom');
|
||||||
switch (port) {
|
switch (port) {
|
||||||
case '9130':
|
case '9130':
|
||||||
@ -295,6 +296,27 @@ export default {
|
|||||||
const dom31 = document.querySelector('.login-form')
|
const dom31 = document.querySelector('.login-form')
|
||||||
dom31.style.marginLeft = '64vw'
|
dom31.style.marginLeft = '64vw'
|
||||||
break;
|
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:
|
default:
|
||||||
document.title = ''
|
document.title = ''
|
||||||
loginDom.style.backgroundImage = 'url(/images/gangyin-bg.png)'
|
loginDom.style.backgroundImage = 'url(/images/gangyin-bg.png)'
|
||||||
|
Loading…
Reference in New Issue
Block a user