|
@@ -5,8 +5,8 @@
|
|
<div class="up-title"><i class="el-icon-search"></i>筛选搜索</div>
|
|
<div class="up-title"><i class="el-icon-search"></i>筛选搜索</div>
|
|
<div class="btn">
|
|
<div class="btn">
|
|
<el-button plain>重置</el-button>
|
|
<el-button plain>重置</el-button>
|
|
- <el-button type="primary" plain>查询列表</el-button>
|
|
|
|
- </div>
|
|
|
|
|
|
+ <el-button type="primary" plain>查询列表</el-button>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
<div class="left-up">
|
|
<div class="left-up">
|
|
<div class="up-input-title">
|
|
<div class="up-input-title">
|
|
@@ -31,19 +31,26 @@
|
|
<el-table :data="tableData" border style="width: 100%" class="messagetable">
|
|
<el-table :data="tableData" border style="width: 100%" class="messagetable">
|
|
<el-table-column prop="id" label="ID">
|
|
<el-table-column prop="id" label="ID">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop="messageTitle" label="消息标题">
|
|
|
|
|
|
+ <el-table-column :formatter="stateFormat" prop="messageTitle" label="消息标题">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="phoneNumber" label="手机号">
|
|
<el-table-column prop="phoneNumber" label="手机号">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="publishTime" label="发布时间">
|
|
<el-table-column prop="publishTime" label="发布时间">
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="operate" label="操作">
|
|
<el-table-column prop="operate" label="操作">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button size="mini" type="text" icon="el-icon-edit">修改</el-button>
|
|
|
|
+ <el-popconfirm title="你确定删除本条消息吗?">
|
|
|
|
+ <el-button class="btn-delete" size="mini" type="text" icon="el-icon-delete"
|
|
|
|
+ @click="deleteMessage(scope.$index)" slot="reference">删除</el-button>
|
|
|
|
+ </el-popconfirm>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="bottom">
|
|
<div class="bottom">
|
|
- <div class="bottom-page"><el-pagination background layout="prev, pager, next" :total="1"></el-pagination></div>
|
|
|
|
|
|
+ <div class="bottom-page"><el-pagination background layout="prev, pager, next" :total="1000"></el-pagination></div>
|
|
<span class="bottom-number">共{{ 0 }}条 </span>
|
|
<span class="bottom-number">共{{ 0 }}条 </span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@@ -75,7 +82,8 @@ export default {
|
|
var data = Mock.mock({
|
|
var data = Mock.mock({
|
|
'list|1-50': [{
|
|
'list|1-50': [{
|
|
'id|+1': 1,
|
|
'id|+1': 1,
|
|
- 'messageTitle': '@cparagraph()',
|
|
|
|
|
|
+ // 'messageTitle': '@cparagraph()',
|
|
|
|
+ 'messageTitle': '@cword(3, 5)',
|
|
'phoneNumber': '158888888',
|
|
'phoneNumber': '158888888',
|
|
'publishTime': '@date()',
|
|
'publishTime': '@date()',
|
|
}]
|
|
}]
|
|
@@ -84,6 +92,17 @@ export default {
|
|
},
|
|
},
|
|
getTableList() {
|
|
getTableList() {
|
|
this.tableData = this.mockMessageList.list
|
|
this.tableData = this.mockMessageList.list
|
|
|
|
+ },
|
|
|
|
+ stateFormat(row, column, cellValue) {
|
|
|
|
+ if (!cellValue) return ''
|
|
|
|
+ if (cellValue.length > 15) { //最长固定显示10个字符
|
|
|
|
+ return cellValue.slice(0, 15) + '...'
|
|
|
|
+ }
|
|
|
|
+ return cellValue
|
|
|
|
+ },
|
|
|
|
+ //删除列表
|
|
|
|
+ deleteMessage(row) {
|
|
|
|
+ console.log(row);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -109,18 +128,20 @@ export default {
|
|
margin-top: 20px;
|
|
margin-top: 20px;
|
|
float: left;
|
|
float: left;
|
|
}
|
|
}
|
|
-.btn{
|
|
|
|
|
|
+
|
|
|
|
+.btn {
|
|
float: right;
|
|
float: right;
|
|
padding-right: 3%;
|
|
padding-right: 3%;
|
|
margin-top: 2.5%;
|
|
margin-top: 2.5%;
|
|
}
|
|
}
|
|
|
|
+
|
|
.up-input {
|
|
.up-input {
|
|
width: 250px;
|
|
width: 250px;
|
|
margin-left: 15px;
|
|
margin-left: 15px;
|
|
}
|
|
}
|
|
|
|
|
|
.up-input-title {
|
|
.up-input-title {
|
|
-
|
|
|
|
|
|
+
|
|
margin-left: 40px;
|
|
margin-left: 40px;
|
|
|
|
|
|
float: left;
|
|
float: left;
|
|
@@ -134,7 +155,7 @@ export default {
|
|
.up-input-title-right {
|
|
.up-input-title-right {
|
|
width: 800px;
|
|
width: 800px;
|
|
margin-left: 450px;
|
|
margin-left: 450px;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@@ -198,9 +219,14 @@ export default {
|
|
float: right;
|
|
float: right;
|
|
}
|
|
}
|
|
|
|
|
|
-.el-icon-search{
|
|
|
|
|
|
+.el-icon-search {
|
|
padding-right: 10px;
|
|
padding-right: 10px;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+.btn-delete {
|
|
|
|
+ margin-left: 20px;
|
|
|
|
+}
|
|
|
|
+
|
|
/**
|
|
/**
|
|
自适应
|
|
自适应
|
|
*/
|
|
*/
|