2023-10-18 14:44:29 +08:00
|
|
|
<template>
|
|
|
|
|
<div class="main-container">
|
2023-10-23 12:10:05 +08:00
|
|
|
<div class="right_side">
|
|
|
|
|
<div class="content_wrap">
|
|
|
|
|
<div class="title_wrap">
|
|
|
|
|
<h2>搬运起点</h2>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="box1">
|
|
|
|
|
<div class="point-box">
|
|
|
|
|
<div class="point fl" :class="{'statusbg': pkId === e.point_code}" v-for="e in dataList" :key="e.point_code" @click="toRadio(e)">{{e.code_name}}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-11-23 15:54:12 +08:00
|
|
|
<!-- <div class="box2">
|
|
|
|
|
<div class="btn" @click="toSure('1')">自动取货</div>
|
|
|
|
|
<div class="btn" @click="toSure('2')">自动放货</div>
|
|
|
|
|
<div class="btn" @click="toSure('0')">定为目标站点</div>
|
|
|
|
|
</div> -->
|
|
|
|
|
<div class="box2 buttons_wrapper">
|
|
|
|
|
<button class="button_control" @click="toSure('1')"><p>自动取货</p></button>
|
|
|
|
|
<button class="button_control" @click="toSure('2')"><p>自动放货</p></button>
|
|
|
|
|
<button class="button_control" @click="toSure('0')"><p>定为目标站点</p></button>
|
2023-10-23 12:10:05 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<!-- <div class="main-container">
|
2023-10-18 14:44:29 +08:00
|
|
|
<div class="movepoint">
|
|
|
|
|
<div class="con">
|
2023-10-19 14:25:43 +08:00
|
|
|
<div class="box0">
|
|
|
|
|
<div class="title">搬运起点</div>
|
|
|
|
|
</div>
|
2023-10-18 14:44:29 +08:00
|
|
|
<div class="box1">
|
2023-10-21 10:29:41 +08:00
|
|
|
<div class="point-box">
|
|
|
|
|
<div class="point fl" :class="{'statusbg': pkId === e.point_code}" v-for="e in dataList" :key="e.point_code" @click="toRadio(e)">{{e.code_name}}</div>
|
|
|
|
|
</div>
|
2023-10-18 14:44:29 +08:00
|
|
|
</div>
|
|
|
|
|
<div class="box2">
|
2023-10-19 14:25:43 +08:00
|
|
|
<div class="btn" @click="toSure">定为目标站点</div>
|
2023-10-18 14:44:29 +08:00
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2023-10-23 12:10:05 +08:00
|
|
|
</div> -->
|
2023-10-18 14:44:29 +08:00
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {queryPoint, confirmPoint} from '@/config/getData.js'
|
|
|
|
|
export default {
|
|
|
|
|
name: 'MovePoint',
|
|
|
|
|
data () {
|
|
|
|
|
return {
|
2023-10-19 14:25:43 +08:00
|
|
|
statusbg: false,
|
|
|
|
|
pkId: '',
|
2023-10-18 14:44:29 +08:00
|
|
|
selectObj: {},
|
2023-10-23 12:10:05 +08:00
|
|
|
dataList: []
|
|
|
|
|
// dataList: [
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '1',
|
|
|
|
|
// code_name: '18-一线起升电机'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '2',
|
|
|
|
|
// code_name: 'A-ZD102'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '3',
|
|
|
|
|
// code_name: 'A-ZD103'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '4',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '5',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '6',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '7',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '8',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '9',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '10',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '11',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '12',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '13',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '14',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '15',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// },
|
|
|
|
|
// {
|
|
|
|
|
// point_code: '16',
|
|
|
|
|
// code_name: 'A-ZD101'
|
|
|
|
|
// }
|
|
|
|
|
// ]
|
2023-10-18 14:44:29 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
created () {
|
|
|
|
|
this.initData()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2023-10-21 10:29:41 +08:00
|
|
|
// 这个接口需要放到agv上去才行
|
2023-10-18 14:44:29 +08:00
|
|
|
async initData () {
|
|
|
|
|
let res = await queryPoint()
|
|
|
|
|
if (res.code === '1') {
|
|
|
|
|
this.dataList = res.result
|
|
|
|
|
} else {
|
|
|
|
|
this.toast(res.desc)
|
|
|
|
|
}
|
|
|
|
|
},
|
2023-11-23 15:54:12 +08:00
|
|
|
async confirmPoint (type) {
|
|
|
|
|
let res = await confirmPoint(this.selectObj.point_code, type)
|
2023-10-18 14:44:29 +08:00
|
|
|
if (res.code === '1') {
|
|
|
|
|
this.toast(res.desc)
|
|
|
|
|
this.selectObj = {}
|
|
|
|
|
} else {
|
|
|
|
|
this.toast(res.desc)
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toRadio (e) {
|
2023-10-19 14:25:43 +08:00
|
|
|
this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
2023-10-18 14:44:29 +08:00
|
|
|
this.selectObj = e
|
|
|
|
|
},
|
2023-11-23 15:54:12 +08:00
|
|
|
toSure (type) {
|
2023-10-18 14:44:29 +08:00
|
|
|
console.log(this.selectObj.point_code, 666)
|
|
|
|
|
if (this.selectObj.point_code) {
|
2023-11-23 15:54:12 +08:00
|
|
|
this.confirmPoint(type)
|
2023-10-18 14:44:29 +08:00
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
toClear () {
|
|
|
|
|
this.selectObj = {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.con
|
|
|
|
|
float left
|
2023-10-19 14:25:43 +08:00
|
|
|
.box0
|
|
|
|
|
width 1586px
|
|
|
|
|
height 102px
|
|
|
|
|
background center / 100% 100% url(../../../images/new/bg-task-r1.png) no-repeat
|
|
|
|
|
.title
|
|
|
|
|
font-size 36px
|
|
|
|
|
color #F6F9FE
|
|
|
|
|
padding-left 39px
|
|
|
|
|
padding-top 48px
|
2023-10-18 14:44:29 +08:00
|
|
|
.box1
|
2023-10-23 12:10:05 +08:00
|
|
|
// width 1592px
|
|
|
|
|
// height 819px
|
|
|
|
|
height 800px
|
2023-10-19 14:25:43 +08:00
|
|
|
background center / 100% 100% url(../../../images/new/bg-task-r2.png) no-repeat
|
2023-10-20 11:04:01 +08:00
|
|
|
padding-top 28px
|
|
|
|
|
padding-left 44px
|
2023-10-21 10:29:41 +08:00
|
|
|
.point-box
|
|
|
|
|
width 100%
|
|
|
|
|
height 700px
|
|
|
|
|
.point
|
|
|
|
|
width 248px
|
|
|
|
|
height 134px
|
|
|
|
|
line-height 134px
|
|
|
|
|
color #B4C1D8
|
|
|
|
|
font-size 26px
|
|
|
|
|
text-align center
|
|
|
|
|
margin-right 3px
|
|
|
|
|
margin-bottom 13px
|
|
|
|
|
background center / 100% 100% url(../../../images/new/bg2.png) no-repeat
|
|
|
|
|
.statusbg
|
|
|
|
|
box-sizing border-box
|
|
|
|
|
color #3CC1FF
|
|
|
|
|
background center / 100% 100% url(../../../images/new/bg1.png) no-repeat !important
|
2023-10-18 14:44:29 +08:00
|
|
|
.box2
|
|
|
|
|
position fixed
|
2023-11-23 15:54:12 +08:00
|
|
|
left 500px
|
|
|
|
|
bottom 50px
|
2023-10-18 14:44:29 +08:00
|
|
|
</style>
|