wujingling0908 6 days ago
commit 6c748c61b2
  1. 189
      src/components/chat-content.vue
  2. 16
      src/components/chat-new.vue
  3. 19
      src/components/text-content.vue
  4. 3
      src/components/text-folding.vue

@ -136,7 +136,7 @@
</div>
</div>
<!-- <div class="service-link-box before-top">
<button class="service-link-btn" disabled="disabled" @click.stop="manualAnswer($event)">
<button class="service-link-btn" :disabled="isHistory" @click.stop="manualAnswer($event)">
点击此处,连线人工客服
</button>
</div> -->
@ -179,10 +179,10 @@
<!-- 2021/12 关爱版开启留言按钮, 隐藏95950000 95980000 95985000渠道留言按钮 -->
<div class="leave-message-btn"
v-if="!($nohxmessage || []).includes(source) && userInfo.blacklistFlag != '1'">
<button class="answer-items" disabled="disabled" @click.stop="leaveMessageBtn($event)">
<button class="answer-items" :disabled="isHistory" @click.stop="leaveMessageBtn($event)">
点击此处,给我们留言
</button>
<!-- <button class="answer-items" disabled="disabled" @click.stop="exitMessage($event)">点击此处,退出人工</button> -->
<!-- <button class="answer-items" :disabled="isHistory" @click.stop="exitMessage($event)">点击此处,退出人工</button> -->
</div>
</div>
</div>
@ -205,7 +205,7 @@
<!-- 2021/12 关爱版开启留言按钮, 隐藏95950000 95980000 95985000渠道留言按钮 -->
<div class="leave-message-btn"
v-if="!($nohxmessage || []).includes(source) && userInfo.blacklistFlag != '1'">
<button class="answer-items" disabled="disabled" @click.stop="leaveMessageBtn($event)">
<button class="answer-items" :disabled="isHistory" @click.stop="leaveMessageBtn($event)">
点击此处,给我们留言
</button>
</div>
@ -295,7 +295,7 @@
</div>
<div class="chat-items">
<div class="content-left-main">
<edit-address :itemList="item" :disabled="true"></edit-address>
<edit-address :itemList="item" :disabled="isHistory"></edit-address>
</div>
</div>
</div>
@ -396,7 +396,7 @@
</div>
<div class="chat-items">
<div class="content-left-main computing-text-box" style="padding: 14rem">
<network-address :itemList="item" :disabled="true"></network-address>
<network-address :itemList="item" :disabled="isHistory"></network-address>
</div>
</div>
</div>
@ -459,7 +459,7 @@
</div>
<div class="chat-items">
<div class="content-left-main computing-text-box" style="padding: 14rem">
<xqjfzzsx-accounts :itemList="item" :disabled="true"></xqjfzzsx-accounts>
<xqjfzzsx-accounts :itemList="item" :disabled="isHistory"></xqjfzzsx-accounts>
</div>
</div>
</div>
@ -476,7 +476,7 @@
</div>
<div class="chat-items">
<div class="content-left-main computing-text-box" style="padding: 14rem">
<insurance-reservation :itemList="item" :disabled="true"></insurance-reservation>
<insurance-reservation :itemList="item" :disabled="isHistory"></insurance-reservation>
</div>
</div>
</div>
@ -499,7 +499,7 @@
<div class="service-icon-tips" v-text="item.msgText"></div>
</div>
<!-- <div class="service-link-box before-top">
<button class="service-link-btn" disabled="disabled" @click.stop="manualAnswer($event)">
<button class="service-link-btn" :disabled="isHistory" @click.stop="manualAnswer($event)">
点击此处,连线人工客服
</button>
</div> -->
@ -523,13 +523,13 @@
<!--
<div class="chat-left-txt connectionArtificial" v-html="item.msgText"></div>
<div class="content-question-answer" v-if="item.intents && item.intents.length > 0" >
<button class="answer-items" v-for="(items, index) in item.intents" :key="index" disabled="disabled" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
<button class="answer-items" v-for="(items, index) in item.intents" :key="index" :disabled="isHistory" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
</div>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
</div>
</div>
</div>
@ -566,20 +566,20 @@
'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ',
}">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" :itemlist="item" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" :itemlist="item" :disabled="isHistory"></text-content>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">0101如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="manualAnswer($event)">进入人工服务</button>。</div> -->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">0101如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="manualAnswer($event)">进入人工服务</button>。</div> -->
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -597,7 +597,7 @@
<div class="chat-name" v-if="item.seatNum && item.seatNum != '调度员'">{{item.seatNum}}</div>
<div class="content-left-main">
<div class="chat-left-txt" v-html="replacementRag(item.msgText)"></div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="manualAnswer($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="manualAnswer($event)">进入人工服务</button>。</div>
</div>
</div>
</div> -->
@ -617,19 +617,19 @@
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRag(item.msgText)"></div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -651,13 +651,13 @@
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRag(item.msgText)"></div>
<div class="content-question-answer" v-if="item.intents && item.intents.length > 0" >
<button class="answer-items" disabled="disabled" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
<button class="answer-items" :disabled="isHistory" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
</div>
</div>
</div>
@ -676,13 +676,13 @@
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRagEmoticon(item.msgText)"></div>
<div class="content-question-answer" v-if="item.intents && item.intents.length > 0" >
<button class="answer-items" disabled="disabled" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
<button class="answer-items" :disabled="isHistory" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="item.msgText" :intents="item.intents" :itemlist="item"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="item.msgText" :intents="item.intents" :itemlist="item"
:isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
</div>
</div>
</div>
@ -699,11 +699,11 @@
<div class="content-left-main img-text-type text-folding-box">
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRag(item.msgText)"></div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
</div>
</div>
</div>
@ -728,12 +728,12 @@
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRagEmoticon(item.msgText)"></div>
<div class="content-question-answer" v-if="item.intents && item.intents.length > 0" >
<button class="answer-items" disabled="disabled" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
<button class="answer-items" :disabled="isHistory" v-for="(items, index) in item.intents" :key="index" @click.stop="richCallAnswer(items.intent)">{{items.intent}}</button>
</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="item.msgText" :intents="item.intents" :itemlist="item"
:isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum" :disabled="true"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="item.msgText" :intents="item.intents" :itemlist="item"
:isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum" :disabled="isHistory"
:reqAndResType="item.reqAndResType"></text-folding>
</div>
</div>
@ -753,21 +753,21 @@
'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ',
}">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="isHistory"></text-content>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true" heightMax="autoHeight"></text-folding>
:disabled="isHistory" heightMax="autoHeight"></text-folding>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -790,21 +790,21 @@
'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ',
}">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="isHistory"></text-content>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true" heightMax="autoHeight"></text-folding>
:disabled="isHistory" heightMax="autoHeight"></text-folding>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -853,11 +853,11 @@
:itemlist="item" />
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ' && item.specialData">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -879,11 +879,11 @@
<div class="content-left-main img-text-type text-folding-box">
<!--
<div class="chat-left-txt connectionArtificial" v-html="replacementRag(item.msgText)"></div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replacementRag(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true" heightMax="autoHeight"></text-folding>
:disabled="isHistory" heightMax="autoHeight"></text-folding>
</div>
</div>
</div>
@ -1016,11 +1016,11 @@
<div class="chat-items">
<div class="content-left-main img-text-type text-folding-box">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" :disabled="isHistory"></text-content>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true"></text-folding>
:disabled="isHistory"></text-folding>
</div>
</div>
</div>
@ -1038,22 +1038,22 @@
'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ',
}">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="isHistory"></text-content>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :itemlist="item" :isWX="isWX"
:tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum" :disabled="true"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :itemlist="item" :isWX="isWX"
:tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum" :disabled="isHistory"
heightMax="autoHeight"></text-folding>
<hot-question :isQA="true"></hot-question>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -1076,21 +1076,21 @@
'question-text': item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ',
}">
<!--
<text-content v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="true"></text-content>
<text-content :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents" heightMax="autoHeight" :disabled="isHistory"></text-content>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
<div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory" @click.stop="connectionArtificial($event)">进入人工服务</button>。</div>
-->
<text-folding v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
<text-folding :isHistory="isHistory" v-if="item.msgText" :introduce="replaceALabel(item.msgText)" :intents="item.intents"
:itemlist="item" :isWX="isWX" :tokenExist="tokenExist" :lostChatInfoNum="lostChatInfoNum"
:disabled="true" heightMax="autoHeight"></text-folding>
:disabled="isHistory" heightMax="autoHeight"></text-folding>
<!--问题反馈 -->
<div class="help-button-box flex flex-align-center before-top"
v-if="item.cmd != 'RGFWHS' && item.cmd != 'QXRGPJ'">
<button class="help-button-item" disabled="disabled" @click.stop="appraise(2, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(2, item, $event)"
:data-ref="`u_${item.timestamp}`">
<em class="help-button-icon"></em>没有帮助
</button>
<button class="help-button-item" disabled="disabled" @click.stop="appraise(1, item, $event)"
<button class="help-button-item" :disabled="isHistory" @click.stop="appraise(1, item, $event)"
:data-ref="`r_${item.timestamp}`">
<em class="help-button-icon"></em>有帮助
</button>
@ -1112,7 +1112,7 @@
<div class="content-left-main">
<div class="chat-left-txt connectionArtificial" v-html="replacementRag(item.msgText)"></div>
<!-- <div class="question-answer-help" v-if="item.cmd && item.cmd == 'RGFWHS'">
如需更多帮助,请点击<button class="answer-help-btn" disabled="disabled"
如需更多帮助,请点击<button class="answer-help-btn" :disabled="isHistory"
@click.stop="connectionArtificial($event)">
进入人工服务</button>。
</div> -->
@ -1965,11 +1965,10 @@ export default {
//评价接口
appraise(evaluation, item, event) {
//evaluation 1为有帮助 2没有帮助
// 基础评价数据交给 appraise-popup 弹窗:提交/关闭时统一落库并置灰按钮
let current = event.currentTarget;
let settled = event.currentTarget.parentNode.children[1]; //有帮助
let unsettled = event.currentTarget.parentNode.children[0]; //没有帮助
let param = {
let baseHandle = {
fromFlag: 1,
userId: this.userId,
sessionId: this.sessionId,
@ -1978,46 +1977,10 @@ export default {
evaluation: evaluation,
reqAndResType: "3",
timestamp: new Date().valueOf(),
event: current,
};
current.disabled = true;
//this.set_sendLoading(true);
// 满意度调查系统需求
this.savePaperResult(param)
.then((res) => { })
.catch((err) => {
console.log(err);
});
this.$post("evaluation/evaluateAnswer", param)
.then((res) => {
//this.set_sendLoading(false);
// console.log("评价接口==", res)
if (res.code && res.code != 0) {
showToast(res.msg);
current.disabled = false;
return;
}
// 禁掉按钮
current.disabled = true;
current.classList.add("active");
if (current.innerText === "有帮助") {
unsettled.disabled = true;
} else if (current.innerText === "没有帮助") {
settled.disabled = true;
}
this.set_chatList(res.data);
this.scrollTopBody();
//评价返回数据
})
.catch((error) => {
current.disabled = false;
console.log(error);
});
this.$emit("handleAppraise", true, baseHandle);
},
//留言
leaveMessageBtn(event) {

@ -10,6 +10,7 @@ import hotQuestionNew from '@/components/hot-question-new.vue'
import welcomes from '@/components/welcomes.vue'
import abstract from '@/components/abstract.vue'
import chatContent from '@/components/chat-content.vue'
import appraisePopup from '@/components/appraise-popup.vue'
import DynamicImage from '@/components/common/DynamicImage.vue'
import bussinessHandle from '@/components/business-handle.vue'
import imageService from '@/utils/imageService'
@ -41,6 +42,13 @@ const sessionId = inject('sessionId', ref(''))
const userId = inject('userId', ref(''))
const isLostMessage = inject('isLostMessage', ref(null))
const mainContainerRef = ref(null)
const appraiseShow = ref(false) // 有帮助/没帮助评价弹层
const baseHandle = ref('') // 评价弹层基础数据(含被点按钮 event)
function appraiseIsClose(val, param) {
appraiseShow.value = val
baseHandle.value = param || ''
}
// 参考 liics/chat-main 的 tokenExist:token 获取成功后才渲染聊天主内容
@ -518,16 +526,24 @@ watch(
:isWX="isWX"
:tokenExist="tokenExist"
:lostChatInfoNum="lostChatInfoNum"
@handleAppraise="appraiseIsClose"
/>
</div>
<div class="chat-footer">
<footer-bar v-if="tokenExist" :tokenExist="tokenExist" />
</div>
<bussinessHandle :businessHandleInfo="store.businessHandleInfo" ref="businessHandleRef" />
<van-overlay :show="appraiseShow" z-index="10" class-name="appraise-popup-box" duration="0.2">
<appraise-popup v-if="appraiseShow" @handleAppraiseClose="appraiseIsClose"
:baseHandle="baseHandle"></appraise-popup>
</van-overlay>
</div>
</template>
<style lang="scss" scoped>
@import '@/assets/style/common.css';
.van-overlay.appraise-popup-box {
background: rgba(0, 0, 0, 0.5) !important;
}
.chat-new {
width: 100vw;
height: 100vh;

@ -49,6 +49,7 @@ const props = defineProps({
disabled: { type: Boolean, default: false },
heightMax: { type: String, default: '' },
itemlist: { type: Object, default: () => ({}) },
isHistory: { type: Boolean, default: false },
})
const store = inject('appStore', null)
@ -252,6 +253,23 @@ function handleURL(url, params) {
function replacementRagEmoticon(str) {
str = str || ''
let res = str.replace(/\\n/gm, '<br/>')
// 历史消息里的内嵌跳转链接置为禁用态(与 text-folding 行为一致)
if (props.isHistory) {
if (res.indexOf('open-wx-web-button')) {
res = res.replace(/"open-wx-web-button"/g, '"open-wx-web-button-disable"')
} else if (res.indexOf('jump-web-button')) {
res = res.replace(/"jump-web-button"/g, '"jump-web-button-disable"')
} else if (res.indexOf('open-app-page-button')) {
res = res.replace(/"open-app-page-button"/g, '"open-app-page-button-disable"')
}
if (res.indexOf('open-wx-web')) {
res = res.replace(/"open-wx-web"/g, '"open-wx-web-disable"')
} else if (res.indexOf('jump-web')) {
res = res.replace(/"jump-web"/g, '"jump-web-disable"')
} else if (res.indexOf('open-app-page')) {
res = res.replace(/"open-app-page"/g, '"open-app-page-disable"')
}
}
return emojiToImage(res)
}
@ -429,7 +447,6 @@ function manualAnswer(event, item) {
}
.answer-items[disabled] {
opacity: 0.5;
cursor: not-allowed;
}

@ -26,7 +26,7 @@
"
>
<button
:class="hasClicked || disabled ? 'answer-items setGrey' : 'answer-items'"
:class="hasClicked ? 'answer-items setGrey' : 'answer-items'"
v-for="(items, index) in intents"
:key="index"
:disabled="disabled"
@ -531,7 +531,6 @@ function manualAnswer(event, item) {
}
.answer-items[disabled] {
opacity: 0.5;
cursor: not-allowed;
}

Loading…
Cancel
Save