登录配置
This commit is contained in:
@@ -19,7 +19,7 @@
|
|||||||
"babel-polyfill": "^6.26.0",
|
"babel-polyfill": "^6.26.0",
|
||||||
"element-ui": "^2.8.2",
|
"element-ui": "^2.8.2",
|
||||||
"fastclick": "^1.0.6",
|
"fastclick": "^1.0.6",
|
||||||
"jsencrypt": "^3.2.1",
|
"jsencrypt": "^3.3.2",
|
||||||
"vant": "^2.11.2",
|
"vant": "^2.11.2",
|
||||||
"vue": "^2.5.2",
|
"vue": "^2.5.2",
|
||||||
"vue-i18n": "^8.26.1",
|
"vue-i18n": "^8.26.1",
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ export default {
|
|||||||
top 50%
|
top 50%
|
||||||
left 50%
|
left 50%
|
||||||
width 45%
|
width 45%
|
||||||
|
max-width 420px
|
||||||
transition .3s
|
transition .3s
|
||||||
transform translate3d(-50%, -50%, 0)
|
transform translate3d(-50%, -50%, 0)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
@@ -85,15 +86,19 @@ export default {
|
|||||||
color #929292
|
color #929292
|
||||||
z-index 2018
|
z-index 2018
|
||||||
.text
|
.text
|
||||||
padding .1rem
|
padding 10px 15px
|
||||||
max-height 60vh
|
max-height 60vh
|
||||||
|
min-height 44px
|
||||||
overflow-y auto
|
overflow-y auto
|
||||||
text-align center
|
text-align center
|
||||||
-webkit-overflow-scrolling touch
|
-webkit-overflow-scrolling touch
|
||||||
white-space pre-wrap
|
white-space pre-wrap
|
||||||
|
font-size 14px
|
||||||
|
line-height 24px
|
||||||
color #606266
|
color #606266
|
||||||
[class*='hairline']
|
[class*='hairline']
|
||||||
position relative
|
position relative
|
||||||
|
padding 5px 0 0
|
||||||
[class*='hairline']::after
|
[class*='hairline']::after
|
||||||
content ' '
|
content ' '
|
||||||
position absolute
|
position absolute
|
||||||
@@ -109,8 +114,9 @@ export default {
|
|||||||
border-top-width 1px
|
border-top-width 1px
|
||||||
.button--large
|
.button--large
|
||||||
width 100%
|
width 100%
|
||||||
height .5rem
|
height 40px
|
||||||
line-height .5rem
|
line-height 40px
|
||||||
|
font-size 14px
|
||||||
color #e74f1a
|
color #e74f1a
|
||||||
background-color #dadee2
|
background-color #dadee2
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="dialog_footer">
|
<div class="dialog_footer">
|
||||||
<button class="button button--primary" @click="toCancle">取消</button>
|
<button class="button button--primary" @click="toCancle">取消</button>
|
||||||
<button class="button button--primary" @click="toSure">确定</button>
|
<button class="button button--primary" :class="{'button--info': unclick === true}" :disabled="disabled" @click="toSure">确定</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -26,11 +26,16 @@ export default {
|
|||||||
name: 'jxDialog',
|
name: 'jxDialog',
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: String,
|
||||||
type: String
|
type: String,
|
||||||
|
unclick: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
active: false
|
active: false,
|
||||||
|
disabled: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -39,7 +44,6 @@ export default {
|
|||||||
this.$emit('toCancle', this.type)
|
this.$emit('toCancle', this.type)
|
||||||
},
|
},
|
||||||
toSure () {
|
toSure () {
|
||||||
this.active = false
|
|
||||||
this.$emit('toSure', this.type)
|
this.$emit('toSure', this.type)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,19 +26,20 @@ export default {
|
|||||||
position fixed
|
position fixed
|
||||||
z-index 10001
|
z-index 10001
|
||||||
width 100%
|
width 100%
|
||||||
height 1rem
|
height 48px
|
||||||
line-height 1rem
|
|
||||||
text-align center
|
text-align center
|
||||||
left 50%
|
left 50%
|
||||||
top 50%
|
top 50%
|
||||||
transform translate(-50%, -50%)
|
transform translate(-50%, -50%)
|
||||||
.text
|
.text
|
||||||
|
height 48px
|
||||||
|
line-height 18px
|
||||||
display inline-block
|
display inline-block
|
||||||
width auto
|
width auto
|
||||||
text-align center
|
text-align center
|
||||||
padding 0 .5rem
|
padding 15px
|
||||||
border-radius 10px
|
border-radius 4px
|
||||||
background #858586
|
background #858586
|
||||||
font-size .32rem
|
font-size 16px
|
||||||
color #fff
|
color #fff
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,13 +12,30 @@ export const parameterSetting = (num, word) => post('api/developer/parameterSett
|
|||||||
password: word
|
password: word
|
||||||
})
|
})
|
||||||
|
|
||||||
export const queryVehicleStatus = () => post('api/vehicle/queryVehicleStatus', {})
|
// new
|
||||||
|
// 登录
|
||||||
|
export const authlogin = (username, password) => post('auth/login', {
|
||||||
|
username: username,
|
||||||
|
password: password
|
||||||
|
})
|
||||||
|
// 车辆状态
|
||||||
|
// 1.1查询车辆状态
|
||||||
|
export const queryVehicleStatus = (username, password) => post('api/vehicle/queryVehicleStatus', {
|
||||||
|
})
|
||||||
|
// 1.2查询传感器状态
|
||||||
export const querrySensor = () => post('api/vehicle/querrySensor', {})
|
export const querrySensor = () => post('api/vehicle/querrySensor', {})
|
||||||
|
// 1.3软启动
|
||||||
export const softStart = () => post('api/vehicle/softStart', {})
|
export const softStart = () => post('api/vehicle/softStart', {})
|
||||||
|
// 1.4跳过起点
|
||||||
export const skipStartPoint = () => post('api/vehicle/skipStartPoint', {})
|
export const skipStartPoint = () => post('api/vehicle/skipStartPoint', {})
|
||||||
export const ShutDown = () => post('api/vehicle/Shut_down', {})
|
// 1.5关机,显示屏控制、TCS控制、RC控制、Joy控制
|
||||||
|
export const ShutDown = (type, bool) => post('api/vehicle/Shut_down', {
|
||||||
|
type: type,
|
||||||
|
bool: bool
|
||||||
|
})
|
||||||
|
// 1.6查询初始化坐标
|
||||||
export const queryRestPoint = () => post('api/vehicle/queryRestPoint', {})
|
export const queryRestPoint = () => post('api/vehicle/queryRestPoint', {})
|
||||||
|
// 1.7初始化坐标确定
|
||||||
export const restCoordinate = (code, name, x, y, t) => post('api/vehicle/restCoordinate', {
|
export const restCoordinate = (code, name, x, y, t) => post('api/vehicle/restCoordinate', {
|
||||||
point_code: code,
|
point_code: code,
|
||||||
point_name: name,
|
point_name: name,
|
||||||
@@ -26,5 +43,36 @@ export const restCoordinate = (code, name, x, y, t) => post('api/vehicle/restCoo
|
|||||||
y: y,
|
y: y,
|
||||||
t: t
|
t: t
|
||||||
})
|
})
|
||||||
|
// 1.8查询agv的状态
|
||||||
export const queryAgvStatus = () => post('api/vehicle/queryAgv_Status', {})
|
export const queryAgvStatus = () => post('api/vehicle/queryAgv_Status', {})
|
||||||
|
// 1.9退出
|
||||||
export const quitNow = () => post('api/vehicle/quitNow', {})
|
export const quitNow = () => post('api/vehicle/quitNow', {})
|
||||||
|
|
||||||
|
// 系统管理
|
||||||
|
// 1.1 用户列表
|
||||||
|
export const usersQuery = (page, size) => post('api/users/query', {
|
||||||
|
page: page,
|
||||||
|
size: size
|
||||||
|
})
|
||||||
|
// 1.2 添加用户
|
||||||
|
export const usersAdd = (username, personName, gender, phone, rolesIds, password) => post('api/users/add', {
|
||||||
|
username: username,
|
||||||
|
personName: personName,
|
||||||
|
gender: gender,
|
||||||
|
phone: phone,
|
||||||
|
rolesIds: rolesIds,
|
||||||
|
password: password
|
||||||
|
})
|
||||||
|
// 1.3 修改用户、重置密码
|
||||||
|
export const usersEdit = (obj) => post('api/users/edit', obj)
|
||||||
|
// 1.4 删除用户
|
||||||
|
export const usersDelete = (userId) => post('api/users/delete', {
|
||||||
|
usersIds: userId
|
||||||
|
})
|
||||||
|
|
||||||
|
// 角色管理
|
||||||
|
// 1.1 角色列表
|
||||||
|
export const sysRoleQuery = (page, size) => post('api/sysRole/query', {
|
||||||
|
page: page,
|
||||||
|
size: size
|
||||||
|
})
|
||||||
|
|||||||
@@ -1,17 +1,17 @@
|
|||||||
import axios from 'axios'
|
import axios from 'axios'
|
||||||
// import qs from 'qs'
|
|
||||||
import { Dialog } from './utils.js'
|
import { Dialog } from './utils.js'
|
||||||
// import { Dialog, toast } from './utils.js'
|
|
||||||
import store from '../vuex/store'
|
import store from '../vuex/store'
|
||||||
// import router from './../router'
|
import router from '@/router'
|
||||||
|
|
||||||
axios.defaults.timeout = 50000
|
axios.defaults.timeout = 50000
|
||||||
// axios.defaults.retry = 5
|
|
||||||
// axios.defaults.retryDelay = 10000
|
|
||||||
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
axios.defaults.headers.post['Content-Type'] = 'application/json;charset=UTF-8'
|
||||||
|
|
||||||
axios.interceptors.request.use(
|
axios.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
|
let token = ''
|
||||||
|
if (store.getters.userInfo !== '') {
|
||||||
|
token = JSON.parse(store.getters.userInfo).token
|
||||||
|
}
|
||||||
|
token && (config.headers.Authorization = token)
|
||||||
if (config.method === 'post') {
|
if (config.method === 'post') {
|
||||||
if (!config.data.flag) {
|
if (!config.data.flag) {
|
||||||
config.data = config.data
|
config.data = config.data
|
||||||
@@ -32,46 +32,19 @@ axios.interceptors.response.use(
|
|||||||
return Promise.resolve(response)
|
return Promise.resolve(response)
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
// let condata = error.config.data.split('&')
|
if (error && error.response) {
|
||||||
// console.log('condata', condata)
|
switch (error.response.status) {
|
||||||
// if (condata[1] === '_SRVMETHOD=queryProduceOrderReprot' || condata[1] === '_SRVMETHOD=queryQCRecord' || condata[1] === '_SRVMETHOD=queryEquipWorkTeam') {
|
case 400:
|
||||||
// toast(error.message)
|
break
|
||||||
// setTimeout(() => {
|
case 401:
|
||||||
// router.replace({
|
store.dispatch('setSignOut')
|
||||||
// path: '/login'
|
router.push('/login')
|
||||||
// })
|
break
|
||||||
// }, 10000)
|
}
|
||||||
// } else {
|
return Promise.reject(error.response.data)
|
||||||
// if (condata[1] === '_SRVMETHOD=queryEquip') {
|
} else {
|
||||||
// toast(error.message)
|
return Promise.reject(error)
|
||||||
// } else {
|
}
|
||||||
// Dialog(error.message)
|
|
||||||
// }
|
|
||||||
// // Dialog(error.message)
|
|
||||||
// }
|
|
||||||
// toast(error.message)
|
|
||||||
// - 20201215-x
|
|
||||||
// router.push({
|
|
||||||
// path: '/500',
|
|
||||||
// query: {redirect: router.currentRoute.fullPath}
|
|
||||||
// })
|
|
||||||
// - 20201215-x
|
|
||||||
return Promise.reject(error)
|
|
||||||
// let config = error.config
|
|
||||||
// if (!config || !config.retry) return Promise.reject(error)
|
|
||||||
// config.__retryCount = config.__retryCount || 0
|
|
||||||
// if (config.__retryCount >= config.retry) {
|
|
||||||
// return Promise.reject(error)
|
|
||||||
// }
|
|
||||||
// config.__retryCount += 1
|
|
||||||
// let backoff = new Promise(resolve => {
|
|
||||||
// setTimeout(() => {
|
|
||||||
// resolve()
|
|
||||||
// }, config.retryDelay || 1)
|
|
||||||
// })
|
|
||||||
// return backoff.then(() => {
|
|
||||||
// return axios(config)
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -79,11 +52,9 @@ export const post = (sevmethod, params) => {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
|
axios.post(`${store.getters.baseUrl}/` + sevmethod, params)
|
||||||
.then(response => {
|
.then(response => {
|
||||||
// if (response.data.code === '0') {
|
|
||||||
// Dialog(response.data.desc)
|
|
||||||
// }
|
|
||||||
resolve(response.data)
|
resolve(response.data)
|
||||||
}, error => {
|
}, error => {
|
||||||
|
Dialog(error.message)
|
||||||
reject(error.message)
|
reject(error.message)
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|||||||
@@ -9,28 +9,131 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-content">
|
<div class="login-content">
|
||||||
<div class="login-content_wraper">
|
<div v-show="tab === 0" class="login-content_wraper">
|
||||||
<div class="dl">登录</div>
|
<div class="dl">登录</div>
|
||||||
<div class="login-items-wraper">
|
<div class="login-items-wraper">
|
||||||
<div class="login-item">
|
<div class="login-item">
|
||||||
<input type="text" class="login-input">
|
<div class="login-label" @click="toFocus(1)">用户名</div>
|
||||||
|
<input type="text" class="login-input" ref="input1" v-model="username">
|
||||||
</div>
|
</div>
|
||||||
<div class="login-item">
|
<div class="login-item">
|
||||||
<input type="password" class="login-input">
|
<div class="login-label" @click="toFocus(2)">密码</div>
|
||||||
|
<input type="password" class="login-input" ref="input2" v-model="password">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="login-buttons-wraper">
|
<div class="login-setup-wraper">
|
||||||
<button class="button button--primary button-login">登录</button>
|
<div class="setup-info pointer" @click="toSetup">配置信息</div>
|
||||||
</div>
|
|
||||||
<div class="login-forget-wraper">
|
|
||||||
<router-link to="/home">忘记密码</router-link>
|
<router-link to="/home">忘记密码</router-link>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="login-buttons-wraper">
|
||||||
|
<button class="button button--primary button-login" :disabled="disabled" @click="saveLogin">登录</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-show="tab === 1" class="login-content_wraper">
|
||||||
|
<div class="dl">配置</div>
|
||||||
|
<div class="login-items-wraper">
|
||||||
|
<div class="login-item">
|
||||||
|
<div class="login-label" @click="toFocus(3)">域名地址</div>
|
||||||
|
<input type="text" class="login-input" ref="input3" v-model="baseUrl">
|
||||||
|
</div>
|
||||||
|
<div class="login-item">
|
||||||
|
<div class="login-label" @click="toFocus(4)">刷新时间(秒)</div>
|
||||||
|
<input type="number" class="login-input" ref="input4" v-model="setTime">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="login-setup-wraper login-setup-wraper__r">
|
||||||
|
<div class="setup-info pointer" @click="toLogin">立即登录</div>
|
||||||
|
</div>
|
||||||
|
<div class="login-buttons-wraper">
|
||||||
|
<button class="button button--primary button-login" @click="saveSetup">配置</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {authlogin} from '@config/getData2.js'
|
||||||
|
import {encrypt} from '../../../main.js'
|
||||||
|
export default {
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
tab: 0,
|
||||||
|
username: '',
|
||||||
|
password: '',
|
||||||
|
baseUrl: this.$store.getters.baseUrl,
|
||||||
|
setTime: this.$store.getters.setTime / 1000,
|
||||||
|
disabled: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
mounted () {
|
||||||
|
// 点对点项目分辨率 1024 * 768
|
||||||
|
// alert(document.body.clientWidth, 'a')
|
||||||
|
// alert(document.body.clientHeight, 'b')
|
||||||
|
// alert(window.screen.width, 'c')
|
||||||
|
// alert(window.screen.height, 'd')
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toFocus (i) {
|
||||||
|
switch (i) {
|
||||||
|
case 1:
|
||||||
|
this.$refs.input1.focus()
|
||||||
|
break
|
||||||
|
case 2:
|
||||||
|
this.$refs.input2.focus()
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
this.$refs.input3.focus()
|
||||||
|
break
|
||||||
|
case 4:
|
||||||
|
this.$refs.input4.focus()
|
||||||
|
break
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toSetup () {
|
||||||
|
this.tab = 1
|
||||||
|
},
|
||||||
|
toLogin () {
|
||||||
|
this.tab = 0
|
||||||
|
},
|
||||||
|
saveSetup () {
|
||||||
|
let obj = {
|
||||||
|
baseUrl: this.baseUrl,
|
||||||
|
setTime: this.setTime * 1000
|
||||||
|
}
|
||||||
|
this.$store.dispatch('setConfig', obj)
|
||||||
|
this.toLogin()
|
||||||
|
},
|
||||||
|
saveLogin () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.username) {
|
||||||
|
this.toast('请输入用户名')
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!this.password) {
|
||||||
|
this.toast('请输入密码')
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this._authlogin()
|
||||||
|
},
|
||||||
|
async _authlogin () {
|
||||||
|
try {
|
||||||
|
let res = await authlogin(this.username, encrypt(this.password))
|
||||||
|
let obj = {}
|
||||||
|
obj = Object.assign({}, res)
|
||||||
|
this.$store.dispatch('userInfo', JSON.stringify(obj))
|
||||||
|
this.$router.push('/homehome')
|
||||||
|
} catch (err) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="stylus" scoped>
|
<style lang="stylus" scoped>
|
||||||
@import '~@style/mixin'
|
@import '~@style/mixin'
|
||||||
.login-container
|
.login-container
|
||||||
@@ -40,7 +143,7 @@
|
|||||||
_fj(center)
|
_fj(center)
|
||||||
.login-wraper
|
.login-wraper
|
||||||
_fj()
|
_fj()
|
||||||
_wh(80vw, 65vh)
|
_wh(70vw, 65vh)
|
||||||
padding 20px
|
padding 20px
|
||||||
background-color #fff
|
background-color #fff
|
||||||
border-radius 20px
|
border-radius 20px
|
||||||
@@ -64,36 +167,49 @@
|
|||||||
padding 20px
|
padding 20px
|
||||||
.login-content_wraper
|
.login-content_wraper
|
||||||
width 100%
|
width 100%
|
||||||
max-width 200px
|
max-width 260px
|
||||||
margin 0 auto
|
margin 0 auto
|
||||||
_fj(center,,column)
|
_fj(center,,column)
|
||||||
.dl
|
.dl
|
||||||
width 100%
|
width 100%
|
||||||
_font(16px, 28px, #333, bold, center)
|
_font(16px, 28px, #333, bold, center)
|
||||||
margin-bottom 10px
|
margin-bottom 30px
|
||||||
.login-items-wraper
|
.login-items-wraper
|
||||||
width 100%
|
width 100%
|
||||||
.login-item
|
.login-item
|
||||||
width 100%
|
_fj()
|
||||||
|
_wh(100%, 42px)
|
||||||
|
background-color #fff
|
||||||
|
padding 5px 12px
|
||||||
|
border 1px solid $gray2
|
||||||
|
border-radius 20px
|
||||||
+.login-item
|
+.login-item
|
||||||
margin-top 20px
|
margin-top 20px
|
||||||
|
.login-label
|
||||||
|
width 102px
|
||||||
|
line-height 30px
|
||||||
|
_font(14px, 30px, $gray1,,)
|
||||||
.login-input
|
.login-input
|
||||||
|
width calc(100% - 102px)
|
||||||
|
line-height 30px
|
||||||
|
_font(14px, 30px, $gray1,,)
|
||||||
|
.login-setup-wraper
|
||||||
width 100%
|
width 100%
|
||||||
height 40px
|
margin-top 10px
|
||||||
border 1px solid $gray2
|
_fj()
|
||||||
padding 5px 12px
|
|
||||||
_font(14px, 16px, #323232,,)
|
|
||||||
border-radius 6px
|
|
||||||
.login-forget-wraper
|
|
||||||
width 100%
|
|
||||||
margin-top 15px
|
|
||||||
text-align right
|
|
||||||
a
|
a
|
||||||
_font(14px, 20px, $red1,,)
|
_font(14px, 20px, $red1,,)
|
||||||
|
.login-setup-wraper__r
|
||||||
|
justify-content flex-end
|
||||||
|
.setup-info
|
||||||
|
color $red1
|
||||||
|
.setup-info
|
||||||
|
_font(14px, 20px, $fc1,,)
|
||||||
.login-buttons-wraper
|
.login-buttons-wraper
|
||||||
width 100%
|
width 100%
|
||||||
margin-top 20px
|
margin-top 10px
|
||||||
.button-login
|
.button-login
|
||||||
width 100%
|
width 100%
|
||||||
border-radius 12px
|
border-radius 20px
|
||||||
|
letter-spacing 5px
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="elec-txt">90%</div>
|
<div class="elec-txt">90%</div>
|
||||||
<div class="iconfont icon_admin"></div>
|
<div class="iconfont icon_admin"></div>
|
||||||
<div class="elec-txt">admin</div>
|
<div class="elec-txt">{{ username }}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="time-container">
|
<div class="time-container">
|
||||||
<jxTime></jxTime>
|
<jxTime></jxTime>
|
||||||
@@ -40,6 +40,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
username: this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).user.username : '',
|
||||||
activeIndex: this.$store.getters.defaultActive,
|
activeIndex: this.$store.getters.defaultActive,
|
||||||
menus: [{
|
menus: [{
|
||||||
label: '首页',
|
label: '首页',
|
||||||
|
|||||||
@@ -49,6 +49,7 @@
|
|||||||
_wh(calc(100% - 120px), 100%)
|
_wh(calc(100% - 120px), 100%)
|
||||||
|
|
||||||
.site_container
|
.site_container
|
||||||
|
_fj()
|
||||||
_wh(100%, calc(100% - 82px))
|
_wh(100%, calc(100% - 82px))
|
||||||
overflow hidden
|
overflow hidden
|
||||||
.left_side
|
.left_side
|
||||||
@@ -134,6 +135,10 @@
|
|||||||
padding: 12px 20px;
|
padding: 12px 20px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
|
&:disabled
|
||||||
|
color: #fff;
|
||||||
|
background-color: $gray;
|
||||||
|
border-color: $gray1;
|
||||||
.button+.button
|
.button+.button
|
||||||
margin-left: 10px;
|
margin-left: 10px;
|
||||||
.button--primary
|
.button--primary
|
||||||
@@ -195,7 +200,7 @@
|
|||||||
width 100%
|
width 100%
|
||||||
.form
|
.form
|
||||||
width 100%
|
width 100%
|
||||||
_fj(flex-start)
|
_fj(flex-start, flex-start)
|
||||||
.form_item
|
.form_item
|
||||||
width 48%
|
width 48%
|
||||||
margin-bottom: 20px
|
margin-bottom: 20px
|
||||||
@@ -422,60 +427,65 @@
|
|||||||
.state_wrap
|
.state_wrap
|
||||||
width 100%
|
width 100%
|
||||||
_fj(, flex-start)
|
_fj(, flex-start)
|
||||||
margin-bottom 20px
|
|
||||||
.state_tip
|
.state_tip
|
||||||
_wh(200px, 100px)
|
_wh(150px, 50px)
|
||||||
_fj(center)
|
_fj(center)
|
||||||
_font(28px, 40px, #ffffff,,center)
|
_font(18px, 15px, #ffffff,,center)
|
||||||
border 1px solid $red
|
border 1px solid $red
|
||||||
background-color #ffc3a7
|
background-color #ffc3a7
|
||||||
border-radius 16px
|
border-radius 6px
|
||||||
margin-right 70px
|
margin-right 70px
|
||||||
overflow hidden
|
overflow hidden
|
||||||
.state_content
|
.state_content
|
||||||
width calc(100% - 270px)
|
width calc(100% - 220px)
|
||||||
_fj(flex-start)
|
_fj(flex-start)
|
||||||
flex-wrap wrap
|
flex-wrap wrap
|
||||||
.state_item_1
|
.state_item_1
|
||||||
_wh(260px, 100px)
|
_wh(150px, 50px)
|
||||||
_fj(center)
|
_fj(center)
|
||||||
border 1.6px solid #54C0B3
|
border 1.6px solid #54C0B3
|
||||||
background-color #fff
|
background-color #fff
|
||||||
_font(32px,45px,#54C0B3,,center)
|
_font(18px,25px,#54C0B3,,center)
|
||||||
border-radius 16px
|
border-radius 6px
|
||||||
.state_item_2
|
margin-bottom 20px
|
||||||
_wh(284px, 100px)
|
|
||||||
_fj(center)
|
|
||||||
border 12px solid #DFE1E6
|
|
||||||
background-color #fff
|
|
||||||
border-radius 16px
|
|
||||||
margin-bottom 24px
|
|
||||||
margin-right 24px
|
margin-right 24px
|
||||||
|
.state_item_2
|
||||||
|
_wh(calc(33.333333% - 16px), 60px)
|
||||||
|
_fj(center)
|
||||||
|
border 10px solid #DFE1E6
|
||||||
|
background-color #fff
|
||||||
|
border-radius 6px
|
||||||
|
margin-bottom 20px
|
||||||
|
margin-right 24px
|
||||||
|
&:nth-child(3n)
|
||||||
|
margin-right 0
|
||||||
.state_item_2_dot
|
.state_item_2_dot
|
||||||
display block
|
display block
|
||||||
_wh(32px,32px)
|
_wh(24px,24px)
|
||||||
background-color #00C852
|
background-color #ffffff
|
||||||
border-radius 50%
|
border-radius 50%
|
||||||
margin-right 24px
|
margin-right 20px
|
||||||
.state_item_2_txt
|
.state_item_2_txt
|
||||||
display block
|
display block
|
||||||
_font(32px,45px,#696969,,)
|
_font(18px,25px,#696969,,)
|
||||||
.state_item_3
|
.state_item_3
|
||||||
_wh(310px, 100px)
|
_wh(calc(33.333333% - 16px), 50px)
|
||||||
_fj(flex-start)
|
_fj(flex-start)
|
||||||
border 1.6px solid #8B90A6
|
border 1.6px solid #8B90A6
|
||||||
background-color #fff
|
background-color #fff
|
||||||
border-radius 16px
|
border-radius 16px
|
||||||
margin-bottom 24px
|
margin-bottom 20px
|
||||||
margin-right 24px
|
margin-right 24px
|
||||||
padding 10px 20px
|
padding 10px 20px
|
||||||
|
&:nth-child(3n)
|
||||||
|
margin-right 0
|
||||||
.state_item_3_txt1
|
.state_item_3_txt1
|
||||||
display block
|
display block
|
||||||
_font(32px,45px,#696969,,)
|
_font(18px,25px,#696969,,)
|
||||||
margin-right 12px
|
margin-right 12px
|
||||||
.state_item_3_txt2
|
.state_item_3_txt2
|
||||||
display block
|
display block
|
||||||
_font(32px,45px,#FA6400,,)
|
_font(18px,25px,#FA6400,,)
|
||||||
.state_item_switch
|
.state_item_switch
|
||||||
display: inline-flex;
|
display: inline-flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@@ -483,6 +493,11 @@
|
|||||||
line-height: 50px;
|
line-height: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
margin-bottom 20px
|
||||||
|
margin-right 24px
|
||||||
|
outline none
|
||||||
|
background none
|
||||||
|
cursor pointer
|
||||||
.switch__input
|
.switch__input
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 0;
|
width: 0;
|
||||||
@@ -503,8 +518,8 @@
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
transition: border-color .3s,background-color .3s;
|
transition: border-color .3s,background-color .3s;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
border-color: rgb(255, 73, 73);
|
border-color: $gray2;
|
||||||
background-color: rgb(255, 73, 73);
|
background-color: $gray3;
|
||||||
&::after
|
&::after
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -44,3 +44,7 @@ _ct()
|
|||||||
position: absolute
|
position: absolute
|
||||||
top: 50%
|
top: 50%
|
||||||
transform: translateY(-50%)
|
transform: translateY(-50%)
|
||||||
|
|
||||||
|
// 背景图片改变颜色
|
||||||
|
_shadow(w,c)
|
||||||
|
filter drop-shadow(w 0 0 c)
|
||||||
@@ -124,6 +124,10 @@ input::-webkit-input-placeholder {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pointer {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
.mgb40 {
|
.mgb40 {
|
||||||
margin-bottom: .4rem !important;
|
margin-bottom: .4rem !important;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,11 @@
|
|||||||
import * as types from '../types'
|
import * as types from '../types'
|
||||||
import { getStore, setStore } from '@config/utils.js'
|
import { getStore, setStore } from '@config/utils.js'
|
||||||
|
|
||||||
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.155:8013' : 'http://192.168.81.155:8013'
|
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://43.139.166.161:8018' : 'http://43.139.166.16:8018'
|
||||||
const imgBaseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.100/' : 'http://192.168.46.5/'
|
|
||||||
const setTime = '5000'
|
const setTime = '5000'
|
||||||
const state = {
|
const state = {
|
||||||
baseUrl: getStore('baseUrl') || baseUrl,
|
baseUrl: getStore('baseUrl') || baseUrl,
|
||||||
setTime: getStore('setTime') || setTime,
|
setTime: getStore('setTime') || setTime,
|
||||||
imgBaseUrl: getStore('imgBaseUrl') || imgBaseUrl,
|
|
||||||
lockTime: getStore('lockTime') || 0,
|
|
||||||
loading: false,
|
loading: false,
|
||||||
showToast: false,
|
showToast: false,
|
||||||
showAlert: false,
|
showAlert: false,
|
||||||
@@ -21,8 +18,6 @@ const state = {
|
|||||||
const getters = {
|
const getters = {
|
||||||
baseUrl: state => state.baseUrl,
|
baseUrl: state => state.baseUrl,
|
||||||
setTime: state => state.setTime,
|
setTime: state => state.setTime,
|
||||||
imgBaseUrl: state => state.imgBaseUrl,
|
|
||||||
lockTime: state => state.lockTime,
|
|
||||||
loading: state => state.loading,
|
loading: state => state.loading,
|
||||||
showToast: state => state.showToast,
|
showToast: state => state.showToast,
|
||||||
showAlert: state => state.showAlert
|
showAlert: state => state.showAlert
|
||||||
@@ -32,8 +27,6 @@ const actions = {
|
|||||||
setConfig ({commit}, res) {
|
setConfig ({commit}, res) {
|
||||||
setStore('baseUrl', res.baseUrl)
|
setStore('baseUrl', res.baseUrl)
|
||||||
setStore('setTime', res.setTime)
|
setStore('setTime', res.setTime)
|
||||||
setStore('imgBaseUrl', res.imgBaseUrl)
|
|
||||||
setStore('lockTime', res.lockTime)
|
|
||||||
commit(types.COM_CONFIG, res)
|
commit(types.COM_CONFIG, res)
|
||||||
},
|
},
|
||||||
setLoadingState ({ commit }, status) {
|
setLoadingState ({ commit }, status) {
|
||||||
@@ -63,8 +56,6 @@ const mutations = {
|
|||||||
[types.COM_CONFIG] (state, res) {
|
[types.COM_CONFIG] (state, res) {
|
||||||
state.baseUrl = res.baseUrl
|
state.baseUrl = res.baseUrl
|
||||||
state.setTime = res.setTime
|
state.setTime = res.setTime
|
||||||
state.imgBaseUrl = res.imgBaseUrl
|
|
||||||
state.lockTime = res.lockTime
|
|
||||||
},
|
},
|
||||||
|
|
||||||
[types.COM_LOADING_STATUS] (state, status) {
|
[types.COM_LOADING_STATUS] (state, status) {
|
||||||
|
|||||||
@@ -1,62 +1,90 @@
|
|||||||
import * as types from '../types'
|
import * as types from '../types'
|
||||||
import { getStore, setStore } from '@config/utils.js'
|
import { getStore, setStore } from '@config/utils.js'
|
||||||
|
|
||||||
|
// const state = {
|
||||||
|
// accountId: getStore('accountId') || '',
|
||||||
|
// accountName: getStore('accountName') || '',
|
||||||
|
// userName: getStore('userName') || '',
|
||||||
|
// deptName: getStore('deptName') || '',
|
||||||
|
// deviceUuid: getStore('deviceUuid') || '',
|
||||||
|
// deviceCode: getStore('deviceCode') || ''
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const getters = {
|
||||||
|
// accountId: state => state.accountId,
|
||||||
|
// accountName: state => state.accountName,
|
||||||
|
// userName: state => state.userName,
|
||||||
|
// deptName: state => state.deptName,
|
||||||
|
// deviceUuid: state => state.deviceUuid,
|
||||||
|
// deviceCode: state => state.deviceCode
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const actions = {
|
||||||
|
// setUserInfo ({ commit }, res) {
|
||||||
|
// setStore('accountId', res.account_id)
|
||||||
|
// setStore('accountName', res.account_name)
|
||||||
|
// setStore('userName', res.user_name)
|
||||||
|
// setStore('deptName', res.dept_name)
|
||||||
|
// commit(types.SET_USER_INFO, res)
|
||||||
|
// },
|
||||||
|
// setSignOut ({ commit }) {
|
||||||
|
// localStorage.removeItem('accountId')
|
||||||
|
// localStorage.removeItem('accountName')
|
||||||
|
// localStorage.removeItem('userName')
|
||||||
|
// localStorage.removeItem('deptName')
|
||||||
|
// commit(types.SET_SIGN_OUT)
|
||||||
|
// },
|
||||||
|
// setDevice ({commit}, res) {
|
||||||
|
// setStore('deviceUuid', res.deviceUuid)
|
||||||
|
// setStore('deviceCode', res.deviceCode)
|
||||||
|
// commit(types.SET_DEVICE, res)
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// const mutations = {
|
||||||
|
// [types.SET_USER_INFO] (state, res) {
|
||||||
|
// state.accountId = res.account_id
|
||||||
|
// state.accountName = res.account_name
|
||||||
|
// state.userName = res.user_name
|
||||||
|
// state.deptName = res.dept_name
|
||||||
|
// },
|
||||||
|
// [types.SET_SIGN_OUT] (state) {
|
||||||
|
// state.accountId = ''
|
||||||
|
// state.accountName = ''
|
||||||
|
// state.userName = ''
|
||||||
|
// state.deptName = ''
|
||||||
|
// },
|
||||||
|
// [types.SET_DEVICE] (state, res) {
|
||||||
|
// state.deviceUuid = res.deviceUuid
|
||||||
|
// state.deviceCode = res.deviceCode
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
const state = {
|
const state = {
|
||||||
accountId: getStore('accountId') || '',
|
userInfo: getStore('userInfo') || '' // 用户信息
|
||||||
accountName: getStore('accountName') || '',
|
|
||||||
userName: getStore('userName') || '',
|
|
||||||
deptName: getStore('deptName') || '',
|
|
||||||
deviceUuid: getStore('deviceUuid') || '',
|
|
||||||
deviceCode: getStore('deviceCode') || ''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const getters = {
|
const getters = {
|
||||||
accountId: state => state.accountId,
|
userInfo: state => state.userInfo
|
||||||
accountName: state => state.accountName,
|
|
||||||
userName: state => state.userName,
|
|
||||||
deptName: state => state.deptName,
|
|
||||||
deviceUuid: state => state.deviceUuid,
|
|
||||||
deviceCode: state => state.deviceCode
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const actions = {
|
const actions = {
|
||||||
setUserInfo ({ commit }, res) {
|
userInfo ({ commit }, res) {
|
||||||
setStore('accountId', res.account_id)
|
setStore('userInfo', res)
|
||||||
setStore('accountName', res.account_name)
|
|
||||||
setStore('userName', res.user_name)
|
|
||||||
setStore('deptName', res.dept_name)
|
|
||||||
commit(types.SET_USER_INFO, res)
|
commit(types.SET_USER_INFO, res)
|
||||||
},
|
},
|
||||||
setSignOut ({ commit }) {
|
setSignOut ({ commit }) {
|
||||||
localStorage.removeItem('accountId')
|
localStorage.removeItem('userInfo')
|
||||||
localStorage.removeItem('accountName')
|
|
||||||
localStorage.removeItem('userName')
|
|
||||||
localStorage.removeItem('deptName')
|
|
||||||
commit(types.SET_SIGN_OUT)
|
commit(types.SET_SIGN_OUT)
|
||||||
},
|
|
||||||
setDevice ({commit}, res) {
|
|
||||||
setStore('deviceUuid', res.deviceUuid)
|
|
||||||
setStore('deviceCode', res.deviceCode)
|
|
||||||
commit(types.SET_DEVICE, res)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mutations = {
|
const mutations = {
|
||||||
[types.SET_USER_INFO] (state, res) {
|
[types.SET_USER_INFO] (state, res) {
|
||||||
state.accountId = res.account_id
|
state.userInfo = res
|
||||||
state.accountName = res.account_name
|
|
||||||
state.userName = res.user_name
|
|
||||||
state.deptName = res.dept_name
|
|
||||||
},
|
},
|
||||||
[types.SET_SIGN_OUT] (state) {
|
[types.SET_SIGN_OUT] (state) {
|
||||||
state.accountId = ''
|
state.accountId = ''
|
||||||
state.accountName = ''
|
|
||||||
state.userName = ''
|
|
||||||
state.deptName = ''
|
|
||||||
},
|
|
||||||
[types.SET_DEVICE] (state, res) {
|
|
||||||
state.deviceUuid = res.deviceUuid
|
|
||||||
state.deviceCode = res.deviceCode
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5190,10 +5190,10 @@ jsdom@^11.5.1:
|
|||||||
ws "^5.2.0"
|
ws "^5.2.0"
|
||||||
xml-name-validator "^3.0.0"
|
xml-name-validator "^3.0.0"
|
||||||
|
|
||||||
jsencrypt@^3.2.1:
|
jsencrypt@^3.3.2:
|
||||||
version "3.2.1"
|
version "3.3.2"
|
||||||
resolved "https://registry.yarnpkg.com/jsencrypt/-/jsencrypt-3.2.1.tgz#09766983cc760088ff26b12fe7e574252af97727"
|
resolved "https://registry.yarnpkg.com/jsencrypt/-/jsencrypt-3.3.2.tgz#b0f1a2278810c7ba1cb8957af11195354622df7c"
|
||||||
integrity sha512-k1sD5QV0KPn+D8uG9AdGzTQuamt82QZ3A3l6f7TRwMU6Oi2Vg0BsL+wZIQBONcraO1pc78ExMdvmBBJ8WhNYUA==
|
integrity sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==
|
||||||
|
|
||||||
jsesc@^1.3.0:
|
jsesc@^1.3.0:
|
||||||
version "1.3.0"
|
version "1.3.0"
|
||||||
|
|||||||
Reference in New Issue
Block a user