develop
pnoker 4 years ago
parent b2df26750d
commit 7dbd6d43d6

@ -20,11 +20,11 @@ MAINTAINER pnoker pnokers@icloud.com
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
COPY ./dc3/nginx/ /etc/nginx/ COPY ./dc3/nginx/ /etc/nginx/
COPY ./dist/ /usr/share/nginx/html/ COPY ./dist/ /usr/share/nginx/html/dc3/demo/
COPY ./dc3/dependencies/ssl/ /etc/ssl/ COPY ./dc3/dependencies/ssl/ /etc/ssl/
COPY ./dc3/dependencies/conf.crt/ /etc/nginx/conf.crt/ COPY ./dc3/dependencies/conf.crt/ /etc/nginx/conf.crt/
EXPOSE 443 EXPOSE 80 443
VOLUME /var/log/nginx VOLUME /var/log/nginx
CMD /bin/wait-for dc3-auth:8300 dc3-manager:8400 dc3-data:8500 -t 5 -- nginx -g 'daemon off;' CMD /bin/wait-for dc3-auth:8300 dc3-manager:8400 dc3-data:8500 -t 5 -- nginx -g 'daemon off;'

@ -5,9 +5,10 @@ services:
build: build:
context: ../ context: ../
dockerfile: ./Dockerfile dockerfile: ./Dockerfile
image: pnoker/dc3-web:1.0 image: pnoker/dc3-web:1.0.0
restart: always restart: always
ports: ports:
- 80:80
- 443:443 - 443:443
container_name: dc3-web container_name: dc3-web
hostname: dc3-web hostname: dc3-web

