From 81f92eb9fb83ed5d8ac0b0a5c206315416f10df0 Mon Sep 17 00:00:00 2001
From: suerprisePlus <15810472099@163.com>
Date: 星期四, 04 七月 2024 10:14:06 +0800
Subject: [PATCH] 系统更新

---
 src/components/Chat/chatList.vue |  208 +++++++++++++++++++++++++++++++++++++++++-----------
 1 files changed, 164 insertions(+), 44 deletions(-)

diff --git a/src/components/Chat/chatList.vue b/src/components/Chat/chatList.vue
index cd22876..844194e 100644
--- a/src/components/Chat/chatList.vue
+++ b/src/components/Chat/chatList.vue
@@ -1,38 +1,27 @@
 <template>
-  <div class="body">
-    <div :style="pageConfig.width | setWidth">
+  <div class="body webBody">
+    <div :class="$store.state.setScreenFlag ? 'webmainBox_Active' : 'webmainBox'">
       <div class="web__main" ref="main">
         <div class="web__main-item" v-for="(item, index) in list" :key="loding(index)"
           :class="{ 'web__main-item--mine': item.mine }">
- 
           <div class="web__main_content">
             <div>
               <img :src="item.img" />
             </div>
+
             <div class="web__main_Date">
               <div>
                 <cite>
-                  <div style="display: flex">
+                  <div style="float: left;">
                     {{ item.name }}
-
-                    <!-- <div style="margin-left: 10px" v-show="item.file">
-                      <el-select
-                        @change="(val) => setFileChange(val)"
-                        v-model="item.file"
-                        size="mini"
-                      >
-                        <el-option
-                          v-for="(res, key) in item.fileList"
-                          :key="key"
-                          :label="res.name"
-                          :value="res.url"
-                        >
-                        </el-option>
-                      </el-select>
-                    </div> -->
                   </div>
-
-                  <div>
+                  <div v-show="item.sourceValue" class="sourcefrom" style="float: left;margin-left:20px">
+                    <el-select size="small" v-model="item.sourceValue"  placeholder="璧勬枡鏉ユ簮">
+                      <el-option value="1" label="GEDB"></el-option>
+                      <el-option value="2" label="GeoAgent"></el-option>
+                    </el-select>
+                  </div>
+                  <div style="float: right;">
                     {{ item.date }}
                   </div>
                 </cite>
@@ -45,12 +34,34 @@
                   <div v-else-if="res.type == 'loader'">
                     <span v-html="handleDetail(res.val)" ref="content"></span>
                   </div>
-                  <div style="margin-bottom:10px" v-else-if="res.type == 'rag'">
+                  <div v-else-if="res.type == 'markdown'">
+                    <vue-markdown :source="res.val" class="newConcentLeft my-markdown"></vue-markdown>
+                    <div v-show="res.link" style="float: right; ">
+                      <a @click="setDownLoadFile(res.link)" style="color: white">涓嬭浇鎶ュ憡</a>
+                    </div>
+                  </div>
+                  <div v-else-if="res.type == 'table'">
+                    <table class="contTable">
+                      <thead>
+                        <th v-for="(item, index) in res.val[0]" :key="index">
+                          {{ item }}
+                        </th>
+                      </thead>
+                      <tbody>
+                        <tr v-for="(item, index) in res.val[1]" :key="index">
+                          <td v-for="(rs, flag) in item" :key="flag">
+                            {{ rs }}
+                          </td>
+                        </tr>
+                      </tbody>
+                    </table>
+                  </div>
+                  <div style="margin-bottom: 10px" v-else-if="res.type == 'rag'">
                     <div v-show="res.acction">
                       {{ res.acction }}
                     </div>
-                    <div> {{ res.question }} </div>
-                    <div style="display: flex;">
+                    <div>{{ res.question }}</div>
+                    <div style="display: flex">
                       鏉ユ簮: {{ res.source }}
                       <div @click.stop="setRagMoreList(res.msg)" class="setRagMore" v-show="res.more">
                         ...鏇村
@@ -58,9 +69,7 @@
                     </div>
                   </div>
                 </div>
-
               </div>
-
             </div>
           </div>
         </div>
@@ -94,7 +103,7 @@
         width = value - 30 + "px";
       }
       if (width == "100vh") {
-        return "99vh"
+        return "99vh";
       }
       return width;
     }
@@ -118,7 +127,7 @@
       imgSrc: "",
       videoSrc: "",
       audioSrc: "",
-      isDisabled: true,
+      isDisabled: true
     };
   },
   watch: {
@@ -132,6 +141,14 @@
     }
   },
   methods: {
+    setDownLoadFile(res) {
+      const downloadLink = document.createElement('a');
+      downloadLink.href = res
+      document.body.appendChild(downloadLink);
+      downloadLink.click();
+      document.body.removeChild(downloadLink);
+
+    },
     setRagMoreList(res) {
       if (this.isDisabled) {
         this.isDisabled = false;
@@ -140,9 +157,8 @@
         }, 500);
         setTimeout(() => {
           this.isDisabled = false;
-        }, 3000)
+        }, 3000);
       }
