master
lion 1 year ago
parent d703018ec9
commit fae1bb9362

@ -2,7 +2,7 @@
<div>
<div class="statistics">
<panel-group :totaldata="list" />
<!-- <panel-group :totaldata="list" /> -->
</div>

@ -11,6 +11,9 @@
</div>
<div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
</div>
<div>
<el-button type="primary" size="small" @click="resetSearch"></el-button>
</div>
<div v-if="catalogList.length>0">
<el-button type="primary" size="small" @click="editIndex('add')"></el-button>
@ -30,7 +33,17 @@
</div>
<div class="catalog_right">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange"
:table-item="table_item">
:table-item="table_item">
<template v-slot:catalog_name>
<el-table-column align='left' label="所属目录" width="120" header-align="center">
<template slot-scope="scope">
<div v-if="scope.row.catalog_id_details && scope.row.catalog_id_details.length>0">
<el-tag style="margin-right:5px;margin-bottom:5px" v-for="item in scope.row.catalog_id_details">
{{item.name}}</el-tag>
</div>
</template>
</el-table-column>
</template>
<template v-slot:area_name>
<el-table-column align='left' label="所属区域" width="240" header-align="center">
<template slot-scope="scope">
@ -53,13 +66,13 @@
</template>
<template v-slot:btns>
<el-table-column align='center' fixed="right" label="操作" width="240" header-align="center">
<el-table-column align='left' fixed="right" label="操作" width="240" header-align="center">
<template slot-scope="scope">
<!-- <el-button type="primary" size="small" @click="editIndex('child',scope.row.id,scope.row.name)"></el-button> -->
<el-button type="primary" size="small" @click="showIndex('show',scope.row.id)"></el-button>
<el-button v-if="stateObj.login_id===scope.row.admin_id" type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-popconfirm v-if="stateObj.login_id===scope.row.admin_id" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button v-if="stateObj.login_id===scope.row.admin_id || stateObj.roles.includes('admin')" type="primary" size="small" @click="editIndex('editor',scope.row.id)"></el-button>
<el-popconfirm v-if="stateObj.login_id===scope.row.admin_id || stateObj.roles.includes('admin')" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?">
<el-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm>
</template>
@ -107,19 +120,20 @@
catalogList: [],
table_item: [{
type: 'index',
width: 50
width: 50,
fixed:'left'
}, {
prop: 'title',
label: '标题',
align: 'left',
width: 360
},
// {
// prop: 'catalog_name',
// label: '',
// align: 'center',
// width: 120
// },
{
prop: 'catalog_name',
label: '所属目录',
align: 'center',
width: 120
},
{
prop: 'area_name',
label: '区域',
@ -196,6 +210,12 @@
this.select.page_size = e
this.select.page = 1
this.getList()
},
resetSearch(){
this.select.page = 1
this.select.title = ''
this.select.catalog_id = ''
this.getList()
},
async getList() {
const res = await index({
@ -203,7 +223,9 @@
page: this.select.page,
table_name: this.select.table_name,
json_data_fields: ['files', 'area_ids', 'tag_ids', 'catalog_id'],
is_auth: 1,
is_auth: 1,
sort_type:'DESC',
sort_name:'date',
filter: [{
"key": "title",
"op": "like",

Loading…
Cancel
Save