修改110

This commit is contained in:
2025-03-12 11:32:04 +08:00
parent 8873575e88
commit 35ed049c2d
4 changed files with 40 additions and 15 deletions

View File

@@ -87,7 +87,7 @@
},
async _startMoveWasteFoilv2 () {
try {
let res = await startMoveWasteFoilv2(this.index2, this.index1)
let res = await startMoveWasteFoilv2('', this.index2, this.index1)
this.clearUp()
uni.showToast({
title: res.message,

View File

@@ -13,11 +13,19 @@
/>
</view>
</view>
<view class="zd-row border-bottom">
<view class="zd-col-5">
<span class="filter_label">载具类型</span>
</view>
<view class="zd-col-19 filter_select">
<zxz-uni-data-select v-model="index3" filterable :localdata="options3"></zxz-uni-data-select>
</view>
</view>
</view>
</view>
<view class="zd-row submit-bar">
<button class="zd-col-4 button-default" @tap="clearUp">清空</button>
<button class="zd-col-4 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure1">开始</button>
<button class="zd-col-4 button-primary" :class="{'button-info': !val1 || !index3}" :disabled="disabled" @tap="toSure1">开始</button>
<button class="zd-col-4 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure2('1')">确认</button>
<button class="zd-col-4 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="toSure2('2')">结束</button>
<button class="zd-col-6 button-primary" :class="{'button-info': !val1}" :disabled="disabled" @tap="_resumeAutoMoveWasteFoil">继续巡航</button>
@@ -29,7 +37,7 @@
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import LinkScan from '@/components/LinkScan.vue'
import {startMoveWasteFoilv2, resumeMoveWasteFoilv2, resumeAutoMoveWasteFoil} from '@/utils/getData2.js'
import {getVehicleType, startMoveWasteFoilv2, resumeMoveWasteFoilv2, resumeAutoMoveWasteFoil} from '@/utils/getData2.js'
export default {
components: {
NavBar,
@@ -40,16 +48,28 @@
return {
title: '',
val1: '',
options3: [],
index3: '',
disabled: false
};
},
onLoad (options) {
this.title = options.title
this._getVehicleType()
},
methods: {
async _getVehicleType () {
let res = await getVehicleType()
if (res.code === 200 && res.content) {
this.options3 = [...res.content]
this.options3.map(el => {
this.$set(el, 'text', el.label)
})
}
},
async toSure1 () {
this.disabled = true
if (!this.val1) {
if (!this.val1 || !this.index3) {
this.disabled = false
return
}
@@ -68,7 +88,7 @@
},
async _startMoveWasteFoilv2 () {
try {
let res = await startMoveWasteFoilv2(this.val1)
let res = await startMoveWasteFoilv2(this.index3, this.val1)
this.clearUp()
uni.showToast({
title: res.message,
@@ -103,7 +123,7 @@
},
async _resumeMoveWasteFoilv2 (type) {
try {
let res = await resumeMoveWasteFoilv2(type, this.val1)
let res = await resumeMoveWasteFoilv2(type, this.val1, this.index3)
this.clearUp()
uni.showToast({
title: res.message,
@@ -115,6 +135,7 @@
},
clearUp () {
this.val1 = ''
this.index3 = ''
this.disabled = false
},
async _resumeAutoMoveWasteFoil () {
@@ -124,7 +145,7 @@
return
}
try {
let res = await resumeAutoMoveWasteFoil(this.val1)
let res = await resumeAutoMoveWasteFoil(this.val1, this.index3)
uni.showToast({
title: res.message,
icon: 'none'