@lambo-design/pro-layout 1.0.0-beta.283 → 1.0.0-beta.285
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +3 -3
- package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-notice.vue +124 -209
- package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-todo.vue +107 -214
- package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-user.vue +4 -10
- package/src/index.vue +15 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lambo-design/pro-layout",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.285",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "lambo",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"registry": "https://registry.npmjs.org/"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
|
-
"@lambo-design/
|
|
14
|
-
"@lambo-design/
|
|
13
|
+
"@lambo-design/shared": "^1.0.0-beta.136",
|
|
14
|
+
"@lambo-design/core": "^4.7.1-beta.129"
|
|
15
15
|
},
|
|
16
16
|
"scripts": {}
|
|
17
17
|
}
|
|
@@ -1,53 +1,32 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="notice
|
|
2
|
+
<div class="pro-layout-tools-quick-notice">
|
|
3
3
|
<Dropdown >
|
|
4
4
|
<Badge :count="noticeDatas.length" :offset=[-3,-1] size="small">
|
|
5
5
|
<Icon type="ios-notifications-outline" size="20" style="cursor: pointer"></Icon>
|
|
6
6
|
</Badge>
|
|
7
7
|
<template #list>
|
|
8
|
-
<DropdownMenu slot="list" class="
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<div class="
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
<img src="../../../../styles/images/xiaoxitongzhi.png" class="item-image" alt=""/>
|
|
15
|
-
<span class="red-dot"></span>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="item-content">
|
|
18
|
-
<div class="item-title" >{{ item.noticeTitle }}</div>
|
|
19
|
-
<div class="item-time">
|
|
20
|
-
<span>
|
|
21
|
-
{{ item.publishTime.split(" ")[0] }}
|
|
22
|
-
</span>
|
|
23
|
-
<span style="margin-left: 5px">
|
|
24
|
-
{{ item.publishTime.split(" ")[1] }}
|
|
25
|
-
</span>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</DropdownItem>
|
|
29
|
-
<a @click="enterItem" class="display-more" v-if="noticeDatas.length>0">查看更多</a>
|
|
30
|
-
<div v-if="noticeDatas.length==0" style="text-align: center;font-size: 17px">暂无未读通知</div>
|
|
8
|
+
<DropdownMenu slot="list" class="notice-dropdown-menu">
|
|
9
|
+
<div class="dropdown-content">
|
|
10
|
+
<DropdownItem v-for="(item, index) in noticeDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
|
|
11
|
+
<div class="item-image-container">
|
|
12
|
+
<img src="../../../../styles/images/xiaoxitongzhi.png" class="item-image" alt=""/>
|
|
13
|
+
<span class="red-dot"></span>
|
|
31
14
|
</div>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
</DropdownItem>
|
|
41
|
-
<dropdownItem>
|
|
42
|
-
<div style="text-align: center;font-size: 17px">暂无数据</div>
|
|
43
|
-
</dropdownItem>
|
|
15
|
+
<div class="item-content">
|
|
16
|
+
<div class="item-title" >
|
|
17
|
+
{{ item.noticeTitle }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="item-time">
|
|
20
|
+
{{ item.publishTime }}
|
|
21
|
+
</div>
|
|
44
22
|
</div>
|
|
45
|
-
</
|
|
46
|
-
|
|
23
|
+
</DropdownItem>
|
|
24
|
+
<a @click="getMore" class="display-more" v-if="noticeDatas.length>0">查看更多</a>
|
|
25
|
+
<div v-if="noticeDatas.length == 0" class="no-data">暂无未读通知</div>
|
|
26
|
+
</div>
|
|
47
27
|
<div class="dropdown-footer">
|
|
48
28
|
<DropdownItem class="mark-read">
|
|
49
|
-
<Button @click.native="
|
|
50
|
-
style="font-size: 13px;border-color:#3C7BF6;background-color: #3C7BF6;color: #FFFFFF;">一键已读
|
|
29
|
+
<Button @click.native="markRead" >一键已读
|
|
51
30
|
</Button>
|
|
52
31
|
</DropdownItem>
|
|
53
32
|
</div>
|
|
@@ -58,194 +37,130 @@
|
|
|
58
37
|
</template>
|
|
59
38
|
|
|
60
39
|
<script>
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import Bus from "@lambo-design/shared/utils/bus";
|
|
40
|
+
import Bus from '@lambo-design/shared/utils/bus';
|
|
41
|
+
import {deepCopy} from '@lambo-design/shared/utils/assist';
|
|
64
42
|
export default {
|
|
65
43
|
name: "pro-layout-tools-quick-notice",
|
|
66
44
|
data() {
|
|
67
45
|
return {
|
|
68
|
-
|
|
69
|
-
activeTab: 'notice',
|
|
70
|
-
noticeDatas:[],
|
|
71
|
-
noticeModel:false,
|
|
46
|
+
noticeDatas:[]
|
|
72
47
|
}
|
|
73
48
|
},
|
|
74
|
-
created() {
|
|
75
|
-
this.init()
|
|
76
|
-
},
|
|
77
49
|
methods: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
config.smartMsgServerContext + "/manage/notices/created",
|
|
86
|
-
requestParams
|
|
87
|
-
)
|
|
88
|
-
this.init()
|
|
89
|
-
Bus.$emit('system-modalList',true,item.noticeId)
|
|
50
|
+
initListener() {
|
|
51
|
+
Bus.$on('other-datas',(data) => {
|
|
52
|
+
this.initNoticeList(data);
|
|
53
|
+
})
|
|
54
|
+
},
|
|
55
|
+
destroyListener() {
|
|
56
|
+
Bus.$off('other-datas')
|
|
90
57
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
.map((news) => news.noticeId); // 获取所有未读公告的id数组
|
|
95
|
-
const categoryIds = noticeData
|
|
96
|
-
.map((news) => news.categoryId); // 获取所有未读公告的栏目id数组
|
|
97
|
-
let requestParams = {
|
|
98
|
-
noticeId: noticeIds.join(),
|
|
99
|
-
categoryId: categoryIds.join(),
|
|
100
|
-
};
|
|
101
|
-
if (requestParams.categoryId) {
|
|
102
|
-
ajax.post(
|
|
103
|
-
config.smartMsgServerContext + "/manage/notices/created",
|
|
104
|
-
requestParams
|
|
105
|
-
).then(function (resp) {
|
|
106
|
-
if (resp.data.code === 1) {
|
|
107
|
-
self.init()
|
|
108
|
-
self.$Message.info("已读成功")
|
|
109
|
-
} else {
|
|
110
|
-
alert("请求失败");
|
|
111
|
-
}
|
|
112
|
-
});
|
|
58
|
+
initNoticeList(data) {
|
|
59
|
+
if (data && data.noticeDatas) {
|
|
60
|
+
this.noticeDatas = deepCopy(data.noticeDatas);
|
|
113
61
|
}
|
|
114
62
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
self.noticeDatas = resp.data.data
|
|
121
|
-
});
|
|
63
|
+
getDetail(item){
|
|
64
|
+
Bus.$emit('other-operate','notice-detail',item)
|
|
65
|
+
},
|
|
66
|
+
markRead(){
|
|
67
|
+
Bus.$emit('other-operate','notice-mark-read')
|
|
122
68
|
},
|
|
123
|
-
|
|
124
|
-
|
|
69
|
+
getMore() {
|
|
70
|
+
Bus.$emit('other-operate','notice-more')
|
|
125
71
|
}
|
|
72
|
+
},
|
|
73
|
+
created() {
|
|
74
|
+
this.initListener()
|
|
75
|
+
},
|
|
76
|
+
beforeDestroy() {
|
|
77
|
+
this.destroyListener()
|
|
126
78
|
}
|
|
127
79
|
}
|
|
128
80
|
</script>
|
|
129
81
|
|
|
130
82
|
<style lang="less" scoped>
|
|
131
|
-
.notice
|
|
132
|
-
.
|
|
133
|
-
|
|
134
|
-
|
|
83
|
+
.pro-layout-tools-quick-notice{
|
|
84
|
+
.notice-dropdown-menu {
|
|
85
|
+
width: 300px;
|
|
86
|
+
.dropdown-content{
|
|
87
|
+
max-height: 340px;
|
|
88
|
+
overflow-y: auto;
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
padding: 10px;
|
|
92
|
+
margin-top: -6px;
|
|
93
|
+
&::-webkit-scrollbar {
|
|
94
|
+
width: 0;
|
|
95
|
+
height: 0;
|
|
96
|
+
}
|
|
97
|
+
.dropdown-item{
|
|
98
|
+
display: flex;
|
|
99
|
+
flex-direction: row; /* 修改为row,以便子元素水平排列 */
|
|
100
|
+
align-items: center; /* 确保所有子元素在交叉轴上居中对齐 */
|
|
101
|
+
padding: 14px 0; /* 根据需要添加一些垂直填充 */
|
|
102
|
+
.item-image-container{
|
|
103
|
+
position: relative;
|
|
104
|
+
display: inline-block; /* 或者 flex,根据需要 */
|
|
105
|
+
margin-right: 11px; /* 在图片和文本之间添加一些间距 */
|
|
106
|
+
.item-image{
|
|
107
|
+
width: 40px; /* 或者您想要的任何尺寸 */
|
|
108
|
+
height: 37px; /* 或者您想要的任何尺寸 */
|
|
109
|
+
margin-left: 7px;
|
|
110
|
+
}
|
|
111
|
+
.red-dot {
|
|
112
|
+
position: absolute;
|
|
113
|
+
margin: 0 0 0 -8px;
|
|
114
|
+
width: 10px; /* 小红点的大小 */
|
|
115
|
+
height: 10px; /* 小红点的大小 */
|
|
116
|
+
border-radius: 50%; /* 使其成为圆形 */
|
|
117
|
+
background-color: red; /* 红色背景 */
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
.item-content{
|
|
121
|
+
flex-grow: 1; /* 允许内容区域填充剩余空间 */
|
|
122
|
+
overflow: hidden;
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column; /* 保持文字内容的垂直布局 */
|
|
125
|
+
.item-title{
|
|
126
|
+
font-weight: bold;
|
|
127
|
+
white-space: nowrap;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
font-size: 13px;
|
|
130
|
+
text-overflow: ellipsis;
|
|
131
|
+
}
|
|
132
|
+
.item-time{
|
|
133
|
+
font-size: 12px;
|
|
134
|
+
color: #999999;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
overflow: hidden;
|
|
137
|
+
text-overflow: ellipsis;
|
|
138
|
+
margin-top: 10px;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
.display-more{
|
|
143
|
+
text-align: center;
|
|
144
|
+
margin: 22px 0 4px 0;
|
|
145
|
+
}
|
|
146
|
+
.no-data{
|
|
147
|
+
text-align: center;
|
|
148
|
+
font-size: 17px
|
|
149
|
+
}
|
|
135
150
|
}
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
151
|
+
.dropdown-footer{
|
|
152
|
+
text-align: right;
|
|
153
|
+
border-top: 1px solid #bbbbbb;
|
|
154
|
+
.mark-read{
|
|
155
|
+
font-size: 13px;
|
|
156
|
+
border-color:#3C7BF6;
|
|
157
|
+
background-color: #3C7BF6;
|
|
158
|
+
color: #FFFFFF;
|
|
159
|
+
span{
|
|
160
|
+
margin-left: 5px;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
140
163
|
}
|
|
141
164
|
}
|
|
142
165
|
}
|
|
143
|
-
|
|
144
|
-
.notice-nav {
|
|
145
|
-
margin-right: 20px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.demo-dropdown-menu {
|
|
149
|
-
width: 300px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.dropdown-content {
|
|
153
|
-
max-height: 340px;
|
|
154
|
-
overflow-y: auto;
|
|
155
|
-
display: flex;
|
|
156
|
-
flex-direction: column;
|
|
157
|
-
padding: 10px;
|
|
158
|
-
margin-top: -6px;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.dropdown-content::-webkit-scrollbar {
|
|
162
|
-
width: 0;
|
|
163
|
-
height: 0;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.dropdown-item {
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: row; /* 修改为row,以便子元素水平排列 */
|
|
169
|
-
align-items: center; /* 确保所有子元素在交叉轴上居中对齐 */
|
|
170
|
-
padding: 14px 0; /* 根据需要添加一些垂直填充 */
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.item-content {
|
|
174
|
-
flex-grow: 1; /* 允许内容区域填充剩余空间 */
|
|
175
|
-
overflow: hidden;
|
|
176
|
-
display: flex;
|
|
177
|
-
flex-direction: column; /* 保持文字内容的垂直布局 */
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.item-title {
|
|
181
|
-
font-weight: bold;
|
|
182
|
-
white-space: nowrap;
|
|
183
|
-
overflow: hidden;
|
|
184
|
-
font-size: 13px;
|
|
185
|
-
text-overflow: ellipsis;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.item-time {
|
|
189
|
-
font-size: 12px;
|
|
190
|
-
color: #999999;
|
|
191
|
-
white-space: nowrap;
|
|
192
|
-
overflow: hidden;
|
|
193
|
-
text-overflow: ellipsis;
|
|
194
|
-
margin-top: 10px;
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/deep/ .ivu-tabs-nav-container {
|
|
199
|
-
width: 100%;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/deep/ .ivu-tabs-nav {
|
|
203
|
-
display: flex;
|
|
204
|
-
width: 100%;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/deep/ .ivu-tabs-tab {
|
|
208
|
-
flex: 1; /* 使所有标签平均分配空间 */
|
|
209
|
-
text-align: center; /* 使文本居中显示 */
|
|
210
|
-
border: none; /* 根据需要去除标签的边框 */
|
|
211
|
-
font-size: 14px;
|
|
212
|
-
margin-bottom: 8px;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.item-image {
|
|
216
|
-
width: 40px; /* 或者您想要的任何尺寸 */
|
|
217
|
-
height: 37px; /* 或者您想要的任何尺寸 */
|
|
218
|
-
margin-left: 7px;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.display-more {
|
|
222
|
-
text-align: center;
|
|
223
|
-
margin: 22px 0 4px 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.dropdown-footer {
|
|
227
|
-
text-align: right;
|
|
228
|
-
border-top: 1px solid #bbbbbb;
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.mark-read span {
|
|
233
|
-
margin-left: 5px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.item-image-container {
|
|
237
|
-
position: relative;
|
|
238
|
-
display: inline-block; /* 或者 flex,根据需要 */
|
|
239
|
-
margin-right: 11px; /* 在图片和文本之间添加一些间距 */
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.red-dot {
|
|
243
|
-
position: absolute;
|
|
244
|
-
margin: 0 0 0 -8px;
|
|
245
|
-
width: 10px; /* 小红点的大小 */
|
|
246
|
-
height: 10px; /* 小红点的大小 */
|
|
247
|
-
border-radius: 50%; /* 使其成为圆形 */
|
|
248
|
-
background-color: red; /* 红色背景 */
|
|
249
|
-
}
|
|
250
|
-
|
|
251
166
|
</style>
|
package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-quick-todo.vue
CHANGED
|
@@ -1,55 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="
|
|
2
|
+
<div class="pro-layout-tools-quick-todo">
|
|
3
3
|
<Dropdown >
|
|
4
|
-
<Badge :count="
|
|
4
|
+
<Badge :count="todoDatas.length" :offset=[-3,-1] size="small">
|
|
5
5
|
<Icon type="ios-notifications-outline" size="20" style="cursor: pointer"></Icon>
|
|
6
6
|
</Badge>
|
|
7
7
|
<template #list>
|
|
8
|
-
<DropdownMenu slot="list" class="
|
|
9
|
-
<
|
|
10
|
-
<
|
|
11
|
-
<div class="
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
<img src="../../../../styles/images/xiaoxitongzhi.png" class="item-image" alt=""/>
|
|
15
|
-
<span class="red-dot"></span>
|
|
16
|
-
</div>
|
|
17
|
-
<div class="item-content">
|
|
18
|
-
<div class="item-title" >{{ item.noticeTitle }}</div>
|
|
19
|
-
<div class="item-time">
|
|
20
|
-
<span>
|
|
21
|
-
{{ item.publishTime.split(" ")[0] }}
|
|
22
|
-
</span>
|
|
23
|
-
<span style="margin-left: 5px">
|
|
24
|
-
{{ item.publishTime.split(" ")[1] }}
|
|
25
|
-
</span>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</DropdownItem>
|
|
29
|
-
<a @click="enterItem" class="display-more" v-if="noticeDatas.length>0">查看更多</a>
|
|
30
|
-
<div v-if="noticeDatas.length==0" style="text-align: center;font-size: 17px">暂无未读通知</div>
|
|
8
|
+
<DropdownMenu slot="list" class="todo-dropdown-menu">
|
|
9
|
+
<div class="dropdown-content">
|
|
10
|
+
<DropdownItem v-for="(item, index) in todoDatas" :key="index" class="dropdown-item" @click.native="getDetail(item)" >
|
|
11
|
+
<div class="item-image-container">
|
|
12
|
+
<img src="../../../../styles/images/xiaoxitongzhi.png" class="item-image" alt=""/>
|
|
13
|
+
<span class="red-dot"></span>
|
|
31
14
|
</div>
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
</div>
|
|
40
|
-
</DropdownItem>
|
|
41
|
-
<dropdownItem>
|
|
42
|
-
<div style="text-align: center;font-size: 17px">暂无数据</div>
|
|
43
|
-
</dropdownItem>
|
|
15
|
+
<div class="item-content">
|
|
16
|
+
<div class="item-title" >
|
|
17
|
+
{{ item.title }}
|
|
18
|
+
</div>
|
|
19
|
+
<div class="item-time">
|
|
20
|
+
{{ item.createTime }}
|
|
21
|
+
</div>
|
|
44
22
|
</div>
|
|
45
|
-
</TabPane>
|
|
46
|
-
</Tabs>
|
|
47
|
-
<div class="dropdown-footer">
|
|
48
|
-
<DropdownItem class="mark-read">
|
|
49
|
-
<Button @click.native="markAllAsRead(noticeDatas) "
|
|
50
|
-
style="font-size: 13px;border-color:#3C7BF6;background-color: #3C7BF6;color: #FFFFFF;">一键已读
|
|
51
|
-
</Button>
|
|
52
23
|
</DropdownItem>
|
|
24
|
+
<a @click="getMore" class="display-more" v-if="todoDatas.length>0">查看更多</a>
|
|
25
|
+
<div v-if="todoDatas.length == 0" class="no-data">暂无未读通知</div>
|
|
53
26
|
</div>
|
|
54
27
|
</DropdownMenu>
|
|
55
28
|
</template>
|
|
@@ -58,194 +31,114 @@
|
|
|
58
31
|
</template>
|
|
59
32
|
|
|
60
33
|
<script>
|
|
61
|
-
import
|
|
62
|
-
import
|
|
63
|
-
import Bus from "@lambo-design/shared/utils/bus";
|
|
34
|
+
import Bus from '@lambo-design/shared/utils/bus';
|
|
35
|
+
import {deepCopy} from '@lambo-design/shared/utils/assist';
|
|
64
36
|
export default {
|
|
65
37
|
name: "pro-layout-tools-quick-todo",
|
|
66
38
|
data() {
|
|
67
39
|
return {
|
|
68
|
-
|
|
69
|
-
activeTab: 'notice',
|
|
70
|
-
noticeDatas:[],
|
|
71
|
-
noticeModel:false,
|
|
40
|
+
todoDatas:[]
|
|
72
41
|
}
|
|
73
42
|
},
|
|
74
|
-
created() {
|
|
75
|
-
this.init()
|
|
76
|
-
},
|
|
77
43
|
methods: {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
categoryId:item.categoryId
|
|
83
|
-
}
|
|
84
|
-
ajax.post(
|
|
85
|
-
config.smartMsgServerContext + "/manage/notices/created",
|
|
86
|
-
requestParams
|
|
87
|
-
)
|
|
88
|
-
this.init()
|
|
89
|
-
Bus.$emit('system-modalList',true,item.noticeId)
|
|
44
|
+
initListener() {
|
|
45
|
+
Bus.$on('other-datas',(data) => {
|
|
46
|
+
this.initTodoList(data);
|
|
47
|
+
})
|
|
90
48
|
},
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
.
|
|
97
|
-
let requestParams = {
|
|
98
|
-
noticeId: noticeIds.join(),
|
|
99
|
-
categoryId: categoryIds.join(),
|
|
100
|
-
};
|
|
101
|
-
if (requestParams.categoryId) {
|
|
102
|
-
ajax.post(
|
|
103
|
-
config.smartMsgServerContext + "/manage/notices/created",
|
|
104
|
-
requestParams
|
|
105
|
-
).then(function (resp) {
|
|
106
|
-
if (resp.data.code === 1) {
|
|
107
|
-
self.init()
|
|
108
|
-
self.$Message.info("已读成功")
|
|
109
|
-
} else {
|
|
110
|
-
alert("请求失败");
|
|
111
|
-
}
|
|
112
|
-
});
|
|
49
|
+
destroyListener() {
|
|
50
|
+
Bus.$off('other-datas')
|
|
51
|
+
},
|
|
52
|
+
initTodoList(data) {
|
|
53
|
+
if (data && data.todoDatas) {
|
|
54
|
+
this.todoDatas = deepCopy(data.todoDatas);
|
|
113
55
|
}
|
|
114
56
|
},
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
let self = this
|
|
118
|
-
ajax.get(config.smartMsgServerContext + "/manage/notices/gonggaoList").then(function (resp) {
|
|
119
|
-
console.log(resp)
|
|
120
|
-
self.noticeDatas = resp.data.data
|
|
121
|
-
});
|
|
57
|
+
getDetail(item){
|
|
58
|
+
Bus.$emit('other-operate','todo-detail',item)
|
|
122
59
|
},
|
|
123
|
-
|
|
124
|
-
|
|
60
|
+
getMore() {
|
|
61
|
+
Bus.$emit('other-operate','todo-more')
|
|
125
62
|
}
|
|
63
|
+
},
|
|
64
|
+
created() {
|
|
65
|
+
this.initListener()
|
|
66
|
+
},
|
|
67
|
+
beforeDestroy() {
|
|
68
|
+
this.destroyListener()
|
|
126
69
|
}
|
|
127
70
|
}
|
|
128
71
|
</script>
|
|
129
72
|
|
|
130
73
|
<style lang="less" scoped>
|
|
131
|
-
.
|
|
132
|
-
.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
74
|
+
.pro-layout-tools-quick-todo{
|
|
75
|
+
.todo-dropdown-menu {
|
|
76
|
+
width: 300px;
|
|
77
|
+
.dropdown-content{
|
|
78
|
+
max-height: 340px;
|
|
79
|
+
overflow-y: auto;
|
|
80
|
+
display: flex;
|
|
81
|
+
flex-direction: column;
|
|
82
|
+
padding: 10px;
|
|
83
|
+
margin-top: -6px;
|
|
84
|
+
&::-webkit-scrollbar {
|
|
85
|
+
width: 0;
|
|
86
|
+
height: 0;
|
|
87
|
+
}
|
|
88
|
+
.dropdown-item{
|
|
89
|
+
display: flex;
|
|
90
|
+
flex-direction: row; /* 修改为row,以便子元素水平排列 */
|
|
91
|
+
align-items: center; /* 确保所有子元素在交叉轴上居中对齐 */
|
|
92
|
+
padding: 14px 0; /* 根据需要添加一些垂直填充 */
|
|
93
|
+
.item-image-container{
|
|
94
|
+
position: relative;
|
|
95
|
+
display: inline-block; /* 或者 flex,根据需要 */
|
|
96
|
+
margin-right: 11px; /* 在图片和文本之间添加一些间距 */
|
|
97
|
+
.item-image{
|
|
98
|
+
width: 40px; /* 或者您想要的任何尺寸 */
|
|
99
|
+
height: 37px; /* 或者您想要的任何尺寸 */
|
|
100
|
+
margin-left: 7px;
|
|
101
|
+
}
|
|
102
|
+
.red-dot {
|
|
103
|
+
position: absolute;
|
|
104
|
+
margin: 0 0 0 -8px;
|
|
105
|
+
width: 10px; /* 小红点的大小 */
|
|
106
|
+
height: 10px; /* 小红点的大小 */
|
|
107
|
+
border-radius: 50%; /* 使其成为圆形 */
|
|
108
|
+
background-color: red; /* 红色背景 */
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
.item-content{
|
|
112
|
+
flex-grow: 1; /* 允许内容区域填充剩余空间 */
|
|
113
|
+
overflow: hidden;
|
|
114
|
+
display: flex;
|
|
115
|
+
flex-direction: column; /* 保持文字内容的垂直布局 */
|
|
116
|
+
.item-title{
|
|
117
|
+
font-weight: bold;
|
|
118
|
+
white-space: nowrap;
|
|
119
|
+
overflow: hidden;
|
|
120
|
+
font-size: 13px;
|
|
121
|
+
text-overflow: ellipsis;
|
|
122
|
+
}
|
|
123
|
+
.item-time{
|
|
124
|
+
font-size: 12px;
|
|
125
|
+
color: #999999;
|
|
126
|
+
white-space: nowrap;
|
|
127
|
+
overflow: hidden;
|
|
128
|
+
text-overflow: ellipsis;
|
|
129
|
+
margin-top: 10px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
.display-more{
|
|
134
|
+
text-align: center;
|
|
135
|
+
margin: 22px 0 4px 0;
|
|
136
|
+
}
|
|
137
|
+
.no-data{
|
|
138
|
+
text-align: center;
|
|
139
|
+
font-size: 17px
|
|
140
|
+
}
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
}
|
|
143
|
-
|
|
144
|
-
.notice-nav {
|
|
145
|
-
margin-right: 20px;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
.demo-dropdown-menu {
|
|
149
|
-
width: 300px;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
.dropdown-content {
|
|
153
|
-
max-height: 340px;
|
|
154
|
-
overflow-y: auto;
|
|
155
|
-
display: flex;
|
|
156
|
-
flex-direction: column;
|
|
157
|
-
padding: 10px;
|
|
158
|
-
margin-top: -6px;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.dropdown-content::-webkit-scrollbar {
|
|
162
|
-
width: 0;
|
|
163
|
-
height: 0;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.dropdown-item {
|
|
167
|
-
display: flex;
|
|
168
|
-
flex-direction: row; /* 修改为row,以便子元素水平排列 */
|
|
169
|
-
align-items: center; /* 确保所有子元素在交叉轴上居中对齐 */
|
|
170
|
-
padding: 14px 0; /* 根据需要添加一些垂直填充 */
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
.item-content {
|
|
174
|
-
flex-grow: 1; /* 允许内容区域填充剩余空间 */
|
|
175
|
-
overflow: hidden;
|
|
176
|
-
display: flex;
|
|
177
|
-
flex-direction: column; /* 保持文字内容的垂直布局 */
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
.item-title {
|
|
181
|
-
font-weight: bold;
|
|
182
|
-
white-space: nowrap;
|
|
183
|
-
overflow: hidden;
|
|
184
|
-
font-size: 13px;
|
|
185
|
-
text-overflow: ellipsis;
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
.item-time {
|
|
189
|
-
font-size: 12px;
|
|
190
|
-
color: #999999;
|
|
191
|
-
white-space: nowrap;
|
|
192
|
-
overflow: hidden;
|
|
193
|
-
text-overflow: ellipsis;
|
|
194
|
-
margin-top: 10px;
|
|
195
|
-
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
/deep/ .ivu-tabs-nav-container {
|
|
199
|
-
width: 100%;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/deep/ .ivu-tabs-nav {
|
|
203
|
-
display: flex;
|
|
204
|
-
width: 100%;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
/deep/ .ivu-tabs-tab {
|
|
208
|
-
flex: 1; /* 使所有标签平均分配空间 */
|
|
209
|
-
text-align: center; /* 使文本居中显示 */
|
|
210
|
-
border: none; /* 根据需要去除标签的边框 */
|
|
211
|
-
font-size: 14px;
|
|
212
|
-
margin-bottom: 8px;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
.item-image {
|
|
216
|
-
width: 40px; /* 或者您想要的任何尺寸 */
|
|
217
|
-
height: 37px; /* 或者您想要的任何尺寸 */
|
|
218
|
-
margin-left: 7px;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
.display-more {
|
|
222
|
-
text-align: center;
|
|
223
|
-
margin: 22px 0 4px 0;
|
|
224
|
-
}
|
|
225
|
-
|
|
226
|
-
.dropdown-footer {
|
|
227
|
-
text-align: right;
|
|
228
|
-
border-top: 1px solid #bbbbbb;
|
|
229
|
-
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
.mark-read span {
|
|
233
|
-
margin-left: 5px;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.item-image-container {
|
|
237
|
-
position: relative;
|
|
238
|
-
display: inline-block; /* 或者 flex,根据需要 */
|
|
239
|
-
margin-right: 11px; /* 在图片和文本之间添加一些间距 */
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.red-dot {
|
|
243
|
-
position: absolute;
|
|
244
|
-
margin: 0 0 0 -8px;
|
|
245
|
-
width: 10px; /* 小红点的大小 */
|
|
246
|
-
height: 10px; /* 小红点的大小 */
|
|
247
|
-
border-radius: 50%; /* 使其成为圆形 */
|
|
248
|
-
background-color: red; /* 红色背景 */
|
|
249
|
-
}
|
|
250
|
-
|
|
251
144
|
</style>
|
package/src/components/pro-layout-header/pro-layout-tools/components/pro-layout-tools-user.vue
CHANGED
|
@@ -4,16 +4,10 @@
|
|
|
4
4
|
<span>欢迎,{{ userInfo.userName }}</span>
|
|
5
5
|
<Icon v-if="userInfo.dropList.length > 0" type="ios-arrow-down"/>
|
|
6
6
|
<DropdownMenu v-if="userInfo.dropList.length > 0" slot="list">
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<
|
|
11
|
-
<DropdownItem v-if="item === 'theme'" name="theme"><span>切换主题</span></DropdownItem>
|
|
12
|
-
<DropdownItem v-if="item === 'showTheme'" name="showTheme"><span>自定义主题</span></DropdownItem>
|
|
13
|
-
<DropdownItem v-if="item === 'personalCenter'" name="personalCenter"><span>个人中心</span></DropdownItem>
|
|
14
|
-
<DropdownItem v-if="item === 'noticeList'" name="noticeList"><span>通知公告</span></DropdownItem>
|
|
15
|
-
</div>
|
|
16
|
-
<!-- 最后添加退出登录项 -->
|
|
7
|
+
<DropdownItem v-if="userInfo.dropList.includes('theme')" name="theme"><span>切换主题</span></DropdownItem>
|
|
8
|
+
<DropdownItem v-if="userInfo.dropList.includes('showTheme')" name="showTheme"><span>自定义主题</span></DropdownItem>
|
|
9
|
+
<DropdownItem v-if="userInfo.dropList.includes('personalCenter')" name="personalCenter"><span>个人中心</span></DropdownItem>
|
|
10
|
+
<DropdownItem v-if="userInfo.dropList.includes('noticeList')" name="noticeList"><span>通知公告</span></DropdownItem>
|
|
17
11
|
<DropdownItem v-if="userInfo.dropList.includes('logout')" name="logout"><span>退出登录</span></DropdownItem>
|
|
18
12
|
</DropdownMenu>
|
|
19
13
|
</Dropdown>
|
package/src/index.vue
CHANGED
|
@@ -86,6 +86,10 @@ export default {
|
|
|
86
86
|
default: () => {
|
|
87
87
|
return config.homeRouter
|
|
88
88
|
}
|
|
89
|
+
},
|
|
90
|
+
otherDatas: {
|
|
91
|
+
type: Object,
|
|
92
|
+
default: () => {}
|
|
89
93
|
}
|
|
90
94
|
},
|
|
91
95
|
data(){
|
|
@@ -103,7 +107,7 @@ export default {
|
|
|
103
107
|
},
|
|
104
108
|
computed: {
|
|
105
109
|
allData(){
|
|
106
|
-
const { systemInfo, userInfo, navList, originalAllMenuList, menuList, historyMenuList, collectMenuList, homeRouter} = this;
|
|
110
|
+
const { systemInfo, userInfo, navList, originalAllMenuList, menuList, historyMenuList, collectMenuList, homeRouter, otherDatas} = this;
|
|
107
111
|
return {
|
|
108
112
|
systemInfo,
|
|
109
113
|
userInfo,
|
|
@@ -112,7 +116,8 @@ export default {
|
|
|
112
116
|
menuList,
|
|
113
117
|
historyMenuList,
|
|
114
118
|
collectMenuList,
|
|
115
|
-
homeRouter
|
|
119
|
+
homeRouter,
|
|
120
|
+
otherDatas
|
|
116
121
|
}
|
|
117
122
|
},
|
|
118
123
|
headBackgroundStyle(){
|
|
@@ -171,6 +176,9 @@ export default {
|
|
|
171
176
|
Bus.$on('click-logo',()=>{
|
|
172
177
|
this.clickLogo();
|
|
173
178
|
})
|
|
179
|
+
Bus.$on('other-operate',(type,data)=>{
|
|
180
|
+
this.otherOperate(type,data);
|
|
181
|
+
})
|
|
174
182
|
},
|
|
175
183
|
destroyListener(){
|
|
176
184
|
Bus.$off('trigger-change')
|
|
@@ -182,6 +190,7 @@ export default {
|
|
|
182
190
|
Bus.$off('delete-collect-menu')
|
|
183
191
|
Bus.$off('toggle-collect-menu')
|
|
184
192
|
Bus.$off('click-logo')
|
|
193
|
+
Bus.$off('other-operate')
|
|
185
194
|
},
|
|
186
195
|
initEmit(){
|
|
187
196
|
//在这里改this.menuList
|
|
@@ -198,6 +207,7 @@ export default {
|
|
|
198
207
|
Bus.$emit('menu-list',this.menuList);
|
|
199
208
|
Bus.$emit('history-menu-list',this.historyMenuList);
|
|
200
209
|
Bus.$emit('collect-menu-list',this.collectMenuList);
|
|
210
|
+
Bus.$emit('other-datas',this.otherDatas)
|
|
201
211
|
},
|
|
202
212
|
initTags(){
|
|
203
213
|
let tagList = getTagNavListFromLocalstorage(config.routerBase + '-tagNavList');
|
|
@@ -280,6 +290,9 @@ export default {
|
|
|
280
290
|
},
|
|
281
291
|
clickLogo(){
|
|
282
292
|
this.$emit('click-logo')
|
|
293
|
+
},
|
|
294
|
+
otherOperate(type,data){
|
|
295
|
+
this.$emit('other-operate', type, data)
|
|
283
296
|
}
|
|
284
297
|
},
|
|
285
298
|
mounted(){
|