agv呼叫管理
This commit is contained in:
@@ -233,29 +233,28 @@ uni-button:after {
|
|||||||
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
|
box-shadow: 0 4rpx 10rpx 2rpx rgba(0,0,0,.1);
|
||||||
}
|
}
|
||||||
.item-font-1
|
.item-font-1
|
||||||
_font(30rpx,28rpx,#000,,)
|
_font(30rpx,52rpx,#000,,)
|
||||||
.item-font-2
|
.item-font-2
|
||||||
_font(24rpx,40rpx,$red,,)
|
_font(26rpx,52rpx,$red,,)
|
||||||
.item-font-3
|
.item-font-3
|
||||||
_font(24rpx,26rpx,#333,,)
|
_font(26rpx,38rpx,#333,,)
|
||||||
text-align:justify;
|
text-align:justify;
|
||||||
text-align-last: justify;
|
text-align-last: justify;
|
||||||
text-justify: inter-ideograph;
|
text-justify: inter-ideograph;
|
||||||
.item-font-4
|
.item-font-4
|
||||||
_font(26rpx,26rpx,#999,,)
|
_font(26rpx,38rpx,#999,,)
|
||||||
.item-font-5
|
.item-font-5
|
||||||
_font(44rpx,60rpx,$green,,center)
|
_font(44rpx,60rpx,$green,,center)
|
||||||
background-color #f6f6f6
|
background-color #f6f6f6
|
||||||
.item-font-6
|
.item-font-6
|
||||||
height 52rpx
|
height 52rpx
|
||||||
_font(24rpx,52rpx,#666,,center)
|
_font(26rpx,52rpx,#666,,center)
|
||||||
background-color #e5e5e5
|
background-color #e5e5e5
|
||||||
border-radius 26rpx
|
border-radius 26rpx
|
||||||
.item-font-7
|
.item-font-7
|
||||||
_font(24rpx,52rpx,#666,,center)
|
_font(24rpx,52rpx,#666,,center)
|
||||||
.item-font-8
|
|
||||||
_font(24rpx,52rpx,#666,,center)
|
|
||||||
.isChecked
|
.isChecked
|
||||||
|
background-color: #fff !important
|
||||||
box-shadow inset 2px 2px 4px 0px rgba(120, 141, 250, 0.7), inset -2px -2px 4px 0px rgba(120, 141, 250, 0.7)
|
box-shadow inset 2px 2px 4px 0px rgba(120, 141, 250, 0.7), inset -2px -2px 4px 0px rgba(120, 141, 250, 0.7)
|
||||||
/** 提交栏 **/
|
/** 提交栏 **/
|
||||||
.submit-bar {
|
.submit-bar {
|
||||||
@@ -280,7 +279,7 @@ uni-button:after {
|
|||||||
border-radius: 10rpx;
|
border-radius: 10rpx;
|
||||||
}
|
}
|
||||||
.button-primary {
|
.button-primary {
|
||||||
font-size: 34rpx;
|
font-size: 30rpx;
|
||||||
line-height: 88rpx;
|
line-height: 88rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
@@ -502,7 +501,7 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
.point_title_2
|
.point_title_2
|
||||||
_wh(100%, 40rpx)
|
_wh(100%, 40rpx)
|
||||||
overflow hidden
|
overflow hidden
|
||||||
_font(24rpx,40rpx,#999,500, center)
|
_font(26rpx,40rpx,#999,500, center)
|
||||||
.state-wrap
|
.state-wrap
|
||||||
position fixed
|
position fixed
|
||||||
z-index 200
|
z-index 200
|
||||||
@@ -520,6 +519,29 @@ uni-button[disabled]:not([type]), uni-button[disabled][type=default] {
|
|||||||
position fixed
|
position fixed
|
||||||
z-index 200
|
z-index 200
|
||||||
bottom 100rpx
|
bottom 100rpx
|
||||||
|
width 100%
|
||||||
padding 14rpx
|
padding 14rpx
|
||||||
background-color #fff
|
background-color #fff
|
||||||
box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7);
|
box-shadow: 0 0 20rpx 0 rgba(160,160,160,0.7);
|
||||||
|
.pop_point_wrap
|
||||||
|
position fixed
|
||||||
|
width: 43.2%
|
||||||
|
top -10%
|
||||||
|
left -10%
|
||||||
|
z-index 301
|
||||||
|
transform scale(0)
|
||||||
|
.pop_point_content
|
||||||
|
position relative
|
||||||
|
margin-top 40rpx
|
||||||
|
padding 20rpx
|
||||||
|
background-color #fff
|
||||||
|
border-radius 10rpx
|
||||||
|
&::after
|
||||||
|
position absolute
|
||||||
|
top -40rpx
|
||||||
|
left calc(50% - 20rpx)
|
||||||
|
content ''
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
border: 20rpx solid;
|
||||||
|
border-color: transparent transparent #fff transparent
|
||||||
@@ -9,12 +9,10 @@ $fc1 = #323232
|
|||||||
background-color: $red !important
|
background-color: $red !important
|
||||||
.bggreen
|
.bggreen
|
||||||
background-color: $green !important
|
background-color: $green !important
|
||||||
color #fff !important
|
|
||||||
.bgyellow
|
.bgyellow
|
||||||
background-color: $yellow !important
|
background-color: $yellow !important
|
||||||
.bgblue
|
.bgblue
|
||||||
background-color: $blue !important
|
background-color: $blue !important
|
||||||
color #fff !important
|
|
||||||
.bggray
|
.bggray
|
||||||
background-color: $gray !important
|
background-color: $gray !important
|
||||||
|
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ input[type="button"], input[type="submit"], input[type="search"], input[type="re
|
|||||||
.mgb10 {
|
.mgb10 {
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
}
|
}
|
||||||
|
.mgb20 {
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
}
|
||||||
.pdl20 {
|
.pdl20 {
|
||||||
padding-left: 20rpx;
|
padding-left: 20rpx;
|
||||||
}
|
}
|
||||||
|
|||||||
212
pages/manage/agv-call-manage.vue
Normal file
212
pages/manage/agv-call-manage.vue
Normal file
@@ -0,0 +1,212 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row mgb20 border-bottom">
|
||||||
|
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务起点1</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{sCode1}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row mgb20 border-bottom">
|
||||||
|
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务终点1</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{nCode1}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row mgb20 border-bottom">
|
||||||
|
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务起点2</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{sCode2}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row">
|
||||||
|
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务终点2</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{nCode2}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_wrapper">
|
||||||
|
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
|
||||||
|
<view class="zd-row" @click="getPonit(e)">
|
||||||
|
<view class="title_locate">{{e.region_name}}</view>
|
||||||
|
<uni-icons :type="pkId === e.region_code ? 'up' : 'down'" size="16"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view v-if="pkId === e.region_code" class="zd-row flexstart flexwrap">
|
||||||
|
<view class="zd-col-12 site_item" v-for="(el, index) in pointArr" :key="index">
|
||||||
|
<view class="site_item_box":class="{'isChecked': el.device_code === sCode1 || el.device_code === nCode1 || el.device_code === sCode2 || el.device_code === nCode2}" :id="'site_item_box_'+ index" @click="setcode(el,index)">
|
||||||
|
<view class="point_title_1">{{el.device_name}}</view>
|
||||||
|
<view class="point_title_2">{{el.device_code}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-4 button-default" @click="cancle">清空</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !((sCode1 !== '' && nCode1 !== '') || (sCode2 !== '' && nCode2 !== ''))}" :disabled="disabled" @tap="_agvcallTask('1')">生箔换轴</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !((sCode1 !== '' && nCode1 !== '') || (sCode2 !== '' && nCode2 !== ''))}" :disabled="disabled" @tap="_agvcallTask('2')">分切换轴</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': !((sCode1 !== '' && nCode1 !== '') || (sCode2 !== '' && nCode2 !== ''))}" :disabled="disabled" @tap="_agvcallTask('3')">搬运任务</button>
|
||||||
|
</view>
|
||||||
|
<view ref="pointIcon" class="pop_point_wrap">
|
||||||
|
<view class="zd-row jccenter">
|
||||||
|
<uni-icons type="map-pin-ellipse" size="18" color="#fff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="pop_point_content">
|
||||||
|
<view class="zd-row mgb20">
|
||||||
|
<view class="zd-col-11 item-font-6 bggreen" @tap="getstartcode1">任务起点1</view>
|
||||||
|
<view class="zd-col-11 item-font-6 bgblue" @tap="getnextcode1">任务终点1</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row">
|
||||||
|
<view class="zd-col-11 item-font-6 bggreen" @tap="getstartcode2">任务起点2</view>
|
||||||
|
<view class="zd-col-11 item-font-6 bgblue" @tap="getnextcode2">任务终点2</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="show" class="msg_mask" @tap="colsePop"></view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
// import {agvqueryArea, queryPointByArea} from '@/utils/mork2.js'
|
||||||
|
import {agvqueryArea, queryPointByArea, agvcallTask} from '@/utils/getData2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
areaArr: [],
|
||||||
|
pointArr: [],
|
||||||
|
pkId: '',
|
||||||
|
disabled: false,
|
||||||
|
code: '',
|
||||||
|
sCode1: '',
|
||||||
|
nCode1: '',
|
||||||
|
sCode2: '',
|
||||||
|
nCode2: '',
|
||||||
|
show: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.initArea()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
async initArea () {
|
||||||
|
let res = await agvqueryArea()
|
||||||
|
this.areaArr = [...res.data]
|
||||||
|
if (this.areaArr.length > 0) {
|
||||||
|
this.pkId = this.areaArr[0].region_code
|
||||||
|
this.initPonit()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getPonit (e) {
|
||||||
|
this.pkId = this.pkId === e.region_code ? '' : e.region_code
|
||||||
|
if (this.pkId) {
|
||||||
|
this.initPonit()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async initPonit () {
|
||||||
|
let res = await queryPointByArea(this.pkId)
|
||||||
|
this.pointArr = [...res.data]
|
||||||
|
},
|
||||||
|
setcode (el,index) {
|
||||||
|
let distanceToTop = ''
|
||||||
|
let distanceToLeft = ''
|
||||||
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
query
|
||||||
|
.select(`#site_item_box_${index}`)
|
||||||
|
.boundingClientRect(data => {
|
||||||
|
if (data) {
|
||||||
|
distanceToTop = data.top + (data.height / 2) - 9
|
||||||
|
distanceToLeft = data.left
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
this.show = true
|
||||||
|
this.$refs.pointIcon.$el.style.top = distanceToTop + 'px'
|
||||||
|
this.$refs.pointIcon.$el.style.left = distanceToLeft + 'px'
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(100%)'
|
||||||
|
this.code = el.device_code
|
||||||
|
},
|
||||||
|
colsePop () {
|
||||||
|
this.show = !this.show
|
||||||
|
if (!this.show) {
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
getstartcode1 () {
|
||||||
|
if (this.nCode1 !== '' && this.nCode1 === this.code) {
|
||||||
|
this.nCode1 = ''
|
||||||
|
}
|
||||||
|
this.sCode1 = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
|
getnextcode1 () {
|
||||||
|
if (this.sCode1 !== '' && this.sCode1 === this.code) {
|
||||||
|
this.sCode1 = ''
|
||||||
|
}
|
||||||
|
this.nCode1 = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
|
getstartcode2 () {
|
||||||
|
if (this.nCode2 !== '' && this.nCode2 === this.code) {
|
||||||
|
this.nCode2 = ''
|
||||||
|
}
|
||||||
|
this.sCode2 = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
|
getnextcode2 () {
|
||||||
|
if (this.sCode2 !== '' && this.sCode2 === this.code) {
|
||||||
|
this.sCode2 = ''
|
||||||
|
}
|
||||||
|
this.nCode2 = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
|
/** 清空点位选择 */
|
||||||
|
cancle () {
|
||||||
|
this.sCode1 = ''
|
||||||
|
this.nCode1 = ''
|
||||||
|
this.sCode2 = ''
|
||||||
|
this.nCode2 = ''
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _agvcallTask (type) {
|
||||||
|
this.disabled = true
|
||||||
|
if (!((this.sCode1 !== '' && this.nCode1 !== '') || (this.sCode2 !== '' && this.nCode2 !== ''))) {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await agvcallTask(this.sCode1, this.nCode1, this.sCode2, this.nCode2, type)
|
||||||
|
this.cancle()
|
||||||
|
clearInterval(this.timer)
|
||||||
|
this.timer = null
|
||||||
|
setTimeout(() => {
|
||||||
|
this.refresh()
|
||||||
|
this.cancle()
|
||||||
|
}, 2000)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.item-font-6
|
||||||
|
color #fff
|
||||||
|
</style>
|
||||||
@@ -7,21 +7,28 @@
|
|||||||
<view class="state-name">{{e.name}}</view>
|
<view class="state-name">{{e.name}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="zd-row mgb10 xzd-wraper">
|
|
||||||
<view class="zd-col-11 item-font-6 bggreen">起:{{sObj.device_name}}</view>
|
|
||||||
<view class="zd-col-1 item-font-7">–</view>
|
|
||||||
<view class="zd-col-11 item-font-6 bgblue">终:{{nObj.device_name}}</view>
|
|
||||||
</view>
|
|
||||||
<view class="zd_content">
|
<view class="zd_content">
|
||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper">
|
||||||
|
<view class="zd-row mgb20 border-bottom">
|
||||||
|
<uni-icons type="arrow-up" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务起点</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{sCode}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row">
|
||||||
|
<uni-icons type="arrow-down" size="18" color="#ff6a00"></uni-icons>
|
||||||
|
<view class="zd-col-6 item-font-2">任务终点</view>
|
||||||
|
<view class="zd-col-16 item-font-1">{{nCode}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_wrapper">
|
||||||
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
|
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
|
||||||
<view class="zd-row" @click="getPonit (e)">
|
<view class="zd-row" @click="getPonit(e)">
|
||||||
<view class="title_locate">{{e.region_name}}</view>
|
<view class="title_locate">{{e.region_name}}</view>
|
||||||
<uni-icons :type="e.checked ? 'up' : 'down'" size="16"></uni-icons>
|
<uni-icons :type="pkId === e.region_code ? 'up' : 'down'" size="16"></uni-icons>
|
||||||
</view>
|
</view>
|
||||||
<view v-show="e.checked === true" class="zd-row flexstart flexwrap">
|
<view v-if="pkId === e.region_code" class="zd-row flexstart flexwrap">
|
||||||
<view class="zd-col-12 site_item" v-for="(el, i) in e.pointArr" :key="i">
|
<view class="zd-col-12 site_item" v-for="(el, index) in pointArr" :key="index">
|
||||||
<view class="site_item_box" :class="{'bggreen': sObj.device_code === el.device_code, 'bgblue': nObj.device_code === el.device_code}" @click="setcode(el)">
|
<view class="site_item_box" :class="{'isChecked': el.device_code === sCode || el.device_code === nCode}" :id="'site_item_box_'+ index" @click="setcode(el,index)">
|
||||||
<view class="point_title_1">{{el.device_name}}</view>
|
<view class="point_title_1">{{el.device_name}}</view>
|
||||||
<view class="point_title_2">{{el.device_code}}</view>
|
<view class="point_title_2">{{el.device_code}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -32,16 +39,26 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="zd-row submit-bar">
|
<view class="zd-row submit-bar">
|
||||||
<button class="zd-col-4 button-default" @click="cancle">清空</button>
|
<button class="zd-col-4 button-default" @click="cancle">清空</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('1')">生箔换轴</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('1')">生箔换轴</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('2')">分切换轴</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('2')">分切换轴</button>
|
||||||
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
|
<button class="zd-col-6 button-primary" :class="{'button-info': sCode === '' || nCode === ''}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
|
||||||
</view>
|
</view>
|
||||||
|
<view ref="pointIcon" class="pop_point_wrap">
|
||||||
|
<view class="zd-row jccenter">
|
||||||
|
<uni-icons type="map-pin-ellipse" size="18" color="#fff"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row pop_point_content">
|
||||||
|
<view class="zd-col-11 item-font-6 bggreen" @tap="getstartcode">任务起点</view>
|
||||||
|
<view class="zd-col-11 item-font-6 bgblue" @tap="getnextcode">任务终点</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view v-if="show" class="msg_mask" @tap="colsePop"></view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import {queryArea, queryPointByArea, callTask} from '@/utils/mork2.js'
|
import {queryArea, queryPointByArea, callTask} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar
|
NavBar
|
||||||
@@ -49,16 +66,14 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: '',
|
title: '',
|
||||||
interTime: this.$store.getters.setTime,
|
|
||||||
timer: null,
|
|
||||||
state: [{color: 'bggray', name: '空位'}, {color: 'bggreen', name: '有货'}],
|
|
||||||
areaArr: [],
|
areaArr: [],
|
||||||
pointArr: [],
|
pointArr: [],
|
||||||
regobj: {},
|
pkId: '',
|
||||||
disabled: false,
|
disabled: false,
|
||||||
sObj: {},
|
code: '',
|
||||||
nObj: {},
|
sCode: '',
|
||||||
isS: false
|
nCode: '',
|
||||||
|
show: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
@@ -67,82 +82,79 @@
|
|||||||
created () {
|
created () {
|
||||||
this.initArea()
|
this.initArea()
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
|
||||||
if (this.timer) {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
onUnload () {
|
|
||||||
if (this.timer) {
|
|
||||||
clearInterval(this.timer);
|
|
||||||
this.timer = null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
refresh (e) {
|
|
||||||
this.timer = setInterval(() => {
|
|
||||||
this.initPonit(e)
|
|
||||||
}, this.interTime)
|
|
||||||
},
|
|
||||||
async initArea () {
|
async initArea () {
|
||||||
let res = await queryArea()
|
let res = await queryArea()
|
||||||
this.areaArr = [...res.data]
|
this.areaArr = [...res.data]
|
||||||
this.areaArr.map(el => {
|
|
||||||
this.$set(el, 'checked', false)
|
|
||||||
this.$set(el, 'pointArr', [])
|
|
||||||
})
|
|
||||||
if (this.areaArr.length > 0) {
|
if (this.areaArr.length > 0) {
|
||||||
this.getPonit(this.areaArr[0])
|
this.pkId = this.areaArr[0].region_code
|
||||||
|
this.initPonit()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async initPonit (e) {
|
|
||||||
let res = await queryPointByArea(e.region_code)
|
|
||||||
this.regobj = e
|
|
||||||
this.areaArr.map(el => {
|
|
||||||
if (el.region_code === e.region_code) {
|
|
||||||
this.$set(el, 'pointArr', [...res.data])
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getPonit (e) {
|
getPonit (e) {
|
||||||
clearInterval(this.timer)
|
this.pkId = this.pkId === e.region_code ? '' : e.region_code
|
||||||
this.areaArr.map(el => {
|
if (this.pkId) {
|
||||||
if (el.region_code !== e.region_code) {
|
this.initPonit()
|
||||||
el.checked = false
|
|
||||||
}
|
|
||||||
if (el.region_code === e.region_code) {
|
|
||||||
e.checked = !e.checked
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (e.checked) {
|
|
||||||
this.initPonit(e)
|
|
||||||
this.refresh(e)
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setcode (el) {
|
async initPonit () {
|
||||||
if (this.isS === false) {
|
let res = await queryPointByArea(this.pkId)
|
||||||
this.sObj = el
|
this.pointArr = [...res.data]
|
||||||
this.isS = true
|
},
|
||||||
} else if (this.isS) {
|
setcode (el,index) {
|
||||||
this.nObj = el
|
let distanceToTop = ''
|
||||||
this.isS = false
|
let distanceToLeft = ''
|
||||||
|
const query = uni.createSelectorQuery().in(this);
|
||||||
|
query
|
||||||
|
.select(`#site_item_box_${index}`)
|
||||||
|
.boundingClientRect(data => {
|
||||||
|
if (data) {
|
||||||
|
distanceToTop = data.top + (data.height / 2) - 9
|
||||||
|
distanceToLeft = data.left
|
||||||
|
}
|
||||||
|
}).exec()
|
||||||
|
this.show = true
|
||||||
|
this.$refs.pointIcon.$el.style.top = distanceToTop + 'px'
|
||||||
|
this.$refs.pointIcon.$el.style.left = distanceToLeft + 'px'
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(100%)'
|
||||||
|
this.code = el.device_code
|
||||||
|
},
|
||||||
|
colsePop () {
|
||||||
|
this.show = !this.show
|
||||||
|
if (!this.show) {
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getstartcode () {
|
||||||
|
if (this.nCode !== '' && this.nCode === this.code) {
|
||||||
|
this.nCode = ''
|
||||||
|
}
|
||||||
|
this.sCode = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
|
getnextcode () {
|
||||||
|
if (this.sCode !== '' && this.sCode === this.code) {
|
||||||
|
this.sCode = ''
|
||||||
|
}
|
||||||
|
this.nCode = this.code
|
||||||
|
this.show = false
|
||||||
|
this.$refs.pointIcon.$el.style.transform = 'scale(0)'
|
||||||
|
},
|
||||||
/** 清空点位选择 */
|
/** 清空点位选择 */
|
||||||
cancle () {
|
cancle () {
|
||||||
this.sObj = {}
|
this.sCode = ''
|
||||||
this.nObj = {}
|
this.nCode = ''
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
},
|
},
|
||||||
async _callTask (type) {
|
async _callTask (type) {
|
||||||
this.disabled = true
|
this.disabled = true
|
||||||
if (JSON.stringify(this.sObj) === '{}' || JSON.stringify(this.nObj) === '{}') {
|
if (this.sCode === '' || nCode === '') {
|
||||||
this.disabled = false
|
this.disabled = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
let res = await callTask(this.sObj.device_code, this.nObj.device_code, type)
|
let res = await callTask(this.sCode, this.nCode, type)
|
||||||
this.cancle()
|
this.cancle()
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
this.timer = null
|
this.timer = null
|
||||||
@@ -164,12 +176,6 @@
|
|||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.zd_content
|
.item-font-6
|
||||||
padding-bottom 200rpx
|
color #fff
|
||||||
.submit-bar
|
|
||||||
box-shadow none
|
|
||||||
.button-default, .button-primary
|
|
||||||
font-size 30rpx
|
|
||||||
.bgblue .point_title_1,.bgblue .point_title_2,.bggreen .point_title_1,.bggreen .point_title_2
|
|
||||||
color #fff
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
176
pages/manage/call-manage的副本.vue
Normal file
176
pages/manage/call-manage的副本.vue
Normal file
@@ -0,0 +1,176 @@
|
|||||||
|
<template>
|
||||||
|
<view class="zd_container">
|
||||||
|
<nav-bar :title="title"></nav-bar>
|
||||||
|
<!-- <view class="zd-row jcflexstart state-wrap">
|
||||||
|
<view class="zd-col-4 zd-row jcflexstart" v-for="e in state">
|
||||||
|
<view class="state-color" :class="e.color"></view>
|
||||||
|
<view class="state-name">{{e.name}}</view>
|
||||||
|
</view>
|
||||||
|
</view> -->
|
||||||
|
<view class="zd-row mgb10 xzd-wraper">
|
||||||
|
<view class="zd-col-11 item-font-6 bggreen">起:{{sObj.device_name}}</view>
|
||||||
|
<view class="zd-col-1 item-font-7">–</view>
|
||||||
|
<view class="zd-col-11 item-font-6 bgblue">终:{{nObj.device_name}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd_content">
|
||||||
|
<view class="zd_wrapper grid-wraper">
|
||||||
|
<view class="allwidth" v-for="e in areaArr" :key="e.region_code">
|
||||||
|
<view class="zd-row" @click="getPonit (e)">
|
||||||
|
<view class="title_locate">{{e.region_name}}</view>
|
||||||
|
<uni-icons :type="e.checked ? 'up' : 'down'" size="16"></uni-icons>
|
||||||
|
</view>
|
||||||
|
<view v-show="e.checked === true" class="zd-row flexstart flexwrap">
|
||||||
|
<view class="zd-col-12 site_item" v-for="(el, i) in e.pointArr" :key="i">
|
||||||
|
<view class="site_item_box" :class="{'bggreen': sObj.device_code === el.device_code, 'bgblue': nObj.device_code === el.device_code}" @click="setcode(el)">
|
||||||
|
<view class="point_title_1">{{el.device_name}}</view>
|
||||||
|
<view class="point_title_2">{{el.device_code}}</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row submit-bar">
|
||||||
|
<button class="zd-col-4 button-default" @click="cancle">清空</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('1')">生箔换轴</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('2')">分切换轴</button>
|
||||||
|
<button class="zd-col-6 button-primary" :class="{'button-info': JSON.stringify(sObj) === '{}' && JSON.stringify(nObj) === '{}'}" :disabled="disabled" @tap="_callTask('3')">搬运任务</button>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import NavBar from '@/components/NavBar.vue'
|
||||||
|
import {queryArea, queryPointByArea, callTask} from '@/utils/mork2.js'
|
||||||
|
export default {
|
||||||
|
components: {
|
||||||
|
NavBar
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
title: '',
|
||||||
|
interTime: this.$store.getters.setTime,
|
||||||
|
timer: null,
|
||||||
|
state: [{color: 'bggray', name: '空位'}, {color: 'bggreen', name: '有货'}],
|
||||||
|
areaArr: [],
|
||||||
|
pointArr: [],
|
||||||
|
regobj: {},
|
||||||
|
disabled: false,
|
||||||
|
sObj: {},
|
||||||
|
nObj: {},
|
||||||
|
isS: false
|
||||||
|
};
|
||||||
|
},
|
||||||
|
onLoad (options) {
|
||||||
|
this.title = options.title
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
this.initArea()
|
||||||
|
},
|
||||||
|
beforeDestroy () {
|
||||||
|
if (this.timer) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onUnload () {
|
||||||
|
if (this.timer) {
|
||||||
|
clearInterval(this.timer);
|
||||||
|
this.timer = null
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
refresh (e) {
|
||||||
|
this.timer = setInterval(() => {
|
||||||
|
this.initPonit(e)
|
||||||
|
}, this.interTime)
|
||||||
|
},
|
||||||
|
async initArea () {
|
||||||
|
let res = await queryArea()
|
||||||
|
this.areaArr = [...res.data]
|
||||||
|
this.areaArr.map(el => {
|
||||||
|
this.$set(el, 'checked', false)
|
||||||
|
this.$set(el, 'pointArr', [])
|
||||||
|
})
|
||||||
|
if (this.areaArr.length > 0) {
|
||||||
|
this.getPonit(this.areaArr[0])
|
||||||
|
}
|
||||||
|
},
|
||||||
|
async initPonit (e) {
|
||||||
|
let res = await queryPointByArea(e.region_code)
|
||||||
|
this.regobj = e
|
||||||
|
this.areaArr.map(el => {
|
||||||
|
if (el.region_code === e.region_code) {
|
||||||
|
this.$set(el, 'pointArr', [...res.data])
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getPonit (e) {
|
||||||
|
clearInterval(this.timer)
|
||||||
|
this.areaArr.map(el => {
|
||||||
|
if (el.region_code !== e.region_code) {
|
||||||
|
el.checked = false
|
||||||
|
}
|
||||||
|
if (el.region_code === e.region_code) {
|
||||||
|
e.checked = !e.checked
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (e.checked) {
|
||||||
|
this.initPonit(e)
|
||||||
|
this.refresh(e)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
setcode (el) {
|
||||||
|
if (this.isS === false) {
|
||||||
|
this.sObj = el
|
||||||
|
this.isS = true
|
||||||
|
} else if (this.isS) {
|
||||||
|
this.nObj = el
|
||||||
|
this.isS = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
/** 清空点位选择 */
|
||||||
|
cancle () {
|
||||||
|
this.sObj = {}
|
||||||
|
this.nObj = {}
|
||||||
|
this.disabled = false
|
||||||
|
},
|
||||||
|
async _callTask (type) {
|
||||||
|
this.disabled = true
|
||||||
|
if (JSON.stringify(this.sObj) === '{}' || JSON.stringify(this.nObj) === '{}') {
|
||||||
|
this.disabled = false
|
||||||
|
return
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
let res = await callTask(this.sObj.device_code, this.nObj.device_code, type)
|
||||||
|
this.cancle()
|
||||||
|
clearInterval(this.timer)
|
||||||
|
this.timer = null
|
||||||
|
setTimeout(() => {
|
||||||
|
this.refresh()
|
||||||
|
this.cancle()
|
||||||
|
}, 2000)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.desc,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
} catch (err) {
|
||||||
|
this.disabled = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="stylus">
|
||||||
|
@import '../../common/style/mixin.styl';
|
||||||
|
.zd_content
|
||||||
|
padding-bottom 200rpx
|
||||||
|
.submit-bar
|
||||||
|
box-shadow none
|
||||||
|
.button-default, .button-primary
|
||||||
|
font-size 30rpx
|
||||||
|
.bgblue,.bggreen
|
||||||
|
.point_title_1,.point_title_2
|
||||||
|
color #fff
|
||||||
|
</style>
|
||||||
@@ -12,32 +12,32 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item-wrapper">
|
<view class="item-wrapper">
|
||||||
<view class="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.inst_uuid}">
|
<view class="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.inst_uuid}">
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-10 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成','取消'][Number(e.inst_status)]}}</view>
|
<view class="zd-col-10 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成','取消'][Number(e.inst_status)]}}</view>
|
||||||
<view class="zd-col-10 item-font-2" style="text-align:right">{{e.create_time}}</view>
|
<view class="zd-col-10 item-font-2" style="text-align:right">{{e.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
<view class="zd-col-16">
|
<view class="zd-col-16">
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-6 item-font-3">指令号:</view>
|
<view class="zd-col-6 item-font-3">指令号:</view>
|
||||||
<view class="zd-col-18 item-font-4">{{e.instruction_code}}</view>
|
<view class="zd-col-18 item-font-4">{{e.instruction_code}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-10 item-font-3">指令执行步骤:</view>
|
<view class="zd-col-10 item-font-3">指令执行步骤:</view>
|
||||||
<view class="zd-col-14 item-font-4">{{e.inst_step}}</view>
|
<view class="zd-col-14 item-font-4">{{e.inst_step}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-6 item-font-3">载具号:</view>
|
<view class="zd-col-6 item-font-3">载具号:</view>
|
||||||
<view class="zd-col-18 item-font-4">{{e.carrier}}</view>
|
<view class="zd-col-18 item-font-4">{{e.carrier}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-6 item-font-3">车号:</view>
|
<view class="zd-col-6 item-font-3">车号:</view>
|
||||||
<view class="zd-col-18 item-font-4">{{e.carno}}</view>
|
<view class="zd-col-18 item-font-4">{{e.carno}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<view class="item-font-5">{{e.priority}}</view>
|
<view class="item-font-5">{{e.priority}}</view>
|
||||||
<view class="item-font-8">优先级</view>
|
<view class="item-font-7">优先级</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="zd_wrapper grid-wraper">
|
<view class="zd_wrapper grid-wraper">
|
||||||
<view class="zd-row flexstart flexwrap">
|
<view class="zd-row flexstart flexwrap">
|
||||||
<view class="zd-col-12 site_item" v-for="(e, i) in pointArr" :key="i" @tap="toCheck(e)">
|
<view class="zd-col-12 site_item" v-for="(e, i) in pointArr" :key="i" @tap="toCheck(e)">
|
||||||
<view class="site_item_box" :class="{'site_checked': pkId === e.device_code}">
|
<view class="site_item_box" :class="{'isChecked': pkId === e.device_code}">
|
||||||
<view class="point_title_1">{{e.device_name}}</view>
|
<view class="point_title_1">{{e.device_name}}</view>
|
||||||
<view class="point_title_2">{{e.device_code}}</view>
|
<view class="point_title_2">{{e.device_code}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import NavBar from '@/components/NavBar.vue'
|
import NavBar from '@/components/NavBar.vue'
|
||||||
import {queryDevices} from '@/utils/mork2.js'
|
// import {queryDevices} from '@/utils/mork2.js'
|
||||||
import {updateDeviceStatus} from '@/utils/getData2.js'
|
import {queryDevices, updateDeviceStatus} from '@/utils/getData2.js'
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
NavBar
|
NavBar
|
||||||
@@ -75,10 +75,4 @@
|
|||||||
|
|
||||||
<style lang="stylus">
|
<style lang="stylus">
|
||||||
@import '../../common/style/mixin.styl';
|
@import '../../common/style/mixin.styl';
|
||||||
.site_checked
|
|
||||||
background-color #fff
|
|
||||||
border 2rpx solid rgba(255, 106, 0, 0.6)
|
|
||||||
box-shadow 0px 0px 6px 0px rgba(255, 106, 0, 0.6), 0px 0px 6px 0px rgba(255, 106, 0, 0.6);
|
|
||||||
.submit-bar
|
|
||||||
box-shadow none
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -12,20 +12,24 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item-wrapper">
|
<view class="item-wrapper">
|
||||||
<view class="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.task_uuid}">
|
<view class="item-wrap" v-for="(e, i) in dataList" :key="i" @tap="toCheck(e)" :class="{isChecked: pkId === e.task_uuid}">
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-row">
|
||||||
<view class="zd-col-24 item-font-1">{{e.task_no}} | {{['就绪', '执行中', '完成'][Number(e.task_status)]}}</view>
|
<view class="zd-col-10 item-font-1">{{e.task_no}}</view>
|
||||||
|
<view class="zd-col-10 item-font-2" style="text-align:right">{{e.create_time}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
<view class="zd-col-16">
|
<view class="zd-col-16">
|
||||||
<view class="item-font-2 mgb10">{{e.create_time}}</view>
|
<view class="zd-row">
|
||||||
<view class="zd-row mgb10">
|
<view class="zd-col-7 item-font-3">任务状态:</view>
|
||||||
|
<view class="zd-col-17 item-font-4">{{['就绪', '执行中', '完成'][Number(e.task_status)]}}</view>
|
||||||
|
</view>
|
||||||
|
<view class="zd-row">
|
||||||
<view class="zd-col-7 item-font-3">载具号:</view>
|
<view class="zd-col-7 item-font-3">载具号:</view>
|
||||||
<view class="zd-col-17 item-font-4">{{e.carrier}}</view>
|
<view class="zd-col-17 item-font-4">{{e.carrier}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-col-8">
|
<view class="zd-col-8">
|
||||||
<view class="item-font-5">{{e.priority}}</view>
|
<view class="item-font-5">{{e.priority}}</view>
|
||||||
<view class="item-font-8">优先级</view>
|
<view class="item-font-7">优先级</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="zd-row">
|
<view class="zd-row">
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ export const updateDeviceStatus = (code, option) => request({
|
|||||||
* agv呼叫管理
|
* agv呼叫管理
|
||||||
*/
|
*/
|
||||||
// 1.1查询所有区域信息
|
// 1.1查询所有区域信息
|
||||||
export const agvqueryDevices = () => request({
|
export const agvqueryArea = () => request({
|
||||||
url:'api/hands/queryArea',
|
url:'api/hands/queryArea',
|
||||||
data: {}
|
data: {}
|
||||||
})
|
})
|
||||||
@@ -112,7 +112,7 @@ export const agvqueryDevices = () => request({
|
|||||||
export const agvqueryPointByArea = (code) => request({
|
export const agvqueryPointByArea = (code) => request({
|
||||||
url:'api/hands/queryPointByArea',
|
url:'api/hands/queryPointByArea',
|
||||||
data: {
|
data: {
|
||||||
areaCode: code
|
region_code: code
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
// 1.2创建任务(生成任务号为-开头)
|
// 1.2创建任务(生成任务号为-开头)
|
||||||
|
|||||||
@@ -83,35 +83,34 @@ export const taskOperation = (uuid, type) => {
|
|||||||
}
|
}
|
||||||
export const queryArea = () => {
|
export const queryArea = () => {
|
||||||
let res = {
|
let res = {
|
||||||
data: [{region_code: '1', region_name: 'A1'}, {region_code: '2', region_name: 'A2'}, {region_code: '3', region_name: 'A2'}, {region_code: '4', region_name: 'A10'}]
|
data: [{region_code: '1', region_name: '一楼装箱区'}, {region_code: '2', region_name: 'A2'}, {region_code: '3', region_name: 'A2'}, {region_code: '4', region_name: 'A10'}]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
export const queryPointByArea = () => {
|
export const queryPointByArea = () => {
|
||||||
let res = {
|
let res = {
|
||||||
data: [{
|
data: [{
|
||||||
device_code: '1',
|
device_code: 'B2_ED_1_1_K',
|
||||||
device_name: 'JLDFJLLJ',
|
device_name: 'B2_1_1_生箔机空轴',
|
||||||
source_device: 'FAL3LAA01',
|
|
||||||
status: '1'
|
status: '1'
|
||||||
}, {
|
}, {
|
||||||
device_code: '12',
|
device_code: 'B2_ED_1_2_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'B2_1_2_生箔机空轴'
|
||||||
}, {
|
}, {
|
||||||
device_code: '13',
|
device_code: 'B2_ED_1_3_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'JLDFJLLJ3'
|
||||||
}, {
|
}, {
|
||||||
device_code: '14',
|
device_code: 'B2_ED_1_4_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'JLDFJLLJ4'
|
||||||
}, {
|
}, {
|
||||||
device_code: '15',
|
device_code: 'B2_ED_1_5_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'JLDFJLLJ5'
|
||||||
}, {
|
}, {
|
||||||
device_code: '16',
|
device_code: 'B2_ED_1_6_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'JLDFJLLJ6'
|
||||||
}, {
|
}, {
|
||||||
device_code: '17',
|
device_code: 'B2_ED_1_7_K',
|
||||||
device_name: 'JLDFJLLJ'
|
device_name: 'JLDFJLLJ7'
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
@@ -143,4 +142,38 @@ export const queryDevices = () => {
|
|||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
}
|
||||||
|
export const agvqueryArea = () => {
|
||||||
|
let res = {
|
||||||
|
data: [{region_code: '1', region_name: '一楼装箱区'}, {region_code: '2', region_name: 'A2'}, {region_code: '3', region_name: 'A2'}, {region_code: '4', region_name: 'A10'}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
|
}
|
||||||
|
export const agvqueryPointByArea = (code) => {
|
||||||
|
let res = {
|
||||||
|
data: [{
|
||||||
|
device_code: '1',
|
||||||
|
device_name: 'JLDFJLLJ',
|
||||||
|
seq_num: '1'
|
||||||
|
}, {
|
||||||
|
device_code: '12',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '13',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '14',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '15',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '16',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}, {
|
||||||
|
device_code: '17',
|
||||||
|
device_name: 'JLDFJLLJ'
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
return res
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user