|
@@ -1,15 +1,33 @@
|
|
|
<template>
|
|
|
<div class="message">
|
|
|
- <div class="select">
|
|
|
- <div @click="selectFun('系统')"
|
|
|
- :style="currentItem==0 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">系统消息</div>
|
|
|
- <div @click="selectFun('应用')"
|
|
|
- :style="currentItem==1 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">应用消息</div>
|
|
|
- </div>
|
|
|
- <list :list="list"></list>
|
|
|
- <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber"
|
|
|
- @pageChange="pageChange">
|
|
|
- </pagination>
|
|
|
+ <el-row>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="left">
|
|
|
+ <div class="select">
|
|
|
+ <div @click="selectFun('系统')"
|
|
|
+ :style="currentItem==0 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">系统消息</div>
|
|
|
+ <div @click="selectFun('应用')"
|
|
|
+ :style="currentItem==1 ? 'background:#3874F6;color:#ffffff' : 'border:1px solid #cccccc'">应用消息</div>
|
|
|
+ </div>
|
|
|
+ <list :list="list" @messageItemClick="messageItemClick"></list>
|
|
|
+ <pagination :total="total" :pageSize="param.content.pageSize" :currentPage="param.content.pageNumber"
|
|
|
+ @pageChange="pageChange">
|
|
|
+ </pagination>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <div class="right">
|
|
|
+ <p class="title">{{message.title}}</p>
|
|
|
+ <p class="info">
|
|
|
+ <span>发布于:{{message.createdate}} | {{message.type}}</span>
|
|
|
+ </p>
|
|
|
+ <div class="content-txt">
|
|
|
+ <p class="txt">{{message.message}}</p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -27,17 +45,18 @@ export default {
|
|
|
"classname": "system.message.Message",
|
|
|
"method": "queryMessage",
|
|
|
"content": {
|
|
|
- "nocache": true,
|
|
|
+ "nocache": true,
|
|
|
"pageNumber": 1,
|
|
|
"pageSize": 10,
|
|
|
"type": ''
|
|
|
}
|
|
|
},
|
|
|
- list: [],
|
|
|
- total:0
|
|
|
+ list: '',
|
|
|
+ total: 0,
|
|
|
+ message:''
|
|
|
};
|
|
|
},
|
|
|
- components: { list ,pagination },
|
|
|
+ components: { list, pagination },
|
|
|
computed: {
|
|
|
},
|
|
|
watch: {
|
|
@@ -50,16 +69,31 @@ export default {
|
|
|
this.param.content.type = this.currentItem == 0 ? '系统' : '应用'
|
|
|
let res = await this.$api.requested(this.param)
|
|
|
this.list = res.data
|
|
|
+ this.messageItemClick(this.list[0])
|
|
|
this.total = res.total
|
|
|
+ console.log(this.list);
|
|
|
+
|
|
|
},
|
|
|
selectFun (data) {
|
|
|
this.param.content.pageNumber = 1
|
|
|
this.currentItem = data == '系统' ? 0 : 1
|
|
|
this.getMessageList()
|
|
|
},
|
|
|
- pageChange(n) {
|
|
|
+ pageChange (n) {
|
|
|
this.param.content.pageNumber = n
|
|
|
this.getMessageList()
|
|
|
+ },
|
|
|
+ async messageItemClick(data) {
|
|
|
+ let res = await this.$api.requested({
|
|
|
+ "classname": "system.message.Message",
|
|
|
+ "method": "readMessage",
|
|
|
+ "content": {
|
|
|
+ "nocache":true,
|
|
|
+ "messageid":data.messageid
|
|
|
+ }
|
|
|
+ })
|
|
|
+ data.isread = 1
|
|
|
+ this.message = res.data
|
|
|
}
|
|
|
},
|
|
|
};
|
|
@@ -70,13 +104,18 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
.message {
|
|
|
- width: 1200px;
|
|
|
+ width: 100%;
|
|
|
min-height: 100%;
|
|
|
margin: 0 auto;
|
|
|
- background: #ffffff;
|
|
|
- padding: 30px 0 60px 0;
|
|
|
position: relative;
|
|
|
}
|
|
|
+.message .left {
|
|
|
+ position: relative;
|
|
|
+ padding: 20px 0 60px 0;
|
|
|
+ box-shadow: 1px 0px 0px 1px #DDDDDD;
|
|
|
+ border-radius: 4px 4px 4px 4px;
|
|
|
+ background: #ffffff;
|
|
|
+}
|
|
|
.message .select {
|
|
|
width: 200px;
|
|
|
height: 36px;
|
|
@@ -85,7 +124,7 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
line-height: 36px;
|
|
|
font-size: 14px;
|
|
|
- margin-left: 30px;
|
|
|
+ margin-left: 16px;
|
|
|
}
|
|
|
.message .select div {
|
|
|
width: 50%;
|
|
@@ -102,6 +141,33 @@ export default {
|
|
|
border-top-right-radius: 4px;
|
|
|
border-bottom-right-radius: 4px;
|
|
|
}
|
|
|
+.message .right {
|
|
|
+ padding: 20px 16px;
|
|
|
+}
|
|
|
+.message .right .title {
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: bold;
|
|
|
+ color: #333333;
|
|
|
+}
|
|
|
+.message .right .info {
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #333333;
|
|
|
+ margin: 16px 0;
|
|
|
+}
|
|
|
+.message .right .content-txt {
|
|
|
+ width: 100%;
|
|
|
+ padding: 20px 16px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ background: #ffffff;
|
|
|
+}
|
|
|
+.message .right .content-txt p:first-child {
|
|
|
+ color: #666666;
|
|
|
+}
|
|
|
+/* .message .right .content-txt p:last-child {
|
|
|
+ color: #3874F6;
|
|
|
+} */
|
|
|
/deep/.el-pagination {
|
|
|
position: absolute;
|
|
|
right: 16px;
|