ソースを参照

Merge branch 'v3' of http://94.191.59.107:3000/houwenfeng/cloudfile-ui into v3

liuQiang 2 年 前
コミット
861ddbcf84

+ 1 - 2
.env.development

@@ -5,5 +5,4 @@ VITE_APP_TITLE = 聚合智慧文档
 VITE_APP_ENV = 'development'
 
 # 聚合智慧文档/开发环境
-# VITE_APP_BASE_API = '/dev-api'
-VITE_APP_BASE_API = 'http://8.142.173.95:19527'
+VITE_APP_BASE_API = '/dev-api'

+ 2 - 2
src/api/chat/msg.js

@@ -43,9 +43,9 @@ export function msgFriend(msgId) {
   })
 }
 // 删除聊天消息管理;
-export function delMsg(msgId) {
+export function delMsg(toId) {
   return request({
-    url: '/chat/msg/'+msgId,
+    url: '/chat/msg/del/'+toId,
     method: 'delete'
   })
 }

+ 12 - 4
src/assets/styles/my-common.scss

@@ -155,13 +155,11 @@
   .del-chat {
     position: absolute;
     right: 8px;
-    bottom: -8px;
-    width: 88px;
-    height: 38px;
     box-shadow: 0px 2px 8px 1px rgba(199, 203, 216, 0.5);
     background: rgba(255, 255, 255, 0.9);
     border-radius: 4px;
     border: none;
+    cursor: pointer;
   }
 }
 
@@ -241,4 +239,14 @@
 
 .forwd {
   margin: 0 16px;
-}
+}
+.shouzhi {
+  cursor: pointer;
+}
+.juli {
+  margin-right: 6px;
+}
+.juzhong{
+  display: flex;
+  align-items: center;
+}

+ 3 - 2
src/components/RightMenu/index.vue

@@ -6,11 +6,11 @@
   >
     <div class="menu_item" @click="folderClick(null, null)">
       <img src="@/assets/images/trash.png" alt="" />
-      <span>打开</span>
+      <span class="shouzhi">打开</span>
     </div>
     <div class="menu_item" @click="collectFolder">
       <img src="@/assets/images/collect.png" alt="" />
-      <span>取消收藏</span>
+      <span class="shouzhi">取消收藏</span>
     </div>
   </div>
 </template>
