|
|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
<template> |
|
|
|
|
<view class="detail" :data="params" :change:data="renderjs.renderjsGet" :imgArr="imgArr" |
|
|
|
|
:change:imgArr="renderjs.getImgArr" :check="check" :change:check="renderjs.checkGet" :taskId="taskId" :change:taskId="renderjs.taskIdGet" > |
|
|
|
|
:change:imgArr="renderjs.getImgArr" :check="check" :change:check="renderjs.checkGet" :taskId="taskId" |
|
|
|
|
:change:taskId="renderjs.taskIdGet"> |
|
|
|
|
<!-- <view class="Content BorderBox Width100"> |
|
|
|
|
<top-title |
|
|
|
|
:is-show-left="true" |
|
|
|
|
@ -48,8 +49,7 @@ |
|
|
|
|
<view class="cur-time font-family-SR"> |
|
|
|
|
{{curTime}} |
|
|
|
|
</view> |
|
|
|
|
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item, i) in msgList" |
|
|
|
|
:key="item.id"> |
|
|
|
|
<view :class="['bar', item.answerId == '0' ? 'currAnswer' : '']" v-for="(item, i) in msgList" :key="i"> |
|
|
|
|
<!-- <image |
|
|
|
|
:src=" |
|
|
|
|
item.answerId == '0' ? '/static/self.png' : '/static/left_user.png' |
|
|
|
|
@ -93,7 +93,8 @@ |
|
|
|
|
</u-checkbox-group> |
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
<view v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0" |
|
|
|
|
<view |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 0 && !item.check" |
|
|
|
|
:style="item.answerOptions.length > 2 ? 'display: flex; flex-wrap: wrap;' : ''" |
|
|
|
|
:class="item.answerOptions.length > 2 ? '' : 'btnBox'"> |
|
|
|
|
<view v-for="(it, ind) in item.answerOptions" :key="ind" |
|
|
|
|
@ -119,7 +120,7 @@ |
|
|
|
|
</u-radio-group> --> |
|
|
|
|
</view> |
|
|
|
|
<view class="btnBox" |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1"> |
|
|
|
|
v-if="item.answerOptions && item.answerOptions.length > 0 && item.optionType == 1 && !item.check"> |
|
|
|
|
<view class="btn" @click="handleGroup2(i)">清空</view> |
|
|
|
|
<view class="btn" @click="handleGroup(item)">确认</view> |
|
|
|
|
</view> |
|
|
|
|
@ -337,7 +338,10 @@ |
|
|
|
|
{ |
|
|
|
|
answerId: "1", |
|
|
|
|
data: '', |
|
|
|
|
}, |
|
|
|
|
optionType: res.result.data?.optionType, |
|
|
|
|
answerOptions: res.result.data ? res.result.data |
|
|
|
|
.answerOptions : [], |
|
|
|
|
} |
|
|
|
|
]; |
|
|
|
|
console.log('contentcontentcontent', content) |
|
|
|
|
this.tempStr = content |
|
|
|
|
@ -347,6 +351,7 @@ |
|
|
|
|
}, 50) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('msgList', this.msgList) |
|
|
|
|
// } |
|
|
|
|
|
|
|
|
|
// debugger |
|
|
|
|
@ -426,6 +431,7 @@ |
|
|
|
|
res.result.data?.optionType; |
|
|
|
|
this.msgList[this.msgList.length - 1].answerOptions = |
|
|
|
|
res.result.data ? res.result.data.answerOptions : []; |
|
|
|
|
console.log('msgList', this.msgList) |
|
|
|
|
} else { |
|
|
|
|
//最后一个是问题 |
|
|
|
|
this.msgList = [ |
|
|
|
|
@ -438,6 +444,7 @@ |
|
|
|
|
.answerOptions : [], |
|
|
|
|
}, |
|
|
|
|
]; |
|
|
|
|
console.log('msgList', this.msgList) |
|
|
|
|
} |
|
|
|
|
}, index * 50) |
|
|
|
|
}) |
|
|
|
|
@ -997,7 +1004,15 @@ |
|
|
|
|
} else { |
|
|
|
|
text = item; |
|
|
|
|
} |
|
|
|
|
this.$set(this.msgList[this.msgList.length - 1], 'check', true) |
|
|
|
|
this.msgList.push({ |
|
|
|
|
answerId: '0', |
|
|
|
|
data: text |
|
|
|
|
}) |
|
|
|
|
this.check = text |
|
|
|
|
setTimeout(() => { |
|
|
|
|
this.check = '' |
|
|
|
|
}, 100) |
|
|
|
|
return |
|
|
|
|
this.handleSend(text); |
|
|
|
|
}, |
|
|
|
|
@ -1056,6 +1071,7 @@ |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
newSSE(voiceText, answerId = '') { |
|
|
|
|
if (!voiceText) return |
|
|
|
|
console.log('排查chat发送', voiceText, { |
|
|
|
|
voiceText, |
|
|
|
|
sceneFlag: "", |
|
|
|
|
@ -1089,7 +1105,7 @@ |
|
|
|
|
stream: true, |
|
|
|
|
type: "1", |
|
|
|
|
id: this.params.id || '', |
|
|
|
|
taskId: this.params.taskId || '', |
|
|
|
|
taskId: this.params.taskId || this.taskId, |
|
|
|
|
sectionId: this.params.sectionId || '', |
|
|
|
|
sectionType: this.params.sectionType || '', |
|
|
|
|
}), |
|
|
|
|
@ -1097,6 +1113,10 @@ |
|
|
|
|
openWhenHidden: true, |
|
|
|
|
onopen: () => {}, |
|
|
|
|
onmessage: (ev) => { |
|
|
|
|
if (!this.taskId) { |
|
|
|
|
const result = JSON.parse(ev.data); |
|
|
|
|
this.taskId = result.taskId |
|
|
|
|
} |
|
|
|
|
console.log('chat内容返回', ev); |
|
|
|
|
//发送数据到逻辑层 |
|
|
|
|
this.$ownerInstance.callMethod('sseBack', ev); |
|
|
|
|
|