add取消充电任务

This commit is contained in:
2024-08-19 16:33:24 +08:00
parent e11ba0b07b
commit b22d1c772f
9 changed files with 78 additions and 4 deletions

View File

@@ -61,5 +61,6 @@
"warning": "Warning",
"toast.command-reissue": "Do you need to issue it?",
"charging-task": "Charging task",
"toast.charging-task": "Do you need to charge it?"
"toast.charging-task": "Do you need to charge it?",
"cancel-charging-task": "Cancel charging task"
}

View File

@@ -61,5 +61,6 @@
"warning": "힌트",
"toast.command-reissue": "발송해야 하나요?",
"charging-task": "충전 작업",
"toast.charging-task": "충전이 필요하십니까?"
"toast.charging-task": "충전이 필요하십니까?",
"cancel-charging-task": "충전 작업 취소"
}

View File

@@ -61,6 +61,7 @@
"warning": "提示",
"toast.command-reissue": "是否需要下发?",
"charging-task": "充电任务",
"toast.charging-task": "是否需要充电?"
"toast.charging-task": "是否需要充电?",
"cancel-charging-task": "取消充电任务"
}

View File

@@ -50,6 +50,14 @@
}
}
,{
"path" : "pages/manage/cancel-charge-task",
"style" :
{
"navigationStyle": "custom"
}
}
],
"globalStyle": {
// "pageOrientation": "landscape",

View File

@@ -34,7 +34,8 @@
menuList: [
{id: 1, title: this.$t('title.call'), icon: 'RF01', path: '/pages/manage/call-manage'},
{id: 2, title: this.$t('title.command'), icon: 'RF02', path: '/pages/manage/inst-manage'},
{id: 3, title: this.$t('title.task'), icon: 'RF03', path: '/pages/manage/task-manage'}
{id: 3, title: this.$t('title.task'), icon: 'RF03', path: '/pages/manage/task-manage'},
{id: 4, title: this.$t('cancel-charging-task'), icon: 'RF05', path: '/pages/manage/cancel-charge-task'}
// {id: 4, title: this.$t('title.release-confirm'), icon: 'RF04', path: '/pages/manage/release-confirm'}
],
show: false,

View File

@@ -0,0 +1,55 @@
<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">
<button class="zd-col-22 button-primary" :disabled="disabled" @tap="_cancleTaskCharge">{{$t('cancel-charging-task')}}</button>
</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()
this.cancle()
uni.showToast({
title: res.message,
icon: 'none'
})
} catch (err) {
this.disabled = false
}
}
}
}
</script>
<style lang="stylus" scoped>
.img
display block
width 60%
height auto
margin 0 auto
</style>

BIN
static/image/che.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

BIN
static/image/menu/RF05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -101,4 +101,11 @@ export const updateTask = (code,type) => request({
export const taskCharge = () => request({
url:'api/hand/taskCharge',
data: {}
})
/**
* 取消充电任务
*/
export const cancleTaskCharge = () => request({
url:'api/hand/cancleTaskCharge',
data: {}
})