master
lion 1 year ago
parent d703018ec9
commit fae1bb9362

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

@ -12,6 +12,9 @@
<div> <div>
<el-button type="primary" size="small" @click="select.page=1,getList()"></el-button> <el-button type="primary" size="small" @click="select.page=1,getList()"></el-button>
</div> </div>
<div>
<el-button type="primary" size="small" @click="resetSearch"></el-button>
</div>
<div v-if="catalogList.length>0"> <div v-if="catalogList.length>0">
<el-button type="primary" size="small" @click="editIndex('add')"></el-button> <el-button type="primary" size="small" @click="editIndex('add')"></el-button>
</div> </div>
@ -31,6 +34,16 @@
<div class="catalog_right"> <div class="catalog_right">
<xy-table :list="list" :total="total" @pageIndexChange="pageIndexChange" @pageSizeChange="pageSizeChange" <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> <template v-slot:area_name>
<el-table-column align='left' label="所属区域" width="240" header-align="center"> <el-table-column align='left' label="所属区域" width="240" header-align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -53,13 +66,13 @@
</template> </template>
<template v-slot:btns> <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"> <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="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 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-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" style="margin:0 10px" @confirm="deleteList(scope.row.id)" title="确定删除吗?"> <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-button type="danger" size="small" slot="reference">删除</el-button>
</el-popconfirm> </el-popconfirm>
</template> </template>
@ -107,19 +120,20 @@
catalogList: [], catalogList: [],
table_item: [{ table_item: [{
type: 'index', type: 'index',
width: 50 width: 50,
fixed:'left'
}, { }, {
prop: 'title', prop: 'title',
label: '标题', label: '标题',
align: 'left', align: 'left',
width: 360 width: 360
}, },
// { {
// prop: 'catalog_name', prop: 'catalog_name',
// label: '', label: '所属目录',
// align: 'center', align: 'center',
// width: 120 width: 120
// }, },
{ {
prop: 'area_name', prop: 'area_name',
label: '区域', label: '区域',
@ -197,6 +211,12 @@
this.select.page = 1 this.select.page = 1
this.getList() this.getList()
}, },
resetSearch(){
this.select.page = 1
this.select.title = ''
this.select.catalog_id = ''
this.getList()
},
async getList() { async getList() {
const res = await index({ const res = await index({
page_size: this.select.page_size, page_size: this.select.page_size,
@ -204,6 +224,8 @@
table_name: this.select.table_name, table_name: this.select.table_name,
json_data_fields: ['files', 'area_ids', 'tag_ids', 'catalog_id'], json_data_fields: ['files', 'area_ids', 'tag_ids', 'catalog_id'],
is_auth: 1, is_auth: 1,
sort_type:'DESC',
sort_name:'date',
filter: [{ filter: [{
"key": "title", "key": "title",
"op": "like", "op": "like",

Loading…
Cancel
Save