@@ -38,6 +38,7 @@ const props = defineProps({
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
 .right_menu {
   width: 156px;
   position: absolute;

+ 20 - 3
src/layout/indexCommon.vue

@@ -332,11 +332,10 @@ onMounted(() => {
   // console.log('router',router)
 });
 watchEffect(async() => {
-	console.log("===============有新消息了:",websoctStore.messOne)
-	
+  if(router.currentRoute.value.path=='/index') return;
 	if(websoctStore.noReadList!=null)hasNewMessage.value = true
 	else hasNewMessage.value = false
-	console.log("===============websoctStore.noReadList:",websoctStore.noReadList,'===========',hasNewMessage.value)
+	// console.log("===============websoctStore.noReadList:",websoctStore.noReadList,'===========',hasNewMessage.value)
 });
 
 
@@ -480,6 +479,24 @@ const menuList = reactive({
     },
   ],
 });
+
+	const roles = useUserStore().roles;
+	const permissionRoles = ['admin','dept','system','audit']
+	const super_admin = "admin";
+    const hasRole = roles.some(role => {
+      return super_admin === role || permissionRoles.includes(role)
+    })
+	if(hasRole){
+		menuList.data.push(
+		{
+			label: "系统管理",
+			path: "/admin",
+			imgs: system,
+			beimgs: issystem,
+		}
+		);
+	}
+	
 const clickPath = (index, items) => {
   items = toRaw(items);
   // toFileData.value = null

+ 1 - 1
src/main.js

@@ -26,7 +26,7 @@ import SvgIcon from '@/components/SvgIcon'
 import elementIcons from '@/components/SvgIcon/svgicon'
 import * as ElementPlusIconsVue from '@element-plus/icons-vue'
 import './permission' // permission control
-
+// import "@/assets/styles/my-common.scss";
 import { useDict } from '@/utils/dict'
 import { parseTime, resetForm, addDateRange, handleTree, selectDictLabel, selectDictLabels } from '@/utils/ruoyi'
 

+ 8 - 4
src/views/biz/recent/index.vue

@@ -11,7 +11,7 @@
           <el-table
             :data="tableFolderData"
             style="width: 100%"
-            height="40vh"
+            height="42.5vh"
             :scrollbar-always-on="true"
             @row-click="changeFile"
           >
@@ -24,7 +24,7 @@
                     alt=""
                     style=""
                   />
-                  {{ scope.row.dirName }}
+                  <span class="shouzhi">{{ scope.row.dirName }}</span>
                 </div>
               </template>
             </el-table-column>
@@ -56,7 +56,7 @@
                     alt=""
                     style=""
                   />
-                  {{ scope.row==null ? '': scope.row.fileName }}
+                  <span class="shouzhi"> {{ scope.row==null ? '': scope.row.fileName }}</span>
                 </div>
                 <!-- <span
                   style="
@@ -111,7 +111,7 @@
           :style="{ left: xz + 'px', top: yz + 'px' }"
         >
           <template v-for="(item, index) in filterMouseCli()" :key="index">
-            <p @click="chooseSet(item, index, 1)" class="chooseSet">
+            <p @click="chooseSet(item, index, 1)" class="chooseSet shouzhi" style="margin: 0;">
               <img :src="item.img" alt="" />
               {{ item.name }}
               <span
@@ -779,6 +779,7 @@ const downLoadfile = () => {
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
 .page {
   height: 100%;
   height: 100%;
@@ -920,4 +921,7 @@ const downLoadfile = () => {
     }
   }
 }
+.shouzhi{
+  margin-left: 5px;
+}
 </style>

+ 10 - 6
src/views/collect/index.vue

@@ -142,7 +142,7 @@
                     alt=""
                     style=""
                   />
-                  {{ scope.row.docDir.dirName }}
+                  <span class="shouzhi">{{ scope.row.docDir.dirName }}</span>
                 </div>
               </template>
             </el-table-column>
@@ -179,7 +179,7 @@
                     alt=""
                     style=""
                   />
-                  {{ scope.row.docInfo.fileName }}
+                <span class="shouzhi"> {{ scope.row.docInfo.fileName }}</span>  
                 </div>
               </template>
             </el-table-column>
@@ -199,7 +199,7 @@
             <span class="collapseItem_title">文件夹</span>
           </template>
           <!-- 平铺 -->
-          <el-scrollbar height="360px">
+          <el-scrollbar style="height: 37vh;">
             <div class="tile_box">
               <div
                 class="file_box"
@@ -229,7 +229,7 @@
             <span class="collapseItem_title">文件</span>
           </template>
           <!-- 平铺 -->
-          <el-scrollbar height="360px">
+          <el-scrollbar style="height: 37vh;">
             <div class="tile_box">
               <div
                 class="file_box"
@@ -260,9 +260,9 @@
   <!-- 右键唤出的菜单 -->
   <!-- TODO 默认就是不搜索标签 -->
   <div
-    class="right_menu"
+    class="right_menu shouzhi"
     v-if="visible"
-    :style="{ left: left + 'px', top: top + 'px' }"
+    :style="{ left: left + 'px', top: top + 'px',margin:'0' }"
   >
     <div class="menu_item" @click="reName">
       <img src="@/assets/images/textbox.png" alt="" />
@@ -604,6 +604,10 @@ const setIcon = (fileType) => {
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
+.shouzhi {
+  margin-left: 5px;
+}
 .container {
   height: 100%;
   background-color: #fff;

+ 32 - 25
src/views/department/MyFile.vue

@@ -22,7 +22,7 @@
                 <div
                     style="display: flex;justify-content: flex-start;align-items: flex-start;flex-wrap: wrap;height: 75vh;align-content: flex-start;overflow-y: auto;">
                     <!-- v-for盒子 -->
-                    <template v-for="(item, index) in fileMenu">
+                    <template v-for="(item, index) in fileMenu" :key="index">
                         <div class="setBox" @click="changeFile(item, index)">
                             <el-dropdown trigger="click" class="selectChe">
                                 <span class="el-dropdown-link">
@@ -36,7 +36,13 @@
                                 </template>
                             </el-dropdown>
                           <div class="left_fileBox">
-                              <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;">
+                            <el-tooltip
+                                  class="box-item tool-tip"
+                                  effect="dark"
+                                  placement="top-start"
+                               > 
+                               <template #content> 安全级别: {{ item.encryptLevel == 'L1'?'敏感':(item.encryptLevel == 'L2'?'涉密':(item.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                               <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;"></el-tooltip>
                               <p class="ellipsis-text">{{ item.dirName }}</p>
                               <img class="levelImg" v-if="item.isEncrypt === 'Y'" :src="getLevelImg(item.encryptLevel)" alt="">
                           </div>
@@ -65,7 +71,7 @@
                                 <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
                             </div>
                             <div style="margin-left: 5px;">
-                                <span style="color: black;cursor: pointer;" @click="uploadModal = true">上传
+                                <span style="color: black;cursor: pointer;" @click="uploadModal = true" class="shouzhi">上传
                                 </span>
                             </div>
                         </div>
@@ -75,7 +81,7 @@
                                 <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
                             </div>
                             <div style="margin-left: 5px;">
-                                <span style="color: black;cursor: pointer;">上传
+                                <span style="color: black;cursor: pointer;" class="shouzhi">上传
                                 </span>
                             </div>
                         </div>
@@ -89,7 +95,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <div v-else
@@ -102,7 +108,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <template v-for="(item, index) in useMenu" :key="index">
@@ -113,7 +119,7 @@
                                     <img :src="item.img" style="width: 24px;height: 24px;" alt="">
                                 </div>
                                 <div style="margin-left: 5px;">
-                                    <span style="font-size: 14px;">{{ item.name }}</span>
+                                    <span style="font-size: 14px;" class="shouzhi">{{ item.name }}</span>
                                 </div>
                             </div>
                         </template>
@@ -121,9 +127,9 @@
                     <!-- 面包屑功能栏 -->
                     <div class="breadBox">
                         <!-- 左侧 -->
-                        <div style="display: flex;justify-content: space-around;align-items: center;">
+                        <div style="display: flex;justify-content: space-around;align-items: center;margin-left: 10px;">
                             <!-- 前进后退 -->
-                            <div style="display: flex;justify-content: space-around;align-items: center;">
+                            <div style="display: flex;justify-content: space-around;align-items: center;margin-right: 5px;" >
                                 <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
                                     @click="arrowLift">
                                 <img style="display:block;width: 16px;height: 16px;" :src="grayRight" alt="">
@@ -152,21 +158,21 @@
                                 <el-table-column type="selection" width="55" />
                                 <el-table-column label="名称" width="180">
                                     <template #default="scope">
-                                        <span>
-                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)">
+                                        <span class="juzhong">
+                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)" class="juli">
                                                 <Star />
                                             </el-icon>
-                                            <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="">
+                                            <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="" class="juli">
                                             <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;"
-                                                alt="">
+                                                alt="" class="juli">
                                                  <el-tooltip
                                                     class="box-item"
                                                     effect="dark"
-                                                    :content="scope.row.dirName"
                                                     placement="top"
                                                     :show-after="1000"
-                                                >
-                                                   {{ scope.row.dirName }}
+                                                > 
+                                                <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                   <span class="shouzhi"> {{ scope.row.dirName }}</span>
                                                 </el-tooltip>
                                         </span>
                                     </template>
@@ -200,11 +206,11 @@
                             </div> -->
                             <div class="menu_item" @click="restName(null, null)">
                                 <img src="@/assets/images/textbox.png" alt="" />
-                                <span>重命名</span>
+                                <span class="shouzhi">重命名</span>
                             </div>
                             <div class="menu_item" @click="collectFolder">
                                 <img src="@/assets/images/collect.png" alt="" />
-                                <span>收藏</span>
+                                <span class="shouzhi">收藏</span>
                             </div>
                         </div>
                     </div>
@@ -218,20 +224,20 @@
                                     <el-table-column type="selection" width="55" />
                                     <el-table-column label="名称" width="200">
                                         <template #default="scope">
-                                            <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
+                                            <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
                                             <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)">
                                                 <Star />
                                             </el-icon>
-                                            <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="">
-                                            <img :src="getImage(scope.row.fileType)" alt="">
+                                            <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="" class="juli">
+                                            <img :src="getImage(scope.row.fileType)" alt="" class="juli">
                                                   <el-tooltip
                                                     class="box-item"
                                                     effect="dark"
-                                                    :content="scope.row.fileName"
                                                     placement="top"
                                                     :show-after="1000"
                                                 >
-                                                   {{ scope.row.fileName }}
+                                                <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                   <span class="shouzhi">{{ scope.row.fileName }}</span>
                                                 </el-tooltip>
                                         </span>
                                         </template>
@@ -1716,6 +1722,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
 .lodingBox{
     position:absolute;
     top: 0;
@@ -1731,7 +1738,7 @@ p {
 
 .bigBox {
     width: 100%;
-    height: 100%;
+    height: 88vh;
     display: flex;
     justify-content: flex-start;
     overflow: hidden;
@@ -1804,7 +1811,7 @@ p {
 
 .mesBox {
     width: 75vw;
-    height: 92vh;
+    height: 88vh;
     border-radius: 4px;
     background-color: white;
 }

+ 1 - 1
src/views/highSearch/HighSearch.vue

@@ -43,7 +43,7 @@
         @keydown.enter="doSearch"
         placeholder="请输入要查询的内容"
       />
-      <div class="search_btn" @click="doSearch">搜索</div>
+      <div class="search_btn" @click="doSearch" style="cursor: pointer;">搜索</div>
     </div>
     <div class="result_box">
       <div class="left_box" v-if="listData.length">

+ 106 - 61
src/views/liveChat/index.vue

@@ -43,7 +43,7 @@ const userIds = useUserStore();
 // main元素的初始高度,在onMounted时需要重新计算
 let height = ref(document.documentElement.clientHeight - 16 + "px;");
 const messageText = ref(""); //发送的内容
-const headerName = ref("");
+let headerName = ref("");
 const total = ref(0);
 const sendId = ref(""); //选择发送的文件id
 const isForward = ref(false);
@@ -67,27 +67,19 @@ const searchData = ref([]);
 
 //聊天列表数据模拟
 const personList = reactive({ data: [] });
+let getchatUserState = false //获取会话人员列表状态.获取动作完成前接收到的消息需要临时缓存
+let tmpMsgList = ref([]) //临时消息队列。主要存储会话人员还未获取完成前收到的消息
 //获取好友列表
 const getMsgList = async () => {
+  getchatUserState = true
   const resFriend = await msgFriend();
   personList.data = resFriend.rows;
-  // .filter(
-  //   (item) => item.toId !== useUserStore().uid
-  // );
-
   searchData.value = personList.data;
-  if (clickPersonId.value ==0 && personList.data.length>0) {
-    clickPersonId.value = personList.data[0].fromId
+  if(personList.data.length==0){
+    getchatUserState = false
+    return
   }
   //圆点======
-  /*
-  searchData.value.map((i) => {
-    if (i.fromId == websoctStore.messOne?.fromId) {
-      i.showCircel = true;
-    }
-  });
-  */
-  //圆点======
   sendCont.data.toId =
     personList.data[0]?.toId == userIds.uid
       ? personList.data[0].fromId
@@ -96,6 +88,25 @@ const getMsgList = async () => {
     personList.data[0]?.toId == userIds.uid
       ? personList.data[0].fromName
       : personList.data[0].toName;
+  // 默认点击第一个对话人
+  if (clickPersonId.value ==0 && personList.data.length>0) {
+    clickPersonId.value = sendCont.data.toId
+  }
+  getchatUserState = false
+  if(tmpMsgList.value.length>0){
+    //处理临时缓存消息:将发送者标记为消息未读提示
+    searchData.value.map((user) => {
+      let charUserid = user?.toId == userIds.uid  ? user.fromId : user.toId;
+      for(let i=0;i<tmpMsgList.value.length;i++){
+        let tmpFromID = tmpMsgList.value[i].fromId
+        if (tmpFromID == charUserid && sendCont.data.toId!=tmpFromID) {
+          user.showCircel = true;
+        }
+      }
+    });
+    tmpMsgList.value = []
+    console.log("临时缓存消息处理完成:",searchData.value)
+  }
   if (sendCont.data.toId) {
     //调用聊天记录
     msgRecordEvent(sendCont.data.toId);
@@ -115,6 +126,7 @@ const boottmScroll = () => {
 };
 //获取用户的聊天记录
 const msgRecordEvent = async (toIdValue) => {
+  if(clickPersonId.value!=toIdValue) return;
   const queryParams = {
     pageNum: 1,
     pageSize: 10,
@@ -184,40 +196,61 @@ const clickPerson = (index, item) => {
   msgRecordEvent(sendCont.data.toId); 
 };
 //删除聊天
-const delClick = (msgId) => {
+const delClick = (toId) => {
   proxy.$modal
-    .confirm("删除后,将清空该聊天的消息记录")
+    .confirm("删除后,将清空与该人员的所有会话记录,确定吗?")
     .then(function () {
-      return delMsg(msgId);
+      return delMsg(toId);
     })
     .then(() => {
+      chatRecords.data=[]
+      headerName.value=''
+      clickPersonId.value=0
       getMsgList();
       proxy.$modal.msgSuccess("删除成功");
     });
 };
 
 //树选中的人传过来的选中人的信息,push进入列表中
-const changeMsg = async (val) => {
+// val 新的会话人员信息对象
+// isnew:false或null:自己添加的 true:其他人员发起的新消息会话
+const changeMsg = async (val,isnew) => {
   const resInfo = await userInfo(val.id);
+  resInfo.fromId = val.id
+  resInfo.content = val.content
+  resInfo.file = val.file
   if (searchData.value.length > 0) {
     //判断是否有相同的聊天人
     const filerData = searchData.value.filter(
       (vPerson) =>
         (vPerson.toId && vPerson.toId == resInfo.userId) ||
-        (vPerson.userId && vPerson.userId == resInfo.userId)
+        (vPerson.fromId && vPerson.fromId == resInfo.userId)
     );
     if (filerData.length > 0) {
-      return ElMessage({ message: "该聊天已存在", type: "error" });
+      // 存在就算了,无需提示
+      //return ElMessage({ message: "该聊天已存在", type: "error" });
     } else {
+      if(isnew!=null){        
+        resInfo.showCircel = true        
+      }
       searchData.value.unshift(resInfo);
     }
   } else {
     //为空数组的时候无需判断
     searchData.value.unshift(resInfo);
   }
-  sendCont.data.toId = resInfo.userId;
-  msgRecordEvent(sendCont.data.toId);
-  headerName.value = resInfo.nickName;
+  if(isnew==null){
+    // 自己添加的会话人员,默认选中进行对话
+    sendCont.data.toId = resInfo.userId;
+    headerName.value = resInfo.nickName;
+    clickPersonId.value = resInfo.userId
+    clickPerson(0,searchData.value[0]);
+  }else if(searchData.value.length==1){
+    sendCont.data.toId = resInfo.userId;
+    headerName.value = resInfo.nickName;
+    clickPersonId.value = val.id
+    clickPerson(0,searchData.value[0]);
+  }
 };
 
 //发送聊天
@@ -281,48 +314,53 @@ const sendFileClick = async () => {
 const handleNewMessage = async () => {
   if (websoctStore.newMessage) {
     msgRecordEvent(sendCont.data.toId); //获取用户的聊天记录
-     const resFriend = await msgFriend();
-    getMsgList();
+    // const resFriend = await msgFriend();
+    //getMsgList();
     websoctStore.newMessage = false; // 重置新消息标记
   }
 };
-
+//接收到的新消息
 watchEffect(async() => {
-  console.log("===============有新消息了:",websoctStore.messOne)
-  console.log(router.currentRoute.value.path)
-  if(router.currentRoute.value.path!='/index') return;
-  console.log("clickPersonId:",clickPersonId.value)  
+  let newMessages = {}
+  newMessages = websoctStore.messOne  
+  console.log("===============有新消息了:",newMessages)
+  if(router.currentRoute.value.path!='/index' || newMessages.fromId==null) return;
+  //此处判断messOne是否已发生更改,如果还未发生更改则清除该消息
+  if(websoctStore.messOne.fromId==newMessages.fromId){    
+    websoctStore.messOne={}
+  }
+  console.log("clickPersonId:",clickPersonId.value)
+  if(getchatUserState){
+    //会话列表还处理完成,临时缓存消息
+    tmpMsgList.value.push(newMessages)
+    // console.log("===============会话列表还处理完成,临时缓存消息:",tmpMsgList.value)
+    return
+  }
   if(websoctStore.noReadList!=null) {
-    if(clickPersonId.value!=websoctStore.messOne.fromId){
+    // 是否正在对话的人员
+    if(clickPersonId.value!=newMessages.fromId){
+      let isExist=false // 当前消息发送人员是否已在对话人员列表中
       for(let i=0;i<searchData.value.length;i++){
-        if(searchData.value[i].fromId==websoctStore.messOne.fromId){
+        let chatUserID = searchData.value[i].fromId
+        if(chatUserID==userIds.uid) chatUserID = searchData.value[i].toId
+        if(chatUserID==newMessages.fromId){
+          isExist = true
           searchData.value[i].showCircel = true
+          searchData.value[i].content = newMessages.content
+          searchData.value[i].file = newMessages.file
         }
       }
+      if(!isExist){
+        // 接收到其他人员发来的第一次会话消息,需要将该人员添加到会话人员列表
+        changeMsg({"id":newMessages.fromId,"content":newMessages.content,"file":newMessages.file},true)
+      }
       return;
     }
-    msgRecordEvent(websoctStore.messOne.fromId);
-    setTimeout(() => {
-      websoctStore.messOne={}
-    }, 1000);    
+    msgRecordEvent(newMessages.fromId);   
     // getYuan()    
-    getMsgList();
+    // getMsgList();
   }
 });
-  //圆点======
-// const getYuan=async ()=>{
-//   const res= await msgFriend();
-
-//   searchData.value.forEach(k=>{
-//     res.rows.forEach((i) => {
-//     if (i.fromId == websoctStore.messOne?.fromId) {
-//       k=i
-//       k.showCircel = true
-//     }
-//   });
-//   })
-// }
-  // 圆点======
 // 滚动翻页========
 const mainContainer = ref(null);
 const handleScroll = (event) => {
@@ -404,11 +442,16 @@ downLoadfile(file)
 //搜索的点击事件
 const SearchChat = () => {
   if (searchText.value) {
-    searchData.value = personList.data.filter((i) => {
-      return i.toName == searchText.value;
+    searchData.value.map((user) => {
+      let charUserName = user?.toId == userIds.uid  ? user.fromName : user.toName;
+      if(charUserName==null) charUserName = user.nickName
+      if(charUserName.indexOf(searchText.value.replace(/ /gi,''))>-1) user['display'] = 1
+      else user['display'] = 0
     });
   } else {
-    getMsgList();
+    searchData.value.map((user) => {
+      user['display'] = 1
+    });
   }
 };
 //转聊天记录的/n为实际样式
@@ -486,21 +529,22 @@ onMounted(() => {
       <div
         :class="
           clickPersonIndex == index
-            ? 'activ-left-container left-container'
-            : 'left-container'
+            ? 'activ-left-container left-container shouzhi'
+            : 'left-container shouzhi'
         "
         v-for="(item, index) in searchData"
         :key="index"
         @click="clickPerson(index, item)"
       >
+      <template v-if="item.display==null || item.display==1">
         <img :src="cebian" class="cebian" v-if="clickPersonIndex == index" />
-        <!-- <button
+        <button
           class="del-chat"
           v-if="clickPersonIndex == index"
-          @click="delClick(item.msgId)"
+          @click="delClick(item.toId == userIds.uid?item.fromId:item.toId)"
         >
-          删除聊天
-        </button> -->
+          删除会话
+        </button>
         <div>
           <!-- <img :src="item.avatar?item.avatar : chat" class="head-sculpture" /> -->
           <img
@@ -544,6 +588,7 @@ onMounted(() => {
           class="yuandian"
           v-if="item.showCircel && $route.path == '/index' && clickPersonId!==item.fromId"
         ></span>
+      </template>
       </div>
     </div>
     <!-- 右侧聊天 -->

+ 20 - 41
src/views/myfile/MyFile.vue

@@ -36,7 +36,7 @@
                                     </el-dropdown-menu>
                                 </template>
                             </el-dropdown>
-                          <div class="left_fileBox image-container">
+                          <div class="left_fileBox">
                               <el-tooltip
                                   class="box-item tool-tip"
                                   effect="dark"
@@ -110,7 +110,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <div v-else
@@ -123,7 +123,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <template v-for="(item, index) in useMenu" :key="index">
@@ -134,7 +134,7 @@
                                     <img :src="item.img" style="width: 24px;height: 24px;" alt="">
                                 </div>
                                 <div style="margin-left: 5px;">
-                                    <span style="font-size: 14px;">{{ item.name }}</span>
+                                    <span style="font-size: 14px;" class="shouzhi">{{ item.name }}</span>
                                 </div>
                             </div>
                         </template>
@@ -142,7 +142,7 @@
                     <!-- 面包屑功能栏 -->
                     <div class="breadBox">
                         <!-- 左侧 -->
-                        <div style="display: flex;justify-content: space-around;align-items: center;">
+                        <div style="display: flex;justify-content: space-around;align-items: center;margin-left: 10px;">
                             <!-- 前进后退 -->
                             <!-- <div style="display: flex;justify-content: space-around;align-items: center;">
                                 <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
@@ -175,12 +175,12 @@
                                     <el-table-column type="selection" width="55" />
                                     <el-table-column label="名称" width="180">
                                         <template #default="scope">
-                                            <span>
-                                                <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)">
+                                            <span style="display: flex;align-items: center;">
+                                                <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)" style="margin-right: 7px;">
                                                     <Star />
                                                 </el-icon>
                                                 <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="">
-                                                <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;"
+                                                <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;margin-right: 5px;"
                                                     alt="">
                                                     <el-tooltip
                                                         class="box-item"
@@ -189,7 +189,8 @@
                                                         placement="top"
                                                         :show-after="1000"
                                                     >
-                                                    {{ scope.row.dirName }}
+                                                    <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                    <span class="shouzhi">{{ scope.row.dirName }}</span>
                                                     </el-tooltip>
                                             </span>
                                         </template>
@@ -215,7 +216,7 @@
                                 </el-collapse-item>
                             </el-collapse>
                             <!-- 右键唤出的菜单 -->
-                            <div class="right_menu" v-if="folderVisible"
+                            <div class="right_menu shouzhi" v-if="folderVisible"
                                 :style="{ left: folderleft + 'px', top: foldertop + 'px' }">
                                 <!-- <div class="menu_item" @click="folderClick(null, null)">
                                     <img src="@/assets/images/trash.png" alt="" />
@@ -241,20 +242,20 @@
                                         <el-table-column type="selection" width="55" />
                                         <el-table-column label="名称" width="200">
                                             <template #default="scope">
-                                                <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                                                <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)">
+                                                <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;display: flex;align-items: center;">
+                                                <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)" style="margin-right: 7px;">
                                                     <Star />
                                                 </el-icon>
-                                                <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="">
+                                                <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="" style="margin-right: 5px;">
                                                 <img :src="getImage(scope.row.fileType)" alt="">
                                                     <el-tooltip
                                                         class="box-item"
                                                         effect="dark"
-                                                        :content="scope.row.fileName"
                                                         placement="top"
                                                         :show-after="1000"
                                                     >
-                                                    {{ scope.row.fileName }}
+                                                    <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                    <span class="shouzhi">{{ scope.row.fileName }}</span>
                                                     </el-tooltip>
                                             </span>
                                             </template>
@@ -1799,6 +1800,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
 .lodingBox{
     position:absolute;
     top: 0;
@@ -1814,7 +1816,7 @@ p {
 
 .bigBox {
     width: 100%;
-    height: 100%;
+    height: 88vh;
     display: flex;
     justify-content: flex-start;
     overflow: hidden;
@@ -1887,7 +1889,7 @@ p {
 
 .mesBox {
     width: 75vw;
-    height: 92vh;
+    height: 88vh;
     border-radius: 4px;
     background-color: white;
 }
@@ -2119,28 +2121,5 @@ p {
     :deep(.el-table th.el-table__cell:nth-child(1) .cell) {
         visibility: hidden;
     }
-}
-.image-container {  
-      position: relative;  
-      display: inline-block;  
-    }  
-      
-    .image-container img {  
-      width: 72px;  
-      height: 72px;  
-    }  
-      
-    .tooltip {  
-      position: absolute;  
-      top: 0;  
-      right: -10px;  
-      display: none; 
-      box-shadow: 2px 2px 2px #d9d9d9;
-      padding: 5px;  
-      border-radius: 5px;  
-    }  
-      
-    .image-container:hover .tooltip {  
-      display: block;  
-    }  
+} 
 </style>

+ 13 - 12
src/views/myjoin/MyJoin.vue

@@ -13,13 +13,13 @@
                                 <el-table-column type="selection" width="55" />
                                 <el-table-column label="名称" width="200">
                                     <template #default="scope">
-                                        <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                                            <el-icon v-if="collectImg">
+                                        <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
+                                            <el-icon v-if="collectImg" class="juli">
                                                 <Star />
                                             </el-icon>
-                                            <img v-else src="../../assets/images/yellowstar.png" alt="">
-                                            <img :src="getImage(scope.row.fileType)" alt="">
-                                            {{ scope.row.fileName }}
+                                            <img v-else src="../../assets/images/yellowstar.png" alt="" class="juli">
+                                            <img :src="getImage(scope.row.fileType)" alt="" class="juli">
+                                            <span class="shouzhi">{{ scope.row.fileName }}</span>
                                         </span>
                                     </template>
                                 </el-table-column>
@@ -40,13 +40,13 @@
                             <el-table-column type="selection" width="55" />
                             <el-table-column label="名称" width="200">
                                 <template #default="scope">
-                                    <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                                        <el-icon v-if="collectImg">
+                                    <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
+                                        <el-icon v-if="collectImg" class="juli">
                                             <Star />
                                         </el-icon>
-                                        <img v-else src="../../assets/images/yellowstar.png" alt="">
-                                        <img :src="getImage(scope.row.fileType)" alt="">
-                                        {{ scope.row.fileName }}
+                                        <img v-else src="../../assets/images/yellowstar.png" alt="" class="juli">
+                                        <img :src="getImage(scope.row.fileType)" alt="" class="juli">
+                                        <span class="shouzhi">{{ scope.row.fileName }}</span>
                                     </span>
                                 </template>
                             </el-table-column>
@@ -193,10 +193,11 @@ export default {
 }
 </script>
 
-<style scoped>
+<style scoped lang="scss">
+@import "@/assets/styles/my-common.scss";
 .bigBox {
     width: 100%;
-    height: 92vh;
+    height: 88vh;
     margin: 0 auto;
     background-color: white;
 }

+ 35 - 32
src/views/publicment/MyFile.vue

@@ -22,7 +22,7 @@
                 <div
                     style="display: flex;justify-content: flex-start;align-items: flex-start;flex-wrap: wrap;height: 75vh;align-content: flex-start;overflow-y: auto;">
                     <!-- v-for盒子 -->
-                    <template v-for="(item, index) in fileMenu">
+                    <template v-for="(item, index) in fileMenu" :key="index">
                         <div class="setBox" @click="changeFile(item, index)">
                             <el-dropdown trigger="click" class="selectChe">
                                 <span class="el-dropdown-link">
@@ -36,7 +36,13 @@
                                 </template>
                             </el-dropdown>
                           <div class="left_fileBox">
-                              <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;">
+                            <el-tooltip
+                                  class="box-item tool-tip"
+                                  effect="dark"
+                                  placement="top-start"
+                               > 
+                               <template #content> 安全级别: {{ item.encryptLevel == 'L1'?'敏感':(item.encryptLevel == 'L2'?'涉密':(item.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                               <img src="../../assets/images/fileStyle.png" style="width: 72px;height: 72px;"></el-tooltip>
                               <p class="ellipsis-text">{{ item.dirName }}</p>
                               <img class="levelImg" v-if="item.isEncrypt === 'Y'" :src="getLevelImg(item.encryptLevel)" alt="">
                           </div>
@@ -65,7 +71,7 @@
                                 <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
                             </div>
                             <div style="margin-left: 5px;">
-                                <span style="color: black;cursor: pointer;" @click="uploadModal = true">上传
+                                <span style="color: black;cursor: pointer;" @click="uploadModal = true" class="shouzhi">上传
                                 </span>
                             </div>
                         </div>
@@ -75,7 +81,7 @@
                                 <img src="../../assets/images/upload.png" style="width: 24px;height: 24px;" alt="">
                             </div>
                             <div style="margin-left: 5px;">
-                                <span style="color: black;cursor: pointer;">上传
+                                <span style="color: black;cursor: pointer;" class="shouzhi">上传
                                 </span>
                             </div>
                         </div>
@@ -89,7 +95,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <div v-else
@@ -102,7 +108,7 @@
                                 </el-icon>
                             </div>
                             <div style="margin-left: 5px;" @click="createNewMenu(0)">
-                                <span style="font-size: 14px;">新建</span>
+                                <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
                         <template v-for="(item, index) in useMenu" :key="index">
@@ -113,7 +119,7 @@
                                     <img :src="item.img" style="width: 24px;height: 24px;" alt="">
                                 </div>
                                 <div style="margin-left: 5px;">
-                                    <span style="font-size: 14px;">{{ item.name }}</span>
+                                    <span style="font-size: 14px;" class="shouzhi">{{ item.name }}</span>
                                 </div>
                             </div>
                         </template>
@@ -121,7 +127,7 @@
                     <!-- 面包屑功能栏 -->
                     <div class="breadBox">
                         <!-- 左侧 -->
-                        <div style="display: flex;justify-content: space-around;align-items: center;">
+                        <div style="display: flex;justify-content: space-around;align-items: center;margin-left: 5px;">
                             <!-- 前进后退 -->
                             <!-- <div style="display: flex;justify-content: space-around;align-items: center;">
                                 <img style="display:block;width: 11px;height: 11px;" :src="blueLeft" alt=""
@@ -152,21 +158,21 @@
                                 <el-table-column type="selection" width="55" />
                                 <el-table-column label="名称" width="180">
                                     <template #default="scope">
-                                        <span>
-                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)">
+                                        <span class="juzhong">
+                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,true)" class="juli">
                                                 <Star />
                                             </el-icon>
-                                            <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="">
+                                            <img v-else @click.stop="delCollect(scope.row,true)" src="../../assets/images/yellowstar.png" alt="" class="juli">
                                             <img src="../../assets/images/fileBox.png" style="width: 20px;height: 24px;"
-                                                alt="">
+                                                alt="" class="juli">
                                                  <el-tooltip
                                                     class="box-item"
                                                     effect="dark"
-                                                    :content="scope.row.dirName"
                                                     placement="top"
                                                     :show-after="1000"
                                                 >
-                                                   {{ scope.row.dirName }}
+                                                <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                  <span class="shouzhi"> {{ scope.row.dirName }}</span>
                                                 </el-tooltip>
                                         </span>
                                     </template>
@@ -200,11 +206,11 @@
                             </div> -->
                             <div class="menu_item" @click="restName(null, null)">
                                 <img src="@/assets/images/textbox.png" alt="" />
-                                <span>重命名</span>
+                                <span class="shouzhi">重命名</span>
                             </div>
                             <div class="menu_item" @click="collectFolder">
                                 <img src="@/assets/images/collect.png" alt="" />
-                                <span>收藏</span>
+                                <span  class="shouzhi">收藏</span>
                             </div>
                         </div>
                     </div>
@@ -218,20 +224,20 @@
                                     <el-table-column type="selection" width="55" />
                                     <el-table-column label="名称" width="200">
                                         <template #default="scope">
-                                            <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
-                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)">
+                                            <span style="white-space: nowrap;overflow: hidden;text-overflow: ellipsis;" class="juzhong">
+                                            <el-icon v-if="scope.row.isFavorite == 'N'" @click.stop="collectByStar(scope.row,false)" class="juli">
                                                 <Star />
                                             </el-icon>
-                                            <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="">
-                                            <img :src="getImage(scope.row.fileType)" alt="">
+                                            <img v-else @click.stop="delCollect(scope.row,false)" src="../../assets/images/yellowstar.png" alt="" class="juli">
+                                            <img :src="getImage(scope.row.fileType)" alt="" class="juli">
                                                   <el-tooltip
                                                     class="box-item"
                                                     effect="dark"
-                                                    :content="scope.row.fileName"
                                                     placement="top"
                                                     :show-after="1000"
                                                 >
-                                                   {{ scope.row.fileName }}
+                                                <template #content> {{ scope.row.encryptLevel == 'L1'?'敏感':(scope.row.encryptLevel == 'L2'?'涉密':(scope.row.encryptLevel == 'L3'?'机密':'绝密')) }} </template>
+                                                   <span class="shouzhi">{{ scope.row.fileName }}</span>
                                                 </el-tooltip>
                                         </span>
                                         </template>
@@ -256,7 +262,7 @@
                                     <img :src="item.img" alt="">
                                     {{ item.name }}
                                     <span v-if="item.name == '在线编辑' || item.name == '协作' ? true : false"
-                                        style="color: #7084B4;float: right;position: relative;" class="arrow">></span>
+                                        style="color: #7084B4;float: right;position: relative;" class="arrow"></span>
                                 </p>
                             </template>
                         </div>
@@ -1717,6 +1723,7 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+@import "@/assets/styles/my-common.scss";
 .lodingBox{
     position:absolute;
     top: 0;
@@ -1732,7 +1739,7 @@ p {
 
 .bigBox {
     width: 100%;
-    height: 100%;
+    height: 88vh;
     display: flex;
     justify-content: flex-start;
     overflow: hidden;
@@ -1805,7 +1812,7 @@ p {
 
 .mesBox {
     width: 75vw;
-    height: 92vh;
+    height: 88vh;
     border-radius: 4px;
     background-color: white;
 }
@@ -1882,7 +1889,7 @@ p {
 
 .detailBox {
     width: 100%;
-    height: 270px;
+    height: 30vh;
 }
 
 :deep(.el-dialog__header) {
@@ -1891,9 +1898,9 @@ p {
 }
 
 .fileTable {
-    height: 100%;
+    height: 45vh;
     overflow-y: hidden;
-    margin-top: 55px;
+    margin-top: 48px;
 }
 
 .setCli {
@@ -2022,10 +2029,6 @@ p {
     border-bottom: none;
 }
 
-:deep(.el-collapse-item__wrap) {
-    height: 300px;
-}
-
 // 隐藏全选按钮
 .file-jia {
     :deep(.el-table th.el-table__cell:nth-child(1) .cell) {

+ 74 - 0
vite.config.js

@@ -0,0 +1,74 @@
+import {
+	defineConfig,
+	loadEnv
+} from 'vite'
+import path from 'path'
+import createVitePlugins from './vite/plugins'
+
+// https://vitejs.dev/config/
+export default defineConfig(({
+								 mode,
+								 command
+							 }) => {
+	const env = loadEnv(mode, process.cwd())
+	const {
+		VITE_APP_ENV
+	} = env
+	return {
+		// 部署生产环境和开发环境下的URL。
+		// 默认情况下,vite 会假设你的应用是被部署在一个域名的根路径上
+		// 例如 https://www.ruoyi.vip/。如果应用被部署在一个子路径上,你就需要用这个选项指定这个子路径。例如,如果你的应用被部署在 https://www.ruoyi.vip/admin/,则设置 baseUrl 为 /admin/。
+		base: VITE_APP_ENV === 'production' ? '/' : '/',
+		plugins: createVitePlugins(env, command === 'build'),
+		resolve: {
+			// https://cn.vitejs.dev/config/#resolve-alias
+			alias: {
+				// 设置路径
+				'~': path.resolve(__dirname, './'),
+				// 设置别名
+				'@': path.resolve(__dirname, './src')
+			},
+			// https://cn.vitejs.dev/config/#resolve-extensions
+			extensions: ['.mjs', '.js', '.ts', '.jsx', '.tsx', '.json', '.vue']
+		},
+		// vite 相关配置
+		server: {
+			port: 80,
+			host: true,
+			open: true,
+			proxy: {
+				// https://cn.vitejs.dev/config/#server-proxy
+				'/dev-api': {
+					// target: 'http://192.168.1.28:8080/',
+					target: 'http://8.142.173.95:19527/',
+					// target:'http://192.168.1.28:8080/',
+					changeOrigin: true,
+					rewrite: (p) => p.replace(/^\/dev-api/, '')
+				},
+				//websocket代理
+				'/websocket': {
+					target:'ws://8.142.173.95:19527/websocket',
+					// target:'ws://192.168.1.28:8080/websocket',
+					// target:'ws://192.168.1.11:8080/websocket',
+					changeOrigin: true,
+					rewrite: (p) => p.replace(/^\/websocket/, '')
+				}
+			}
+		},
+		//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
+		css: {
+			postcss: {
+				plugins: [{
+					postcssPlugin: 'internal:charset-removal',
+					AtRule: {
+						charset: (atRule) => {
+							if (atRule.name === 'charset') {
+								atRule.remove();
+							}
+						}
+					}
+				}]
+			}
+		}
+	}
+})