添加文件统计
This commit is contained in:
		
							parent
							
								
									5c6c0ecc10
								
							
						
					
					
						commit
						dd5d08824d
					
				| 
						 | 
				
			
			@ -8,8 +8,7 @@ const pageList = (params)=>getAction("/file/pageList",params);
 | 
			
		|||
const uoloadFile = (params)=>uploadAction("/file/uoloadFile",params);
 | 
			
		||||
const verifyFileExist = (params)=>getAction("/file/verifyFileExist",params);
 | 
			
		||||
const fullTextSearching = (params)=>getAction("/file/fullTextSearching",params);
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
const countFileNum = (params)=>getAction("/file/countFileNum",params);
 | 
			
		||||
export {
 | 
			
		||||
    downloadFile,
 | 
			
		||||
    filePreview,
 | 
			
		||||
| 
						 | 
				
			
			@ -17,7 +16,8 @@ export {
 | 
			
		|||
    pageList,
 | 
			
		||||
    uoloadFile,
 | 
			
		||||
    verifyFileExist,
 | 
			
		||||
    fullTextSearching
 | 
			
		||||
    fullTextSearching,
 | 
			
		||||
    countFileNum
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -33,7 +33,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">598</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.total}}</div>
 | 
			
		||||
                                    <div>文件总数</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -44,7 +44,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">20</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.pictures}}</div>
 | 
			
		||||
                                    <div>图片</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -55,7 +55,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">45</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.audio}}</div>
 | 
			
		||||
                                    <div>音频</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -66,7 +66,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">98</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.dbfile}}</div>
 | 
			
		||||
                                    <div>数据库文件</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -77,7 +77,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">112</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.video}}</div>
 | 
			
		||||
                                    <div>视频</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -88,7 +88,7 @@
 | 
			
		|||
                                    <img style="margin-top: 10px;" :src="guaz" />
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                                <a-col :span="12">
 | 
			
		||||
                                    <div style="margin-top: 14px">36</div>
 | 
			
		||||
                                    <div style="margin-top: 14px">{{fileNum.document}}</div>
 | 
			
		||||
                                    <div>文档</div>
 | 
			
		||||
                                </a-col>
 | 
			
		||||
                            </a-row>
 | 
			
		||||
| 
						 | 
				
			
			@ -137,7 +137,7 @@
 | 
			
		|||
import uploadModal from './modules/uploadModal'
 | 
			
		||||
import guaz from '@assets/guaz.png'
 | 
			
		||||
import {createDir,logicDelDir,renameDir,dirtreeList} from '@/api/dirapi'
 | 
			
		||||
import {downloadFile,filePreview,logicDeleteFile,pageList,uoloadFile} from '@/api/fileapi'
 | 
			
		||||
import {downloadFile,filePreview,logicDeleteFile,pageList,uoloadFile,countFileNum} from '@/api/fileapi'
 | 
			
		||||
export default {
 | 
			
		||||
    name: "fileManage",
 | 
			
		||||
    components: {
 | 
			
		||||
| 
						 | 
				
			
			@ -223,12 +223,21 @@ export default {
 | 
			
		|||
                "pageNum":"",
 | 
			
		||||
                "pageSize":"",
 | 
			
		||||
            },
 | 
			
		||||
            fileNum:{
 | 
			
		||||
                document:0,
 | 
			
		||||
                pictures:0,
 | 
			
		||||
                video:0,
 | 
			
		||||
                dbfile:0,
 | 
			
		||||
                audio:0,
 | 
			
		||||
                total:0
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
    created() {
 | 
			
		||||
    },
 | 
			
		||||
    mounted() {
 | 
			
		||||
        this.getDirList();
 | 
			
		||||
        this.getcountFileNum();
 | 
			
		||||
	},
 | 
			
		||||
    computed: {
 | 
			
		||||
        
 | 
			
		||||
| 
						 | 
				
			
			@ -243,6 +252,40 @@ export default {
 | 
			
		|||
            this.$refs.modalForm.title = "文件上传";
 | 
			
		||||
            this.$refs.modalForm.dirId = this.searchFile.dirId;
 | 
			
		||||
        },
 | 
			
		||||
        getcountFileNum(){
 | 
			
		||||
            var that = this;
 | 
			
		||||
            countFileNum({}).then((res) => {
 | 
			
		||||
                if (res.success) {
 | 
			
		||||
                    res.result.forEach((item,index)=>{
 | 
			
		||||
                        that.setcountFileNum(item);
 | 
			
		||||
                    })
 | 
			
		||||
                } else {
 | 
			
		||||
                    this.$message.warning(res.message);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        },
 | 
			
		||||
        setcountFileNum(item){
 | 
			
		||||
            switch (item.FILETYPE) {
 | 
			
		||||
                case "document":
 | 
			
		||||
                    this.fileNum.document = item.NUMS
 | 
			
		||||
                    break;
 | 
			
		||||
                case "pictures":
 | 
			
		||||
                    this.fileNum.pictures = item.NUMS
 | 
			
		||||
                    break;
 | 
			
		||||
                case "video":
 | 
			
		||||
                    this.fileNum.video = item.NUMS
 | 
			
		||||
                    break;
 | 
			
		||||
                case "dbfile":
 | 
			
		||||
                    this.fileNum.dbfile = item.NUMS
 | 
			
		||||
                    break;
 | 
			
		||||
                case "audio":
 | 
			
		||||
                    this.fileNum.audio = item.NUMS
 | 
			
		||||
                    break;  
 | 
			
		||||
                case "total":
 | 
			
		||||
                    this.fileNum.total = item.NUMS
 | 
			
		||||
                    break;  
 | 
			
		||||
            }
 | 
			
		||||
        },
 | 
			
		||||
        download(item){
 | 
			
		||||
            let apiBaseUrl = window._CONFIG['domianURL'] || "/jeecg-boot";
 | 
			
		||||
            window.open(apiBaseUrl+"/file/downloadFile?fileId="+item.id);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user