scorpio 2 ani în urmă
părinte
comite
1d9756976b

+ 13 - 6
src/components/filepicker/index.vue

@@ -90,7 +90,7 @@
           <el-tabs
             v-model="activeName"
             tab-position="left"
-            @tab-change="tabClick"
+            @tab-change="tabClick(true)"
           >
             <el-tab-pane label="最近上传" name="1"></el-tab-pane>
             <el-tab-pane label="全部文件" name="2"></el-tab-pane>
@@ -187,7 +187,7 @@ export default {
     stageId: {
       handler(val) {
         if (this.activeName === '2') {
-          this.tabClick()
+          this.tabClick(true)
         }
       },
       immediate: false
@@ -239,7 +239,10 @@ export default {
     }
   },
   methods: {
-    tabClick() {
+    tabClick(initPage) {
+      if (initPage) {
+        this.page.current = 1
+      }
       this.list.length = 0
       if (this.activeName === '1') {
         this.isLatest = 0
@@ -247,9 +250,13 @@ export default {
         this.tips = '最近15天内上传的文件'
         this.fetchData()
       } else if (this.activeName === '2') {
-        this.isLatest = 0
+        this.isLatest = ''
         this.dictKey = ''
-        this.getFolderList()
+        if (this.topFolder) {
+          this.getFolderList()
+        } else {
+          this.getFileList(this.currentRow)
+        }
       } else if (this.activeName === '3') {
         this.isLatest = ''
         this.dictKey = 1
@@ -356,7 +363,7 @@ export default {
     },
     currentChange(current) {
       this.page.current = current
-      this.tabClick()
+      this.tabClick(false)
     },
     uploadSuccess(res) {
       this.getFileList(this.currentRow)

+ 29 - 8
src/views/resource/component/row1.vue

@@ -4,13 +4,29 @@
       v-if="index === 0"
       class="flex flex-align-center flex-justify-start full-height padding-left cell"
     >
-      <el-checkbox
-        v-if="showCheckBox"
-        v-model="info.checked"
-        :disabled="folderChecked === false && row.type === 2"
-        class="padding-right"
-        @change="rowChecked(row)"
-      />
+      <!--      <el-checkbox-->
+      <!--        v-if="showCheckBox"-->
+      <!--        v-model="info.checked"-->
+      <!--        :disabled="folderChecked === false && row.type === 2"-->
+      <!--        class="padding-right"-->
+      <!--        @change="rowChecked(row)"-->
+      <!--      />-->
+
+      <div v-if="showCheckBox" class="margin">
+        <el-icon
+          v-if="folderChecked === false && row.type === 2"
+          size="18"
+          color="grey"
+          ><Remove
+        /></el-icon>
+        <div v-else>
+          <el-icon v-if="info.checked" color="red" size="18px"
+            ><CircleCheckFilled
+          /></el-icon>
+          <el-icon v-else color="grey" size="18px"><CircleCheck /></el-icon>
+        </div>
+      </div>
+
       <div v-else style="width: 24px" />
       <div v-if="info.type === 2">
         <img
@@ -41,7 +57,11 @@
         />
         <img v-else src="../../../assets/svg/folder/other.svg" />
       </div>
-      {{ info[column.prop] }}
+      <el-tooltip :content="info[column.prop]">
+        <div class="lines-2 padding-right">
+          {{ info[column.prop] }}
+        </div>
+      </el-tooltip>
     </div>
     <div
       v-else
@@ -91,6 +111,7 @@ export default {
   },
   methods: {
     rowChecked(res) {
+      this.info.checked = res
       this.$emit('row-change', res)
     }
   }

+ 2 - 2
vite.config.js

@@ -57,8 +57,8 @@ export default defineConfig({
     proxy: {
       '/api': {
         // 正式环境地址
-        target: 'https://dev.wutongresearch.club/api',
-        // target: 'https://prod.wutongshucloud.com/api',
+        // target: 'https://dev.wutongresearch.club/api',
+        target: 'https://prod.wutongshucloud.com/api',
         // target: 'http://192.168.31.181:8110',
         changeOrigin: true,
         rewrite: path => path.replace(/^\/api/, '')