فهرست منبع

t:LLMerge branch 'liuqiang' into v3
n empty message aborts: the commit.

liuQiang 1 سال پیش
والد
کامیت
1537388b5d

+ 23 - 9
src/layout/indexCommon.vue

@@ -518,16 +518,30 @@ const clickTab = (item) => {
     if (toFileData.value) {
       localStorage.setItem("inChat",0)
       // 去全文搜索单独判断
-      if(toFileData.value.name == "全局搜索"){
-        console.log("clickRowId.value", JSON.stringify(toRaw(toFileData.value).clickRowId));
+      if(toFileData.value.name == "全局搜索" || toFileData.value.label == "全局搜索"){
+        // console.log("clickRowId.value", JSON.stringify(toRaw(toFileData.value).clickRowId));
         editableTabsValue.value = toFileData.value.path
-        router.push({
-          name: toFileData.value.path,
-          state: {
-            // row: JSON.stringify(toRaw(toFileData.value.clickRowId)),
-            clickRowId: JSON.stringify(toRaw(toFileData.value).clickRowId),
-          },
-      });
+        isAlive.value = true
+        console.log('route',route.path);
+        // 如果当前已经在search就跳到中转页面
+        if(route.path == "/search"){
+          router.push({
+            path: '/allback',
+            query: {
+              // row: JSON.stringify(toRaw(toFileData.value.clickRowId)),
+              clickRowId: JSON.stringify(toRaw(toFileData.value).clickRowId),
+            },
+         });
+        }else{
+          // 否则去search
+          router.push({
+            name: toFileData.value.path,
+            state: {
+              // row: JSON.stringify(toRaw(toFileData.value.clickRowId)),
+              clickRowId: JSON.stringify(toRaw(toFileData.value).clickRowId),
+            },
+         });
+        }
         return
       }
       editableTabsValue.value = toFileData.value.path

+ 3 - 3
src/views/department/MyFile.vue

@@ -87,8 +87,8 @@
                                 </span>
                             </div>
                         </div>
-                        <div v-if="thisFolder.dirType"
-                            style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
+                        <div v-if="!thisFolder.dirType"
+                            style="display: flex;width: 82px;opacity:0.5;height: 32px;justify-content: flex-start;align-items: center;">
                             <div style="margin-left: 5px;">
                                 <el-icon
                                     style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
@@ -101,7 +101,7 @@
                             </div>
                         </div>
                         <div v-else
-                            style="display: flex;opacity:0.5;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
+                            style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
                             <div style="margin-left: 5px;">
                                 <el-icon
                                     style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"

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

@@ -9,13 +9,13 @@ import { useRouter, useRoute } from "vue-router";
 onMounted(() => {
   let router = useRouter();
   let route = useRoute();
-  const searchText = route.params.searchText;
-  const searchData = route.params.searchData;
-  router.replace({
-    path: "/search",
-    query: {
-      searchData: searchData,
-      searchText: searchText,
+  const JparData = route.query.clickRowId;
+  // console.log(JparData, 'allbackparData');
+  router.push({
+    name: 'search',
+    state: {
+      // row: JSON.stringify(toRaw(toFileData.value.clickRowId)),
+      clickRowId: JparData,
     },
   });
 });

+ 1 - 0
src/views/login.vue

@@ -277,6 +277,7 @@ async function handleLogin() {
           console.log("infoRes", infoRes);
           // console.log('loginres',res);
           if (infoRes.repass) {
+            // Cookies.remove('Admin-Token')
             //需要该密
             showEdit.value = true;
             loading.value = false;

+ 5 - 17
src/views/myfile/MyFile.vue

@@ -7,7 +7,7 @@
                     
                     <div class="spaceName">{{spaceName}}</div>
                     <div>
-                        <el-icon @click="createNewMenu(0)" color="#505870" size="24">
+                        <el-icon @click="createNewMenu(1)" color="#505870" size="24">
                             <Plus />
                         </el-icon>
                         <!-- @click="createNewFile" -->
@@ -106,7 +106,7 @@
                                 </span>
                             </div>
                         </div>
-                        <div v-if="thisFolder.dirType"
+                        <div v-if="thisFolder.dirType" class="shouzhi"
                             style="display: flex;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
                             <div style="margin-left: 5px;">
                                 <el-icon
@@ -119,7 +119,7 @@
                                 <span style="font-size: 14px;" class="shouzhi">新建</span>
                             </div>
                         </div>
-                        <div v-else
+                        <div v-else class="shouzhi"
                             style="display: flex;opacity:0.5;width: 82px;height: 32px;justify-content: flex-start;align-items: center;">
                             <div style="margin-left: 5px;">
                                 <el-icon
@@ -137,7 +137,7 @@
                             <div style="margin-left: 5px;">
                                 <el-icon
                                     style="background-color: #7084B4;width: 24px;height: 24px;border-radius: 50%;color: white;"
-                                    @click="thisFolder.dirType?createNewMenu(1):null">
+                                    @click="thisFolder.dirType?createNewMenu(2):null">
                                     <Plus />
                                 </el-icon>
                             </div>
@@ -524,18 +524,6 @@ export default {
             }
         ])
         let useMenu = ref([
-            // {
-            //     img: ImgFile.copy,
-            //     name: "复制"
-            // },
-            // {
-            //     img: ImgFile.clipboard,
-            //     name: "粘贴"
-            // },
-            {
-                img: ImgFile.share,
-                name: "分享给"
-            },
             {
                 img: ImgFile.trash,
                 name: "删除"
@@ -993,7 +981,7 @@ export default {
             anyP.value = false
         }
         function createNewMenu(num) {
-            if(num==1) {
+            if(num==2) {
                 newAdd.value = true
             }else{
                 oneOrTwo.value = num

+ 11 - 1
src/views/search/index.vue

@@ -91,7 +91,7 @@
 </template>
 
 <script setup>
-import { onMounted, ref, toRaw, inject } from "vue";
+import { onMounted, ref, toRaw, inject ,watch} from "vue";
 import { search } from "@/api/search/search.js";
 import { flieSearch } from "@/api/search/search.js";
 import { useRoute, useRouter, onBeforeRouteUpdate } from "vue-router";
@@ -118,6 +118,7 @@ const searchText = ref(""); //搜索ipt的值
 const baseData = ref(); //搜索出的原始数据
 const isAsc = ref("asc");
 const router = useRouter(); //注册路由
+const route = useRoute(); //注册路由
 
 //---------分页--------------
 const total = ref(0);
@@ -125,6 +126,9 @@ const page = ref(1);
 const limit = ref(2); //pagesize
 //---------------------------
 
+const historyParams  = history.state.params
+console.log('historyParams',historyParams);
+
 const reload = inject("reload");
 onMounted(() => {
   // let route = useRoute();
@@ -293,6 +297,12 @@ onBeforeRouteUpdate((to, from) => {
   console.log('to', to);
   console.log('from', from);
 })
+watch(() => history, (newValue, oldValue) => {
+  console.log('history 发生改变了', newValue, oldValue);
+}, {
+  immediate: true,
+  deep: true
+});
 </script>
 
 <style lang="scss" scoped>