浏览代码

feat:table修改,文件管理修改

ljc 1 月之前
父节点
当前提交
b8f2d26cb4
共有 3 个文件被更改,包括 15 次插入15 次删除
  1. 9 8
      components/cwg-file.vue
  2. 5 1
      components/cwg-tabel.vue
  3. 1 6
      pages/mine/components/FileManagementTab.vue

+ 9 - 8
components/cwg-file.vue

@@ -1,20 +1,21 @@
 <template>
     <view class="file-preview">
         <!-- PDF 预览链接 -->
-        <view v-if="isPdfFile" class="pdf-link" @click="handlePreviewPdf">
-            <uni-icons type="document" size="20" color="#ff0000"></uni-icons>
-            <text class="pdf-text">{{ displayFileName }}</text>
-        </view>
+<!--        <view v-if="isPdfFile" class="pdf-link" @click="handlePreviewPdf">-->
+<!--            <uni-icons type="document" size="20" color="#ff0000"></uni-icons>-->
+<!--            <text class="pdf-text">{{ displayFileName }}</text>-->
+<!--        </view>-->
 
         <!-- 图片预览 -->
-        <view v-else-if="isImageFile" class="image-preview">
-            <image :src="fullPath" mode="aspectFill" class="preview-image" @click.stop="handlePreviewImage" />
+        <view v-if="isImageFile" class="image-preview">
+          <image :src="fullPath" mode="aspectFill" class="preview-image" @click.stop="handlePreviewImage" />
         </view>
 
         <!-- 其他文件类型 -->
         <view v-else class="file-info">
-            <uni-icons type="folder" size="20" color="#007aff"></uni-icons>
-            <text class="file-name">{{ displayFileName }}</text>
+          <cwg-icon icon="crm-document" :size="24" color="#000" />
+<!--            <uni-icons type="folder" size="20" color="#007aff"></uni-icons>-->
+<!--            <text class="file-name">{{ displayFileName }}</text>-->
         </view>
     </view>
 </template>

+ 5 - 1
components/cwg-tabel.vue

@@ -517,9 +517,13 @@ const toggleRowExpand = (rowIndex) => {
 // 打开详情弹窗(移动端使用)
 // 修改 openRowDetail
 const openRowDetail = (row) => {
+
     if (props.isPages) {
         emit('go-pages', row)
-    } else {
+    } else if (!isMobile.value){
+      // 只有移动端才打开详情弹窗
+      return
+    }else {
         // 保存当前行和需要显示的列(有 prop 且有 label) pc 详情不展示操作按钮
         detailRow.value = { ...row, note: getNoteText(row, locale.value, userStore) }
         detailColumns.value = !isMobile.value ? props.columns.filter(col => col && col.prop && col.label && col.type !== 'action') : props.columns.filter(col => col && col.prop && col.label)

+ 1 - 6
pages/mine/components/FileManagementTab.vue

@@ -91,16 +91,11 @@ const isSHowBtn = computed(() => {
 
 // 表格列配置
 const columns = computed(() => [
-    {
-        prop: 'id',
-        label: 'ID',
-        align: 'left'
-    },
     {
         prop: 'path',
         label: t('PersonalManagement.Label.Document'),
         type: 'file',
-        align: 'left'
+        align: 'center'
     },
     {
         prop: 'type',