Explorar o código

g更新代码

liuQiang hai 1 ano
pai
achega
436af552db
Modificáronse 4 ficheiros con 26 adicións e 93 borrados
  1. 3 0
      src/utils/request.js
  2. 16 16
      src/views/department/MyFile.vue
  3. 7 3
      src/views/myfile/MyFile.vue
  4. 0 74
      vite.config.js

+ 3 - 0
src/utils/request.js

@@ -93,6 +93,9 @@ service.interceptors.response.use(res => {
         isRelogin.show = false;
       });
     }
+    // 清楚缓存
+    sessionStorage.clear()
+    localStorage.clear()
     return Promise.reject('无效的会话,或者会话已过期,请重新登录。')
   } else if (code === 500) {
     ElMessage({ message: msg, type: 'error' })

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

@@ -527,14 +527,14 @@ export default {
                 img: ImgFile.previewIcon,
                 name: "预览"
             },
-            {
-                img: ImgFile.addolder,
-                name: "移动到...",
-            },
-            {
-                img: ImgFile.copy,
-                name: "复制到...",
-            },
+            // {
+            //     img: ImgFile.addolder,
+            //     name: "移动到...",
+            // },
+            // {
+            //     img: ImgFile.copy,
+            //     name: "复制到...",
+            // },
             // {
             //     img: ImgFile.clipboard,
             //     name: "粘贴"
@@ -555,18 +555,18 @@ export default {
             //     img: ImgFile.goon,
             //     name: "发送"
             // },
-            {
-                img: ImgFile.share,
-                name: "分享"
-            },
+            // {
+            //     img: ImgFile.share,
+            //     name: "分享"
+            // },
             {
                 img: ImgFile.notePencil,
                 name: "在线编辑"
             },
-            {
-                img: ImgFile.togger,
-                name: "协作"
-            },
+            // {
+            //     img: ImgFile.togger,
+            //     name: "协作"
+            // },
             {
                 img: ImgFile.icc,
                 name: "文字识别"

+ 7 - 3
src/views/myfile/MyFile.vue

@@ -4,13 +4,14 @@
             <div  class="settingBox" @click="mouseClick">
                 <!-- 设置盒子顶部搜索 -->
                 <div class="topSearch">
-                    <div style="position: relative;">
+                    <!-- <div style="position: relative;">
                         <el-input v-model="searchFire" class="searchFire" size="large" placeholder="搜索文件"
                             style="width: 15rem;" />
                         <el-icon style="color: gray;display: inline-block;position: absolute;top: 8px;right: 5px;">
                             <Search />
                         </el-icon>
-                    </div>
+                    </div> -->
+                    <div class="">{{spaceName}}</div>
                     <div>
                         <el-icon style="font-size: 24px;" @click="createNewMenu(1,true)">
                             <Plus />
@@ -650,6 +651,7 @@ export default {
         const addTab = inject("addTab");
         const addFileTab = inject("addFileTab");
         const addFolderAdd = inject("addFolderAdd");
+        const spaceName = ref()
         // 获取文件夹,中栏,文件
         function getAllTop() {
             documents.getTop(3).then(res => {
@@ -659,6 +661,7 @@ export default {
                 newSpaceId.value = userMe[0].spaceId//变化
                 newDirId.value = userMe[0].dirId//变化
                 topPath.value = userMe[0].dirPath
+                spaceName.value = userMe[0].dirPath
                 let obj = {
                     pageNum: 1,
                     pageSize: 10
@@ -1808,7 +1811,8 @@ export default {
             addFolderAdd,
             addFileTab,
             threeBe,
-            newAdd
+            newAdd,
+            spaceName
         }
     },
     watch: {

+ 0 - 74
vite.config.js

@@ -1,74 +0,0 @@
-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://localhost:8080/',
-					// target:'http://8.142.173.95:19527/',
-					changeOrigin: true,
-					rewrite: (p) => p.replace(/^\/dev-api/, '')
-				},
-				//websocket代理
-				'/websocket': {
-					// target:'ws://localhost:8080/websocket',
-					target:'ws://192.168.1.28:8080/websocket',
-					// target:'ws://8.142.173.95:19527/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();
-							}
-						}
-					}
-				}]
-			}
-		}
-	}
-})