master
parent
6a7efc2f64
commit
adfb1a20df
@ -0,0 +1,9 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function getFiles(params) {
|
||||
return request({
|
||||
url: '/api/admin/other/accept_file_list',
|
||||
method: 'get',
|
||||
params:params
|
||||
})
|
||||
}
|
||||
@ -0,0 +1,98 @@
|
||||
<template>
|
||||
<div style="padding: 0 20px">
|
||||
<div ref="lxHeader">
|
||||
<lx-header icon="md-apps" text="文件管理" style="margin-bottom: 10px; border: 0px; margin-top: 15px">
|
||||
<slot>
|
||||
<div style="display: flex;justify-content: flex-start;flex-wrap: wrap;">
|
||||
<Input v-model="select.keyword" clearable style="width: 200px;margin-right: 10px;" placeholder="关键字搜索" />
|
||||
<Button type="primary" @click="getList">查询</Button>
|
||||
</div>
|
||||
</slot>
|
||||
</lx-header>
|
||||
</div>
|
||||
<!-- @cell-click="cellClicks" -->
|
||||
<xy-table
|
||||
:list="list"
|
||||
:total="total"
|
||||
stripe
|
||||
@pageSizeChange="e => {select.page_size = e,getList()}"
|
||||
@pageIndexChange="e => {select.page = e,getList()}"
|
||||
:table-item="table">
|
||||
<template v-slot:btns>
|
||||
<div></div>
|
||||
<el-table-column fixed="right" align='left' label="操作" width="180" header-align="center">
|
||||
<template slot-scope="scope">
|
||||
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small">新增计划</Button>
|
||||
|
||||
<Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small">新增任务</Button>
|
||||
|
||||
<!-- <Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="showPlan(scope.row.id)">查看</Button> -->
|
||||
<!-- <Button type="primary" style='margin-right:5px;margin-bottom:5px;' size="small" @click="editorPlan(scope.row.id,'editor')">编辑</Button> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</template>
|
||||
</xy-table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getFiles
|
||||
} from '@/api/oafile/index.js'
|
||||
|
||||
export default{
|
||||
components:{
|
||||
},
|
||||
data(){
|
||||
return{
|
||||
select:{
|
||||
keyword:'',
|
||||
page:1,
|
||||
page_size:10,
|
||||
},
|
||||
total:0,
|
||||
table:[{
|
||||
label:"文件名称",
|
||||
prop:'name',
|
||||
align:'left',
|
||||
customFn:(row)=>{
|
||||
return(<a href={row.url} target="_blank">{row.name}</a>)
|
||||
}
|
||||
// width:200
|
||||
},{
|
||||
label:"来源",
|
||||
prop:'from',
|
||||
width:120,
|
||||
},{
|
||||
label:"创建日期",
|
||||
prop:'created_at',
|
||||
width:120,
|
||||
formatter:(cell,data,value,index)=>{
|
||||
return value?value.substring(0,11):''
|
||||
}
|
||||
}],
|
||||
list:[],
|
||||
}
|
||||
},
|
||||
created(){
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
async getList(){
|
||||
const res = await getFiles({...this.select})
|
||||
this.list = res.data
|
||||
this.total = res.total
|
||||
}
|
||||
},
|
||||
watch:{}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/deep/ .el-icon-circle-close{
|
||||
color:#fff
|
||||
}
|
||||
/* /deep/ .el-table__body tr.el-table__row--striped td {
|
||||
background-color: #C0C4CC!important;
|
||||
} */
|
||||
</style>
|
||||
Loading…
Reference in new issue