Ver código fonte

协作文件可编辑,最近文件文件夹跳转

liuQiang 1 ano atrás
pai
commit
73443b8ae7

+ 2 - 2
src/components/OnlyOffice/index.vue

@@ -52,8 +52,8 @@
 				}
 
 				this.doctype = this.getDocType(option.fileType);
-				console.log(this.doctype);
-				console.log(option.key);
+				// console.log(this.doctype);
+				// console.log(option.key);
 				let config = {
 					document: {
 						fileType: option.fileType, //后缀

+ 218 - 252
src/layout/indexCommon.vue

@@ -1,113 +1,79 @@
 <template>
   <div class="common-layout">
     <el-container>
-      <el-header
-        class="nav"
-        style="position: sticky; top: 0; left: 0; width: 100%; z-index: 999"
-      >
+      <el-header class="nav" style="position: sticky; top: 0; left: 0; width: 100%; z-index: 999">
         <div class="nav-top">
           <div>
-            <img class="logoImg" src="@/assets/images/logos.png" /><span
-              >聚合智慧文档管理系统</span
-            >
+            <img class="logoImg" src="@/assets/images/logos.png" /><span>聚合智慧文档管理系统</span>
           </div>
           <div class="search">
-            <el-input
-              v-model="searchText"
-              maxlength="32"
-              class="w-50 m-2"
-              size="small"
-              placeholder="搜索文件"
-              suffix-icon="Search"
-              clearable
-              @change="toSearch"
-              @@keyup.enter="toSearch"
-            />
+            <el-input v-model="searchText" maxlength="32" class="w-50 m-2" size="small" placeholder="搜索文件"
+              suffix-icon="Search" clearable @keyup.enter="toSearch" />
           </div>
           <div>
-            <el-dropdown
-              @command="handleCommand"
-              class="right-menu-item hover-effect"
-              trigger="click"
-            >
+            <el-dropdown @command="handleCommand" class="right-menu-item hover-effect" trigger="click">
               <div class="avatar-wrapper">
-                <img
-                  :src="
-                    userStore.avatar
-                      ? userStore.avatar
-                      : '@/assets/images/profile.png'
+                <img :src="userStore.avatar
+                  ? userStore.avatar
+                  : '@/assets/images/profile.png'
                   " class="head-img" /><span style="cursor: pointer;margin-right: 6px;">{{ userStore.name }}</span>
-				  <el-icon><ArrowDown /></el-icon>
-							</div>
-							<template #dropdown>
-								<el-dropdown-menu>
-									<router-link to="/user/profile">
-										<el-dropdown-item>个人中心</el-dropdown-item>
-									</router-link>
-									<el-dropdown-item divided command="logout">
-										<span>退出登录</span>
-									</el-dropdown-item>
-								</el-dropdown-menu>
-							</template>
-						</el-dropdown>
-					</div>
-				</div>
-			</el-header>
-			<el-container>
-				<el-aside width="92px" class="asides">
-					<div class="aside-con">
-						<router-link :to="item.path" v-for="(item, index) in menuList.data" :key="index"
-							@click="clickPath(index, item)">
-							<div style="position: relative" :class="
-                  $route.path == item.path
-                    ? 'acitve-img-style img-style'
-                    : 'img-style'
+                <el-icon>
+                  <ArrowDown />
+                </el-icon>
+              </div>
+              <template #dropdown>
+                <el-dropdown-menu>
+                  <router-link to="/user/profile">
+                    <el-dropdown-item>个人中心</el-dropdown-item>
+                  </router-link>
+                  <el-dropdown-item divided command="logout">
+                    <span>退出登录</span>
+                  </el-dropdown-item>
+                </el-dropdown-menu>
+              </template>
+            </el-dropdown>
+          </div>
+        </div>
+      </el-header>
+      <el-container>
+        <el-aside width="92px" class="asides">
+          <div class="aside-con">
+            <router-link :to="item.path" v-for="(item, index) in menuList.data" :key="index"
+              @click="clickPath(index, item)">
+              <div style="position: relative" :class="$route.path == item.path
+                ? 'acitve-img-style img-style'
+                : 'img-style'
                 ">
-								<img :src="$route.path == item.path ? item.beimgs : item.imgs" />
-								<div class="text-style" v-if="$route.path != item.path">
-									{{ item.label }}
-								</div>
-								<span class="yuandian" v-if="
-                    hasNewMessage &&
-                    item.path == '/index' &&
-                    ($route.path != item.path || isSwitchFileIframe)
+                <img :src="$route.path == item.path ? item.beimgs : item.imgs" />
+                <div class="text-style" v-if="$route.path != item.path">
+                  {{ item.label }}
+                </div>
+                <span class="yuandian" v-if="hasNewMessage &&
+                  item.path == '/index' &&
+                  ($route.path != item.path || isSwitchFileIframe)
                   "></span>
-							</div>
-						</router-link><br />
-					</div>
-				</el-aside>
-				<el-main class="main">
-					<div class="tab_box">
-						<!-- <el-tabs
+              </div>
+            </router-link><br />
+          </div>
+        </el-aside>
+        <el-main class="main">
+          <div class="tab_box">
+            <!-- <el-tabs
               v-model="editableTabsValue"
               @tab-change="clickTab"
               @tab-add="addTab"
               type="card"
               class="common-tabs"
             > -->
-            <el-tabs
-              v-model="editableTabsValue"
-              @tab-add="addTab"
-              type="card"
-              class="common-tabs"
-            >
+            <el-tabs v-model="editableTabsValue" @tab-add="addTab" type="card" class="common-tabs">
               <!-- <el-tab-pane label="首页" @click="clickTab('/index')"> </el-tab-pane> -->
-              <el-tab-pane
-                v-for="(item, index) in toRaw(editableTabs)"
-                :key="item.path"
-                :label="item.label"
-                :name="item.path"
-                :data-item="JSON.stringify(item)"
-              >
+              <el-tab-pane v-for="(item, index) in toRaw(editableTabs)" :key="item.path" :label="item.label"
+                :name="item.path" :data-item="JSON.stringify(item)">
                 <template #label>
                   <div class="tab_pane" @click="paneClick(item)">
                     <div class="tab_text">{{ item.label }}</div>
-                    <img
-					v-if="item.label != '首页'"
-                      src="@/assets/images/close.png"
-                      @click="closeTab(item, index, $event)"
-                      alt=""
-                    />
+                    <img v-if="item.label != '首页'" src="@/assets/images/close.png" @click="closeTab(item, index, $event)"
+                      alt="" />
                   </div>
                   <!-- <router-link
                     :key="item"
@@ -129,11 +95,7 @@
                   <template #label>
                     <div class="tab_pane" @click="filePaneClick(item)">
                       <div class="tab_text">{{ item.name }}</div>
-                      <img
-                        src="@/assets/images/close.png"
-                        @click="closeFileTab(item, index, $event)"
-                        alt=""
-                      />
+                      <img src="@/assets/images/close.png" @click="closeFileTab(item, index, $event)" alt="" />
                     </div>
                   </template>
                 </el-tab-pane>
@@ -141,7 +103,7 @@
             </el-tabs>
           </div>
           <div v-show="isAlive">
-            <router-view v-slot="{ Component }">
+            <router-view v-slot="{ Component }" :key="$router.currentRoute.value.fullPath">
               <KeepAlive :exclude="['identifyFont', 'allback', 'search']">
                 <component :is="Component" />
               </KeepAlive>
@@ -150,16 +112,8 @@
           <div v-show="!isAlive" style="width: 100%">
             <div v-for="item in iFrameData" :key="item.id">
               <div style="width: 100%" v-show="item.show">
-                <iframe
-                  :src="item.src"
-                  frameborder="0"
-                  :id="`iframe${item.id}`"
-                  :name="`iframe${item.id}`"
-                  width="100%"
-                  height="800px"
-                  class="iframeBox"
-                  v-show="item.show"
-                ></iframe>
+                <iframe :src="item.src" frameborder="0" :id="`iframe${item.id}`" :name="`iframe${item.id}`" width="100%"
+                  height="800px" class="iframeBox" v-show="item.show"></iframe>
               </div>
             </div>
           </div>
@@ -170,7 +124,7 @@
 </template>
 
 <script setup>
-import { nextTick, onMounted, provide, ref,watchEffect,watch } from "vue";
+import { nextTick, onMounted, provide, ref, watchEffect, watch } from "vue";
 import { ElMessageBox, ElMessage } from "element-plus";
 import useAppStore from "@/store/modules/app";
 import useUserStore from "@/store/modules/user";
@@ -214,7 +168,7 @@ const wangzhi = import.meta.env.VITE_APP_BASE_API;
 const isAlive = ref(true);
 const toFileData = ref();
 const uid = useUserStore().uid;
-let hasNewMessage=ref(false)
+let hasNewMessage = ref(false)
 let isSwitchFileIframe = ref(false); //是否切换到文件预览标签
 const iFrameData = ref(JSON.parse(sessionStorage.getItem('fileTabData')) || [
   {
@@ -222,7 +176,7 @@ const iFrameData = ref(JSON.parse(sessionStorage.getItem('fileTabData')) || [
     // src: `${window.location.origin}/fileEdit?clickRowId=113`,
     show: false,
     name: "file1",
-	docId:''
+    docId: ''
   },
   {
     id: 2,
@@ -230,89 +184,89 @@ const iFrameData = ref(JSON.parse(sessionStorage.getItem('fileTabData')) || [
     // src: `http://192.168.1.9:81/fileEdit?clickRowId=1198`,
     show: false,
     name: "file2",
-	docId:''
+    docId: ''
   },
   {
     id: 3,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 4,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 5,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 6,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 7,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 8,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 9,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
   {
     id: 10,
     src: ``,
     show: false,
     name: "",
-	docId:''
+    docId: ''
   },
 ]);
 //--------tabs-----------------
 let tabIndex = 2;
-const editableTabsValue = ref(JSON.parse(sessionStorage.getItem('editableTabsValue')) ||"/index");
+const editableTabsValue = ref(JSON.parse(sessionStorage.getItem('editableTabsValue')) || "/index");
 // const editableTabsValue = ref("/index");
-const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) ||[{label:'首页',path:'/reindex'}]);
+const editableTabs = ref(JSON.parse(sessionStorage.getItem('tabData')) || [{ label: '首页', path: '/reindex' }]);
 
-	// const removeTab = (targetName) => {
-	//   const tabs = editableTabs.value;
-	//   let activeName = editableTabsValue.value;
-	//   if (activeName === targetName) {
-	//     tabs.forEach((tab, index) => {
-	//       if (tab.name === targetName) {
-	//         const nextTab = tabs[index + 1] || tabs[index - 1];
-	//         if (nextTab) {
-	//           activeName = nextTab.name;
-	//         }
-	//       }
-	//     });
-	//   }
+// const removeTab = (targetName) => {
+//   const tabs = editableTabs.value;
+//   let activeName = editableTabsValue.value;
+//   if (activeName === targetName) {
+//     tabs.forEach((tab, index) => {
+//       if (tab.name === targetName) {
+//         const nextTab = tabs[index + 1] || tabs[index - 1];
+//         if (nextTab) {
+//           activeName = nextTab.name;
+//         }
+//       }
+//     });
+//   }
 
-	//   editableTabsValue.value = activeName;
-	//   editableTabs.value = tabs.filter((tab) => tab.name !== targetName);
-	// };
-	//-------------------------
+//   editableTabsValue.value = activeName;
+//   editableTabs.value = tabs.filter((tab) => tab.name !== targetName);
+// };
+//-------------------------
 
 function reload() {
   isAlive.value = false;
@@ -327,7 +281,7 @@ function toggleSideBar() {
   appStore.toggleSideBar();
 }
 const logingName = ref("");
-let lisetenMessageTime=null;
+let lisetenMessageTime = null;
 onMounted(() => {
   logingName.value = Cookies.get("username");
   clearInterval(lisetenMessageTime)
@@ -335,28 +289,35 @@ onMounted(() => {
     //if(router.currentRoute.value.path=='/index') return;
     //console.log("===============window.noReadList:", localStorage.getItem("noreadlist"),'===========',isSwitchFileIframe.value)
     let tmplist = localStorage.getItem("noreadlist")
-    if(tmplist==null || tmplist==''){
+    if (tmplist == null || tmplist == '') {
       hasNewMessage.value = false
       return
     }
     tmplist = JSON.parse(tmplist);
-    if(tmplist!=null)hasNewMessage.value = true
+    if (tmplist != null) hasNewMessage.value = true
     else hasNewMessage.value = false
   }, 1000);
   // console.log('onMt',editableTabsValue.value);
   // console.log('type',typeof editableTabsValue.value);
 
-  nextTick(()=>{ // 要放在对响应式数据修改之后
-  if(typeof editableTabsValue.value == 'number'){
+  nextTick(() => { // 要放在对响应式数据修改之后
+    if (typeof editableTabsValue.value == 'number') {
       setTimeout(() => {
         iframeSize(editableTabsValue.value)
       }, 1000);
     }
   })
-  
+
 
   // console.log('router',router)
 });
+watchEffect(async () => {
+  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)
+});
+
 
 function handleCommand(command) {
   switch (command) {
@@ -383,7 +344,7 @@ function logout() {
         location.href = "/index";
       });
     })
-    .catch(() => {});
+    .catch(() => { });
 }
 
 // 跳转到全文搜索
@@ -398,7 +359,7 @@ const toSearch = async () => {
     pageNum: 1,
   };
   const res = await flieSearch(query);
-  // console.log("res", res);
+  console.log("res", res);
   if (res) {
     const itemData = {
       label:'全局搜索',
@@ -410,23 +371,24 @@ const toSearch = async () => {
     }
     // console.log("res", res);
     // console.log("router", route.path);
-    // if (route.path != "/search") {
-    //   router.push({
-    //     name: "search",
-    //     params: {
-    //       searchData: JSON.stringify(res),
-    //       searchText: searchText.value,
-    //     },
-    //   });
-    // } else {
-    //   router.replace({
-    //     path: "/allback",
-    //     query: {
-    //       searchData: JSON.stringify(res),
-    //       searchText: searchText.value,
-    //     },
-    //   });
-    // }
+    if (route.path != "/search") {
+      let listArr = JSON.stringify(res);
+      router.push({
+        name: 'search',
+        params: {
+          listArr: listArr,
+          searchText: searchText.value
+        }
+      });
+    } else {
+      router.replace({
+        path: "/allback",
+        query: {
+          searchData: JSON.stringify(res),
+          searchText: searchText.value,
+        },
+      });
+    }
   }
 };
 const emits = defineEmits(["setLayout"]);
@@ -507,30 +469,30 @@ 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 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);
-  localStorage.setItem("inChat",items.path=="/index"?1:0)
+  localStorage.setItem("inChat", items.path == "/index" ? 1 : 0)
   // toFileData.value = null
   console.log("clickPathitems", items);
   // editableTabs.value = arr;
-  isSwitchFileIframe.value=false
+  isSwitchFileIframe.value = false
   const arr = toRaw(editableTabs.value);
   if (!arr.some((item) => item.label == items.label)) {
     editableTabs.value.push({
@@ -568,7 +530,7 @@ const clickTab = (item) => {
       });
       return;
     }
-    localStorage.setItem("inChat",url=="/index" ? 1: 0)
+    localStorage.setItem("inChat", url == "/index" ? 1 : 0)
     let regExp = new RegExp(/^\//);
     if (!regExp.test(url)) {
       const data = JSON.parse(url);
@@ -583,7 +545,7 @@ const clickTab = (item) => {
         },
       });
     } else {
-      editableTabsValue.value = url      
+      editableTabsValue.value = url
       router.push({
         path: item+'?dirId='+item,
       });
@@ -592,6 +554,7 @@ const clickTab = (item) => {
 };
 const paneClick = (item) => {
   // 可以拿到当前的标签对象
+  console.log(item, 'pane');
   isAlive.value = true;
   isSwitchFileIframe.value = false
   // console.log("paneItem", item);
@@ -605,13 +568,14 @@ const paneClick = (item) => {
 };
 // 点击文件标签
 const filePaneClick = (item) => {
-  localStorage.setItem("inChat",0)
+  localStorage.setItem("inChat", 0)
   console.log("filePaneClickitem", item);
   isSwitchFileIframe.value = true
+  console.log(98588546543);
   const row = toRaw(item);
   const arr = iFrameData.value.map((par) => {
     if (par.id === row.id) {
-		// editableTabsValue.value = row.id
+      // editableTabsValue.value = row.id
       par.show = true;
       // document.getElementById('iframe'+par.id).window.document.iframe[0]
       const outIframe = document.getElementById("iframe" + par.id);
@@ -635,7 +599,7 @@ const filePaneClick = (item) => {
   iFrameData.value = arr;
   // console.log("Clicknewfilearr", iFrameData.value);
   isAlive.value = false;
-//   console.log("editableTabsValue", editableTabsValue.value);
+  //   console.log("editableTabsValue", editableTabsValue.value);
 };
 // 创建文件的标签
 const addFileTab = (data,bool) => {
@@ -644,26 +608,26 @@ const addFileTab = (data,bool) => {
   const thisData = JSON.parse(JSON.stringify(toRaw(data)));
   const oldIFrameData = iFrameData.value;
   const canAdd = oldIFrameData.some((par) => par.src == ""); //是否达到上限
-  if (!canAdd) return ElMessage.error("已到最大数量,请先关闭其他文件!"); 
+  if (!canAdd) return ElMessage.error("已到最大数量,请先关闭其他文件!");
   const hasThis = oldIFrameData.find((par) => par.docId == data.docId);//是否已存在
-  if (hasThis){
+  if (hasThis) {
     const thisPane = toRaw(hasThis)
     // console.log('hasThis',thisPane);
     const arr = oldIFrameData.map((par) => {
-    if (par.id == thisPane.id) {
-      par.show = true
-      editableTabsValue.value = par.id// 标签跳转
-      setTimeout(() => {
-        
-        iframeSize(par.id)
-      }, 1000);
-    }else{
-		par.show = false
-	}
-    return toRaw(par);
-  });
-  iFrameData.value = arr;
-  isAlive.value = false;
+      if (par.id == thisPane.id) {
+        par.show = true
+        editableTabsValue.value = par.id// 标签跳转
+        setTimeout(() => {
+
+          iframeSize(par.id)
+        }, 1000);
+      } else {
+        par.show = false
+      }
+      return toRaw(par);
+    });
+    iFrameData.value = arr;
+    isAlive.value = false;
     return
   }
   const arr = oldIFrameData.map((par) => {
@@ -677,13 +641,13 @@ const addFileTab = (data,bool) => {
         thisData.docId = "";
         editableTabsValue.value = par.id// 新建时标签跳转
         setTimeout(() => {
-          
+
           iframeSize(par.id)
         }, 1000);
       }
-    }else{
-		par.show = false
-	}
+    } else {
+      par.show = false
+    }
     return toRaw(par);
   });
   iFrameData.value = arr;
@@ -738,7 +702,7 @@ const closeTab = (item, index, e) => {
   // console.log('nextTab',toRaw(nextTab));
   // console.log('item',item);
   // console.log('editableTabsValue',editableTabsValue.value);
-  if(editableTabsValue.value == item.path){
+  if (editableTabsValue.value == item.path) {
 
     paneClick(toRaw(nextTab));
   }
@@ -757,92 +721,92 @@ const closeFileTab = (item, index, e) => {
       par.src = "";
       par.show = false;
       par.name = "";
-	    par.docId = ''
+      par.docId = ''
     }
     return toRaw(par);
   });
-  if(data.id == editableTabsValue.value){
-    console.log('data.id',data.id);
+  if (data.id == editableTabsValue.value) {
+    console.log('data.id', data.id);
     let isLeft = true
     //如果不是第一个就左移
-    for (let thisId = data.id; thisId>0; thisId--) {
-      console.log(arr[thisId - 1].id,arr[thisId - 1].src);
-      if(arr[thisId - 1].src){
-        arr[thisId -1].show = true
+    for (let thisId = data.id; thisId > 0; thisId--) {
+      console.log(arr[thisId - 1].id, arr[thisId - 1].src);
+      if (arr[thisId - 1].src) {
+        arr[thisId - 1].show = true
         isLeft = false
         editableTabsValue.value = arr[thisId - 1].id
         return
       }
-      
+
     }
     // 如果是第一个就跳到文件夹标签右一
-    if(isLeft){
+    if (isLeft) {
       const num = toRaw(editableTabs.value).length - 1
       const nextTab = editableTabs.value[num]
-       paneClick(toRaw(nextTab));
-      console.log('left',nextTab);
+      paneClick(toRaw(nextTab));
+      console.log('left', nextTab);
     }
     // isAlive.value = true;
   }
-    iFrameData.value = arr;
+  iFrameData.value = arr;
   // console.log("index", index);
   console.log("iFrameData", iFrameData.value);
 };
 // 控制iframe大小
-const iframeSize = (id)=>{
-   const outIframe = document.getElementById("iframe" + id);
+const iframeSize = (id) => {
+  const outIframe = document.getElementById("iframe" + id);
   const inIframe =
     outIframe.contentDocument.getElementsByTagName("iframe")[0];
-    console.log('outIframe',outIframe.parentElement);
-    console.error(outIframe.parentElement);
-    inIframe.style.height = outIframe.style.height =
-      outIframe.parentElement.offsetHeight + "px";
-    inIframe.style.width = outIframe.style.width =
-      outIframe.parentElement.offsetWidth + "px";
+  console.log('outIframe', outIframe.parentElement);
+  console.error(outIframe.parentElement);
+  inIframe.style.height = outIframe.style.height =
+    outIframe.parentElement.offsetHeight + "px";
+  inIframe.style.width = outIframe.style.width =
+    outIframe.parentElement.offsetWidth + "px";
 
-    // console.log('dom',outIframe.parentElement.offsetWidth);
-    // console.log('inIframe',inIframe);
+  // console.log('dom',outIframe.parentElement.offsetWidth);
+  // console.log('inIframe',inIframe);
 }
 // 监听和保存标签信息
-const setTabLocal = (data)=>{
+const setTabLocal = (data) => {
   // console.log('setTabLocal',data);
   sessionStorage.setItem('tabData', JSON.stringify(data))
 }
-const setFileTabLocal = (data)=>{
-  console.log('setFileTabLocal',data);
+const setFileTabLocal = (data) => {
+  console.log('setFileTabLocal', data);
   isSwitchFileIframe.value = true
   // console.log('setFileTabLocal',data);
   sessionStorage.setItem('fileTabData', JSON.stringify(data))
 }
-const setEditableTabsValue = (data)=>{
+const setEditableTabsValue = (data) => {
   // console.log('setEditableTabsValue',data);
   sessionStorage.setItem('editableTabsValue', JSON.stringify(data))
 }
 watch(() => iFrameData.value, (newValue, oldValue) => {
-    // console.log('iFrameData 发生改变了', newValue, oldValue);
-    setFileTabLocal(toRaw(toRaw(newValue)))
-    
+  // console.log('iFrameData 发生改变了', newValue, oldValue);
+  setFileTabLocal(toRaw(toRaw(newValue)))
+
 }, {
-    immediate: true,
-    deep: true
+  immediate: true,
+  deep: true
 });
 watch(() => editableTabs.value, (newValue, oldValue) => {
-    // console.log('editableTabs 发生改变了', newValue, oldValue);
-    setTabLocal(toRaw(newValue))
+  // console.log('editableTabs 发生改变了', newValue, oldValue);
+  setTabLocal(toRaw(newValue))
 }, {
-    immediate: true,
-    deep: true
+  immediate: true,
+  deep: true
 });
 watch(() => editableTabsValue.value, (newValue, oldValue) => {
-    // console.log('editableTabsValue 发生改变了', newValue, oldValue);
-    setEditableTabsValue(toRaw(newValue))
-    let regExp = new RegExp(/^\//);
-    if(!regExp.test(editableTabsValue.value)){
-      isAlive.value = false;
-    }
+  // console.log('editableTabsValue 发生改变了', newValue, oldValue);
+  setEditableTabsValue(toRaw(newValue))
+  let regExp = new RegExp(/^\//);
+  if (!regExp.test(editableTabsValue.value)) {
+    isAlive.value = false;
+  }
 }, {
-    immediate: true,
-    deep: true
+  immediate: true,
+  deep: true
 });
 </script>
 
@@ -869,17 +833,17 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
     display: flex;
     justify-content: space-between;
 
-    & > div:first-child {
+    &>div:first-child {
       font-family: "Inter-SemiBold";
     }
 
-    & > div:first-child,
-    & > div:last-child {
+    &>div:first-child,
+    &>div:last-child {
       display: flex;
       align-items: center;
       color: #fff;
 
-      & > img {
+      &>img {
         width: 48px;
         height: 48px;
       }
@@ -906,6 +870,7 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
   }
 
   .search {
+
     .w-50,
     :deep .el-input {
       width: 400px;
@@ -998,7 +963,7 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
   align-items: center;
   justify-content: center;
 
-  & > img {
+  &>img {
     width: 40px;
     height: 40px;
   }
@@ -1024,6 +989,7 @@ watch(() => editableTabsValue.value, (newValue, oldValue) => {
 
 //鼠标移动上去的选中色
 .type_popper {
+
   .el-select-dropdown__item.hover,
   .el-select-dropdown__item:hover {
     background: #6f85b5 !important;

+ 402 - 401
src/router/index.js

@@ -20,362 +20,363 @@ import main from '@/layout/components/AppMain.vue'
  * roles: ['admin', 'common']       // 访问路由的角色权限
  * permissions: ['a:a:a', 'b:b:b']  // 访问路由的菜单权限
  * meta : {
-    noCache: true                   // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
-    title: 'title'                  // 设置该路由在侧边栏和面包屑中展示的名字
-    icon: 'svg-name'                // 设置该路由的图标,对应路径src/assets/icons/svg
-    breadcrumb: false               // 如果设置为false,则不会在breadcrumb面包屑中显示
-    activeMenu: '/system/user'      // 当路由设置了该属性,则会高亮相对应的侧边栏。
+	noCache: true                   // 如果设置为true,则不会被 <keep-alive> 缓存(默认 false)
+	title: 'title'                  // 设置该路由在侧边栏和面包屑中展示的名字
+	icon: 'svg-name'                // 设置该路由的图标,对应路径src/assets/icons/svg
+	breadcrumb: false               // 如果设置为false,则不会在breadcrumb面包屑中显示
+	activeMenu: '/system/user'      // 当路由设置了该属性,则会高亮相对应的侧边栏。
   }
  */
 
 // 公共路由
 export const constantRoutes = [{
-		path: '/redirect',
-		component: Layout,
-		hidden: true,
+	path: '/redirect',
+	component: Layout,
+	hidden: true,
+	children: [{
+		path: '/redirect/:path(.*)',
+		component: () => import('@/views/redirect/index.vue')
+	}]
+},
+{
+	path: '/login',
+	component: () => import('@/views/login'),
+	hidden: true
+},
+{
+	path: '/register',
+	component: () => import('@/views/register'),
+	hidden: true
+},
+{
+	path: "/:pathMatch(.*)*",
+	component: () => import('@/views/error/404'),
+	hidden: true
+},
+{
+	path: '/401',
+	component: () => import('@/views/error/401'),
+	hidden: true
+}, {
+	path: "/fileEdit",
+	name: "fileEdit",
+	// component: common,
+	component: () => import("@/views/myfile/components/FileEdit.vue"),
+	// children: [{
+	// 	path: '/fileEdit:docId(\\d+)',
+	// 	component: () => import("@/views/myfile/components/FileEdit.vue"),
+	// 	name: 'fileEdit',
+	// 	meta: {
+	// 		title: '文件预览',
+	// 		activeMenu: '/fileEdit'
+	// 	}
+	// }]
+},
+{
+	path: '',
+	component: () => import('@/layout/indexCommon.vue'),
+	redirect: '/index',
+	hidden: true,
+	children: [{
+		path: 'index',
+		component: () => import('@/views/liveChat/index.vue'),
+		name: 'index',
+		meta: {
+			title: '返回',
+			icon: 'dashboard',
+			affix: true
+		},
+	},
+	{
+		path: 'reindex',
+		component: () => import('@/views/liveChat/index.vue'),
+		name: 'reindex',
+		meta: {
+			title: '返回',
+			icon: 'dashboard',
+			affix: true
+		},
+	},
+	{
+		path: 'swagger',
+		component: () => import('@/views/tool/swagger/index.vue'),
+		name: 'swagger',
+		redirect: 'noredirect',
+		meta: {
+			title: '接口',
+			icon: 'dashboard'
+		},
+
+	},
+	{
+		path: 'recent',
+		component: () => import('@/views/biz/recent/index.vue'),
+		name: 'recent',
+		meta: {
+			title: '最近文件',
+			icon: 'dashboard'
+		},
+	},
+	{
+		path: '/search/:listArr/:searchText',
+		component: () => import('@/views/search/index.vue'),
+		name: 'search',
+		meta: {
+			title: '全文搜索',
+			icon: 'dashboard'
+		},
+		props: true
+	},
+	// {
+	// 	path: "/myfile",
+	// 	component: () => import("@/views/myfile/MyFile"),
+	// 	name: "myfile",
+	// 	meta: {
+	// 		title: "我的文件",
+	// 		icon: "myfile"
+	// 	}
+	// },
+	{
+		path: "/myfile",
+		component: () => import("@/views/myfile/MyFile"),
+		name: "myfile",
+		meta: {
+			title: "我的文件",
+			icon: "myfile"
+		},
 		children: [{
-			path: '/redirect/:path(.*)',
-			component: () => import('@/views/redirect/index.vue')
+			path: '/myfile:dirId(\\d+)',
+			component: () => import('@/views/myfile/MyFile'),
+			name: 'myfile',
+			meta: {
+				title: '我的文件',
+				activeMenu: '/myfile'
+			}
 		}]
 	},
 	{
-		path: '/login',
-		component: () => import('@/views/login'),
-		hidden: true
+		path: "/myjoin",
+		component: () => import("@/views/myjoin/MyJoin"),
+		name: "myjoin",
+		meta: {
+			title: "我的协作",
+			icon: "myjoin"
+		}
 	},
+	// {
+	// 	path: "/department",
+	// 	component: () => import("@/views/department/MyFile"),
+	// 	name: "department",
+	// 	meta: {
+	// 		title: "部门文件",
+	// 		icon: "department"
+	// 	}
+	// },
 	{
-		path: '/register',
-		component: () => import('@/views/register'),
-		hidden: true
+		path: "/department",
+		component: () => import("@/views/department/MyFile"),
+		name: "department",
+		meta: {
+			title: "部门文件",
+			icon: "department"
+		},
+		children: [{
+			path: '/department:dirId(\\d+)',
+			component: () => import('@/views/department/MyFile'),
+			name: 'department',
+			meta: {
+				title: '部门文件',
+				activeMenu: '/department'
+			}
+		}]
 	},
+	// {
+	// 	path: "/publicment",
+	// 	component: () => import("@/views/publicment/MyFile"),
+	// 	name: "publicment",
+	// 	meta: {
+	// 		title: "公共文件",
+	// 		icon: "becommon"
+	// 	}
+	// },
 	{
-		path: "/:pathMatch(.*)*",
-		component: () => import('@/views/error/404'),
-		hidden: true
+		path: "/publicment",
+		component: () => import("@/views/publicment/MyFile"),
+		name: "publicment",
+		meta: {
+			title: "公共文件",
+			icon: "becommon"
+		},
+		children: [{
+			path: '/publicment:dirId(\\d+)',
+			component: () => import('@/views/publicment/MyFile'),
+			name: 'publicment',
+			meta: {
+				title: '公共文件',
+				activeMenu: '/publicment'
+			}
+		}]
 	},
 	{
-		path: '/401',
-		component: () => import('@/views/error/401'),
-		hidden: true
-	},{
-		path: "/fileEdit",
-		name: "fileEdit",
-		// component: common,
-		component: () => import("@/views/myfile/components/FileEdit.vue"),
-		// children: [{
-		// 	path: '/fileEdit:docId(\\d+)',
-		// 	component: () => import("@/views/myfile/components/FileEdit.vue"),
-		// 	name: 'fileEdit',
-		// 	meta: {
-		// 		title: '文件预览',
-		// 		activeMenu: '/fileEdit'
-		// 	}
-		// }]
+		path: "/collect",
+		component: () => import("@/views/collect/index.vue"),
+		name: "collect",
+		meta: {
+			title: "收藏文件",
+			icon: "department"
+		}
 	},
 	{
-		path: '',
-		component: () => import('@/layout/indexCommon.vue'),
-		redirect: '/index',
-		hidden: true,
-		children: [{
-				path: 'index',
-				component: () => import('@/views/liveChat/index.vue'),
-				name: 'index',
-				meta: {
-					title: '返回',
-					icon: 'dashboard',
-					affix: true
-				},
-			},
-			{
-				path: 'reindex',
-				component: () => import('@/views/liveChat/index.vue'),
-				name: 'reindex',
-				meta: {
-					title: '返回',
-					icon: 'dashboard',
-					affix: true
-				},
-			},
-			{
-				path: 'swagger',
-				component: () => import('@/views/tool/swagger/index.vue'),
-				name: 'swagger',
-				redirect: 'noredirect',
-				meta: {
-					title: '接口',
-					icon: 'dashboard'
-				},
-
-			},
-			{
-				path: 'recent',
-				component: () => import('@/views/biz/recent/index.vue'),
-				name: 'recent',
-				meta: {
-					title: '最近文件',
-					icon: 'dashboard'
-				},
-			},
-			{
-				path: '/search',
-				component: () => import('@/views/search/index.vue'),
-				name: 'search',
-				meta: {
-					title: '全文搜索',
-					icon: 'dashboard'
-				},
-			},
-			// {
-			// 	path: "/myfile",
-			// 	component: () => import("@/views/myfile/MyFile"),
-			// 	name: "myfile",
-			// 	meta: {
-			// 		title: "我的文件",
-			// 		icon: "myfile"
-			// 	}
-			// },
-			{
-				path: "/myfile",
-				component: () => import("@/views/myfile/MyFile"),
-				name: "myfile",
-				meta: {
-					title: "我的文件",
-					icon: "myfile"
-				},
-				children: [{
-					path: '/myfile:dirId(\\d+)',
-					component: () => import('@/views/myfile/MyFile'),
-					name: 'myfile',
-					meta: {
-						title: '我的文件',
-						activeMenu:'/myfile'
-					}
-				}]
-			},
-			{
-				path: "/myjoin",
-				component: () => import("@/views/myjoin/MyJoin"),
-				name: "myjoin",
-				meta: {
-					title: "我的协作",
-					icon: "myjoin"
-				}
-			},
-			// {
-			// 	path: "/department",
-			// 	component: () => import("@/views/department/MyFile"),
-			// 	name: "department",
-			// 	meta: {
-			// 		title: "部门文件",
-			// 		icon: "department"
-			// 	}
-			// },
-			{
-				path: "/department",
-				component: () => import("@/views/department/MyFile"),
-				name: "department",
-				meta: {
-					title: "部门文件",
-					icon: "department"
-				},
-				children: [{
-					path: '/department:dirId(\\d+)',
-					component: () => import('@/views/department/MyFile'),
-					name: 'department',
-					meta: {
-						title: '部门文件',
-						activeMenu:'/department'
-					}
-				}]
-			},
-			// {
-			// 	path: "/publicment",
-			// 	component: () => import("@/views/publicment/MyFile"),
-			// 	name: "publicment",
-			// 	meta: {
-			// 		title: "公共文件",
-			// 		icon: "becommon"
-			// 	}
-			// },
-			{
-				path: "/publicment",
-				component: () => import("@/views/publicment/MyFile"),
-				name: "publicment",
-				meta: {
-					title: "公共文件",
-					icon: "becommon"
-				},
-				children: [{
-					path: '/publicment:dirId(\\d+)',
-					component: () => import('@/views/publicment/MyFile'),
-					name: 'publicment',
-					meta: {
-						title: '公共文件',
-						activeMenu:'/publicment'
-					}
-				}]
-			},
-			{
-				path: "/collect",
-				component: () => import("@/views/collect/index.vue"),
-				name: "collect",
-				meta: {
-					title: "收藏文件",
-					icon: "department"
-				}
-			},
-			{
-				path: "/ws",
-				component: () => import("@/views/biz/test/index.vue"),
-				name: "ws",
-				meta: {
-					title: "聊天",
-					icon: "department"
-				}
-			},
-			{
-				path: "/transFile",
-				component: () => import("@/views/transFile/index.vue"),
-				name: "transFile",
-				meta: {
-					title: "聊天",
-					icon: "department"
-				}
-			},
-			{
-				path: "/highsearch",
-				component: () => import("@/views/highSearch/HighSearch.vue"),
-				name: "highsearch",
-				meta: {
-					title: "高级搜索",
-					icon: "department"
-				}
-			},{
-				path: "/identifyFont",
-				component: () => import("@/components/IdentifyFont/IdentifyFont.vue"),
-				name: "identifyFont",
-				meta: {
-					title: "图文识别",
-					icon: "department"
-				}
-			},{
-				path: "/iframe/*",
-				component: () => import("@/layout/iframe.vue"),
-				name: "iframe",
-				meta: {
-					title: "iframe",
-					icon: "department"
-				}
-			},{
-				path: "/allback",
-				component: () => import("@/views/highSearch/SupplierAllBack.vue"),
-				name: "allback",
-				meta: { title: "kongbaiye", icon: "department" }
-			  },{
-				path: "/admin",
-				component: Layout,
-				redirect: '/admin/index',
-				children: [{
-					path: 'index',
-					// component: () => import('@/layout/index.vue'),
-					name: 'adminIndex',
-					meta: {
-						title: '首页',
-						icon: 'dashboard',
-						affix: true
-					},
-	
-				},]
-			  }
-		]
+		path: "/ws",
+		component: () => import("@/views/biz/test/index.vue"),
+		name: "ws",
+		meta: {
+			title: "聊天",
+			icon: "department"
+		}
+	},
+	{
+		path: "/transFile",
+		component: () => import("@/views/transFile/index.vue"),
+		name: "transFile",
+		meta: {
+			title: "聊天",
+			icon: "department"
+		}
 	},
 	{
-		path: '/admin',
+		path: "/highsearch",
+		component: () => import("@/views/highSearch/HighSearch.vue"),
+		name: "highsearch",
+		meta: {
+			title: "高级搜索",
+			icon: "department"
+		}
+	}, {
+		path: "/identifyFont",
+		component: () => import("@/components/IdentifyFont/IdentifyFont.vue"),
+		name: "identifyFont",
+		meta: {
+			title: "图文识别",
+			icon: "department"
+		}
+	}, {
+		path: "/iframe/*",
+		component: () => import("@/layout/iframe.vue"),
+		name: "iframe",
+		meta: {
+			title: "iframe",
+			icon: "department"
+		}
+	}, {
+		path: "/allback",
+		component: () => import("@/views/highSearch/SupplierAllBack.vue"),
+		name: "allback",
+		meta: { title: "kongbaiye", icon: "department" }
+	}, {
+		path: "/admin",
 		component: Layout,
 		redirect: '/admin/index',
 		children: [{
-				path: 'index',
-				// component: () => import('@/layout/index.vue'),
-				name: 'adminIndex',
-				meta: {
-					title: '首页',
-					icon: 'dashboard',
-					affix: true
-				},
-
-			},
-			// 其他 admin 下的子路由
-			{
-				path: '/onlyoffice/',
-				component: () => import('@/views/biz/onlyoffice/index'),
-				name: 'onlyoffice',
-				meta: {
-					title: '在线编辑',
-					icon: 'dashboard'
-				},
-				hidden:true
+			path: 'index',
+			// component: () => import('@/layout/index.vue'),
+			name: 'adminIndex',
+			meta: {
+				title: '首页',
+				icon: 'dashboard',
+				affix: true
 			},
-		]
-	},
 
-	// {
-	//   path: '/file',
-	//   component: Layout,
-	//   redirect: '/index',
-	//   children: [
-	//     // {
-	//     //   path: 'swagger',
-	//     //   component: () => import('@/views/tool/swagger/index.vue'),
-	//     //   name: 'swagger',
-	//     //   meta: { title: '接口', icon: 'dashboard' },
+		},]
+	}
+	]
+},
+{
+	path: '/admin',
+	component: Layout,
+	redirect: '/admin/index',
+	children: [{
+		path: 'index',
+		// component: () => import('@/layout/index.vue'),
+		name: 'adminIndex',
+		meta: {
+			title: '首页',
+			icon: 'dashboard',
+			affix: true
+		},
 
+	},
+	// 其他 admin 下的子路由
 	{
-		path: '/file',
-		component: Layout,
-		redirect: '/index',
-		children: [
-			// {
-			//   path: 'swagger',
-			//   component: () => import('@/views/tool/swagger/index.vue'),
-			//   name: 'swagger',
-			//   meta: { title: '接口', icon: 'dashboard' },
-
-			// },
-		]
+		path: '/onlyoffice/',
+		component: () => import('@/views/biz/onlyoffice/index'),
+		name: 'onlyoffice',
+		meta: {
+			title: '在线编辑',
+			icon: 'dashboard'
+		},
+		hidden: true
 	},
+	]
+},
 
-	//     // },
-	//     // {
-	//     //   path: "/myfile",
-	//     //   component: () => import("@/views/myfile/MyFile"),
-	//     //   name: "myfile",
-	//     //   meta: { title: "我的文件", icon: "myfile" }
-	//     // },
-	//     // {
-	//     //   path: "/department",
-	//     //   component: () => import("@/views/department/Department"),
-	//     //   name: "department",
-	//     //   meta: { title: "部门文件", icon: "department" }
-	//     // }
-	//   ]
-	// },
+// {
+//   path: '/file',
+//   component: Layout,
+//   redirect: '/index',
+//   children: [
+//     // {
+//     //   path: 'swagger',
+//     //   component: () => import('@/views/tool/swagger/index.vue'),
+//     //   name: 'swagger',
+//     //   meta: { title: '接口', icon: 'dashboard' },
 
-	{
-		path: '/user',
-		component: Layout,
-		hidden: true,
-		redirect: 'noredirect',
-		children: [{
-			path: 'profile',
-			component: () => import('@/views/system/user/profile/index'),
-			name: 'Profile',
-			meta: {
-				title: '个人中心',
-				icon: 'user'
-			}
-		}, ]
-	},
+{
+	path: '/file',
+	component: Layout,
+	redirect: '/index',
+	children: [
+		// {
+		//   path: 'swagger',
+		//   component: () => import('@/views/tool/swagger/index.vue'),
+		//   name: 'swagger',
+		//   meta: { title: '接口', icon: 'dashboard' },
+
+		// },
+	]
+},
+
+//     // },
+//     // {
+//     //   path: "/myfile",
+//     //   component: () => import("@/views/myfile/MyFile"),
+//     //   name: "myfile",
+//     //   meta: { title: "我的文件", icon: "myfile" }
+//     // },
+//     // {
+//     //   path: "/department",
+//     //   component: () => import("@/views/department/Department"),
+//     //   name: "department",
+//     //   meta: { title: "部门文件", icon: "department" }
+//     // }
+//   ]
+// },
+
+{
+	path: '/user',
+	component: Layout,
+	hidden: true,
+	redirect: 'noredirect',
+	children: [{
+		path: 'profile',
+		component: () => import('@/views/system/user/profile/index'),
+		name: 'Profile',
+		meta: {
+			title: '个人中心',
+			icon: 'user'
+		}
+	},]
+},
 	// {
 	//   path: '/indexCommons',
 	//   hidden: true,
@@ -400,80 +401,80 @@ export const constantRoutes = [{
 
 // 动态路由,基于用户权限动态去加载
 export const dynamicRoutes = [{
-		path: '/system/user-auth',
-		component: Layout,
-		hidden: true,
-		permissions: ['system:user:edit'],
-		children: [{
-			path: 'role/:userId(\\d+)',
-			component: () => import('@/views/system/user/authRole'),
-			name: 'AuthRole',
-			meta: {
-				title: '分配角色',
-				activeMenu: '/system/user'
-			}
-		}]
-	},
-	{
-		path: '/system/role-auth',
-		component: Layout,
-		hidden: true,
-		permissions: ['system:role:edit'],
-		children: [{
-			path: 'user/:roleId(\\d+)',
-			component: () => import('@/views/system/role/authUser'),
-			name: 'AuthUser',
-			meta: {
-				title: '分配用户',
-				activeMenu: '/system/role'
-			}
-		}]
-	},
-	{
-		path: '/system/dict-data',
-		component: Layout,
-		hidden: true,
-		permissions: ['system:dict:list'],
-		children: [{
-			path: 'index/:dictId(\\d+)',
-			component: () => import('@/views/system/dict/data'),
-			name: 'Data',
-			meta: {
-				title: '字典数据',
-				activeMenu: '/system/dict'
-			}
-		}]
-	},
-	{
-		path: '/monitor/job-log',
-		component: Layout,
-		hidden: true,
-		permissions: ['monitor:job:list'],
-		children: [{
-			path: 'index/:jobId(\\d+)',
-			component: () => import('@/views/monitor/job/log'),
-			name: 'JobLog',
-			meta: {
-				title: '调度日志',
-				activeMenu: '/monitor/job'
-			}
-		}]
-	},
-	{
-		path: '/tool/gen-edit',
-		component: Layout,
-		hidden: true,
-		permissions: ['tool:gen:edit'],
-		children: [{
-			path: 'index/:tableId(\\d+)',
-			component: () => import('@/views/tool/gen/editTable'),
-			name: 'GenEdit',
-			meta: {
-				title: '修改生成配置',
-				activeMenu: '/tool/gen'
-			}
-		}]
-	}
+	path: '/system/user-auth',
+	component: Layout,
+	hidden: true,
+	permissions: ['system:user:edit'],
+	children: [{
+		path: 'role/:userId(\\d+)',
+		component: () => import('@/views/system/user/authRole'),
+		name: 'AuthRole',
+		meta: {
+			title: '分配角色',
+			activeMenu: '/system/user'
+		}
+	}]
+},
+{
+	path: '/system/role-auth',
+	component: Layout,
+	hidden: true,
+	permissions: ['system:role:edit'],
+	children: [{
+		path: 'user/:roleId(\\d+)',
+		component: () => import('@/views/system/role/authUser'),
+		name: 'AuthUser',
+		meta: {
+			title: '分配用户',
+			activeMenu: '/system/role'
+		}
+	}]
+},
+{
+	path: '/system/dict-data',
+	component: Layout,
+	hidden: true,
+	permissions: ['system:dict:list'],
+	children: [{
+		path: 'index/:dictId(\\d+)',
+		component: () => import('@/views/system/dict/data'),
+		name: 'Data',
+		meta: {
+			title: '字典数据',
+			activeMenu: '/system/dict'
+		}
+	}]
+},
+{
+	path: '/monitor/job-log',
+	component: Layout,
+	hidden: true,
+	permissions: ['monitor:job:list'],
+	children: [{
+		path: 'index/:jobId(\\d+)',
+		component: () => import('@/views/monitor/job/log'),
+		name: 'JobLog',
+		meta: {
+			title: '调度日志',
+			activeMenu: '/monitor/job'
+		}
+	}]
+},
+{
+	path: '/tool/gen-edit',
+	component: Layout,
+	hidden: true,
+	permissions: ['tool:gen:edit'],
+	children: [{
+		path: 'index/:tableId(\\d+)',
+		component: () => import('@/views/tool/gen/editTable'),
+		name: 'GenEdit',
+		meta: {
+			title: '修改生成配置',
+			activeMenu: '/tool/gen'
+		}
+	}]
+}
 ]
 
 const router = createRouter({

+ 9 - 2
src/store/modules/websocket.js

@@ -11,7 +11,8 @@ const useWebsoctStore = defineStore('websoct', {
     socket: null,
     messOne:{},
     falseMessag:false,//消息是否发送成功
-    noReadList: null
+    noReadList: null,
+    lastSendTime:0, //最后发送消息时间
   }),
   actions: {
     connect() {
@@ -57,10 +58,16 @@ const useWebsoctStore = defineStore('websoct', {
       })
     },
     sendMessage(message) {
+      if(this.lastSendTime>0 && (new Date().getTime()- this.lastSendTime)<4000){
+        return new Promise((resolve, reject) => {
+            ElMessage({ message: "消息发送频率太快", type: "error" });
+            reject('发送频率太快')
+        })
+      }
       var that=this
       return new Promise((resolve, reject) => {
 				msgSend(message).then(res => {
-           this.newMessage = true // 标记有新的消息
+          that.lastSendTime = new Date().getTime();
 					resolve(res)
 				}).catch(error => {
           ElMessage({ message: "发送消息失败", type: "error" });

+ 40 - 45
src/views/highSearch/HighSearch.vue

@@ -5,23 +5,10 @@
       <div class="font">聚合智慧文档管理系统</div>
     </div>
     <div class="search_box">
-      <el-select
-        v-model="selectValue"
-        class="m-2"
-        popper-class="typeSelect"
-        placeholder="Select"
-        size="large"
-      >
-        <el-option
-          v-for="item in selectOptions"
-          :key="item.value"
-          :label="item.label"
-          :value="item.value"
-        >
+      <el-select v-model="selectValue" class="m-2" popper-class="typeSelect" placeholder="Select" size="large">
+        <el-option v-for="item in selectOptions" :key="item.value" :label="item.label" :value="item.value">
           <span style="float: left">{{ item.label }}</span>
-          <div
-            v-if="item.value === selectValue"
-            style="
+          <div v-if="item.value === selectValue" style="
               position: relative;
               right: -13px;
               color: #000;
@@ -29,32 +16,21 @@
               font-size: 13px;
               text-align: right;
               box-sizing: border-box;
-            "
-          >
+            ">
           </div>
         </el-option>
       </el-select>
       <div class="line">|</div>
-      <el-input
-        class="search_ipt"
-        v-model="searchText"
-        maxlength="32"
-        @keydown.enter="doSearch"
-        placeholder="请输入要查询的内容"
-      />
+      <el-input class="search_ipt" v-model="searchText" maxlength="32" @keydown.enter="doSearch"
+        placeholder="请输入要查询的内容" />
       <div class="search_btn" @click="doSearch" style="cursor: pointer;">搜索</div>
     </div>
     <div class="result_box">
       <div class="left_box" v-if="listData.length">
         <div class="dataNum">共查询到{{ total }}个相关结果</div>
       </div>
-      <div
-        class="content_box"
-        v-infinite-scroll="setScroll"
-        infinite-scroll-distance="30"
-        v-if="listData.length"
-      >
+      <div class="content_box" v-infinite-scroll="setScroll" infinite-scroll-distance="30" v-if="listData.length">
         <!-- <el-scrollbar height="200px"  ref="scrollRef" id="scrollRef"> -->
         <div class="oneBox" v-for="item in listData" :key="item.id">
           <span class="fileName" @click="toPreview(item)">{{
@@ -64,12 +40,7 @@
             <img src="@/assets/images/bx:bx-time-five.png" alt="" />
             <span>{{ item.content.docInfo.createTime }}</span>
           </div>
-          <div
-            class="flieContent"
-            v-for="par in item.highlightFields.content"
-            :key="par"
-            v-html="par"
-          ></div>
+          <div class="flieContent" v-for="par in item.highlightFields.content" :key="par" v-html="par"></div>
         </div>
         <div class="showAll" v-if="beEnd">已经到达底部~</div>
         <!-- </el-scrollbar> -->
@@ -81,13 +52,8 @@
     </div>
   </div>
   <div v-else class="preview">
-    <FileEdit
-      :docId="clickRowId"
-      :copyRow="copyRow"
-      :historyPrew="historyPrew"
-      :historycopyRow="historycopyRow"
-      :onlyView="onlyView"
-    ></FileEdit>
+    <FileEdit :docId="clickRowId" :copyRow="copyRow" :historyPrew="historyPrew" :historycopyRow="historycopyRow"
+      :onlyView="onlyView"></FileEdit>
   </div>
 </template>
 
@@ -123,7 +89,7 @@ const selectOptions = [
 const openFile = ref(true);
 // ----------------------------
 
-onMounted(async () => {});
+onMounted(async () => { });
 
 const doSearch = async () => {
   if (!searchText.value) {
@@ -203,12 +169,14 @@ const toPreview = (item) => {
   background-color: #fff;
   overflow: hidden;
 }
+
 .container {
   // height: 100%;
   height: calc(98vh - 48px - 8px - 32px - 8px);
   background-color: #fff;
   overflow: hidden;
 }
+
 .logo {
   margin: 8px auto;
   width: 500px;
@@ -217,10 +185,12 @@ const toPreview = (item) => {
   //   border: 1px solid #000;
   display: flex;
   align-items: center;
+
   img {
     width: 80px;
     height: 80px;
   }
+
   .font {
     font-size: 32px;
     font-weight: normal;
@@ -230,6 +200,7 @@ const toPreview = (item) => {
     -webkit-transform: skew(-10deg);
   }
 }
+
 .search_box {
   box-sizing: border-box;
   margin: 8px auto;
@@ -239,9 +210,11 @@ const toPreview = (item) => {
   border: 2px solid #2e6bc8;
   display: flex;
   align-items: center;
+
   .line {
     color: #2e6bc8;
   }
+
   .search_btn {
     width: 88px;
     height: 100%;
@@ -255,23 +228,28 @@ const toPreview = (item) => {
     line-height: 22px;
   }
 }
+
 .result_box {
   margin-top: 8px;
   padding-left: 16px;
   height: calc(100% - 180px);
+
   .left_box {
     display: flex;
     align-items: center;
+
     .dataNum {
       margin-left: 4px;
       font-size: 14px;
       font-weight: 400;
     }
   }
+
   .content_box {
     width: 100%;
     height: 100%;
     overflow: auto;
+
     // box-sizing: border-box;
     .oneBox {
       width: 100%;
@@ -279,12 +257,14 @@ const toPreview = (item) => {
       border-bottom: 1px dashed #c1cce3;
       padding-bottom: 16px;
       padding-top: 16px;
+
       .fileName {
         font-size: 16px;
         color: #2e6bc8;
         text-decoration: underline;
         font-family: Inter-SemiBold;
       }
+
       .flieTime {
         font-size: 12px;
         font-weight: 400;
@@ -294,10 +274,12 @@ const toPreview = (item) => {
         display: flex;
         align-items: center;
         margin: 4px 0;
+
         span {
           margin-left: 4px;
         }
       }
+
       .flieContent {
         width: 100%;
         font-size: 14px;
@@ -311,6 +293,7 @@ const toPreview = (item) => {
         overflow: hidden;
       }
     }
+
     .showAll {
       margin-top: 8px;
       font-size: 14px;
@@ -321,6 +304,7 @@ const toPreview = (item) => {
       justify-content: center;
     }
   }
+
   .error {
     margin-top: 120px;
     display: flex;
@@ -329,12 +313,14 @@ const toPreview = (item) => {
     font-size: 12px;
     font-weight: 400;
     color: #06286c;
+
     img {
       width: 320px;
       height: 320px;
     }
   }
 }
+
 ::v-deep em {
   color: #dd2025;
 }
@@ -346,23 +332,29 @@ const toPreview = (item) => {
   color: #06286c !important;
   font-size: 14px !important;
 }
+
 ::v-deep .el-select .el-input__wrapper {
   background-color: rgba(0, 0, 0, 0) !important;
   box-shadow: none !important;
 }
+
 ::v-deep .el-select .el-input.is-focus .el-input__wrapper {
   box-shadow: none !important;
 }
+
 ::v-deep .el-select .el-input__wrapper .el-input__inner {
   color: #06286c !important;
 }
+
 // 搜索框样式
 ::v-deep .search_ipt .el-input__wrapper {
   box-shadow: none !important;
 }
+
 ::v-deep .search_ipt .el-input__inner {
   color: #06286c !important;
 }
+
 ::v-deep .search_ipt .el-input__inner::placeholder {
   color: #a4b0d8;
 }
@@ -370,14 +362,17 @@ const toPreview = (item) => {
 <style lang="scss">
 //鼠标移动上去的选中色
 .typeSelect {
+
   .el-select-dropdown__item.hover,
   .el-select-dropdown__item:hover {
     background: #f5f7f9 !important;
   }
+
   //下拉框的文本颜色
   .el-select-dropdown__item {
     color: #06286c !important;
   }
+
   //选中之后的颜色
   .el-select-dropdown__item.selected {
     background: #f5f7f9 !important;

+ 2 - 2
src/views/highSearch/SupplierAllBack.vue

@@ -9,8 +9,8 @@ import { useRouter, useRoute } from "vue-router";
 onMounted(() => {
   let router = useRouter();
   let route = useRoute();
-  const searchText = route.query.searchText;
-  const searchData = route.query.searchData;
+  const searchText = route.params.searchText;
+  const searchData = route.params.searchData;
   router.replace({
     path: "/search",
     query: {

+ 99 - 67
src/views/liveChat/index.vue

@@ -42,6 +42,7 @@ const { proxy } = getCurrentInstance();
 const userIds = useUserStore();
 // main元素的初始高度,在onMounted时需要重新计算
 let height = ref(document.documentElement.clientHeight - 16 + "px;");
+let height2= ref('0px'); //会话列表高度
 const messageText = ref(""); //发送的内容
 let headerName = ref("");
 const total = ref(0);
@@ -224,6 +225,7 @@ const changeMsg = async (val,isnew) => {
   resInfo.fromId = val.id
   resInfo.content = val.content
   resInfo.file = val.file
+  resInfo.toAvatar = resInfo.fromAvatar = resInfo.avatar
   if (searchData.value.length > 0) {
     //判断是否有相同的聊天人
     const filerData = searchData.value.filter(
@@ -279,7 +281,7 @@ const msgSendClick = (event) => {
 };
 const msgSendClick2 = (event,icon) => {
   if(sendCont.data.toId==null||sendCont.data.toId==0){
-    return ElMessage({ message: "请添加或者会话人员", type: "error" });
+    return ElMessage({ message: "请添加或者选择会话人员", type: "error" });
     return
   }
   if ((!event.shiftKey && event.keyCode == 13 && !event.ctrlKey)||icon) {
@@ -294,16 +296,21 @@ const msgSendClick2 = (event,icon) => {
       fileList: [],
       toId: sendCont.data.toId,
     };
-    websoctStore.sendMessage(message);
-    boottmScroll();
-    messageText.value = "";
-    //  将光标设置到输入框第一行
+    websoctStore.sendMessage(message).then((res) => {
+      if(res.code==200){
+        //发送成功
+        messageText.value = "";
+        msgRecordEvent(sendCont.data.toId)
+      }
+    }).catch((err) => {
+      //发送失败了
+    })
   }
 }
 //发送文件确认按钮
 const fileChangeMsg = async (val) => {
   if(sendCont.data.toId==null||sendCont.data.toId==0){
-    return ElMessage({ message: "请添加或者会话人员", type: "error" });
+    return ElMessage({ message: "请添加或者选择会话人员", type: "error" });
     return
   }
   const message = {
@@ -313,7 +320,15 @@ const fileChangeMsg = async (val) => {
     toId: sendCont.data.toId,
   };
   sendId.value = val.id;
-  websoctStore.sendMessage(message);
+  websoctStore.sendMessage(message).then((res) => {
+      if(res.code==200){
+        //发送成功
+        messageText.value = "";
+        msgRecordEvent(sendCont.data.toId)
+      }
+  }).catch((err) => {
+      //发送失败了
+  })
 };
 //点击发送文件图标
 const fileUserTreeData = reactive({ data: {} });
@@ -496,10 +511,15 @@ const formatText = (text) => {
           };
           reader.readAsText(res);
       })
-  }
+  };
+const headError=(ind,item)=>{
+  console.log("头像加载失败:",ind)
+  item.fromAvatar=item.toAvatar=item.avatar=null;
+};
 // 滚动翻页========
 onMounted(() => {
   height.value = document.documentElement.clientHeight - document.getElementsByClassName("tab_box")[0].offsetHeight-8-document.getElementsByClassName("nav")[0].offsetHeight -26 + "px";
+  height2.value = height.value.replace('px','') - 48 + 'px';
   getMsgList();
   websoctStore.connect();
   setInterval(handleNewMessage, 1000); // 每秒钟检查是否有新消息
@@ -538,67 +558,75 @@ onMounted(() => {
         ></Addperson>
       </div>
       <!-- 列表 -->
-      <div
-        :class="
-          clickPersonIndex == index
-            ? '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
-          class="del-chat"
-          v-if="clickPersonIndex == index && item.fromId!=-1"
-          @click="delClick(item.userId!=null? item.userId : (item.toId == userIds.uid?item.fromId:item.toId))"
+      <div :style="'overflow-y: auto;height: '+height2">
+        <div
+          :class="
+            (item.display!=null && item.display==0) 
+            ? ''
+            :(
+            clickPersonIndex == index
+              ? 'activ-left-container left-container shouzhi'
+              : 'left-container shouzhi'
+            )
+          "
+          v-for="(item, index) in searchData"
+          :key="index"
+          @click="clickPerson(index, item)"
         >
-          删除会话
-        </button>
-        <div>
-          <img
-            :src="wangzhi + item.fromAvatar"
-            class="head-sculpture"
-            v-if="item.toId == userIds.uid && item.fromAvatar"
-          />
-          <img :src="item.avatar " alt="" v-else-if="item.avatar"/>
-          <img
-            :src="wangzhi + item.toAvatar"
-            class="head-sculpture"
-            v-else-if="item.toId != userIds.uid && item.toAvatar"
-          />
-          <span
-            style="
-              background-color: #7a89ba;
-              display: inline-block;
-              color: #fff;
-              font-weight: 600;
-              text-align: center;
-              line-height: 40px;
-            "
-            class="head-sculpture"
-            v-else
-            >{{ item.nickName!=null? item.nickName.slice(0, 1):item.toId == userIds.uid? item.fromName.slice(0, 1): item.toName.slice(0, 1) }}</span>
-        </div>
-        <div class="spill">
-          <span class="person-name">{{
-            item.nickName
-              ? item.nickName
-              : item.toId == userIds.uid
-              ? item.fromName
-              : item.toName
-          }}</span
-          ><span class="person-cont spill">
-            {{ item.file?.fileName ? item.file?.fileName : item.content }}</span
+        <template v-if="item.display==null || item.display==1">
+          <img :src="cebian" class="cebian" v-if="clickPersonIndex == index" />
+          <button
+            class="del-chat"
+            v-if="clickPersonIndex == index && item.fromId!=-1"
+            @click="delClick(item.userId!=null? item.userId : (item.toId == userIds.uid?item.fromId:item.toId))"
           >
+            删除会话
+          </button>
+          <div>
+            <img
+              :src="wangzhi + item.fromAvatar"
+              class="head-sculpture"
+              :onerror="headError(index,item)"
+              v-if="item.toId == userIds.uid && item.fromAvatar"
+            />
+            <img :src="item.avatar" :onerror="headError(index,item)" alt="" v-else-if="item.avatar"/>
+            <img
+              :src="wangzhi + item.toAvatar"
+              class="head-sculpture"
+              :onerror="headError(index,item)"
+              v-else-if="item.toId != userIds.uid && item.toAvatar"
+            />
+            <span
+              style="
+                background-color: #7a89ba;
+                display: inline-block;
+                color: #fff;
+                font-weight: 600;
+                text-align: center;
+                line-height: 40px;
+              "
+              class="head-sculpture"
+              v-else
+              >{{ item.nickName!=null? item.nickName.slice(0, 1):item.toId == userIds.uid? item.fromName.slice(0, 1): item.toName.slice(0, 1) }}</span>
+          </div>
+          <div class="spill">
+            <span class="person-name">{{
+              item.nickName
+                ? item.nickName
+                : item.toId == userIds.uid
+                ? item.fromName
+                : item.toName
+            }}</span
+            ><span class="person-cont spill">
+              {{ item.file?.fileName ? item.file?.fileName : item.content }}</span
+            >
+          </div>
+          <span
+            class="yuandian"
+            v-if="item.showCircel && $route.path == '/index' && clickPersonId!==item.fromId"
+          ></span>
+        </template>
         </div>
-        <span
-          class="yuandian"
-          v-if="item.showCircel && $route.path == '/index' && clickPersonId!==item.fromId"
-        ></span>
-      </template>
       </div>
     </div>
     <!-- 右侧聊天 -->
@@ -674,7 +702,8 @@ onMounted(() => {
                   <div>
                     <img
                       :src="wangzhi + record.fromAvatar"
-                      class="head-sculpture"
+                      class="head-sculpture"    
+                      :onerror="headError(index,record)"                  
                       v-if="
                         useUserStore().uid != record.toId && record.fromAvatar
                       "
@@ -682,6 +711,7 @@ onMounted(() => {
                     <img
                       :src="wangzhi + record.toAvatar"
                       class="head-sculpture"
+                      :onerror="headError(index,record)"
                       v-else-if="
                         useUserStore().uid == record.toId && record.toAvatar
                       "
@@ -713,6 +743,7 @@ onMounted(() => {
                     <img
                       :src="wangzhi + record.fromAvatar"
                       class="head-sculpture"
+                      :onerror="headError(index,record)"
                       v-if="
                         useUserStore().uid == record.toId && record.fromAvatar
                       "
@@ -720,6 +751,7 @@ onMounted(() => {
                     <img
                       :src="wangzhi + record.toAvatar"
                       class="head-sculpture"
+                      :onerror="headError(index,record)"
                       v-else-if="
                         useUserStore().uid != record.toId && record.toAvatar
                       "

+ 1 - 1
src/views/myfile/MyFile.vue

@@ -7,7 +7,7 @@
                     
                     <div class="spaceName">{{spaceName}}</div>
                     <div>
-                        <el-icon style="font-size: 24px;" @click="createNewMenu(1,true)">
+                        <el-icon style="font-size: 24px;" @click="createNewMenu(0)">
                             <Plus />
                         </el-icon>
                         <!-- @click="createNewFile" -->

+ 63 - 67
src/views/search/index.vue

@@ -12,11 +12,7 @@
     <div class="searchType">
       <div class="searchFor">
         <div class="search_title">搜索范围:</div>
-        <el-tabs
-          v-model="searchFor"
-          class="demo-tabs"
-          @tab-change="changeSearchFor"
-        >
+        <el-tabs v-model="searchFor" class="demo-tabs" @tab-change="changeSearchFor">
           <el-tab-pane label="公共" name="1"></el-tab-pane>
           <el-tab-pane label="部门" name="2"></el-tab-pane>
           <el-tab-pane label="个人" name="3"></el-tab-pane>
@@ -25,11 +21,7 @@
       <div class="line"></div>
       <div class="searchFor">
         <div class="search_title">分类:</div>
-        <el-tabs
-          v-model="searchType"
-          class="demo-tabs"
-          @tab-change="changeSearchType"
-        >
+        <el-tabs v-model="searchType" class="demo-tabs" @tab-change="changeSearchType">
           <el-tab-pane label="文档" name="doc"></el-tab-pane>
           <el-tab-pane label="图片" name="img"></el-tab-pane>
           <el-tab-pane label="音频" name="audio "></el-tab-pane>
@@ -44,30 +36,10 @@
         <div class="dataNum">共查询到{{ total }}个相关结果</div>
       </div>
       <div class="right_box">
-        <img
-          src="@/assets/images/sort.png"
-          @click="changeSort"
-          v-if="isAsc == 'asc'"
-          alt=""
-        />
-        <img
-          src="@/assets/images/Frame_188.png"
-          @click="changeSort"
-          v-else
-          alt=""
-        />
-        <img
-          v-if="isList"
-          src="@/assets/images/squre.png"
-          alt=""
-          @click="changeShow"
-        />
-        <img
-          v-else
-          src="@/assets/images/Frame_187.png"
-          alt=""
-          @click="changeShow"
-        />
+        <img src="@/assets/images/sort.png" @click="changeSort" v-if="isAsc == 'asc'" alt="" />
+        <img src="@/assets/images/Frame_188.png" @click="changeSort" v-else alt="" />
+        <img v-if="isList" src="@/assets/images/squre.png" alt="" @click="changeShow" />
+        <img v-else src="@/assets/images/Frame_187.png" alt="" @click="changeShow" />
       </div>
     </div>
     <!-- 文件列表 -->
@@ -75,34 +47,21 @@
       <div>
         <div v-if="isList">
           <!-- 表格 -->
-          <el-table
-            :data="tableData"
-            style="width: 100%"
-            :scrollbar-always-on="true"
-          >
-            <el-table-column fixed prop="fileName" label="名称" width="500">
+          <el-table :data="tableData" style="width: 100%" :scrollbar-always-on="true">
+            <el-table-column fixed label="名称" width="500">
               <template #default="scope">
                 <div class="flie_name">
-                  <img
-                    class="table_icon"
-                    :src="setIcon(scope.row.fileType)"
-                    alt=""
-                    style=""
-                  />
+                  <img class="table_icon" :src="setIcon(scope.row.fileType)" alt="" style="" />
                   {{ scope.row.fileName }}
                 </div>
               </template>
             </el-table-column>
-            <el-table-column
-              prop="space.spaceName"
-              label="所属空间"
-              width="180"
-            />
+            <el-table-column prop="space.spaceName" label="所属空间" width="180" />
             <el-table-column prop="createTime" label="时间" width="200" />
             <el-table-column prop="fileType" label="类型" width="80" />
             <el-table-column prop="fileSize" label="大小" width="160">
               <template #default="scope">
-                <div>{{formatFileSize(scope.row.fileSize)}}</div>
+                <div>{{ formatFileSize(scope.row.fileSize) }}</div>
               </template>
             </el-table-column>
             <el-table-column prop="dir.dirPath" label="文件夹" width="180">
@@ -113,12 +72,7 @@
               </template>
             </el-table-column>
           </el-table>
-          <Pagination
-            :total="total"
-            :page="page"
-            :limit="limit"
-            @pagination="pagination"
-          ></Pagination>
+          <Pagination :total="total" :page="page" :limit="limit" @pagination="pagination"></Pagination>
         </div>
         <div v-else>
           <!-- 平铺 -->
@@ -138,7 +92,7 @@
 import { onMounted, ref, toRaw, inject } from "vue";
 import { search } from "@/api/search/search.js";
 import { flieSearch } from "@/api/search/search.js";
-import { useRoute, useRouter,onBeforeRouteUpdate } from "vue-router";
+import { useRoute, useRouter, onBeforeRouteUpdate } from "vue-router";
 import Pagination from "@/components/Pagination/index.vue";
 //---------------导入图片--------------------------
 import file_DOC from "@/assets/images/fileType/file_DOC.png";
@@ -172,14 +126,15 @@ const limit = ref(2); //pagesize
 const reload = inject("reload");
 onMounted(() => {
   let route = useRoute();
-  searchText.value = route.query.searchText;
-  let searchData = route.query.searchData;
+  console.log(route.params, 'route');
+  searchText.value = route.params.searchText;
+  let searchData = route.params.listArr;
   // console.log("searchData", searchData);
   baseData.value = JSON.parse(searchData).rows;
   tableData.value = JSON.parse(searchData).rows;
   total.value = JSON.parse(searchData).total;
   changeSearchFor(searchFor.value);
-  // console.log("total", total.value );
+  console.log("total", baseData.value);
 });
 const tableData = ref([]);
 // 切换搜索范围
@@ -303,7 +258,7 @@ const setType = (fileType) => {
       return [".mp3"];
       break;
     case "video":
-      return [".mp4",'.qlv'];
+      return [".mp4", '.qlv'];
       break;
     case "zip":
       return [".zip", "rar", ".7z"];
@@ -328,10 +283,10 @@ function formatFileSize(fileSize) {
     return fileSize + "B";
   }
 }
-onBeforeRouteUpdate((to,from)=>{
-      console.log('to',to);
-      console.log('from',from);
-    })
+onBeforeRouteUpdate((to, from) => {
+  console.log('to', to);
+  console.log('from', from);
+})
 </script>
 
 <style lang="scss" scoped>
@@ -340,17 +295,20 @@ onBeforeRouteUpdate((to,from)=>{
   background-color: #fff;
   border-radius: 4px;
 }
+
 .searchTitle {
   width: 100%;
   height: 40px;
   padding-left: 8px;
   display: flex;
   align-items: center;
+
   .colLine {
     margin-left: 5px;
     height: 100%;
     border-right: 1px solid #c1cce3;
   }
+
   .searchTitle_text {
     font-size: 16px;
     font-weight: 400;
@@ -358,6 +316,7 @@ onBeforeRouteUpdate((to,from)=>{
     margin-left: 16px;
   }
 }
+
 .searchType {
   width: 100%;
   height: 40px;
@@ -368,9 +327,11 @@ onBeforeRouteUpdate((to,from)=>{
   padding-left: 16px;
   display: flex;
   align-items: center;
+
   .searchFor {
     height: 100%;
     display: flex;
+
     // align-items: center;
     .search_title {
       height: 100%;
@@ -380,6 +341,7 @@ onBeforeRouteUpdate((to,from)=>{
       font-family: Inter-Medium;
     }
   }
+
   .line {
     width: 1px;
     height: 24px;
@@ -387,6 +349,7 @@ onBeforeRouteUpdate((to,from)=>{
     margin: 0 16px;
   }
 }
+
 .statistics {
   width: 100%;
   height: 40px;
@@ -395,47 +358,57 @@ onBeforeRouteUpdate((to,from)=>{
   display: flex;
   justify-content: space-between;
   align-items: center;
+
   .left_box {
     display: flex;
     align-items: center;
+
     .dataNum {
       margin-left: 4px;
       font-size: 14px;
       font-weight: 400;
     }
   }
+
   .right_box {
     width: 50px;
     display: flex;
     justify-content: space-between;
     margin-right: 30px;
+
     img {
       cursor: pointer;
     }
   }
 }
+
 .fileList {
   height: 100%;
+
   .content_box {
     width: 100%;
     height: 100%;
     padding: 16px;
+
     .oneBox {
       width: 100%;
       height: 120px;
       border-bottom: 1px dashed #c1cce3;
+
       .fileName {
         font-size: 16px;
         color: #2e6bc8;
         text-decoration: underline;
         font-family: Inter-SemiBold;
       }
+
       .flieTime {
         font-size: 12px;
         font-weight: 400;
         color: #06286c;
         line-height: 20px;
       }
+
       .flieContent {
         width: 100%;
         font-size: 14px;
@@ -447,6 +420,7 @@ onBeforeRouteUpdate((to,from)=>{
         text-overflow: ellipsis;
         -webkit-line-clamp: 3; //例如超过3行显示省略号
         overflow: hidden;
+
         em {
           color: #dd2025;
         }
@@ -454,6 +428,7 @@ onBeforeRouteUpdate((to,from)=>{
     }
   }
 }
+
 //表格文本超出隐藏
 ::v-deep .flie_name,
 .folder {
@@ -464,24 +439,29 @@ onBeforeRouteUpdate((to,from)=>{
   /* 第三步:用省略号来代表未显示完的文本 */
   text-overflow: ellipsis;
 }
+
 // tag间距
 ::v-deep .el-tabs__item {
   padding: 0 16px !important;
   color: #505870 !important;
   font-weight: 400 !important;
 }
+
 ::v-deep .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
   padding-left: 0 !important;
 }
+
 ::v-deep .el-tabs--top .el-tabs__item.is-top:last-child {
   padding-right: 0 !important;
 }
+
 // tag选中颜色
 ::v-deep .el-tabs__item.is-active {
   color: #2e6bc8 !important;
   font-weight: normal;
   font-family: Inter-SemiBold;
 }
+
 ::v-deep .el-tabs__active-bar {
   background-color: #2e6bc8;
 }
@@ -494,33 +474,40 @@ onBeforeRouteUpdate((to,from)=>{
 .el-collapse-item__wrap {
   border: none;
 }
+
 .table_icon {
   height: 27px;
   width: 27px;
   vertical-align: middle;
 }
+
 ::v-deep .el-collapse-item__content {
   padding-bottom: 0;
 }
+
 ::v-deep .el-collapse-item__header {
   background-color: #ebeff6 !important;
   width: 100% !important;
   height: 24px !important;
 }
+
 ::v-deep .el-collapse-item__arrow {
   position: relative;
   color: #2e6bc8;
   right: 97%;
 }
+
 ::v-deep .el-table td.el-table__cell {
   border: none;
   font-size: 14px !important;
   font-weight: 400 !important;
   color: #000 !important;
 }
+
 ::v-deep .el-table__row {
   height: 35px !important;
 }
+
 ::v-deep .el-table .el-table__header-wrapper th {
   border-bottom: none;
   border-right: 1px solid #c1cce3;
@@ -528,6 +515,7 @@ onBeforeRouteUpdate((to,from)=>{
   color: #505870;
   font-size: 14px;
 }
+
 .collapseItem_title {
   position: relative;
   left: 40px;
@@ -535,16 +523,19 @@ onBeforeRouteUpdate((to,from)=>{
   font-family: Inter-Medium;
   font-size: 12px;
 }
+
 // 表格右边3个靠右对齐
 ::v-deep .el-table__header thead tr th {
   font-family: Inter-Medium;
   font-size: 14px;
   color: #505870;
   text-align: right;
+
   &:nth-child(1) {
     text-align: left;
   }
 }
+
 // ::v-deep .el-table__body tbody [class*="column_2"] {
 //   text-align: right;
 // }
@@ -562,16 +553,19 @@ onBeforeRouteUpdate((to,from)=>{
 // }
 ::v-deep .el-table__body tbody [class*="column_"] {
   text-align: right;
+
   &:nth-child(4n + 1) {
     text-align: left;
   }
 }
+
 //平铺
 .tile_box {
   width: 100%;
   height: 300px;
   display: flex;
   flex-wrap: wrap;
+
   .file_box {
     width: 116px;
     min-height: 138px;
@@ -579,10 +573,12 @@ onBeforeRouteUpdate((to,from)=>{
     display: flex;
     flex-direction: column;
     align-items: center;
+
     .big_file_img {
       width: 100px;
       height: 100px;
     }
+
     span {
       font-size: 14px;
       font-weight: 400;

+ 4 - 4
vite.config.js

@@ -40,16 +40,16 @@ export default defineConfig(({
 				// 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/',
+					// target: 'http://localhost:8080/',
+					target:'http://8.142.173.95:19527/',
 					changeOrigin: true,
 					rewrite: (p) => p.replace(/^\/dev-api/, '')
 				},
 				//websocket代理
 				'/websocket': {
-					target:'ws://8.142.173.95:19527/websocket',
+					// target:'ws://localhost:8080/websocket',
 					// target:'ws://192.168.1.28:8080/websocket',
-					// target:'ws://192.168.1.11:8080/websocket',
+					target:'ws://8.142.173.95:19527/websocket',
 					changeOrigin: true,
 					rewrite: (p) => p.replace(/^\/websocket/, '')
 				}