登录配置首页
This commit is contained in:
@@ -4,38 +4,25 @@
|
||||
<section class="content" style="margin-bottom: 0">
|
||||
<div class="userInfo">
|
||||
<div class="fxcol">
|
||||
<p class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).nickName : ''}}</p>
|
||||
<p class="p2">欢迎进入晟华手持系统!</p>
|
||||
<p class="p1">{{$store.getters.userInfo !== '' ? JSON.parse($store.getters.userInfo).UserName : ''}}</p>
|
||||
<p class="p2">欢迎进入讯博手持系统!</p>
|
||||
</div>
|
||||
<div class="exit" @click="Quit">
|
||||
<i class="icon-exit"></i>
|
||||
<span class="exit-text">退出</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="con">
|
||||
<ul>
|
||||
<li @click="goInner('/groupdisk')">组盘</li>
|
||||
<li @click="goInner('/opendisk')">解盘</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
<div class="con">
|
||||
<ul>
|
||||
<!-- <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> -->
|
||||
<li @click="goInner('/zlmanage')">指令管理</li>
|
||||
<li @click="goInner('/taskmanage')">任务管理</li>
|
||||
<li @click="goInner('/belowgradereport')">不合格品上报</li>
|
||||
<li @click="goInner('/sendmater')">送料</li>
|
||||
<li @click="goInner('/callmater')">叫料</li>
|
||||
<li @click="goInner('/sendempty')">送空</li>
|
||||
<li @click="goInner('/callempty')">叫空</li>
|
||||
<li @click="goInner('/KunliaoManage')">困料管理</li>
|
||||
<li @click="goInner('/RuyaoManage')">入窑管理</li>
|
||||
<li @click="goInner('/VehicleBind')">载具绑定</li>
|
||||
<li @click="goInner('/VehicleUnbind')">载具解绑</li>
|
||||
<li @click="goInner('/CallDefective')">呼叫次品料</li>
|
||||
<li @click="goInner('/CreateChargingTask')">AGV充电</li>
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {authority} from '@config/getData2.js'
|
||||
export default {
|
||||
name: 'Home',
|
||||
data () {
|
||||
@@ -49,9 +36,6 @@ export default {
|
||||
document.getElementsByTagName('body')[0].className = 'bgwhite'
|
||||
this.$store.dispatch('receiveMaterObj', {})
|
||||
},
|
||||
created () {
|
||||
// this._authority()
|
||||
},
|
||||
methods: {
|
||||
toPage (e) {
|
||||
let name = e.path.substr(2)
|
||||
@@ -60,16 +44,6 @@ export default {
|
||||
}
|
||||
this.$router.push(e.path.substr(2))
|
||||
},
|
||||
/** 获取菜单 */
|
||||
async _authority () {
|
||||
let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
|
||||
let res = await authority(accountId)
|
||||
if (res.code === '1') {
|
||||
this.menuList = [...res.result.sonTree]
|
||||
} else {
|
||||
this.Dialog(res.desc)
|
||||
}
|
||||
},
|
||||
Quit () {
|
||||
this.$store.dispatch('setSignOut')
|
||||
this.$router.push('/login')
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<section>
|
||||
<section class="content">
|
||||
<p class="p1">欢迎来到</p>
|
||||
<p class="p2">晟华手持系统!</p>
|
||||
<p class="p2">讯博手持系统!</p>
|
||||
<div class="input-box">
|
||||
<input type="text" class="allwidth" placeholder="请输入用户名" v-model="loginname">
|
||||
</div>
|
||||
@@ -21,7 +21,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {loginApi} from '@config/getData2'
|
||||
import {rfLogin} from '@config/getData2'
|
||||
import {encrypt} from '../../main.js'
|
||||
export default {
|
||||
name: 'Login',
|
||||
@@ -50,15 +50,15 @@ export default {
|
||||
Remember () {
|
||||
this.memberName = !this.memberName
|
||||
},
|
||||
async loginApi () {
|
||||
async rfLogin () {
|
||||
try {
|
||||
let res = await loginApi(this.loginname, encrypt(this.password))
|
||||
if (res.code === '1') {
|
||||
let res = await rfLogin(this.loginname, encrypt(this.password))
|
||||
if (res.ErrNO === '1') {
|
||||
let obj = {}
|
||||
if (this.memberName) {
|
||||
obj = Object.assign({}, res.result.user.user, {token: res.result.token, loginname: this.loginname})
|
||||
obj = Object.assign({}, {UserName: res.UserName, UserPID: res.UserPID, loginname: this.loginname})
|
||||
} else {
|
||||
obj = Object.assign({}, res.result.user.user, {token: res.result.token, loginname: ''})
|
||||
obj = Object.assign({}, {UserName: res.UserName, UserPID: res.UserPID, loginname: ''})
|
||||
}
|
||||
this.$store.dispatch('setUserInfo', JSON.stringify(obj))
|
||||
this.$router.push('/home')
|
||||
@@ -83,7 +83,7 @@ export default {
|
||||
return
|
||||
}
|
||||
this.logintype = '01'
|
||||
this.loginApi()
|
||||
this.rfLogin()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,14 +4,14 @@
|
||||
<section class="content">
|
||||
<ul class="pwd-manage-content">
|
||||
<li>
|
||||
<span>lms地址:</span>
|
||||
<span>服务器地址:</span>
|
||||
<input type="text" v-model.trim="addrip">
|
||||
</li>
|
||||
<li>
|
||||
<!-- <li>
|
||||
<span>acs地址:</span>
|
||||
<input type="text" v-model.trim="acsip">
|
||||
</li>
|
||||
<!-- <li>
|
||||
<li>
|
||||
<span>打印地址:</span>
|
||||
<input type="text" v-model="printip">
|
||||
</li>
|
||||
@@ -41,13 +41,13 @@ export default {
|
||||
methods: {
|
||||
_submit () {
|
||||
if (this.addrip === '') {
|
||||
this.toast('请填写wms地址')
|
||||
return
|
||||
}
|
||||
if (this.acsip === '') {
|
||||
this.toast('请填写acs地址')
|
||||
this.toast('请填写服务器地址')
|
||||
return
|
||||
}
|
||||
// if (this.acsip === '') {
|
||||
// this.toast('请填写acs地址')
|
||||
// return
|
||||
// }
|
||||
// if (this.printip === '') {
|
||||
// this.toast('请填写打印地址')
|
||||
// return
|
||||
@@ -58,7 +58,7 @@ export default {
|
||||
// }
|
||||
// 存值
|
||||
this.$store.dispatch('setBaseUrl', this.addrip)
|
||||
this.$store.dispatch('setAcsIp', this.acsip)
|
||||
// this.$store.dispatch('setAcsIp', this.acsip)
|
||||
// this.$store.dispatch('setPrintUrl', this.printip)
|
||||
// this.$store.dispatch('setRefreshTime', this.setTime)
|
||||
this.$router.push('/login')
|
||||
|
||||
Reference in New Issue
Block a user