@ -1,12 +1,13 @@
server { server {
listen 80; listen 80;
server_name dc3.com;
return 301 https://$server_name$request_uri; rewrite ^/$ /dc3/demo permanent;
include /etc/nginx/conf.d/location;
} }
server { server {
listen 443 ssl; listen 443 ssl;
server_name dc3-web;
add_header X-Xss-Protection 1; add_header X-Xss-Protection 1;
add_header X-Frame-Options DENY; add_header X-Frame-Options DENY;
@ -20,26 +21,8 @@ server {
ssl_certificate /etc/nginx/conf.crt/dc3.site/fullchain.pem; ssl_certificate /etc/nginx/conf.crt/dc3.site/fullchain.pem;
ssl_certificate_key /etc/nginx/conf.crt/dc3.site/privkey.pem; ssl_certificate_key /etc/nginx/conf.crt/dc3.site/privkey.pem;
location / { rewrite ^/$ /dc3/demo permanent;
root /usr/share/nginx/html;
index index.html index.htm;
}
location ^~/user_api/ {
proxy_pass http://dc3-auth:8300/;
}
location ^~/manager_api/ {
proxy_pass http://dc3-manager:8400/;
}
location ^~/data_api/ { include /etc/nginx/conf.d/location;
proxy_pass http://dc3-data:8500/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
} }

@ -0,0 +1,21 @@
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
location ^~/dc3/demo/user_api/ {
proxy_pass http://dc3-auth:8300/;
}
location ^~/dc3/demo/manager_api/ {
proxy_pass http://dc3-manager:8400/;
}
location ^~/dc3/demo/data_api/ {
proxy_pass http://dc3-data:8500/;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

@ -2,7 +2,7 @@ import request from '@/config/axios'
export const pointValueApi = { export const pointValueApi = {
list: (pointValue) => request({ list: (pointValue) => request({
url: '/data_api/data/pointValue/list', url: 'data_api/data/pointValue/list',
method: 'post', method: 'post',
data: pointValue data: pointValue
}) })
@ -10,7 +10,7 @@ export const pointValueApi = {
export const deviceEventApi = { export const deviceEventApi = {
list: (event) => request({ list: (event) => request({
url: '/data_api/data/deviceEvent/list', url: 'data_api/data/deviceEvent/list',
method: 'post', method: 'post',
data: event data: event
}) })

@ -2,16 +2,16 @@ import request from '@/config/axios'
export const driverApi = { export const driverApi = {
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/driver/delete/' + id, url: 'manager_api/manager/driver/delete/' + id,
method: 'post' method: 'post'
}), }),
list: (driver) => request({ list: (driver) => request({
url: '/manager_api/manager/driver/list', url: 'manager_api/manager/driver/list',
method: 'post', method: 'post',
data: driver data: driver
}), }),
status: (driver) => request({ status: (driver) => request({
url: '/manager_api/manager/driver/status', url: 'manager_api/manager/driver/status',
method: 'post', method: 'post',
data: driver data: driver
}) })
@ -19,21 +19,21 @@ export const driverApi = {
export const driverAttributeApi = { export const driverAttributeApi = {
add: (driverAttribute) => request({ add: (driverAttribute) => request({
url: '/manager_api/manager/driverAttribute/add', url: 'manager_api/manager/driverAttribute/add',
method: 'post', method: 'post',
data: driverAttribute data: driverAttribute
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/driverAttribute/delete/' + id, url: 'manager_api/manager/driverAttribute/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (driverAttribute) => request({ update: (driverAttribute) => request({
url: '/manager_api/manager/driverAttribute/update', url: 'manager_api/manager/driverAttribute/update',
method: 'post', method: 'post',
data: driverAttribute data: driverAttribute
}), }),
list: (driverAttribute) => request({ list: (driverAttribute) => request({
url: '/manager_api/manager/driverAttribute/list', url: 'manager_api/manager/driverAttribute/list',
method: 'post', method: 'post',
data: driverAttribute data: driverAttribute
}) })
@ -41,21 +41,21 @@ export const driverAttributeApi = {
export const driverInfoApi = { export const driverInfoApi = {
add: (driverInfo) => request({ add: (driverInfo) => request({
url: '/manager_api/manager/driverInfo/add', url: 'manager_api/manager/driverInfo/add',
method: 'post', method: 'post',
data: driverInfo data: driverInfo
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/driverInfo/delete/' + id, url: 'manager_api/manager/driverInfo/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (driverInfo) => request({ update: (driverInfo) => request({
url: '/manager_api/manager/driverInfo/update', url: 'manager_api/manager/driverInfo/update',
method: 'post', method: 'post',
data: driverInfo data: driverInfo
}), }),
list: (driverInfo) => request({ list: (driverInfo) => request({
url: '/manager_api/manager/driverInfo/list', url: 'manager_api/manager/driverInfo/list',
method: 'post', method: 'post',
data: driverInfo data: driverInfo
}) })
@ -63,21 +63,21 @@ export const driverInfoApi = {
export const pointAttributeApi = { export const pointAttributeApi = {
add: (pointAttribute) => request({ add: (pointAttribute) => request({
url: '/manager_api/manager/pointAttribute/add', url: 'manager_api/manager/pointAttribute/add',
method: 'post', method: 'post',
data: pointAttribute data: pointAttribute
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/pointAttribute/delete/' + id, url: 'manager_api/manager/pointAttribute/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (pointAttribute) => request({ update: (pointAttribute) => request({
url: '/manager_api/manager/pointAttribute/update', url: 'manager_api/manager/pointAttribute/update',
method: 'post', method: 'post',
data: pointAttribute data: pointAttribute
}), }),
list: (pointAttribute) => request({ list: (pointAttribute) => request({
url: '/manager_api/manager/pointAttribute/list', url: 'manager_api/manager/pointAttribute/list',
method: 'post', method: 'post',
data: pointAttribute data: pointAttribute
}) })
@ -85,21 +85,21 @@ export const pointAttributeApi = {
export const pointInfoApi = { export const pointInfoApi = {
add: (pointInfo) => request({ add: (pointInfo) => request({
url: '/manager_api/manager/pointInfo/add', url: 'manager_api/manager/pointInfo/add',
method: 'post', method: 'post',
data: pointInfo data: pointInfo
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/pointInfo/delete/' + id, url: 'manager_api/manager/pointInfo/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (pointInfo) => request({ update: (pointInfo) => request({
url: '/manager_api/manager/pointInfo/update', url: 'manager_api/manager/pointInfo/update',
method: 'post', method: 'post',
data: pointInfo data: pointInfo
}), }),
list: (pointInfo) => request({ list: (pointInfo) => request({
url: '/manager_api/manager/pointInfo/list', url: 'manager_api/manager/pointInfo/list',
method: 'post', method: 'post',
data: pointInfo data: pointInfo
}) })
@ -107,21 +107,21 @@ export const pointInfoApi = {
export const profileApi = { export const profileApi = {
add: (profile) => request({ add: (profile) => request({
url: '/manager_api/manager/profile/add', url: 'manager_api/manager/profile/add',
method: 'post', method: 'post',
data: profile data: profile
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/profile/delete/' + id, url: 'manager_api/manager/profile/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (profile) => request({ update: (profile) => request({
url: '/manager_api/manager/profile/update', url: 'manager_api/manager/profile/update',
method: 'post', method: 'post',
data: profile data: profile
}), }),
list: (profile) => request({ list: (profile) => request({
url: '/manager_api/manager/profile/list', url: 'manager_api/manager/profile/list',
method: 'post', method: 'post',
data: profile data: profile
}) })
@ -129,21 +129,21 @@ export const profileApi = {
export const groupApi = { export const groupApi = {
add: (group) => request({ add: (group) => request({
url: '/manager_api/manager/group/add', url: 'manager_api/manager/group/add',
method: 'post', method: 'post',
data: group data: group
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/group/delete/' + id, url: 'manager_api/manager/group/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (group) => request({ update: (group) => request({
url: '/manager_api/manager/group/update', url: 'manager_api/manager/group/update',
method: 'post', method: 'post',
data: group data: group
}), }),
list: (group) => request({ list: (group) => request({
url: '/manager_api/manager/group/list', url: 'manager_api/manager/group/list',
method: 'post', method: 'post',
data: group data: group
}) })
@ -151,26 +151,26 @@ export const groupApi = {
export const deviceApi = { export const deviceApi = {
add: (device) => request({ add: (device) => request({
url: '/manager_api/manager/device/add', url: 'manager_api/manager/device/add',
method: 'post', method: 'post',
data: device data: device
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/device/delete/' + id, url: 'manager_api/manager/device/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (device) => request({ update: (device) => request({
url: '/manager_api/manager/device/update', url: 'manager_api/manager/device/update',
method: 'post', method: 'post',
data: device data: device
}), }),
list: (device) => request({ list: (device) => request({
url: '/manager_api/manager/device/list', url: 'manager_api/manager/device/list',
method: 'post', method: 'post',
data: device data: device
}), }),
status: (device) => request({ status: (device) => request({
url: '/manager_api/manager/device/status', url: 'manager_api/manager/device/status',
method: 'post', method: 'post',
data: device data: device
}) })
@ -178,21 +178,21 @@ export const deviceApi = {
export const pointApi = { export const pointApi = {
add: (point) => request({ add: (point) => request({
url: '/manager_api/manager/point/add', url: 'manager_api/manager/point/add',
method: 'post', method: 'post',
data: point data: point
}), }),
delete: (id) => request({ delete: (id) => request({
url: '/manager_api/manager/point/delete/' + id, url: 'manager_api/manager/point/delete/' + id,
method: 'post' method: 'post'
}), }),
update: (point) => request({ update: (point) => request({
url: '/manager_api/manager/point/update', url: 'manager_api/manager/point/update',
method: 'post', method: 'post',
data: point data: point
}), }),
list: (point) => request({ list: (point) => request({
url: '/manager_api/manager/point/list', url: 'manager_api/manager/point/list',
method: 'post', method: 'post',
data: point data: point
}) })
@ -200,31 +200,31 @@ export const pointApi = {
export const dictionaryApi = { export const dictionaryApi = {
driverDictionary: () => request({ driverDictionary: () => request({
url: '/manager_api/manager/dictionary/driver', url: 'manager_api/manager/dictionary/driver',
method: 'get' method: 'get'
}), }),
profileDictionary: () => request({ profileDictionary: () => request({
url: '/manager_api/manager/dictionary/profile', url: 'manager_api/manager/dictionary/profile',
method: 'get' method: 'get'
}), }),
driverAttributeDictionary: () => request({ driverAttributeDictionary: () => request({
url: '/manager_api/manager/dictionary/driverAttribute', url: 'manager_api/manager/dictionary/driverAttribute',
method: 'get' method: 'get'
}), }),
pointAttributeDictionary: () => request({ pointAttributeDictionary: () => request({
url: '/manager_api/manager/dictionary/pointAttribute', url: 'manager_api/manager/dictionary/pointAttribute',
method: 'get' method: 'get'
}), }),
groupDictionary: () => request({ groupDictionary: () => request({
url: '/manager_api/manager/dictionary/group', url: 'manager_api/manager/dictionary/group',
method: 'get' method: 'get'
}), }),
deviceDictionary: (parent) => request({ deviceDictionary: (parent) => request({
url: '/manager_api/manager/dictionary/device/' + parent, url: 'manager_api/manager/dictionary/device/' + parent,
method: 'get' method: 'get'
}), }),
pointDictionary: (parent) => request({ pointDictionary: (parent) => request({
url: '/manager_api/manager/dictionary/point/' + parent, url: 'manager_api/manager/dictionary/point/' + parent,
method: 'get' method: 'get'
}) })
}; };

@ -1,7 +1,7 @@
import request from '@/config/axios' import request from '@/config/axios'
export const generateSalt = (name) => request({ export const generateSalt = (name) => request({
url: '/user_api/auth/token/salt', url: 'user_api/auth/token/salt',
method: 'get', method: 'get',
params: { params: {
username: name username: name
@ -9,13 +9,13 @@ export const generateSalt = (name) => request({
}); });
export const generateToken = (user) => request({ export const generateToken = (user) => request({
url: '/user_api/auth/token/generate', url: 'user_api/auth/token/generate',
method: 'post', method: 'post',
data: user data: user
}); });
export const checkTokenValid = (user, token) => request({ export const checkTokenValid = (user, token) => request({
url: '/user_api/auth/token/check', url: 'user_api/auth/token/check',
method: 'get', method: 'get',
params: { params: {
username: user, username: user,
@ -24,7 +24,7 @@ export const checkTokenValid = (user, token) => request({
}); });
export const cancelToken = (name) => request({ export const cancelToken = (name) => request({
url: '/user_api/auth/token/cancel', url: 'user_api/auth/token/cancel',
method: 'get', method: 'get',
params: { params: {
username: name username: name

@ -2,7 +2,7 @@
<div class="container"> <div class="container">
<div class="header"> <div class="header">
<el-col :span="4" class="header_item"> <el-col :span="4" class="header_item">
<img class="logo" src="/images/logo/logo.png"> <img class="logo" src="images/logo/logo.png">
</el-col> </el-col>
<el-col :span="16" class="header_item"> <el-col :span="16" class="header_item">
<el-menu class="menu" <el-menu class="menu"
@ -38,7 +38,7 @@
<el-dropdown class="avatar_item" @command="handleCommand"> <el-dropdown class="avatar_item" @command="handleCommand">
<span class="el-dropdown-link"> <span class="el-dropdown-link">
<el-avatar> <el-avatar>
<img src="/images/common/avatar.png"> <img src="images/common/avatar.png">
</el-avatar> </el-avatar>
</span> </span>
<el-dropdown-menu slot="dropdown"> <el-dropdown-menu slot="dropdown">

@ -2,7 +2,7 @@
<div class="login-container"> <div class="login-container">
<div class="login-wrapper-left animated bounceInDown"> <div class="login-wrapper-left animated bounceInDown">
<div class="login-left"> <div class="login-left">
<img class="img" src="/images/logo/logo-white.png"> <img class="img" src="images/logo/logo-white.png">
</div> </div>
</div> </div>
<particles/> <particles/>

@ -88,8 +88,8 @@
prop: 'value', prop: 'value',
span: 12 span: 12
}, { }, {
label: '自定义', label: '计算值',
prop: 'customValue', prop: 'calculateValue',
span: 12 span: 12
}, { }, {
label: '采集日期', label: '采集日期',

Loading…
Cancel
Save