CzRger 3 ay önce
ebeveyn
işleme
f8b7adf2e7
1 değiştirilmiş dosya ile 10 ekleme ve 15 silme
  1. 10 15
      src/views/smart-ask-answer/assistant/index.vue

+ 10 - 15
src/views/smart-ask-answer/assistant/index.vue

@@ -45,9 +45,9 @@
           <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, ...state.hotList.question]">
+              <template v-for="item in state.hotList.question">
                 <div class="item">
-                  <span class="__hover" @click="ref_chat.setText(item.hotContent, true)">{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}{{item.hotContent}}</span>
+                  <span class="__hover" @click="ref_chat.setText(item.hotContent, true)">{{item.hotContent}}</span>
                 </div>
               </template>
             </div>
@@ -69,12 +69,7 @@
           <div class="list_1" v-if="state.adviseList[state.adviseList.value].length > 0">
             <template v-for="item in state.adviseList[state.adviseList.value]">
               <div class="item">
-                <template v-if="state.adviseList.value === 'question'">
-                  <span class="__hover" @click="toGov(item)">{{item.title}}</span>
-                </template>
-                <template v-else>
-                  <span class="__hover" @click="ref_chat.setText(item, true)">{{item}}</span>
-                </template>
+                <span class="__hover" @click="toUrl(item.url)">{{item.name}}</span>
               </div>
             </template>
           </div>
@@ -267,7 +262,7 @@ const initRelation = (text = '') => {
     }
   }
   staticConQueryQuestionslist(params1).then(res => {
-    state.adviseList.question = res?.data?.list || []
+    state.adviseList.question = res?.data?.list.map(v => ({name: v.title, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=cjwt`})) || []
   })
   const params2 = {
     data: {
@@ -279,7 +274,7 @@ const initRelation = (text = '') => {
     }
   }
   matterQueryMatterlist(params2).then(res => {
-    state.adviseList.item = res?.data?.list.map(v => v.mattersName) || []
+    state.adviseList.item = res?.data?.list.map(v => ({name: v.mattersName, url: v.workGuide})) || []
   })
   const params3 = {
     data: {
@@ -291,11 +286,11 @@ const initRelation = (text = '') => {
     }
   }
   policyInfoQueryPolicyInfolist(params3).then(res => {
-    state.adviseList.policy = res?.data?.list.map(v => v.contentTitle) || []
+    state.adviseList.policy = res?.data?.list.map(v => ({name: v.contentTitle, url: `https://iport.ka.sz.gov.cn/szka/article?id=${v.id}&type=zczx`})) || []
   })
 }
-const toGov = (val) => {
-  window.open(`https://iport.ka.sz.gov.cn/szka/article?id=${val.id}&type=cjwt`, '_blank');
+const toUrl = (url) => {
+  window.open(url, '_blank');
 }
 onMounted(() => {
   initTheme()
@@ -320,8 +315,8 @@ onMounted(() => {
   flex: 1;
   display: flex;
   flex-direction: column;
-  overflow: hidden;
-  //overflow-y: auto;
+  //overflow: hidden;
+  overflow-y: auto;
   .item {
     border-bottom: 1px dashed #D8DAE5;
     display: flex;