change
This commit is contained in:
14
pages.json
14
pages.json
@@ -202,6 +202,20 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/wb/taskcarry",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
,{
|
||||||
|
"path" : "pages/wb/taskmanage",
|
||||||
|
"style" :
|
||||||
|
{
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
}
|
||||||
],
|
],
|
||||||
"globalStyle": {
|
"globalStyle": {
|
||||||
// "pageOrientation": "landscape",
|
// "pageOrientation": "landscape",
|
||||||
|
|||||||
248
pages/home/home.1.vue
Normal file
248
pages/home/home.1.vue
Normal file
@@ -0,0 +1,248 @@
|
|||||||
|
<template>
|
||||||
|
<view class="home_wraper">
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="header">首页</view>
|
||||||
|
<view class="userInfo-wrap">
|
||||||
|
<view class="userInfo">
|
||||||
|
<text v-if="userName !== ''" class="p1">{{userName}}</text>
|
||||||
|
<text class="p2">欢迎进入扬州维邦WMS手持系统!</text>
|
||||||
|
</view>
|
||||||
|
<view class="exit" @tap="Quit">
|
||||||
|
<view class="icon-exit"></view>
|
||||||
|
<view class="exit-text">退出</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_home_wrapper">
|
||||||
|
<view class="menus_wrap">
|
||||||
|
<view class="fir_menu_wrap">
|
||||||
|
<view class="fir_menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage1(e)">
|
||||||
|
<image class="menu-img" :src="require('../../static/image/menu/' + e.path + '.png')" alt="">
|
||||||
|
<view class="menu-name">{{e.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<!-- <button type="primary" @tap="toTest">打印测试</button> -->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="sec_menu_wraper" :class="show ? 'popshow' : 'pophide'">
|
||||||
|
<view class="pop-title">{{title}}</view>
|
||||||
|
<view class="sec_menu_w">
|
||||||
|
<view class="sec_menu-item" :style="{'background-image': 'url(' + require('../../static/image/menu/' + icon + '.png') + ')'}" v-for="(e, i) in secM" :key="'sontree' + i" @click="toPage2(e)">
|
||||||
|
<view class="menu-name_inner">{{e.title}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="show" class="modal" @click.stop="show = false"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
userName: '',
|
||||||
|
menuList: [
|
||||||
|
{title: '通用功能', path: 'RF06', sonTree: [
|
||||||
|
{title: '任务下发', path: '/pages/wb/taskcarry'},
|
||||||
|
{title: '任务管理', path: '/pages/wb/taskmanage'}
|
||||||
|
// {title: '入库组箱', path: '/pages/General/warehouse-box'},
|
||||||
|
// {title: '配送组箱', path: '/pages/General/distribution-box'},
|
||||||
|
// {title: '点对点转运', path: '/pages/General/line-transfer'},
|
||||||
|
// {title: '确认取放货', path: '/pages/General/pick-place-goods'},
|
||||||
|
// {title: '作业管理', path: '/pages/General/ops-mgmt'},
|
||||||
|
// {title: '点位更新', path: '/pages/General/pt-update'}
|
||||||
|
]},
|
||||||
|
// {title: '小料箱功能', path: 'RF03', sonTree: [
|
||||||
|
// {title: '空载具出库', path: '/pages/Material/kzj-out-store'},
|
||||||
|
// {title: '空载具入库', path: '/pages/Material/kzj-in-store'},
|
||||||
|
// {title: '小料箱入库', path: '/pages/Material/xlx-in-store'}
|
||||||
|
// ]},
|
||||||
|
// {title: '大料箱功能', path: 'RF04', sonTree: [
|
||||||
|
// {title: '空载具出入库', path: '/pages/Material/kzj-inout-store'},
|
||||||
|
// {title: '料箱入库', path: '/pages/Material/lx-in-store'},
|
||||||
|
// {title: '物料入库', path: '/pages/Material/mater-in-store'},
|
||||||
|
// {title: '大料箱出库', path: '/pages/Material/dlx-out-store'},
|
||||||
|
// {title: '退库确认', path: '/pages/Material/tuiku-confirm'},
|
||||||
|
// {title: '大料箱移库', path: '/pages/Material/dlx-move-store'},
|
||||||
|
// {title: '大料箱盘库', path: '/pages/Material/dlx-pan-store'}
|
||||||
|
// ]}
|
||||||
|
],
|
||||||
|
show: false,
|
||||||
|
secM: [],
|
||||||
|
icon: '',
|
||||||
|
title: ''
|
||||||
|
};
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
if (this.$store.getters.userInfo) {
|
||||||
|
this.userName = JSON.parse(this.$store.getters.userInfo).username
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toPage1 (e) {
|
||||||
|
if (e.sonTree.length > 0) {
|
||||||
|
this.show = true
|
||||||
|
this.secM = e.sonTree
|
||||||
|
|
||||||
|
this.icon = e.path
|
||||||
|
this.title = e.title
|
||||||
|
}
|
||||||
|
},
|
||||||
|
toPage2 (e) {
|
||||||
|
let url = e.path + '?title=' + e.title
|
||||||
|
if (e.active === false) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
uni.redirectTo({
|
||||||
|
url: url
|
||||||
|
})
|
||||||
|
},
|
||||||
|
Quit () {
|
||||||
|
this.$store.dispatch('delUserInfo', '')
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/login/login'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
toTest () {
|
||||||
|
uni.redirectTo({
|
||||||
|
url: '/pages/test'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.home_wraper
|
||||||
|
_wh(100%, 100%)
|
||||||
|
overflow hidden
|
||||||
|
.zd_content
|
||||||
|
padding 0 24rpx
|
||||||
|
height 100%
|
||||||
|
top 0
|
||||||
|
padding-top calc(var(--status-bar-height) + 86rpx)
|
||||||
|
// background linear-gradient(to bottom, #fae2ca 0%, #fff5ea 20%, #fdfdfd 100%)
|
||||||
|
background linear-gradient(to bottom, #f5f6fb 0%, #fff 100%)
|
||||||
|
.header
|
||||||
|
position fixed
|
||||||
|
left 0
|
||||||
|
top 0
|
||||||
|
padding-top var(--status-bar-height)
|
||||||
|
z-index 100
|
||||||
|
_wh(100%, calc(var(--status-bar-height) + 86rpx))
|
||||||
|
_font(36rpx,86rpx,#333,,center)
|
||||||
|
.userInfo-wrap
|
||||||
|
_fj()
|
||||||
|
_wh(100%,190rpx)
|
||||||
|
padding 0 30rpx
|
||||||
|
background-color $red
|
||||||
|
_bis('../../static/image/info_bg.png',auto,100%,right,bottom)
|
||||||
|
border-radius 12rpx
|
||||||
|
margin-bottom 24rpx
|
||||||
|
.userInfo
|
||||||
|
_fj(,flex-start,column)
|
||||||
|
.p1
|
||||||
|
_font(34rpx,1,#fff)
|
||||||
|
padding-bottom 18rpx
|
||||||
|
.p2
|
||||||
|
_font(26rpx,1,#fff)
|
||||||
|
.exit
|
||||||
|
_fj()
|
||||||
|
height 50rpx
|
||||||
|
padding 0 20rpx
|
||||||
|
border 1px solid #FF967C
|
||||||
|
border-radius 20rpx
|
||||||
|
.icon-exit
|
||||||
|
_wh(22rpx, 22rpx)
|
||||||
|
_bis('../../static/image/exit.png',22rpx)
|
||||||
|
.exit-text
|
||||||
|
_font(32rpx,50rpx,#fff,,right)
|
||||||
|
padding-left 10rpx
|
||||||
|
.zd_home_wrapper
|
||||||
|
_wh(100%, calc(100% - 238rpx))
|
||||||
|
margin-bottom 24rpx
|
||||||
|
background-color #fff
|
||||||
|
border-radius: 12rpx;
|
||||||
|
padding: 14rpx;
|
||||||
|
margin-bottom 24rpx
|
||||||
|
box-shadow: 0 4rpx 10rpx 4rpx rgba(0,0,0,.1)
|
||||||
|
overflow-y scroll
|
||||||
|
.menus_wrap
|
||||||
|
width 100%
|
||||||
|
.fir_menu_wrap
|
||||||
|
_fj(flex-start,flex-start,,wrap)
|
||||||
|
align-content: flex-start
|
||||||
|
.fir_menu-item
|
||||||
|
_fj()
|
||||||
|
flex-direction column
|
||||||
|
_wh(30%, auto)
|
||||||
|
margin-bottom 40rpx
|
||||||
|
_font(26rpx, 60rpx,#e74f1a,,center)
|
||||||
|
&:nth-child(3n+2)
|
||||||
|
margin-left 5%
|
||||||
|
margin-right 5%
|
||||||
|
::v-deep .menu-img
|
||||||
|
_wh(100%, auto)
|
||||||
|
img
|
||||||
|
position relative
|
||||||
|
opacity 1
|
||||||
|
_wh(55%, auto)
|
||||||
|
margin 0 auto 0.2rpx
|
||||||
|
.menu-name
|
||||||
|
_font(28rpx, 38rpx, #444,,center)
|
||||||
|
padding 0 20rpx
|
||||||
|
.sec_menu_wraper
|
||||||
|
position fixed
|
||||||
|
bottom 0
|
||||||
|
left 0
|
||||||
|
width 100%
|
||||||
|
background-color #f4f5f5
|
||||||
|
box-shadow 0 -8px 16px 0 rgba(28,31,33,.1)
|
||||||
|
border-top-left-radius 20rpx
|
||||||
|
border-top-right-radius 20rpx
|
||||||
|
z-index 2017
|
||||||
|
transition all .3s
|
||||||
|
.modal
|
||||||
|
position fixed
|
||||||
|
bottom 0
|
||||||
|
left 0
|
||||||
|
_wh(100%, 100%)
|
||||||
|
background-color rgba(0,0,0,0.8)
|
||||||
|
z-index 2010
|
||||||
|
.sec_menu_w
|
||||||
|
width calc(100% - 76rpx)
|
||||||
|
margin 30rpx auto 60rpx auto
|
||||||
|
_fj(flex-start)
|
||||||
|
flex-wrap wrap
|
||||||
|
.sec_menu-item
|
||||||
|
_wh(30%, 120rpx)
|
||||||
|
margin-bottom 20rpx
|
||||||
|
border-radius 10rpx
|
||||||
|
background-size 40% auto
|
||||||
|
background-position right 90%
|
||||||
|
background-repeat no-repeat
|
||||||
|
&:nth-child(3n+2)
|
||||||
|
margin-left 5%
|
||||||
|
margin-right 5%
|
||||||
|
&:nth-child(5n+1) .menu-name_inner
|
||||||
|
background linear-gradient(to right, rgba(73,102,255,0.8) 0%, rgba(117,142,255,0.8) 100%)
|
||||||
|
&:nth-child(5n+2) .menu-name_inner
|
||||||
|
background linear-gradient(to right, rgba(254, 168, 20,0.8) 0%, rgba(255, 177, 1,0.8) 100%)
|
||||||
|
&:nth-child(5n+3) .menu-name_inner
|
||||||
|
background linear-gradient(to right, rgba(0, 228, 153,0.8) 0%, rgba(0, 241, 197,0.8) 100%)
|
||||||
|
&:nth-child(5n+4) .menu-name_inner
|
||||||
|
background linear-gradient(to right, rgba(196, 5, 219,0.8) 0%, rgba(183,120,190,0.8) 100%)
|
||||||
|
&:nth-child(5n+5) .menu-name_inner
|
||||||
|
background linear-gradient(to right, rgba(146, 94, 52,0.8) 0%, rgba(162, 116, 79,0.8) 100%)
|
||||||
|
.menu-name_inner
|
||||||
|
_wh(100%, 100%)
|
||||||
|
_fj(center)
|
||||||
|
_font(28rpx, 30rpx, #fff, 700, center)
|
||||||
|
border-radius 10rpx
|
||||||
|
padding 10rpx
|
||||||
|
overflow hidden
|
||||||
|
.pop-title
|
||||||
|
margin 60rpx 38rpx 0 38rpx
|
||||||
|
_font(30rpx, 60rpx, #000,700,center)
|
||||||
|
</style>
|
||||||
@@ -15,24 +15,14 @@
|
|||||||
<view class="zd_home_wrapper">
|
<view class="zd_home_wrapper">
|
||||||
<view class="menus_wrap">
|
<view class="menus_wrap">
|
||||||
<view class="fir_menu_wrap">
|
<view class="fir_menu_wrap">
|
||||||
<view class="fir_menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage1(e)">
|
<view class="fir_menu-item" v-for="(e, i) in menuList" :key="i" @tap="toPage(e)">
|
||||||
<image class="menu-img" :src="require('../../static/image/menu/' + e.path + '.png')" alt="">
|
<image class="menu-img" :src="require('../../static/image/menu/' + e.icon + '.png')" alt="">
|
||||||
<view class="menu-name">{{e.title}}</view>
|
<view class="menu-name">{{e.title}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- <button type="primary" @tap="toTest">打印测试</button> -->
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="sec_menu_wraper" :class="show ? 'popshow' : 'pophide'">
|
|
||||||
<view class="pop-title">{{title}}</view>
|
|
||||||
<view class="sec_menu_w">
|
|
||||||
<view class="sec_menu-item" :style="{'background-image': 'url(' + require('../../static/image/menu/' + icon + '.png') + ')'}" v-for="(e, i) in secM" :key="'sontree' + i" @click="toPage2(e)">
|
|
||||||
<view class="menu-name_inner">{{e.title}}</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="show" class="modal" @click.stop="show = false"></view>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -42,55 +32,27 @@
|
|||||||
return {
|
return {
|
||||||
userName: '',
|
userName: '',
|
||||||
menuList: [
|
menuList: [
|
||||||
{title: '通用功能', path: 'RF06', sonTree: [
|
{title: '任务下发', icon: 'RF03', path: '/pages/wb/taskcarry'},
|
||||||
{title: '入库组箱', path: '/pages/General/warehouse-box'},
|
{title: '任务管理', icon: 'RF02', path: '/pages/wb/taskmanage'}
|
||||||
{title: '配送组箱', path: '/pages/General/distribution-box'},
|
|
||||||
{title: '点对点转运', path: '/pages/General/line-transfer'},
|
|
||||||
{title: '确认取放货', path: '/pages/General/pick-place-goods'},
|
|
||||||
{title: '作业管理', path: '/pages/General/ops-mgmt'},
|
|
||||||
{title: '点位更新', path: '/pages/General/pt-update'}
|
|
||||||
]},
|
|
||||||
{title: '小料箱功能', path: 'RF03', sonTree: [
|
|
||||||
{title: '空载具出库', path: '/pages/Material/kzj-out-store'},
|
|
||||||
{title: '空载具入库', path: '/pages/Material/kzj-in-store'},
|
|
||||||
{title: '小料箱入库', path: '/pages/Material/xlx-in-store'}
|
|
||||||
]},
|
|
||||||
{title: '大料箱功能', path: 'RF04', sonTree: [
|
|
||||||
{title: '空载具出入库', path: '/pages/Material/kzj-inout-store'},
|
|
||||||
{title: '料箱入库', path: '/pages/Material/lx-in-store'},
|
|
||||||
{title: '物料入库', path: '/pages/Material/mater-in-store'},
|
|
||||||
{title: '大料箱出库', path: '/pages/Material/dlx-out-store'},
|
|
||||||
{title: '退库确认', path: '/pages/Material/tuiku-confirm'},
|
|
||||||
{title: '大料箱移库', path: '/pages/Material/dlx-move-store'},
|
|
||||||
{title: '大料箱盘库', path: '/pages/Material/dlx-pan-store'}
|
|
||||||
]}
|
|
||||||
],
|
],
|
||||||
show: false,
|
show: false,
|
||||||
secM: [],
|
secM: []
|
||||||
icon: '',
|
|
||||||
title: ''
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
|
this.$store.dispatch('setPublicObj', '')
|
||||||
if (this.$store.getters.userInfo) {
|
if (this.$store.getters.userInfo) {
|
||||||
this.userName = JSON.parse(this.$store.getters.userInfo).username
|
this.userName = JSON.parse(this.$store.getters.userInfo).username
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
toPage1 (e) {
|
async _authority () {
|
||||||
if (e.sonTree.length > 0) {
|
let res = await authority()
|
||||||
this.show = true
|
this.menuList = [...res.sonTree]
|
||||||
this.secM = e.sonTree
|
|
||||||
|
|
||||||
this.icon = e.path
|
|
||||||
this.title = e.title
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
toPage2 (e) {
|
toPage (e) {
|
||||||
let url = e.path + '?title=' + e.title
|
let url = e.path + '?title=' + e.title
|
||||||
if (e.active === false) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: url
|
url: url
|
||||||
})
|
})
|
||||||
@@ -100,11 +62,6 @@
|
|||||||
uni.redirectTo({
|
uni.redirectTo({
|
||||||
url: '/pages/login/login'
|
url: '/pages/login/login'
|
||||||
})
|
})
|
||||||
},
|
|
||||||
toTest () {
|
|
||||||
uni.redirectTo({
|
|
||||||
url: '/pages/test'
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -190,57 +147,4 @@
|
|||||||
.menu-name
|
.menu-name
|
||||||
_font(28rpx, 38rpx, #444,,center)
|
_font(28rpx, 38rpx, #444,,center)
|
||||||
padding 0 20rpx
|
padding 0 20rpx
|
||||||
.sec_menu_wraper
|
|
||||||
position fixed
|
|
||||||
bottom 0
|
|
||||||
left 0
|
|
||||||
width 100%
|
|
||||||
background-color #f4f5f5
|
|
||||||
box-shadow 0 -8px 16px 0 rgba(28,31,33,.1)
|
|
||||||
border-top-left-radius 20rpx
|
|
||||||
border-top-right-radius 20rpx
|
|
||||||
z-index 2017
|
|
||||||
transition all .3s
|
|
||||||
.modal
|
|
||||||
position fixed
|
|
||||||
bottom 0
|
|
||||||
left 0
|
|
||||||
_wh(100%, 100%)
|
|
||||||
background-color rgba(0,0,0,0.8)
|
|
||||||
z-index 2010
|
|
||||||
.sec_menu_w
|
|
||||||
width calc(100% - 76rpx)
|
|
||||||
margin 30rpx auto 60rpx auto
|
|
||||||
_fj(flex-start)
|
|
||||||
flex-wrap wrap
|
|
||||||
.sec_menu-item
|
|
||||||
_wh(30%, 120rpx)
|
|
||||||
margin-bottom 20rpx
|
|
||||||
border-radius 10rpx
|
|
||||||
background-size 40% auto
|
|
||||||
background-position right 90%
|
|
||||||
background-repeat no-repeat
|
|
||||||
&:nth-child(3n+2)
|
|
||||||
margin-left 5%
|
|
||||||
margin-right 5%
|
|
||||||
&:nth-child(5n+1) .menu-name_inner
|
|
||||||
background linear-gradient(to right, rgba(73,102,255,0.8) 0%, rgba(117,142,255,0.8) 100%)
|
|
||||||
&:nth-child(5n+2) .menu-name_inner
|
|
||||||
background linear-gradient(to right, rgba(254, 168, 20,0.8) 0%, rgba(255, 177, 1,0.8) 100%)
|
|
||||||
&:nth-child(5n+3) .menu-name_inner
|
|
||||||
background linear-gradient(to right, rgba(0, 228, 153,0.8) 0%, rgba(0, 241, 197,0.8) 100%)
|
|
||||||
&:nth-child(5n+4) .menu-name_inner
|
|
||||||
background linear-gradient(to right, rgba(196, 5, 219,0.8) 0%, rgba(183,120,190,0.8) 100%)
|
|
||||||
&:nth-child(5n+5) .menu-name_inner
|
|
||||||
background linear-gradient(to right, rgba(146, 94, 52,0.8) 0%, rgba(162, 116, 79,0.8) 100%)
|
|
||||||
.menu-name_inner
|
|
||||||
_wh(100%, 100%)
|
|
||||||
_fj(center)
|
|
||||||
_font(28rpx, 30rpx, #fff, 700, center)
|
|
||||||
border-radius 10rpx
|
|
||||||
padding 10rpx
|
|
||||||
overflow hidden
|
|
||||||
.pop-title
|
|
||||||
margin 60rpx 38rpx 0 38rpx
|
|
||||||
_font(30rpx, 60rpx, #000,700,center)
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
<view class="setup-label">服务器地址</view>
|
<view class="setup-label">服务器地址</view>
|
||||||
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model.trim="addrip">
|
<input type="text" class="setup-input" placeholder="请输入服务器地址" v-model.trim="addrip">
|
||||||
</view>
|
</view>
|
||||||
<view class="setup-item">
|
<!-- <view class="setup-item">
|
||||||
<view class="setup-label">打印地址</view>
|
<view class="setup-label">打印地址</view>
|
||||||
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model.trim="printip">
|
<input type="text" class="setup-input" placeholder="请输入打印地址" v-model.trim="printip">
|
||||||
</view>
|
</view> -->
|
||||||
<!-- <view class="setup-item">
|
<!-- <view class="setup-item">
|
||||||
<view class="setup-label">刷新时间(s)</view>
|
<view class="setup-label">刷新时间(s)</view>
|
||||||
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
<input type="text" class="setup-input" placeholder="请输入刷新时间" v-model="setTime">
|
||||||
|
|||||||
173
pages/wb/taskcarry.vue
Normal file
173
pages/wb/taskcarry.vue
Normal file
@@ -0,0 +1,173 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 任务下发 -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">起始区域</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">目标区域</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">起点点位</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row border-bottom">
|
||||||
|
<view class="zd-col-7">
|
||||||
|
<span class="filter_label">目标点位</span>
|
||||||
|
</view>
|
||||||
|
<view class="zd-col-24 filter_select">
|
||||||
|
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-5 button-default" @tap="clearUp">清空</button>
|
||||||
|
<button class="zd-col-18 button-primary" :class="{'button-info': !index || !index2 || !index3 || !index4}" :disabled="disabled" @tap="_callTask">确认</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import {queryArea, queryPointByArea , callTask } from '@/utils/getData3.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
val1: '',
|
||||||
|
val2: '',
|
||||||
|
options: [],
|
||||||
|
index: '',
|
||||||
|
options2: [],
|
||||||
|
index2: '',
|
||||||
|
options3: [],
|
||||||
|
index3: '',
|
||||||
|
options4: [],
|
||||||
|
index4: '',
|
||||||
|
disabled: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this._queryArea ()
|
||||||
|
this._queryArea2()
|
||||||
|
this._queryPointByArea3()
|
||||||
|
this._queryPointByArea4()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async _queryArea () {
|
||||||
|
try {
|
||||||
|
let res = await queryArea ()
|
||||||
|
if (res) {
|
||||||
|
this.options = res.data
|
||||||
|
} else {
|
||||||
|
this.options = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryArea2 () {
|
||||||
|
try {
|
||||||
|
let res = await queryArea ()
|
||||||
|
if (res) {
|
||||||
|
this.options2 = res.data
|
||||||
|
} else {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options2 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryPointByArea3 () {
|
||||||
|
try {
|
||||||
|
let res = await queryPointByArea ()
|
||||||
|
if (res) {
|
||||||
|
this.options3 = res.data
|
||||||
|
} else {
|
||||||
|
this.options3 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options3 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _queryPointByArea4 () {
|
||||||
|
try {
|
||||||
|
let res = await queryPointByArea ()
|
||||||
|
if (res) {
|
||||||
|
this.options4 = res.data
|
||||||
|
} else {
|
||||||
|
this.options4 = []
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.options4 = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectChange (e) {
|
||||||
|
this.index = e
|
||||||
|
},
|
||||||
|
selectChange2 (e) {
|
||||||
|
this.index2 = e
|
||||||
|
},
|
||||||
|
selectChange3 (e) {
|
||||||
|
this.index3 = e
|
||||||
|
},
|
||||||
|
selectChange4 (e) {
|
||||||
|
this.index4 = e
|
||||||
|
},
|
||||||
|
clearUp () {
|
||||||
|
this.index = ''
|
||||||
|
this.index2 = ''
|
||||||
|
this.index3 = ''
|
||||||
|
this.index4 = ''
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _callTask () {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.index3 || !this.index4) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await callTask (this.index3, this.index4, '3')
|
||||||
|
if (res) {
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.clearUp()
|
||||||
|
} catch (e) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
|
||||||
|
</style>
|
||||||
111
pages/wb/taskmanage.vue
Normal file
111
pages/wb/taskmanage.vue
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<!-- 任务管理 -->
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="slide_new">
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>任务号</th>
|
||||||
|
<th>起点</th>
|
||||||
|
<th>终点</th>
|
||||||
|
<th>状态</th>
|
||||||
|
<th>优先级</th>
|
||||||
|
<th>时间</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="(e, i) in dataList" :key="i" :class="{'checked': e.task_uuid === pkId}" @tap="toCheck(e)">
|
||||||
|
<td>{{e.task_no}}</td>
|
||||||
|
<td>{{e.start_devicecode}}</td>
|
||||||
|
<td>{{e.next_devicecode}}</td>
|
||||||
|
<td>{{e.task_status_name}}</td>
|
||||||
|
<td>{{e.priority}}</td>
|
||||||
|
<td>{{e.create_time}}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_taskoperation(1)">重新下发</button>
|
||||||
|
<button class="zd-col-11 button-primary" :class="{'button-info': !pkId}" :disabled="disabled" @tap="_taskoperation(2)">完成任务</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import SearchBox from '@/components/SearchBox.vue'
|
||||||
|
import {querytasks, taskoperation} from '@/utils/getData3.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar,
|
||||||
|
SearchBox
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
pkId: '',
|
||||||
|
disabled: false,
|
||||||
|
dataList: []
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
this._querytasks()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toCheck (e) {
|
||||||
|
this.pkId = this.pkId === e.task_uuid ? '' : e.task_uuid
|
||||||
|
},
|
||||||
|
async _querytasks () {
|
||||||
|
try {
|
||||||
|
let res = await querytasks()
|
||||||
|
if (res && res.data) {
|
||||||
|
this.dataList = [...res.data]
|
||||||
|
} else {
|
||||||
|
this.dataList = []
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} catch (e) {
|
||||||
|
this.dataList = []
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async _taskOperation (type) {
|
||||||
|
this.disabled = true
|
||||||
|
if (!this.pkId) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await taskOperation(this.pkId, type)
|
||||||
|
if (res) {
|
||||||
|
this._queryTask()
|
||||||
|
uni.showToast({
|
||||||
|
title: res.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
} catch (err) {
|
||||||
|
this.disabled = false
|
||||||
|
this.pkId = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.filter_picker {
|
||||||
|
text-align: center
|
||||||
|
}
|
||||||
|
</style>
|
||||||
65
utils/getData3.js
Normal file
65
utils/getData3.js
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
import request from './request.js'
|
||||||
|
|
||||||
|
// 版本更新测试
|
||||||
|
export const pdaUpdate = () => request({
|
||||||
|
url:'api/pda/update'
|
||||||
|
})
|
||||||
|
// export const pdaUpdate = () => {
|
||||||
|
// let res = {
|
||||||
|
// versionName: '1.0.1',
|
||||||
|
// url: 'https://mp-e979e0eb-882b-42b3-a4a1-923ad08ea194.cdn.bspapp.com/cloudstorage/f72ec59f-7b25-487d-a034-fead1b6654c6.apk'
|
||||||
|
// }
|
||||||
|
// return res
|
||||||
|
// }
|
||||||
|
|
||||||
|
// 登录
|
||||||
|
export const handLogin = (user, password) => request({
|
||||||
|
url:'mobile/auth/login',
|
||||||
|
data: {
|
||||||
|
username: user,
|
||||||
|
password: password
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务下发
|
||||||
|
*/
|
||||||
|
// 一、生成任务
|
||||||
|
export const callTask = (scode, ncode, type) => request({
|
||||||
|
url:'api/hand/callTask',
|
||||||
|
data: {
|
||||||
|
start_device_code: scode,
|
||||||
|
next_device_code: ncode,
|
||||||
|
task_type: type
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 二、查询区域
|
||||||
|
export const queryArea = () => request({
|
||||||
|
url:'api/hand/queryArea',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 三、查询区域站点
|
||||||
|
export const queryPointByArea = (rcode) => request({
|
||||||
|
url:'api/hand/queryPointByArea',
|
||||||
|
data: {
|
||||||
|
region_code: rcode
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 任务管理
|
||||||
|
*/
|
||||||
|
// 四、查询未完成任务
|
||||||
|
export const querytasks = () => request({
|
||||||
|
url:'api/hand/tasks',
|
||||||
|
data: {}
|
||||||
|
})
|
||||||
|
// 五、任务操作
|
||||||
|
export const taskoperation = (id, type) => request({
|
||||||
|
url:'api/hand/taskoperation',
|
||||||
|
data: {
|
||||||
|
task_uuid: id,
|
||||||
|
type: type
|
||||||
|
}
|
||||||
|
})
|
||||||
Reference in New Issue
Block a user