diff --git a/.env.development b/.env.development index e2a61260..77023c95 100644 --- a/.env.development +++ b/.env.development @@ -1,6 +1,22 @@ # 开发环境配置 ENV = 'development' +# logo +VUE_APP_LGOG_URL = 'logo/drgy/logo.png' +/** + * 蓝白色登录页需要一个banner图(VUE_APP_BANNER_URL)和一个168像素的logo(VUE_APP_LGOG168_URL) + */ +# logo +VUE_APP_LGOG168_URL = 'logo/drgy/logo168.png' +# banner +VUE_APP_BANNER_URL = 'logo/drgy/banner.png' +# 系统名称 +VUE_APP_SYSTEM_NAME = '数字用电管理系统' +# 系统登录页 login-green、login-blue-black、login-blue-white +VUE_APP_LOGIN_PAGE = 'login-green' +# 系统配色 theme-green、theme-blue-black、theme-blue-white +VUE_APP_THEME_CLASS = 'theme-green' + # 智慧用电管理系统/开发环境 VUE_APP_BASE_API = '/dev-api' diff --git a/.env.dr b/.env.dr new file mode 100644 index 00000000..4bf1a421 --- /dev/null +++ b/.env.dr @@ -0,0 +1,33 @@ +# 开发环境配置 +ENV = 'drgy' + +# logo +VUE_APP_LGOG_URL = 'logo/dr/logo.png' +# 系统名称 +VUE_APP_SYSTEM_NAME = '数字用电管理系统' +# 系统登录页 +VUE_APP_LOGIN_PAGE = 'login-blue-black' +# 系统配色 +VUE_APP_THEME_CLASS = 'theme-blue-black' + +# 智慧用电管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true + +# 前端端口 +port= 9988 + +# 服务端地址 +// 陈志荣 本地 +// target = http://192.168.18.140:8899 +// 黄明 本地 +// target = http://192.168.18.134:8899 +//target = http://192.168.18.139:8899 +// target = http://192.168.18.136:8899 + +// 测试端 +// target = http://192.168.10.241:32024 +// 开发端 + target = http://192.168.1.17:8899 diff --git a/.env.drgy b/.env.drgy new file mode 100644 index 00000000..0fa951bc --- /dev/null +++ b/.env.drgy @@ -0,0 +1,44 @@ +# 开发环境配置 +ENV = 'drgy' + +# logo +VUE_APP_LGOG_URL = 'logo/drgy/logo.png' +/** + * 蓝白色登录页需要一个banner图(VUE_APP_BANNER_URL)和一个168像素的logo(VUE_APP_LGOG168_URL) + */ +# logo +VUE_APP_LGOG168_URL = 'logo/drgy/logo168.png' +# banner +VUE_APP_BANNER_URL = 'logo/drgy/banner.png' +# 系统名称 +VUE_APP_SYSTEM_NAME = '数字用电管理系统' +# 系统登录页 login-green、login-blue-black、login-blue-white +#VUE_APP_LOGIN_PAGE = 'login-green' +#VUE_APP_LOGIN_PAGE = 'login-blue-black' +VUE_APP_LOGIN_PAGE = 'login-blue-white' +# 系统配色 theme-green、theme-blue-black、theme-blue-white +#VUE_APP_THEME_CLASS = 'theme-green' +#VUE_APP_THEME_CLASS = 'theme-blue-black' +VUE_APP_THEME_CLASS = 'theme-blue-white' + +# 智慧用电管理系统/开发环境 +VUE_APP_BASE_API = '/dev-api' + +# 路由懒加载 +VUE_CLI_BABEL_TRANSPILE_MODULES = true + +# 前端端口 +port= 9988 + +# 服务端地址 +// 陈志荣 本地 +// target = http://192.168.18.140:8899 +// 黄明 本地 +// target = http://192.168.18.134:8899 +//target = http://192.168.18.139:8899 +// target = http://192.168.18.136:8899 + +// 测试端 +// target = http://192.168.10.241:32024 +// 开发端 + target = http://192.168.1.17:8899 diff --git a/.env.drgyprod b/.env.drgyprod new file mode 100644 index 00000000..ec36e2a8 --- /dev/null +++ b/.env.drgyprod @@ -0,0 +1,32 @@ +# 生产环境配置 +ENV = 'drgyprod' +NODE_ENV = 'drgyprod' +# logo +VUE_APP_LGOG_URL = 'logo/drgy/logo.png' +/** + * 蓝白色登录页需要一个banner图(VUE_APP_BANNER_URL)和一个168像素的logo(VUE_APP_LGOG168_URL) + */ +# logo +VUE_APP_LGOG168_URL = 'logo/drgy/logo168.png' +# banner +VUE_APP_BANNER_URL = 'logo/drgy/banner.png' +# 系统名称 +VUE_APP_SYSTEM_NAME = '数字用电管理系统' +# 系统登录页 login-green、login-blue-black、login-blue-white +VUE_APP_LOGIN_PAGE = 'login-green' +#VUE_APP_LOGIN_PAGE = 'login-blue-black' +#VUE_APP_LOGIN_PAGE = 'login-blue-white' +# 系统配色 theme-green、theme-blue-black、theme-blue-white +VUE_APP_THEME_CLASS = 'theme-green' +#VUE_APP_THEME_CLASS = 'theme-blue-black' +#VUE_APP_THEME_CLASS = 'theme-blue-white' + +# 智慧用电管理系统/开发环境 +VUE_APP_BASE_API = '/prod-api' + + +# 前端端口 +port= 9988 + +# 服务端地址 +target = http://power.gkiiot.com diff --git a/.env.production b/.env.production index 2d898cf9..2d120dbe 100644 --- a/.env.production +++ b/.env.production @@ -4,6 +4,26 @@ ENV = 'production' # 智慧用电管理系统/生产环境 VUE_APP_BASE_API = '/prod-api' +# logo +VUE_APP_LGOG_URL = 'logo/drgy/logo.png' +/** + * 蓝白色登录页需要一个banner图(VUE_APP_BANNER_URL)和一个168像素的logo(VUE_APP_LGOG168_URL) + */ +# logo +VUE_APP_LGOG168_URL = 'logo/drgy/logo168.png' +# banner +VUE_APP_BANNER_URL = 'logo/drgy/banner.png' +# 系统名称 +VUE_APP_SYSTEM_NAME = '数字用电管理系统' +# 系统登录页 login-green、login-blue-black、login-blue-white +#VUE_APP_LOGIN_PAGE = 'login-green' +#VUE_APP_LOGIN_PAGE = 'login-blue-black' +VUE_APP_LOGIN_PAGE = 'login-blue-white' +# 系统配色 theme-green、theme-blue-black、theme-blue-white +#VUE_APP_THEME_CLASS = 'theme-green' +#VUE_APP_THEME_CLASS = 'theme-blue-black' +VUE_APP_THEME_CLASS = 'theme-blue-white' + # 前端端口 port= 9988 diff --git a/package.json b/package.json index fcfb9d8a..c25c949f 100644 --- a/package.json +++ b/package.json @@ -6,6 +6,9 @@ "license": "MIT", "scripts": { "dev": "vue-cli-service serve", + "dev:drgy": "vue-cli-service serve --mode drgy", + "dev:dr": "vue-cli-service serve --mode dr", + "build:drgyprod": "vue-cli-service build --mode drgyprod", "build:prod": "vue-cli-service build", "build:stage": "vue-cli-service build --mode staging", "preview": "node build/index.js --preview", diff --git a/public/js/config.js b/public/js/config.js index 6f7974d2..43d09665 100644 --- a/public/js/config.js +++ b/public/js/config.js @@ -6,3 +6,11 @@ window.dasConfig = { protocol: 'http://', wsProtocol: 'ws://' } +// 手动配置的地址 +window.dasConfig = { + ip: '192.168.1.17', + port: 8899, + prodApi: '', + protocol: 'http://', + wsProtocol: 'ws://' +} diff --git a/src/assets/logo/dr/logo.png b/src/assets/logo/dr/logo.png new file mode 100644 index 00000000..fbbae28a Binary files /dev/null and b/src/assets/logo/dr/logo.png differ diff --git a/src/assets/logo/dr/logo168.png b/src/assets/logo/dr/logo168.png new file mode 100644 index 00000000..fbbae28a Binary files /dev/null and b/src/assets/logo/dr/logo168.png differ diff --git a/src/assets/logo/drgy/banner.png b/src/assets/logo/drgy/banner.png new file mode 100644 index 00000000..939d880e Binary files /dev/null and b/src/assets/logo/drgy/banner.png differ diff --git a/src/assets/styles/sidebar.scss b/src/assets/styles/sidebar.scss index 038567a9..4cb5142c 100644 --- a/src/assets/styles/sidebar.scss +++ b/src/assets/styles/sidebar.scss @@ -1,3 +1,4 @@ +@import './variables.scss'; #app { .main-container { diff --git a/src/assets/styles/theme.scss b/src/assets/styles/theme.scss index f84a8ba1..32ab29d2 100644 --- a/src/assets/styles/theme.scss +++ b/src/assets/styles/theme.scss @@ -1,3 +1,4 @@ +@import './variables.scss'; //theme-green主题 .theme-green{ //logo diff --git a/src/assets/styles/variables.scss b/src/assets/styles/variables.scss index d23a8b2e..3e22a915 100644 --- a/src/assets/styles/variables.scss +++ b/src/assets/styles/variables.scss @@ -80,6 +80,7 @@ $sideBarWidth: 200px; sidebarN1Title:$sidebarN1Title; //绿色背景 menuGreenText:$menuGreenText; + menuGreenLogoBg:$menuGreenLogoBg; menuGreenBg:$menuGreenBg; menuGreenHover:$menuGreenHover; sidebarGreenTitle:$sidebarGreenTitle; diff --git a/src/config/env.js b/src/config/env.js index 87302600..469c01eb 100644 --- a/src/config/env.js +++ b/src/config/env.js @@ -31,7 +31,7 @@ if (env.NODE_ENV == 'development') { flowIotUrl = 'http://127.0.0.1:1880/#flow/' // hrefHost = "power-tcore.histron.cn" hrefHost = "192.168.1.17" -} else if(env.NODE_ENV == 'production') { +} else if(env.NODE_ENV == 'production' || env.NODE_ENV == 'drgyprod') { // if (hrefHost.indexOf('.gkiiot.com') >= 0) { // iotHost = 'iot.gkiiot.com' // } diff --git a/src/layout/components/Sidebar/Logo.vue b/src/layout/components/Sidebar/Logo.vue index 1879c48b..d98ccf27 100644 --- a/src/layout/components/Sidebar/Logo.vue +++ b/src/layout/components/Sidebar/Logo.vue @@ -34,7 +34,8 @@ export default { return this.$store.state.settings.sideTheme }, attribute() { - return this.$store.getters.attributeInfo['logoTitle'] || this.title; + // return this.$store.getters.attributeInfo['logoTitle'] || this.title; + return process.env.VUE_APP_SYSTEM_NAME || this.title; } }, data() { diff --git a/src/layout/index.vue b/src/layout/index.vue index 66f6d7d9..eeb16369 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -1,5 +1,5 @@