|
@@ -6,13 +6,29 @@
|
|
<breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
|
|
<breadcrumb :breadcrumbTitle="this.$route.meta.title"></breadcrumb>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24" class="container">
|
|
<el-col :span="24" class="container">
|
|
- <el-col :span="24" style="margin:15px 0;text-align:right">
|
|
|
|
- <el-button type="primary" size="mini" @click="add()">添加</el-button>
|
|
|
|
|
|
+ <el-col :span="24" style="margin:15px 0">
|
|
|
|
+ <el-col :span="12">
|
|
|
|
+ <el-input placeholder="请输入名称" v-model="list1.name" class="input-with-select">
|
|
|
|
+ <el-select v-model="list1.type" slot="prepend" placeholder="请选择类型">
|
|
|
|
+ <el-option label="公司新闻" value="0"></el-option>
|
|
|
|
+ <el-option label="行业新闻" value="1"></el-option>
|
|
|
|
+ <el-option label="展会资讯" value="2"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="search()"></el-button>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-col>
|
|
|
|
+ <el-col :span="12" style="text-align:right">
|
|
|
|
+ <el-button type="primary" size="mini" @click="add()">添加</el-button>
|
|
|
|
+ </el-col>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-table :data="list" style="width: 100%" border>
|
|
<el-table :data="list" style="width: 100%" border>
|
|
<el-table-column prop="name" label="名称" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="name" label="名称" align="center" show-overflow-tooltip> </el-table-column>
|
|
- <el-table-column prop="type" label="类型" align="center" show-overflow-tooltip> </el-table-column>
|
|
|
|
|
|
+ <el-table-column label="类型" align="center" show-overflow-tooltip>
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{ scope.row.type == '0' ? '公司新闻' : scope.row.type == '1' ? '行业新闻' : '展会资讯' }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="brief" label="简介" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="brief" label="简介" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="content" label="内容" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="content" label="内容" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="create_time" label="发布时间" align="center" show-overflow-tooltip> </el-table-column>
|
|
<el-table-column prop="create_time" label="发布时间" align="center" show-overflow-tooltip> </el-table-column>
|
|
@@ -63,6 +79,7 @@ export default {
|
|
currentPage: 0,
|
|
currentPage: 0,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
skip: 0,
|
|
skip: 0,
|
|
|
|
+ list1: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -72,6 +89,13 @@ export default {
|
|
...hotspot(['query', 'fetch', 'create', 'update', 'delete']),
|
|
...hotspot(['query', 'fetch', 'create', 'update', 'delete']),
|
|
// 查询列表
|
|
// 查询列表
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
|
+ if (this.list1) {
|
|
|
|
+ info = { ...this.list1 };
|
|
|
|
+ // info = {
|
|
|
|
+ // name: this.list1.name,
|
|
|
|
+ // type: this.list1.type,
|
|
|
|
+ // };
|
|
|
|
+ }
|
|
skip = this.skip;
|
|
skip = this.skip;
|
|
let res = await this.query({ skip, limit, ...info });
|
|
let res = await this.query({ skip, limit, ...info });
|
|
if (this.$checkRes(res)) {
|
|
if (this.$checkRes(res)) {
|
|
@@ -114,4 +138,7 @@ export default {
|
|
text-align: center;
|
|
text-align: center;
|
|
margin: 15px 0;
|
|
margin: 15px 0;
|
|
}
|
|
}
|
|
|
|
+.el-select {
|
|
|
|
+ width: 130px;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|