CzRger před 3 dny
rodič
revize
b5c9d09d7a

+ 2 - 2
src/views/smart-ask-answer/assistant/chat.vue

@@ -78,13 +78,13 @@ const state: any = reactive({
   chats: [],
   goodMap: new Map(),
   badMap: new Map(),
-  autoList: []
+  autoList: [],
 })
 const ref_text = ref()
 const ref_chatMsg = ref()
 const ref_auto = ref()
 const onSend = (text = '') => {
-  if (isValue(state.text.trim())) {
+  if ((isValue(state.text.trim()) || text) && !state.loading) {
     state.loading = true
     if (text) {
       state.params.query = text

+ 18 - 12
src/views/smart-ask-answer/assistant/index.vue

@@ -45,7 +45,7 @@
           <div class="assistant-main-list-hot-question">
             <div class="title_1">热点问题</div>
             <div class="list_1" v-if="state.hotList.question.length > 0">
-              <template v-for="item in state.hotList.question">
+              <template v-for="item in [...state.hotList.question, ...state.hotList.question]">
                 <div class="item">
                   <span class="__hover" @click="ref_chat.setText(item.hotContent, true)">{{item.hotContent}}</span>
                 </div>
@@ -99,12 +99,12 @@
           <img src="@/views/smart-ask-answer/assistant/imgs/icon-1.png"/>使用帮助<SvgIcon name="czr_close_1" color="#ffffff" size="16" class="__hover" @click="state.showHelp = false"/>
         </div>
         <div class="dialog-content help">
-          <div><div>我学习了<em>口岸知识</em>,能帮您解决口岸相关问题。</div></div>
-          <div><div>提问字数应控制在<em>200字以内</em>,简要描述业务相关问题,避免出现<em>事例说明</em>和具体<em>个人信息</em>。</div></div>
-          <div><div>提问范围应在<em>业务以内</em>,避免与业务无关的内容。</div></div>
-          <div><div>提问描述应<em>完整简明</em>,避免仅输入“去哪里办理?”、“要带什么材料”等问法。</div></div>
-          <div><div>提问内容尽量避免出现<em>字母、数字、特殊符号</em>等非简体中文文字内容。</div></div>
-          <div><div>提问避免上<em>上下文分割</em>,避免多次重复提问同一个问题。</div></div>
+          <div><div>我学习了<span>口岸知识</span>,能帮您解决口岸相关问题。</div></div>
+          <div><div>提问字数应控制在<span>200字以内</span>,简要描述业务相关问题,避免出现<span>事例说明</span>和具体<span>个人信息</span>。</div></div>
+          <div><div>提问范围应在<span>业务以内</span>,避免与业务无关的内容。</div></div>
+          <div><div>提问描述应<span>完整简明</span>,避免仅输入“去哪里办理?”、“要带什么材料”等问法。</div></div>
+          <div><div>提问内容尽量避免出现<span>字母、数字、特殊符号</span>等非简体中文文字内容。</div></div>
+          <div><div>提问避免上<span>上下文分割</span>,避免多次重复提问同一个问题。</div></div>
         </div>
       </div>
     </CzrDialog>
@@ -320,8 +320,8 @@ onMounted(() => {
   height: 146px;
   display: flex;
   flex-direction: column;
-  //overflow: hidden;
-  overflow-y: auto;
+  overflow: hidden;
+  //overflow-y: auto;
   .item {
     border-bottom: 1px dashed #D8DAE5;
     display: flex;
@@ -332,9 +332,14 @@ onMounted(() => {
     color: #111111;
     >span {
       min-height: 47px;
-      display: flex;
-      align-items: center;
+      line-height: 47px;
+      display: inline-block;
       flex: 1;
+      margin: 0 5px;
+      white-space: nowrap;
+      overflow: hidden;
+      text-overflow: ellipsis;
+      word-break: break-all;
     }
     &:before {
       content: '';
@@ -515,6 +520,7 @@ onMounted(() => {
             .item {
               >span {
                 min-height: 34px;
+                line-height: 34px;
               }
             }
           }
@@ -605,7 +611,7 @@ onMounted(() => {
           color: #111111;
           line-height: 26px;
           text-align: justify;
-          >em {
+          >span {
             font-weight: bold;
           }
         }