4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
1
2
3
4
5
|
<template>
<div class="NewsDialog">
<div class="news-title">
<div class="left">我的消息</div>
<div class="right">
|
7180000e
monkeyhouyi
优化
|
6
|
<el-button type="text" style="color: #fff;" size="small" :disabled="!messageList.length" @click="toReadAll"
|
93186f57
monkeyhouyi
前端整改页面
|
7
8
|
>标记全部已读</el-button
>
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
9
10
11
12
13
14
15
|
</div>
</div>
<div class="infinite-list-wrapper" style="overflow: auto">
<ul
class="list"
v-infinite-scroll="load"
infinite-scroll-disabled="disabled"
|
b61eb1ed
monkeyhouyi
上报线索研判
|
16
|
infinite-scroll-immediate
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
17
|
>
|
b4af9364
monkeyhouyi
消息管理修改
|
18
|
<li class="list-item" v-for="(v, i) in messageList" :key="v.id">
|
7180000e
monkeyhouyi
优化
|
19
20
21
22
|
<div class="item-title">
<div class="title-text">{{ v.title }}</div>
<div class="img_right"></div>
</div>
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
23
|
<!-- <p>这个应用应该归属到青羊区,不在金牛区的管辖范围内。</p> -->
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
24
|
<div class="item-info">
|
93186f57
monkeyhouyi
前端整改页面
|
25
|
<div class="left">发送人:{{ v.creatorUser }}</div>
|
006cc67a
monkeyhouyi
巡查上报
|
26
27
|
</div>
<div class="item-info">
|
b4af9364
monkeyhouyi
消息管理修改
|
28
|
<div class="left">
|
93186f57
monkeyhouyi
前端整改页面
|
29
30
|
时间:{{ ncc.dateFormat(v.lastModifyTime) }}
</div>
|
b4af9364
monkeyhouyi
消息管理修改
|
31
32
33
|
<div class="right">
<el-button type="text" size="mini" @click="toReadInfo(v.id, i)">标记已读</el-button>
</div>
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
34
35
36
37
38
39
40
41
42
43
|
</div>
</li>
</ul>
<p v-if="loading">加载中...</p>
<p v-if="noMore">没有更多了</p>
</div>
</div>
</template>
<script>
|
61009cfc
monkeyhouyi
2024/8/8
|
44
|
import { getMessageList, ReadInfo, MessageAllRead } from "@/api/system/message";
|
b4af9364
monkeyhouyi
消息管理修改
|
45
|
import { message } from '@/utils/message';
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
46
47
48
49
50
51
|
export default {
name: "NewsDialog",
data() {
return {
count: 10,
loading: false,
|
b61eb1ed
monkeyhouyi
上报线索研判
|
52
|
messageList: [],
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
53
|
searchList: {
|
93186f57
monkeyhouyi
前端整改页面
|
54
55
|
pageIndex: 1,
pageSize: 10,
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
56
57
|
},
total: 0,
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
58
59
60
61
|
};
},
computed: {
noMore() {
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
62
|
return this.messageList.length == this.total;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
63
64
65
66
67
|
},
disabled() {
return this.loading || this.noMore;
},
},
|
93186f57
monkeyhouyi
前端整改页面
|
68
|
created() {},
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
69
70
|
mounted() {},
methods: {
|
93186f57
monkeyhouyi
前端整改页面
|
71
72
73
74
75
76
77
78
|
init() {
this.messageList = [];
this.searchList = {
pageIndex: 1,
pageSize: 10,
};
this.load();
},
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
79
|
load() {
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
80
|
this.loading = true;
|
93186f57
monkeyhouyi
前端整改页面
|
81
|
getMessageList(this.searchList).then(({ data }) => {
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
82
|
this.messageList = this.messageList.concat(data.list);
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
83
|
this.total = data.pagination.total;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
84
|
this.loading = false;
|
93186f57
monkeyhouyi
前端整改页面
|
85
86
|
this.searchList.pageIndex += 1;
this.$emit("changeMagNum", data.pagination.total);
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
87
|
});
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
88
|
},
|
006cc67a
monkeyhouyi
巡查上报
|
89
90
|
toReadAll() {
MessageAllRead().then(() => {
|
b4af9364
monkeyhouyi
消息管理修改
|
91
|
this.init();
|
93186f57
monkeyhouyi
前端整改页面
|
92
93
|
});
},
|
b4af9364
monkeyhouyi
消息管理修改
|
94
95
96
97
98
99
100
101
102
103
|
toReadInfo(id, index) {
ReadInfo(id).then(() => {
this.$message({
showClose: true,
message: '已读成功!',
type: 'success'
});
this.init();
});
}
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
},
};
</script>
<style scoped lang="scss">
.NewsDialog {
margin: -14px;
.news-title {
display: flex;
justify-content: space-between;
align-items: center;
flex-direction: row;
padding: 0 12px;
width: 100%;
height: 40px;
line-height: 40px;
background-color: rgba(59, 130, 246, 1);
color: #fff;
}
.infinite-list-wrapper {
height: 40vh;
text-align: center;
// .list {
// margin-right: -8px;
// }
.list-item {
text-align: left;
|
ecc43230
monkeyhouyi
优化首页,应用管理
|
130
|
margin: 5px;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
131
132
133
|
padding: 8px;
border-radius: 5px;
background-color: rgb(243, 244, 246);
|
b4af9364
monkeyhouyi
消息管理修改
|
134
|
// cursor: pointer;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
135
136
137
138
139
|
.item-title {
color: #000;
font-weight: 600;
display: flex;
flex-direction: row;
|
7180000e
monkeyhouyi
优化
|
140
|
align-items: flex-start;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
141
|
justify-content: space-between;
|
7180000e
monkeyhouyi
优化
|
142
143
144
145
|
.title-text {
flex: 1;
}
.img_right {
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
146
147
|
background-image: url("@/assets/images/Group.png");
background-size: 100% 100%; /* 确保图片覆盖整个元素 */
|
7180000e
monkeyhouyi
优化
|
148
149
|
width: 20px;
height: 20px;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
150
151
|
margin-left: 8px;
}
|
7180000e
monkeyhouyi
优化
|
152
153
154
155
156
157
158
159
160
161
162
|
// &::after {
// content: "";
// display: inline-block;
// width: 25px;
// text-align: center;
// height: 15px;
// background-image: url("@/assets/images/Group.png");
// background-size: 100% 100%; /* 确保图片覆盖整个元素 */
// background-position: center; /* 将图片居中显示 */
// margin-left: 8px;
// }
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
163
164
165
166
167
168
169
170
171
172
173
|
}
p {
margin: 5px 0;
font-size: 12px;
color: #898989;
}
.item-info {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
|
5a14192c
monkeyhouyi
1
|
174
|
color: #454040;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
175
|
font-size: 12px;
|
b4af9364
monkeyhouyi
消息管理修改
|
176
|
line-height: 30px;
|
4f6550f1
monkeyhouyi
消息提醒弹框页面样式
|
177
178
179
180
181
|
}
}
}
}
</style>
|