소스 검색

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

liuQiang 1 년 전
부모
커밋
feabaa265e
3개의 변경된 파일15개의 추가작업 그리고 27개의 파일을 삭제
  1. 9 22
      src/layout/indexCommon.vue
  2. 1 1
      src/router/index.js
  3. 5 4
      src/views/search/index.vue

+ 9 - 22
src/layout/indexCommon.vue

@@ -518,30 +518,17 @@ const clickTab = (item) => {
     if (toFileData.value) {
       localStorage.setItem("inChat",0)
       // 去全文搜索单独判断
-      if(toFileData.value.name == "全局搜索" || toFileData.value.label == "全局搜索"){
-        // console.log("clickRowId.value", JSON.stringify(toRaw(toFileData.value).clickRowId));
+      if(toFileData.value.name == "全局搜索"){
+        // console.log("clickRowId.value", JSON.stringify(toRaw(toFileData.value).clickRowId)); 
         editableTabsValue.value = toFileData.value.path
         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),
-            },
-         });
-        }
+        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

+ 1 - 1
src/router/index.js

@@ -127,7 +127,7 @@ export const constantRoutes = [{
 			title: '全文搜索',
 			icon: 'dashboard'
 		},
-		props: true
+		// props: true
 	},
 	// {
 	// 	path: "/myfile",

+ 5 - 4
src/views/search/index.vue

@@ -135,15 +135,16 @@ onMounted(() => {
   // console.log( history.state, 'route');
   const JparData = history.state.clickRowId
   const parData = JSON.parse(JparData)
-  console.log(parData, 'parData');
+  // console.log(parData, 'parData');
   searchText.value = parData.searchText;
   let searchData = parData.searchData;
-  console.log("searchData", searchData);
+  // console.log("searchData", searchData);
   baseData.value = searchData.rows;
   tableData.value = searchData.rows;
+  console.log(baseData.value,tableData.value,'value');
   total.value = searchData.total;
   changeSearchFor(searchFor.value);
-  console.log("total", baseData.value);
+  // console.log("total", baseData.value);
 });
 const tableData = ref([]);
 // 切换搜索范围
@@ -259,7 +260,7 @@ const setIcon = (fileType) => {
 const setType = (fileType) => {
   switch (fileType) {
     case "doc":
-      return [".txt", ".ppt", ".pdf", ".docx", ".csv", ".wps", ".xls", '.pptxs'];
+      return [".txt", ".ppt", ".pdf", ".docx", ".csv", ".wps", ".xls", '.pptxs','.dll'];
       break;
     case "img":
       return [".png", ".jpg", ".jpeg"];