2024-09-11 11:29:44 +08:00
|
|
|
<template>
|
|
|
|
|
<view class="zd_container">
|
|
|
|
|
<nav-bar :title="title"></nav-bar>
|
|
|
|
|
<view class="zd_content">
|
|
|
|
|
<view class="zd_wrapper">
|
|
|
|
|
<img class="img" src="../../static/image/che.png" alt="">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="zd-row submit-bar">
|
2024-09-11 15:45:45 +08:00
|
|
|
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="_cancleTaskCharge">取消充电任务</button>
|
2024-09-11 11:29:44 +08:00
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import NavBar from '@/components/NavBar.vue'
|
|
|
|
|
import {cancleTaskCharge} from '@/utils/getData2.js'
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
NavBar
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
title: '',
|
|
|
|
|
disabled: false
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
onLoad (options) {
|
|
|
|
|
this.title = options.title
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async _cancleTaskCharge () {
|
|
|
|
|
this.disabled = true
|
|
|
|
|
try {
|
|
|
|
|
let res = await cancleTaskCharge()
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: res.message,
|
|
|
|
|
icon: 'none'
|
|
|
|
|
})
|
|
|
|
|
this.cancle()
|
|
|
|
|
} catch (err) {
|
|
|
|
|
this.disabled = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
|
.img
|
|
|
|
|
display block
|
|
|
|
|
width 60%
|
|
|
|
|
height auto
|
|
|
|
|
margin 0 auto
|
|
|
|
|
</style>
|