Commit 5545ef5e by 李伟康

feat(receptionDetail): 优化质检页面切换提示

- 在 Quality 组件中添加 disabledText 属性,用于自定义禁用切换时的提示文本
- 在 receptionDetail 页面中使用 disabledText 属性,根据 AI 生成和录音状态显示不同提示
- 优化了用户在质检页面切换时的体验,提供了更具体的提示信息
1 parent 9982d462
......@@ -84,7 +84,8 @@ export default {
disabled: {
type: Boolean,
default: false
}
},
disabledText: String
},
data () {
return {
......@@ -129,7 +130,7 @@ export default {
tabClick (item, index) {
if (this.activeIndex == index) return
if (this.disabled) return uni.showToast({
title: '请等待内容生成后再切换其他质检点',
title: this.disabledText || '',
icon: 'none',
mask: true,
duration: 500
......
......@@ -94,6 +94,7 @@
@changeOperate="isOperate = $event"
@tabClick="tabClick"
:disabled="aiDisabled"
:disabledText="disabledText"
/>
</view>
</view>
......@@ -164,7 +165,8 @@ export default {
showPlayControl: false,
AIUrl: '',
wv: null,
aiDisabled: true
aiDisabled: true,
disabledText: ''
}
},
onLoad () {
......@@ -388,7 +390,7 @@ export default {
let title = ''
if (item.sumScore > item.score) title = item.tagGroupName
let { agentUrl, domainName, taskStatus } = data
agentUrl = 'http://192.168.1.237:3000/chat/0piVRFb1xn6OBTcv'
// agentUrl = 'http://192.168.1.237:3000/chat/0piVRFb1xn6OBTcv'
let url = `${agentUrl}?no_header=1&businessType=${bussinessType}&one_id=${uuid}&platformType=1&domain=${domainName}&presuppositionProblem=${title}&brandType=${modelType || 1001}`
url += `&phone=${phone}&brand=${brand}&date=${dayjs().format('YYYY-MM-DD')}`
if (taskStatus) url += `&practice_status=${taskStatus}`
......@@ -439,9 +441,12 @@ export default {
this.wv.evalJS(`sendMessage({type:'reset_chat',payload:{message:'${message}'}})`)
}
},
handlerMessage ({detail}) {
handlerMessage ({ detail }) {
let [data] = detail.data
this.aiDisabled = data.isResponding
this.aiDisabled = data.isResponding || data.isRecording
if (this.aiDisabled) {
this.disabledText = data.isResponding ? '请等待内容生成后再切换其他质检点' : '请等待录音结束后再切换其他质检点'
}
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!