change
This commit is contained in:
@@ -19,10 +19,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="box2 buttons_wrapper">
|
||||
<button class="button_control" @click="toSure(selectObj.point_code, '3')"><p>{{ $t('carrypoint.button1') }}</p></button>
|
||||
<button class="button_control" @click="toSure(selectObj.point_code, '4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
||||
<!-- <button class="button_control" :class="{'button_control_disabled':returnObj}" @click="toSure(startObj, '3')"><p>{{ $t('carrypoint.button1') }}</p></button> -->
|
||||
<button class="button_control" @click="toSure(startObj, '3')"><p>{{ $t('carrypoint.button1') }}</p></button>
|
||||
<button class="button_control" @click="toSure(startObj, '4')"><p>{{ $t('carrypoint.button2') }}</p></button>
|
||||
<button class="button_control" @click="showDialog('1')"><p>{{ $t('carrypoint.button3') }}</p></button>
|
||||
<!-- <button class="button_control" @click="toSure(selectObj.point_code, '1')"><p>{{ $t('carrypoint.button4') }}</p></button> -->
|
||||
<!-- <button class="button_control" @click="showDialog('2')"><p>{{ $t('carrypoint.button4') }}</p></button> -->
|
||||
<button class="button_control" @click="toSure(startObj, '1', returnObj)"><p>{{ $t('carrypoint.button4') }}</p></button>
|
||||
</div>
|
||||
@@ -114,7 +114,6 @@ export default {
|
||||
preventClickEvent: false
|
||||
},
|
||||
statusbg: false,
|
||||
pkId: '',
|
||||
selectObj: {},
|
||||
startObj: '', // 起始点
|
||||
returnObj: '', // 返回点
|
||||
@@ -240,6 +239,8 @@ export default {
|
||||
this.$refs.child.active = true
|
||||
switch (type) {
|
||||
case '1':
|
||||
this.startObj = ''
|
||||
this.returnObj = ''
|
||||
this.pointcode = ''
|
||||
this.returnsitecode = ''
|
||||
this.unclick = true
|
||||
@@ -258,7 +259,7 @@ export default {
|
||||
break
|
||||
case '2':
|
||||
if (this.value) {
|
||||
this.confirmPoint(this.pkId, '1', this.value)
|
||||
this.confirmPoint(this.startObj, '1', this.value)
|
||||
this.value = ''
|
||||
}
|
||||
break
|
||||
@@ -269,7 +270,7 @@ export default {
|
||||
case '1':
|
||||
break
|
||||
case '2':
|
||||
this.confirmPoint(this.pkId, '1', '')
|
||||
this.confirmPoint(this.startObj, '1', '')
|
||||
this.value = ''
|
||||
break
|
||||
}
|
||||
@@ -314,32 +315,43 @@ export default {
|
||||
},
|
||||
toRadio (e) {
|
||||
console.log('seletobj====', e)
|
||||
// this.pkId = this.pkId === e.point_code ? '' : e.point_code
|
||||
this.selectObj = e
|
||||
// this.toast('终点已选中')
|
||||
|
||||
if (this.startObj && this.returnObj) {
|
||||
// 已选中情况下清空
|
||||
this.startObj = ''
|
||||
this.returnObj = ''
|
||||
this.toast('已选点已清空')
|
||||
// this.toast('已选点已清空')
|
||||
return
|
||||
}
|
||||
if (!this.startObj) {
|
||||
this.startObj = e.point_code
|
||||
this.toast('终点已选中')
|
||||
let tipText = this.$i18n.locale === 'en-us' ? 'End point selected' : '终点已选中'
|
||||
this.toast(tipText)
|
||||
// this.toast('终点已选中')
|
||||
return
|
||||
}
|
||||
if (this.startObj && !this.returnObj) {
|
||||
this.returnObj = e.point_code
|
||||
this.toast('返回点已选中')
|
||||
let tipText = this.$i18n.locale === 'en-us' ? 'End point selected' : '终点已选中'
|
||||
this.toast(tipText)
|
||||
// this.toast('终点已选中')
|
||||
if (this.startObj !== e.point_code) {
|
||||
this.returnObj = e.point_code
|
||||
let tipText = this.$i18n.locale === 'en-us' ? 'Return point selected' : '返回点已选中'
|
||||
this.toast(tipText)
|
||||
// this.toast('返回点已选中')
|
||||
}
|
||||
}
|
||||
},
|
||||
toSure (pcode, type, ncode) {
|
||||
this.confirmPoint(pcode, type, ncode)
|
||||
},
|
||||
toClear () {
|
||||
this.selectObj = {}
|
||||
if ((type === '3' || type === '4') && this.returnObj) {
|
||||
return
|
||||
}
|
||||
if ((type === '3' || type === '4') && this.startObj) {
|
||||
this.confirmPoint(pcode, type, ncode)
|
||||
}
|
||||
if (type === '1' && this.startObj) {
|
||||
this.confirmPoint(pcode, type, ncode)
|
||||
}
|
||||
}
|
||||
// handleMouseenter (e) {
|
||||
// console.log('ee', e)
|
||||
|
||||
Reference in New Issue
Block a user