This commit is contained in:
2023-07-03 20:10:05 +08:00
parent 238bb7d5bc
commit 437dd0ff98
5 changed files with 48 additions and 18 deletions

View File

@@ -13,6 +13,9 @@ export const parameterSetting = (num, word) => post('api/developer/parameterSett
password: word
})
export const homeQueryHead = () => post('api/home/queryHead', {
})
// new
// 登录
export const authlogin = (username, password) => post('auth/login', {

View File

@@ -12,9 +12,9 @@
<div class="header-wraper__right">
<div class="header_user_wraper">
<div class="header_user_wraper_inn">
<div class="state-item">运行</div>
<div class="state-item">{{ agvInfo.agvrun_status_name }}</div>
<div class="state-line"></div>
<div class="state-item">自动</div>
<div class="state-item">{{ agvInfo.automatic_status_name }}</div>
<!-- <div class="state-line"></div> -->
<!-- <div class="state-item">中文&nbsp;<i class="icon_dropdown"></i></div> -->
</div>
@@ -22,10 +22,10 @@
<div class="header_user_wraper">
<div class="header_user_wraper_inn">
<div class="elec-qty-wrap">
<div class="elec-qty"></div>
<div class="elec-qty" :style="{height: Number(dataInfo.electric) + '%', backgroundColor: Number(dataInfo.electric) <= 40 ? 'fa6400' : '#54c0b3'}"></div>
<div class="elec-qty-top"></div>
</div>
<div class="elec-txt">90%</div>
<div class="elec-txt">{{ dataInfo.electric }}%</div>
</div>
</div>
<div class="header_user_wraper">
@@ -95,7 +95,8 @@
<script>
import jxTime from '@components/time.vue'
import jxDialog from '@components/dialog.vue'
import { updatePass, sysMenuBuild, authLogout } from '@config/getData2.js'
import { queryHomePage } from '@/config/getData.js'
import { updatePass, sysMenuBuild, authLogout, homeQueryHead } from '@config/getData2.js'
import {encrypt} from '../../../main.js'
export default {
components: {
@@ -195,7 +196,9 @@ export default {
options: {
useKbEvents: false,
preventClickEvent: false
}
},
dataInfo: {},
agvInfo: {}
}
},
computed: {
@@ -328,6 +331,22 @@ export default {
async _authLogout () {
await authLogout()
},
async _queryHomePage () {
let res = await queryHomePage()
if (res.code === '1') {
this.dataInfo = res.result
} else {
this.toast(res.desc)
}
},
async _homeQueryHead () {
let res = await homeQueryHead()
if (res.code === '1') {
this.agvInfo = res.result
} else {
this.toast(res.desc)
}
},
toEixt () {
this.$store.dispatch('setSignOut')
this._authLogout()
@@ -421,8 +440,6 @@ export default {
height 90%
left 0
bottom 0
background-color #54C0B3
// background-color #fa6400
.elec-qty-top
position absolute
_wh(8px, 3px)

View File

@@ -459,8 +459,8 @@
display: inline-flex;
align-items: center;
position: relative;
line-height: 50px;
height: 50px;
line-height: 100px;
height: 100px;
vertical-align: middle;
margin-bottom 20px
margin-right 24px
@@ -477,11 +477,11 @@
margin: 0;
display: inline-block;
position: relative;
width: 100px;
height: 50px;
width: 260px;
height: 100px;
border: 1px solid #dcdfe6;
outline: none;
border-radius: 25px;
border-radius: 60px;
box-sizing: border-box;
background: #dcdfe6;
cursor: pointer;
@@ -496,8 +496,8 @@
left: 1px;
border-radius: 100%;
transition: all .3s;
width: 47px;
height: 47px;
width: 97px;
height: 97px;
background-color: #fff;
.is-checked
.switch_core

View File

@@ -1,15 +1,17 @@
import * as types from '../types'
// import { getStore, setStore } from '@config/utils.js'
import { getStore, setStore } from '@config/utils.js'
const state = {
materObj: {}, // 物料查询-盘点修改
hcxCheckObj: {} // 缓存线盘点 - 盘点修改
hcxCheckObj: {}, // 缓存线盘点 - 盘点修改
agvObj: getStore('agvObj') || '' // 存储对象
}
const getters = {
materObj: state => state.materObj,
hcxCheckObj: state => state.hcxCheckObj,
defaultActive: state => state.defaultActive
defaultActive: state => state.defaultActive,
agvObj: state => state.agvObj
}
const actions = {
@@ -18,6 +20,10 @@ const actions = {
},
hcxCheckObj ({commit}, res) {
commit(types.HCX_CHECK_OBJ, res)
},
setAgvObj ({commit}, res) {
setStore('agvObj', res)
commit(types.SET_AGV_OBJ, res)
}
}
@@ -27,6 +33,9 @@ const mutations = {
},
[types.HCX_CHECK_OBJ] (state, res) {
state.hcxCheckObj = res
},
[types.SET_AGV_OBJ] (state, res) {
state.agvObj = res
}
}

View File

@@ -15,6 +15,7 @@ export const GET_MENUS = 'GET_MENUS'
// 数据
export const SET_DEVICE = 'SET_DEVICE'
export const SET_AGV_OBJ = 'SET_AGV_OBJ'
// hcx数据
export const MATER_OBJ = 'MATER_OBJ' // 物料查询-盘点修改