Commit 434d66f2 by lichengming

修改了消息通知分页

parent 3c02ab90
...@@ -3,9 +3,9 @@ ...@@ -3,9 +3,9 @@
<Card style="width:100%"> <Card style="width:100%">
<div class="config_meta"> <div class="config_meta">
<p class="fl"> <p class="fl">
消息通知 {{ total }} 消息通知
</p> </p>
<div class="fr" @click="_detail"> <div @click="_detail" class="fr">
<Tooltip content="查看更多" placement="left"> <Tooltip content="查看更多" placement="left">
<Icon type="ios-more" size="30" color="#2d8cf0" style="cursor:pointer;" /> <Icon type="ios-more" size="30" color="#2d8cf0" style="cursor:pointer;" />
</Tooltip> </Tooltip>
...@@ -13,27 +13,16 @@ ...@@ -13,27 +13,16 @@
<div class="clear" /> <div class="clear" />
</div> </div>
<div style="width: 100%;"> <div style="width: 100%;">
<element-table <PTVXETableHeight ref="pageTable"
ref="pageTable" :table-height="300"
:page-columns="pageColumns" @on-result-change="_tableResultChange" :getPage="tableData" hide-checkbox="true">
:table-height="tableHeight" <vxe-table-column
:get-page="tableData" :field="item.key"
show-check-box :title="item.title"
hide-page :min-width="item.width?item.width:150"
@on-result-change="_tableResultChange"
>
<el-table-column
v-for="item in pageColumns"
:key="item.key"
show-overflow-tooltip
sortable
:prop="item.key"
:label="item.title"
:align="item.align"
:width="item.width"
:min-width="200"
:fixed="item.fixed?item.fixed:undefined" :fixed="item.fixed?item.fixed:undefined"
> v-for="item in pageColumns"
:key="item.key" sortable>
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="item.datetime"> <span v-if="item.datetime">
{{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM'):'' }} {{ scope.row[item.key]?$dateformat(scope.row[item.key],'yyyy-mm-dd HH:MM'):'' }}
...@@ -45,8 +34,8 @@ ...@@ -45,8 +34,8 @@
{{ scope.row[item.key] }} {{ scope.row[item.key] }}
</span> </span>
</template> </template>
</el-table-column> </vxe-table-column>
</element-table> </PTVXETableHeight>
</div> </div>
</Card> </Card>
<!--&lt;!&ndash;未完成检测项目列表&ndash;&gt;--> <!--&lt;!&ndash;未完成检测项目列表&ndash;&gt;-->
...@@ -68,7 +57,7 @@ export default { ...@@ -68,7 +57,7 @@ export default {
{ title: '内容', key: 'content' }, { title: '内容', key: 'content' },
{ title: '创建时间', key: 'ctime', datetime: true } { title: '创建时间', key: 'ctime', datetime: true }
], ],
total: '' formObj: {}
} }
}, },
computed: { computed: {
...@@ -87,13 +76,11 @@ export default { ...@@ -87,13 +76,11 @@ export default {
_tableResultChange(msg) {}, _tableResultChange(msg) {},
async _request() { async _request() {
this.$refs.pageTable._hideLoading() this.$refs.pageTable._hideLoading()
const data = { Object.assign(this.formObj, this.$refs.pageTable._searchParams())
page: 1, const result = await workbench.myMessagePage(this.formObj)
rows: 10
}
const result = await workbench.myMessagePage(data)
if (result) { if (result) {
this.tableData = result this.tableData = result
this.$refs.pageTable._hideLoading()
} }
// this.$store.dispatch('ManufactContract/messagePage', {page: 1, rows: 7}).then(() => { // this.$store.dispatch('ManufactContract/messagePage', {page: 1, rows: 7}).then(() => {
// let tableData = this.$store.state.ManufactContract.page.records // let tableData = this.$store.state.ManufactContract.page.records
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment