From c3e407327bb44379d35b782b6979ed45b780309f Mon Sep 17 00:00:00 2001 From: tk Date: Mon, 17 Jun 2024 14:42:40 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E7=B1=BB=09=E5=9E=8B=E3=80=91?= =?UTF-8?q?=EF=BC=9Afix=20=E3=80=90=E4=B8=BB=09=E9=A2=98=E3=80=91=EF=BC=9A?= =?UTF-8?q?=E9=A3=9E=E6=9C=BA=E6=8E=A7=E5=88=B6=E9=9D=A2=E6=9D=BF=E5=BC=B9?= =?UTF-8?q?=E5=87=BA=E6=8C=89=E9=92=AE=E6=92=AD=E6=94=BEbug=20=E3=80=90?= =?UTF-8?q?=E6=8F=8F=09=E8=BF=B0=E3=80=91=EF=BC=9A=20=09[=E5=8E=9F?= =?UTF-8?q?=E5=9B=A0]=EF=BC=9A=E6=94=B6=E5=9B=9E=E4=B9=9F=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E5=A3=B0=E9=9F=B3=20=09[=E8=BF=87=E7=A8=8B]=EF=BC=9A?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=94=B6=E5=9B=9E=E6=97=B6=20=E4=B8=8D?= =?UTF-8?q?=E6=92=AD=E6=94=BE=E5=A3=B0=E9=9F=B3=20=09[=E5=BD=B1=E5=93=8D]?= =?UTF-8?q?=EF=BC=9A=20=E3=80=90=E7=BB=93=09=E6=9D=9F=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动 --- src/components/ControllerTabs.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/components/ControllerTabs.vue b/src/components/ControllerTabs.vue index 990f82f..3434d29 100644 --- a/src/components/ControllerTabs.vue +++ b/src/components/ControllerTabs.vue @@ -44,7 +44,7 @@
+ @click="toggleContent(index, item.voice)">
{{ item.title }}
@@ -75,7 +75,7 @@ 航线锁定 + icon="f-s-14 iconfont icon-chakanzhihangrizhi" @click="runQuest"> 提交任务 + @click="reQuest"> 取消任务 + @click="overQuest"> 已送达 @@ -366,17 +366,21 @@ export default { /** * @description: 菜单切换 PS:UI * @param {*} index 序号 + * @param {*} voice 播放声音的文本 */ - toggleContent (index) { + toggleContent (index, voice) { this.activeIndex = this.activeIndex === index ? null : index if (this.tabIsOpen) { if (index !== this.activeIndex) { this.tabIsOpen = false this.$emit('mapXOffset', -200) + } else { + this.speakText(voice) } } else { this.tabIsOpen = true this.$emit('mapXOffset', 200) + this.speakText(voice) } }, /** @@ -430,6 +434,7 @@ export default { this.publishFun(`{"questAss":${routeData}}`)// 发送航点信息主题 this.questAss(item.id, 'status', 'shipped')// 订单改为发货状态 并更新订单列表 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: this.plane.id })// 航线注册飞机 锁定送餐点 + this.speakText('提交任务,锁定航线。') } }) if (i) { return } @@ -489,6 +494,7 @@ export default { this.questAss(item.id, 'status', 'pending')// 订单改回到发货状态之前 既“已付款状态” this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线 this.questForm.id = ''// 选择框设置成 空的状态 + speakText('任务取消,退回未备货状态') } }) }).catch(() => { @@ -516,6 +522,7 @@ export default { this.publishFun('{"resetState":1}')// 发送设置飞机状态主题 状态设为闲置 this.questAss(item.id, 'status', 'completed')// 订单改为已完成状态 this.$store.dispatch('fetchLockSite', { id: item.receive_site_id, runing: 'null' })// 解锁航线 + this.speakText('任务完成') } }) }).catch(() => {