-
     },
     setFileChange(res) {
       if (res == "testUrl") return;
@@ -269,8 +285,57 @@
   vertical-align: bottom;
   display: inline-block;
 }
+
+.contTable {
+  border: 1px solid white;
+  font-family: "Arial", sans-serif !important;
+}
+
+.contTable th {
+  border: 1px solid white;
+  padding: 10px;
+  text-align: center;
+  font-size: 16px;
+}
+
+.contTable td {
+  border: 1px solid white;
+  padding: 10px;
+  text-align: center;
+  font-size: 14px;
+}
 </style>
 <style scoped>
+.webBody {
+  display: flex;
+  justify-content: center;
+}
+
+/deep/.el-select:hover .el-input__inner {
+  background-color: rgba(255, 255, 255, 0.1) !important;
+  color: #ffffff !important;
+}
+
+/deep/ .el-input__inner {
+  background-color: rgba(255, 255, 255, 0.1) !important;
+  padding: 0 10px !important;
+  color: #ffffff !important;
+
+}
+
+/deep/.el-input--small .el-input__inner{
+  height: 30px;
+  font-size: 12px;
+}
+
+.webmainBox {
+  width: 50%;
+}
+
+.webmainBox_Active {
+  width: 90%;
+}
+
 .web__main-item {
   position: relative;
   font-size: 0;
@@ -291,7 +356,6 @@
   padding: 10px !important;
   border-radius: 10px !important;
   margin-top: 10px;
-
 }
 
 .web__main-user {
@@ -368,8 +432,8 @@
   text-align: left;
   font-style: normal;
   width: 100%;
-  display: flex;
-  justify-content: space-between;
+  /* display: flex; */
+  /* justify-content: space-between; */
 }
 
 .web__main-arrow {
@@ -469,15 +533,36 @@
 
 .setRagMore {
   margin-left: 10px;
-
 }
 
 .setRagMore:hover {
-  color: #409EFF;
-
+  color: #409eff;
 }
 </style>
 <style>
+ 
+.el-select-dropdown {
+  background-color: #555555 !important;
+  color: #409eff !important;
+ 
+}
+.el-select-dropdown__item{
+  color: #ffffff !important;
+  background: transparent !important;
+}
+.el-select-dropdown__item.selected{
+  color: #409eff !important;
+  background: transparent !important;
+}
+.el-select-dropdown__item.selected span{
+  color: #409eff !important;
+  background: transparent !important;
+
+}
+.el-select-dropdown__item:hover{
+  /* background-color: #555555 !important; */
+  color: #409eff!important;
+}
 .parentBox {
   height: 100%;
   /* background: rgb(31, 31, 31); */
@@ -544,35 +629,70 @@
     /* 缁撴潫鏃嬭浆 div 鍏冪礌 */
   }
 }
-</style>
 
+.newConcentLeft {
+  margin: 16px;
+  font-family: PingFangSC, PingFang SC;
+  font-weight: 400;
+  font-size: 14px;
+
+  text-align: left;
+  font-style: normal;
+  white-space: pre-wrap;
+  word-wrap: break-word;
+}
+
+.newConcentLeft img {
+  width: 75%;
+}
+
+.newConcentLeft table {
+  width: 100%;
+}
+
+.newConcentLeft pre {
+  white-space: normal;
+}
+
+.newConcentLeft li {
+
+  font-size: 15px !important;
+  line-height: 15px !important;
+}
+
+.newConcentLeft p {
+
+  font-size: 15px !important;
+  /*  */
+}
+</style>
 
 <style>
 .web_Main_markDown h1 {
-  line-height: 30px !important;
+  line-height: 20px !important;
   font-size: 20px !important;
 }
 
 .web_Main_markDown h2 {
-  line-height: 25px !important;
+  line-height: 20px !important;
   font-size: 18px !important;
   margin-left: 10px;
 }
 
 .web_Main_markDown h3 {
-  line-height: 25px !important;
+  line-height: 20px !important;
   font-size: 18px !important;
   margin-left: 10px;
 }
 
 .web_Main_markDown li {
-  line-height: 20px !important;
+  line-height: 15px !important;
   font-size: 16px !important;
   margin-left: 20px;
 }
 
 .web_Main_markDown p {
-  line-height: 20px !important;
+  line-height: 15px !important;
   font-size: 16px !important;
   margin-left: 20px;
 }
@@ -582,4 +702,4 @@
   padding: 10px;
   border-radius: 10px;
 }
-</style>
\ No newline at end of file
+</style>

--
Gitblit v1.9.3