Commit bc882f9d authored by huangjie's avatar huangjie

*

parent 38fcfe24
......@@ -133,3 +133,12 @@ export function deptTreeSelect() {
method: 'get'
})
}
// 用户文件记录列表
export function fileList(data) {
return request({
url: '/user/file/record/list',
method: 'get',
params:data
})
}
......@@ -53,6 +53,38 @@
</el-tab-pane>
</el-tabs>
</el-card>
<el-card style="margin-top: 16px" v-if="tableDataTotal > 0">
<div slot="header" class="clearfix">
<span>数据导出</span>
</div>
<skeleton v-if="isSkeleton" style="padding: 16px"></skeleton>
<div class="table-item">
<el-table
class="fixed-table"
:data="tableData"
element-loading-text="Loading"
v-horizontal-scroll="'hover'"
max-height="640px"
border
highlight-current-row
v-if="tableDataTotal > 0 && !isSkeleton"
>
<el-table-column label="序号" width="60" align="left">
<template slot-scope="scope">{{ (params.pageNum - 1 )* params.pageSize + scope.$index + 1 }}</template>
</el-table-column>
<el-table-column label="导出表格名称" align="left" prop="fileName"></el-table-column>
<el-table-column label="导出时间" align="left" prop="createTime"></el-table-column>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope" align="left">
<div class="wordprimary" style="text-align: left" @click="getFile(scope.row.url)">下载表格</div>
</template>
</el-table-column>
</el-table>
</div>
<div class="pagination-box" v-if="tableDataTotal>params.pageSize">
<el-pagination background :current-page="params.pageNum" :page-size="params.pageSize" :total="tableDataTotal" layout="prev, pager, next, jumper" @current-change="handleCurrentChange" @size-change="handleSizeChange" />
</div>
</el-card>
</el-col>
</el-row>
</div>
......@@ -62,21 +94,27 @@
import userAvatar from "./userAvatar";
import userInfo from "./userInfo";
import resetPwd from "./resetPwd";
import { getUserProfile } from "@/api/system/user";
import { getUserProfile,fileList } from "@/api/system/user";
import skeleton from '@/views/project/projectList/component/skeleton'
export default {
name: "Profile",
components: { userAvatar, userInfo, resetPwd },
components: { userAvatar, userInfo, resetPwd,skeleton },
data() {
return {
user: {},
roleGroup: {},
postGroup: {},
activeTab: "userinfo"
activeTab: "userinfo",
isSkeleton:true,
tableData:[],
tableDataTotal:0,
params:{pageNum:1,pageSize:10},
};
},
created() {
this.getUser();
this.fileList()
},
methods: {
getUser() {
......@@ -85,6 +123,30 @@ export default {
this.roleGroup = response.data.roleGroup;
this.postGroup = response.data.postGroup;
});
},
fileList(){
fileList(this.params).then(res=>{
if(res.code == 200){
this.tableData = res.rows
this.tableDataTotal = res.total
}else{
this.tableData = []
this.tableDataTotal = 0
}
this.isSkeleton = false
})
},
handleCurrentChange(val){
this.params.pageNum = val
this.fileList()
},
handleSizeChange(val){
this.params.pageNum = 1
this.params.pageSize = val
this.fileList()
},
getFile(url){
window.open(url)
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment