This commit is contained in:
2022-11-10 13:51:41 +08:00
parent 520c394d45
commit e8906abda6
8 changed files with 62 additions and 136 deletions

View File

@@ -2,8 +2,8 @@ import {post, post2} from '@config/http.js'
// import store from '../vuex/store'
// 手持登录
export const loginApi = (user, password) => post('api/pda/handlogin', {
user: user,
export const loginApi = (user, password) => post('api/pda/login', {
username: user,
password: password
})
// 手持登陆查询菜单权限
@@ -84,7 +84,7 @@ export const taskOperation = (uuid, type) => post2('api/hand/taskoperation', {
* 搬运任务
*/
// 1.1查询区域点位
export const handQueryPoint = (uuid, type) => post2('api/pda/handling/queryPoint', {})
export const handQueryPoint = (uuid, type) => post('api/pda/handling/queryPoint', {})
// export const handQueryPoint = () => {
// let res = {
// code: '1',
@@ -94,7 +94,7 @@ export const handQueryPoint = (uuid, type) => post2('api/pda/handling/queryPoint
// }
// 1.2任务生成
export const createTask = (sid, scode, spcode, nid, ncode, npcode) => post2('api/pda/handling/createTask', {
export const createTask = (sid, scode, spcode, nid, ncode, npcode) => post('api/pda/handling/createTask', {
start_region_id: sid,
start_region_code: scode,
start_point_code: spcode,

View File

@@ -66,7 +66,7 @@ export const post = (sevmethod, params) => {
export const post2 = (sevmethod, params) => {
return new Promise((resolve, reject) => {
axios.post(`${store.getters.acsUrl}/` + sevmethod, params)
axios.post(`${store.getters.acsip}/` + sevmethod, params)
.then(response => {
resolve(response.data)
}, error => {

View File

@@ -15,20 +15,20 @@
</section>
<div class="con">
<ul>
<li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li>
<!-- <li v-for="e in menuList" :key="e.menu_id" @click="toPage(e)">{{e.name}}</li> -->
<li @click="goInner('/TaskManage')">任务管理</li>
<li @click="goInner('/ZlManage')">指令管理</li>
<li @click="goInner('/HandTask')">搬运任务</li>
<li @click="goInner('/InstoreConfirm')">入库确认</li>
<li @click="goInner('/OutstoreConfirm')">出库确认</li>
<li @click="goInner('/PwdManage')">修改密码</li>
<!-- <li @click="goInner('/PwdManage')">修改密码</li> -->
</ul>
</div>
</section>
</template>
<script>
import {authority} from '@config/getData2.js'
// import {authority} from '@config/getData2.js'
export default {
name: 'Home',
data () {
@@ -42,9 +42,9 @@ export default {
document.getElementsByTagName('body')[0].className = 'bgwhite'
this.$store.dispatch('publicObj', '')
},
created () {
this._authority()
},
// created () {
// this._authority()
// },
methods: {
toPage (e) {
let name = e.path.substr(2)
@@ -54,11 +54,11 @@ 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)
this.menuList = [...res.result.sonTree]
},
// async _authority () {
// let accountId = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).account_id : ''
// let res = await authority(accountId)
// this.menuList = [...res.result.sonTree]
// },
Quit () {
this.$store.dispatch('setSignOut')
this.$router.push('/login')

View File

@@ -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>
@@ -11,7 +11,7 @@
<i class="icon-eye" :class="type === 'password' ? 'icon-eye-close' : 'icon-eye-open'" @click="changeType"></i>
</div>
<div class="fxrow check-box">
<i class="icon-name-check" :class="{'icon-name-checked': memberName === 'true'}" @click="Remember"></i>
<i class="icon-name-check" :class="{'icon-name-checked': memberName}" @click="Remember"></i>
<span class="fxcol">记住用户名</span>
<router-link :to="{path: '/setup'}" class="fxcol" style="text-align:right;color:#6798ef">设置</router-link>
</div>
@@ -28,15 +28,19 @@ export default {
name: 'Login',
data () {
return {
loginname: this.$store.getters.memberName === 'true' ? this.$store.getters.loginname : '',
loginname: '',
password: '',
type: 'password',
memberName: this.$store.getters.memberName,
jobnum: '',
qrcode: '',
memberName: false,
disabled: false
}
},
created () {
if (this.$store.getters.userInfo !== '') {
this.loginname = JSON.parse(this.$store.getters.userInfo).loginname
this.memberName = this.loginname !== ''
}
},
mounted () {
document.getElementsByTagName('body')[0].className = 'login-bg'
},
@@ -45,16 +49,16 @@ export default {
this.type = this.type === 'password' ? 'text' : 'password'
},
Remember () {
this.memberName = this.memberName === 'true' ? 'false' : 'true'
this.memberName = !this.memberName
},
async loginApi () {
try {
let res = await loginApi(this.loginname, encrypt(this.password))
let obj = {}
if (this.remember) {
obj = Object.assign({}, res, {loginname: this.loginname})
if (this.memberName) {
obj = Object.assign({}, res.user.user, {token: res.token, loginname: this.loginname})
} else {
obj = Object.assign({}, res, {loginname: ''})
obj = Object.assign({}, res.user.user, {token: res.token, loginname: ''})
}
this.$store.dispatch('userInfo', JSON.stringify(obj))
addCLodop()

View File

@@ -11,14 +11,14 @@
<span>acs地址:</span>
<input type="text" v-model="acsip">
</li>
<li>
<!-- <li>
<span>打印地址:</span>
<input type="text" v-model="printip">
</li>
<li>
<span>刷新时间(s):</span>
<input type="text" v-model="setTime">
</li>
</li> -->
</ul>
</section>
<section class="submit-bar">
@@ -48,19 +48,19 @@ export default {
this.toast('请填写acs地址')
return
}
if (this.printip === '') {
this.toast('请填写打印地址')
return
}
if (this.setTime === '') {
this.toast('请填写刷新时间')
return
}
// if (this.printip === '') {
// this.toast('请填写打印地址')
// return
// }
// if (this.setTime === '') {
// this.toast('请填写刷新时间')
// return
// }
// 存值
this.$store.dispatch('setBaseUrl', this.addrip)
this.$store.dispatch('setAcsIp', this.acsip)
this.$store.dispatch('setPrintUrl', this.printip)
this.$store.dispatch('setRefreshTime', this.setTime)
// this.$store.dispatch('setPrintUrl', this.printip)
// this.$store.dispatch('setRefreshTime', this.setTime)
this.$router.push('/login')
}
}

View File

@@ -1,19 +1,15 @@
<template>
<section>
<nav-bar title="组盘"></nav-bar>
<nav-bar title="搬运任务"></nav-bar>
<section class="content mgb110">
<div class="filter-wraper">
<div class="bottom-filter-tip">
<div class="filter-label txtjustify">起点区域</div>
<div class="fxcol mgl20 visible">
<dropdown-menu
:option="optionNew1"
:option="option1"
:active="active1"
:open="open1"
:inputed="true"
v-model="val1"
@handleBlur="handleBlur1"
@handleChange="handleChange1"
@toggleItem="toggleItem1"
@dropdownMenu="dropdownMenu1">
</dropdown-menu>
@@ -23,13 +19,9 @@
<div class="filter-label txtjustify">起点点位</div>
<div class="fxcol mgl20 visible">
<dropdown-menu
:option="optionNew2"
:option="option2"
:active="active2"
:open="open2"
:inputed="true"
v-model="val2"
@handleBlur="handleBlur2"
@handleChange="handleChange2"
@toggleItem="toggleItem2"
@dropdownMenu="dropdownMenu2">
</dropdown-menu>
@@ -39,13 +31,9 @@
<div class="filter-label txtjustify">终点区域</div>
<div class="fxcol mgl20 visible">
<dropdown-menu
:option="optionNew3"
:option="option3"
:active="active3"
:open="open3"
:inputed="true"
v-model="val3"
@handleBlur="handleBlur3"
@handleChange="handleChange3"
@toggleItem="toggleItem3"
@dropdownMenu="dropdownMenu3">
</dropdown-menu>
@@ -55,13 +43,9 @@
<div class="filter-label txtjustify">终点点位</div>
<div class="fxcol mgl20 visible">
<dropdown-menu
:option="optionNew4"
:option="option4"
:active="active4"
:open="open4"
:inputed="true"
v-model="val4"
@handleBlur="handleBlur4"
@handleChange="handleChange4"
@toggleItem="toggleItem4"
@dropdownMenu="dropdownMenu4">
</dropdown-menu>
@@ -89,25 +73,17 @@ export default {
data () {
return {
option1: [],
optionNew1: [],
active1: '',
open1: false,
val1: '',
option2: [],
optionNew2: [],
active2: '',
open2: false,
val2: '',
option3: [],
optionNew3: [],
active3: '',
open3: false,
val3: '',
option4: [],
optionNew4: [],
active4: '',
open4: false,
val4: '',
disabled: false
}
},
@@ -118,12 +94,12 @@ export default {
async _handQueryPoint () {
let res = await handQueryPoint()
if (res.code === '1') {
this.option1 = [...res.result]
this.option1 = [...res.result.regionja]
this.option1.map(el => {
this.$set(el, 'value', el.region_code)
this.$set(el, 'label', el.region_name)
})
this.option3 = [...res.result]
this.option3 = [...res.result.regionja]
this.option3.map(el => {
this.$set(el, 'value', el.region_code)
this.$set(el, 'label', el.region_name)
@@ -132,37 +108,8 @@ export default {
this.Dialog(res.desc)
}
},
/** 模糊匹配 */
selectMatchItem1 (lists, keyWord) {
let resArr = []
lists.filter((item) => {
if (item.region_name.indexOf(keyWord) > -1) {
resArr.push(item)
}
})
return resArr
},
selectMatchItem2 (lists, keyWord) {
let resArr = []
lists.filter((item) => {
if (item.point_name.indexOf(keyWord) > -1) {
resArr.push(item)
}
})
return resArr
},
handleChange1 (e) {
this.optionNew1 = []
this.optionNew1 = this.selectMatchItem1(this.option1, e)
this.open1 = true
},
handleBlur1 () {
this.open1 = false
this.val1 = ''
},
toggleItem1 () {
if (!this.open1) {
this.optionNew1 = this.option1
this.open1 = true
} else {
this.open1 = false
@@ -171,9 +118,8 @@ export default {
dropdownMenu1 (i) {
this.active1 = i + ''
this.open1 = false
if (this.optionNew1.length > 0) {
this.val1 = this.optionNew1[i].label
}
this.active2 = ''
this.option2 = []
this.option1.map(el => {
if (el.region_code === this.option1[this.active1].value) {
this.option2 = el.pointArr
@@ -184,18 +130,8 @@ export default {
}
})
},
handleChange2 (e) {
this.optionNew2 = []
this.optionNew2 = this.selectMatchItem2(this.option2, e)
this.open2 = true
},
handleBlur2 () {
this.open2 = false
this.val2 = ''
},
toggleItem2 () {
if (!this.open2) {
this.optionNew2 = this.option2
this.open2 = true
} else {
this.open2 = false
@@ -204,9 +140,6 @@ export default {
dropdownMenu2 (i) {
this.active2 = i + ''
this.open2 = false
if (this.optionNew2.length > 0) {
this.val2 = this.optionNew2[i].label
}
},
handleChange3 (e) {
this.optionNew3 = []
@@ -219,7 +152,6 @@ export default {
},
toggleItem3 () {
if (!this.open3) {
this.optionNew3 = this.option3
this.open3 = true
} else {
this.open3 = false
@@ -228,9 +160,8 @@ export default {
dropdownMenu3 (i) {
this.active3 = i + ''
this.open3 = false
if (this.optionNew3.length > 0) {
this.val3 = this.optionNew3[i].label
}
this.active4 = ''
this.option4 = []
this.option3.map(el => {
if (el.region_code === this.option3[this.active3].value) {
this.option4 = el.pointArr
@@ -241,18 +172,8 @@ export default {
}
})
},
handleChange4 (e) {
this.optionNew4 = []
this.optionNew4 = this.selectMatchItem2(this.option4, e)
this.open4 = true
},
handleBlur4 () {
this.open4 = false
this.val4 = ''
},
toggleItem4 () {
if (!this.open4) {
this.optionNew4 = this.option4
this.open4 = true
} else {
this.open4 = false
@@ -261,9 +182,6 @@ export default {
dropdownMenu4 (i) {
this.active4 = i + ''
this.open4 = false
if (this.optionNew4.length > 0) {
this.val4 = this.optionNew4[i].label
}
},
async _createTask () {
this.disabled = true

View File

@@ -119,7 +119,7 @@ export default {
async _queryPoint () {
let res = await queryPoint()
if (res.code === '1') {
this.option1 = [...res.result]
this.option1 = [...res.result.regionja]
this.option1.map(el => {
this.$set(el, 'value', el.region_code)
this.$set(el, 'label', el.region_name)
@@ -222,9 +222,13 @@ export default {
this.disabled1 = true
try {
let type = ''
if (!this.active3) type = this.option3[this.active3].value
if (this.active3 !== '') {
type = this.option3[this.active3].value
}
let dcode = ''
if (!this.active2) dcode = this.option2[this.active2].value
if (this.active2 !== '') {
dcode = this.option2[this.active2].value
}
let res = await inStructInSave(this.val1, type, this.mcode, dcode)
if (res.code === '1') {
this.toast(res.desc)

View File

@@ -1,8 +1,8 @@
import * as types from '../types'
import { getStore, setStore } from '@config/mUtils.js'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.153:8010' : 'http://192.168.81.153:8010'
const acsip = process.env.NODE_ENV === 'development' ? 'http://192.168.81.153:8010' : 'http://192.168.81.153:8010'
const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.69:8011' : 'http://192.168.81.69:8011'
const acsip = process.env.NODE_ENV === 'development' ? 'http://192.168.81.69:8010' : 'http://192.168.81.69:8010'
const printUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.139:8000' : 'http://192.168.81.139:8000'
const setTime = '10'
/**