فهرست منبع

云盘icon本地化

Karsa 8 ماه پیش
والد
کامیت
8b280408f4

BIN
src/assets/img/cloudDisk/audio_icon.png


BIN
src/assets/img/cloudDisk/config_icon.png


BIN
src/assets/img/cloudDisk/excel_icon.png


+ 0 - 0
src/assets/img/file_icon.png → src/assets/img/cloudDisk/file_icon.png


BIN
src/assets/img/cloudDisk/img_icon.png


BIN
src/assets/img/cloudDisk/pdf_icon.png


BIN
src/assets/img/cloudDisk/ppt_icon.png


BIN
src/assets/img/cloudDisk/video_icon.png


BIN
src/assets/img/cloudDisk/word_icon.png


+ 36 - 2
src/views/report_manage/cloudDisk.vue

@@ -52,7 +52,7 @@
             </template>
             <template slot-scope="{row}">
               <div class="file-name">
-                <img src="~@/assets/img/file_icon.png" />
+                <img :src="iconGetMap(row)" />
                 <span class="active-file-name">{{ row.ItemName }}</span>
               </div>
             </template>
@@ -195,7 +195,17 @@ import 'streamsaver/examples/zip-stream'
         isUploading:false,
         folderPath:'',
         // 选择文件弹窗
-        chooseFolderDiaShow:false
+        chooseFolderDiaShow:false,
+
+        staticFileIco: require('@/assets/img/cloudDisk/file_icon.png'),
+        staticImageIco: require('@/assets/img/cloudDisk/img_icon.png'),
+        staticWordIco: require('@/assets/img/cloudDisk/word_icon.png'),
+        staticExcelIco: require('@/assets/img/cloudDisk/excel_icon.png'),
+        staticPptIco: require('@/assets/img/cloudDisk/ppt_icon.png'),
+        staticPdfIco: require('@/assets/img/cloudDisk/pdf_icon.png'),
+        staticVideoIco: require('@/assets/img/cloudDisk/video_icon.png'),
+        staticAudioIco: require('@/assets/img/cloudDisk/audio_icon.png'),
+        staticConfigIco: require('@/assets/img/cloudDisk/config_icon.png'),
       }
     },
     watch:{
@@ -680,6 +690,30 @@ import 'streamsaver/examples/zip-stream'
           this.downloadFile(row)
         }
         // console.log(type,row);
+      },
+
+      //静态icon资源
+      iconGetMap(item) {
+
+        //文件夹icon
+        if(item.ItemIcon.includes('file_type_menu')) return this.staticFileIco
+        //img icon
+        if(item.ItemIcon.includes('file_type_pic')) return this.staticImageIco
+        //其他icon
+        if(item.ItemIcon.includes('file_type_unknown')) return this.staticConfigIco
+        //音频icon
+        if(item.ItemIcon.includes('file_type_audio')) return this.staticAudioIco
+        //视频icon
+        if(item.ItemIcon.includes('file_type_video')) return this.staticVideoIco
+        //word icon
+        if(item.ItemIcon.includes('file_type_docx')) return this.staticWordIco
+        //excel icon
+        if(item.ItemIcon.includes('file_type_xlsx')) return this.staticExcelIco
+        //ppt icon
+        if(item.ItemIcon.includes('file_type_ppt')) return this.staticPptIco
+        //pdf icon
+        if(item.ItemIcon.includes('file_type_pdf')) return this.staticPdfIco
+
       }
     },
     created(){