scorpio 2 роки тому
батько
коміт
778c953885

+ 1 - 1
src/api/project/index.js

@@ -46,7 +46,7 @@ export default {
     return fetch('/blade-project-manage-v2/qrcode/v2/grantLog', params)
   },
   findFiles (params) { // 文件搜索
-    return fetch('/blade-project-manage-v2/bladefile/v2/findFileList', params)
+    return fetch('/blade-project-manage-v2/folder/v2/findFile', params)
   },
   folderListAll (params) { // 历史数据文件夹列表
     return fetch('/blade-project-manage-v2/folder/v2/history', params)

+ 7 - 1
src/layout/top.vue

@@ -40,7 +40,7 @@
         </div>
       </el-col>
     </el-row>
-    <el-dialog v-model='show' append-to-body width='35%'>
+    <el-dialog v-model='show' append-to-body width='35%' @close='close'>
       <div class="flex flex-col">
         <div class="flex flex-center">
           <div class="mr-5">
@@ -266,6 +266,12 @@ export default {
         this.imgList = [res.url]
         this.showImage = true
       }
+    },
+    /**
+     * 高级搜索框关闭
+     */
+    close () {
+      this.params.keyword = ''
     }
   }
 }

+ 1 - 1
src/page/login.vue

@@ -167,7 +167,7 @@ export default {
   created () {
     this.permission.cleanPermission()
     // fixme prod 环境暂时开启账号登录功能
-    this.dev = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('https://dev.wutongshucloud.com/') > -1
+    this.dev = window.location.href.indexOf('localhost') > -1 || window.location.href.indexOf('https://dev.wutongshucloud.com/') > -1 || window.location.href.indexOf('192.168.31') > -1
     removeToken()
     this.init()
   },

+ 3 - 3
src/views/home/component/files_list.vue

@@ -208,7 +208,7 @@ export default {
           this.imgList.push(item.url)
           return
         }
-        const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: item.fileId, search: true } })
+        const routeData = this.$router.resolve({ path: '/home/file_detail', query: { id: item.fileId } })
         window.open(routeData.href, '_blank')
       } else {
         this.query.id = item.id
@@ -316,7 +316,7 @@ export default {
       this.imgList = []
     },
     removeFile (item) {
-      if (item.type === '1') {
+      if (item.type === 1) {
         this.$confirm('确认是否删除所选文件/文件夹?', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
@@ -332,7 +332,7 @@ export default {
               }
             })
           })
-      } else if (item.type === '2') {
+      } else if (item.type === 2) {
         this.$confirm('确认是否删除所选文件/文件夹?', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',

+ 6 - 2
src/views/home/component/folder_info.vue

@@ -198,6 +198,10 @@ export default {
     this.projectId = this.$route.query.id
     this.getFolderList()
     this.queryCreateFolder()
+    this.$bus.on('reFolder', () => {
+      console.log('reFolder')
+      this.getFolderList()
+    })
   },
   methods: {
     queryCreateFolder () {
@@ -250,11 +254,11 @@ export default {
         setTimeout(() => {
           const data = {
             projectId: this.id,
-            keyWord: this.keyWords
+            keyword: query
           }
           this.$api.project.findFiles(Object.assign(data, this.page)).then(res => {
             if (res.code === 200) {
-              this.findData = res.data.records.map(sub => {
+              this.findData = res.data.map(sub => {
                 const dataItem = {}
                 dataItem.label = sub.title
                 if (['png', 'jpg', 'jpeg'].includes(sub.suffix)) {

+ 1 - 0
src/views/home/files.vue

@@ -42,6 +42,7 @@ export default {
       this.getFileList()
     })
     this.$bus.on('reFolder', () => {
+      console.log('reFolder')
       this.getFolderAll()
     })
   },

+ 16 - 11
vite.config.js

@@ -1,4 +1,6 @@
-import { defineConfig } from 'vite'
+import {
+  defineConfig
+} from 'vite'
 import vue from '@vitejs/plugin-vue'
 import Pages from 'vite-plugin-pages'
 import Layouts from 'vite-plugin-vue-layouts'
@@ -8,15 +10,18 @@ import path from 'path'
 export default defineConfig({
   plugins: [
     vue(),
-    Pages(
-      {
-        dirs: [
-          { dir: 'src/page', baseRoute: '' },
-          { dir: 'src/views', baseRoute: '' }
-        ],
-        exclude: ['**/component/*.vue'] // 排除组件
-      }
-    ),
+    Pages({
+      dirs: [{
+          dir: 'src/page',
+          baseRoute: ''
+        },
+        {
+          dir: 'src/views',
+          baseRoute: ''
+        }
+      ],
+      exclude: ['**/component/*.vue'] // 排除组件
+    }),
     Layouts({
       layoutsDirs: 'src/layout',
       defaultLayout: 'index'
@@ -42,4 +47,4 @@ export default defineConfig({
       }
     }
   }
-})
+})