@cmstops/pro-compo 0.1.1 → 0.1.3
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/dist/index.css +115 -1
- package/dist/index.min.css +1 -1
- package/es/appCenter/component.js +2 -1
- package/es/appCenter/script/routeMap.d.ts +1 -1
- package/es/appCenter/style/index.css +1 -1
- package/es/appCenter/style/index.less +1 -1
- package/es/index.css +115 -1
- package/es/index.d.ts +2 -0
- package/es/index.js +2 -0
- package/es/index.less +2 -0
- package/es/messageBox/component.d.ts +0 -0
- package/es/messageBox/component.js +145 -0
- package/es/messageBox/index.d.ts +2 -0
- package/es/messageBox/index.js +7 -0
- package/es/messageBox/list.d.ts +0 -0
- package/es/messageBox/list.js +116 -0
- package/es/messageBox/script/api.d.ts +6 -0
- package/es/messageBox/script/api.js +16 -0
- package/es/messageBox/style/css.js +1 -0
- package/es/messageBox/style/index.css +64 -0
- package/es/messageBox/style/index.d.ts +1 -0
- package/es/messageBox/style/index.js +1 -0
- package/es/messageBox/style/index.less +71 -0
- package/es/userAvater/component.d.ts +0 -0
- package/es/userAvater/component.js +167 -0
- package/es/userAvater/index.d.ts +2 -0
- package/es/userAvater/index.js +7 -0
- package/es/userAvater/script/api.d.ts +8 -0
- package/es/userAvater/script/api.js +32 -0
- package/es/userAvater/style/css.js +1 -0
- package/es/userAvater/style/index.css +50 -0
- package/es/userAvater/style/index.d.ts +1 -0
- package/es/userAvater/style/index.js +1 -0
- package/es/userAvater/style/index.less +54 -0
- package/es/utils/request.js +3 -2
- package/lib/appCenter/component.js +2 -1
- package/lib/appCenter/style/index.css +1 -1
- package/lib/appCenter/style/index.less +1 -1
- package/lib/index.css +115 -1
- package/lib/index.js +4 -0
- package/lib/index.less +2 -0
- package/lib/messageBox/component.js +146 -0
- package/lib/messageBox/index.js +8 -0
- package/lib/messageBox/list.js +117 -0
- package/lib/messageBox/script/api.js +19 -0
- package/lib/messageBox/style/css.js +2 -0
- package/lib/messageBox/style/index.css +64 -0
- package/lib/messageBox/style/index.js +2 -0
- package/lib/messageBox/style/index.less +71 -0
- package/lib/userAvater/component.js +168 -0
- package/lib/userAvater/index.js +8 -0
- package/lib/userAvater/script/api.js +37 -0
- package/lib/userAvater/style/css.js +2 -0
- package/lib/userAvater/style/index.css +50 -0
- package/lib/userAvater/style/index.js +2 -0
- package/lib/userAvater/style/index.less +54 -0
- package/lib/utils/request.js +3 -2
- package/package.json +1 -1
package/dist/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
border-radius: 4px;
|
|
9
9
|
color: #5f5f5f;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.apps-box-popover {
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 10px;
|
|
14
14
|
}
|
|
@@ -92,3 +92,117 @@
|
|
|
92
92
|
top: 2px;
|
|
93
93
|
right: 4px;
|
|
94
94
|
}
|
|
95
|
+
.reference-btn {
|
|
96
|
+
border: none;
|
|
97
|
+
padding: 12px 16px;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
color: #5f5f5f;
|
|
100
|
+
}
|
|
101
|
+
.message-boxs-popover {
|
|
102
|
+
width: 435px;
|
|
103
|
+
position: relative;
|
|
104
|
+
}
|
|
105
|
+
.message-boxs-popover .arco-tabs-content {
|
|
106
|
+
padding-top: 0;
|
|
107
|
+
}
|
|
108
|
+
.message-boxs-popover .msg-scroll-bar {
|
|
109
|
+
height: 80vh;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
.message-boxs-popover .message-list {
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 0;
|
|
116
|
+
list-style: none;
|
|
117
|
+
}
|
|
118
|
+
.message-boxs-popover .message-item {
|
|
119
|
+
padding: 16px;
|
|
120
|
+
padding-bottom: 0px;
|
|
121
|
+
}
|
|
122
|
+
.message-boxs-popover .message-item:last-child .message-body {
|
|
123
|
+
border-bottom: none;
|
|
124
|
+
}
|
|
125
|
+
.message-boxs-popover .message-item .message-body {
|
|
126
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
127
|
+
padding-bottom: 16px;
|
|
128
|
+
}
|
|
129
|
+
.message-boxs-popover .message-item .message-body .media-message-content {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-content {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
font-size: 12px;
|
|
137
|
+
color: #4e5969;
|
|
138
|
+
margin-bottom: 18px;
|
|
139
|
+
}
|
|
140
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
color: #1d2129;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
line-height: 14px;
|
|
147
|
+
}
|
|
148
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title {
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
text-overflow: ellipsis;
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
}
|
|
153
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon {
|
|
154
|
+
margin-right: 4px;
|
|
155
|
+
}
|
|
156
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover {
|
|
157
|
+
text-decoration: underline;
|
|
158
|
+
}
|
|
159
|
+
.user-avater-content-info {
|
|
160
|
+
width: 328px;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
padding: 24px;
|
|
166
|
+
padding-bottom: 0px;
|
|
167
|
+
line-height: 1;
|
|
168
|
+
}
|
|
169
|
+
.user-avater-content-info .avatar {
|
|
170
|
+
width: 74px;
|
|
171
|
+
height: 74px;
|
|
172
|
+
position: relative;
|
|
173
|
+
border-radius: 50%;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
margin-bottom: 10px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
}
|
|
180
|
+
.user-avater-content-info .avatar .arco-avatar {
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100%;
|
|
183
|
+
}
|
|
184
|
+
.user-avater-content-info .nick-name {
|
|
185
|
+
font-size: 16px;
|
|
186
|
+
color: #1D2129;
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
margin-bottom: 10px;
|
|
189
|
+
}
|
|
190
|
+
.user-avater-content-info .user-name,
|
|
191
|
+
.user-avater-content-info .user-email {
|
|
192
|
+
font-size: 14px;
|
|
193
|
+
color: #86909C;
|
|
194
|
+
margin-bottom: 10px;
|
|
195
|
+
}
|
|
196
|
+
.user-avater-content-info .org-alias {
|
|
197
|
+
border: 1px solid #EBEEF5;
|
|
198
|
+
padding: 10px 20px;
|
|
199
|
+
border-radius: 40px;
|
|
200
|
+
}
|
|
201
|
+
.user-avater-content-info .b_info_bottom {
|
|
202
|
+
height: 52px;
|
|
203
|
+
padding: 10px 16px;
|
|
204
|
+
width: 100%;
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
}
|
package/dist/index.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tooltip-button{height:auto;padding:20px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.
|
|
1
|
+
.tooltip-button{height:auto;padding:20px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.apps-box-popover{position:relative;padding:10px}.app-title{font-size:16px;font-weight:700;padding:0 15px}.ul-list{list-style:none;overflow:hidden;width:435px!important;text-align:center;padding:0;margin:0}.ul-list .li_item{float:left;width:85px;height:90px;text-align:center;margin:13px 0;position:relative}.ul-list .li_item .icon-logo .svg-icon{width:4em;height:3.5em}.ul-list .li_item:hover{background:rgba(0,0,0,.05);border-radius:4px;cursor:pointer}.ul-list .li_item:hover .icon-gengduo{display:block}.ul-list .li_item .wrap_icon{width:70px;display:inline-block;margin-top:6px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo{width:70px;height:50px;margin-bottom:4px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo img{max-width:100%;max-height:100%}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo{line-height:77px}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img{width:35px;height:35px}.ul-list .li_item .wrap_icon .wrap_ .icon_title{width:73px;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ul-list .li_item .wrap_icon .quick-add .icon-logo{width:40px;height:40px;margin:5px auto 9px;text-align:center;background-color:rgba(0,0,0,.12);border-radius:50%}.ul-list .li_item .wrap_icon .quick-add .icon-logo i{line-height:40px;color:rgba(0,0,0,.85);font-size:14px}.ul-list .li_item .icon-gengduo{display:none;position:absolute;top:2px;right:4px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.message-boxs-popover{width:435px;position:relative}.message-boxs-popover .arco-tabs-content{padding-top:0}.message-boxs-popover .msg-scroll-bar{height:80vh;overflow-y:auto;display:block}.message-boxs-popover .message-list{margin:0;padding:0;list-style:none}.message-boxs-popover .message-item{padding:16px;padding-bottom:0}.message-boxs-popover .message-item:last-child .message-body{border-bottom:none}.message-boxs-popover .message-item .message-body{border-bottom:1px solid rgba(0,0,0,.05);padding-bottom:16px}.message-boxs-popover .message-item .message-body .media-message-content{width:100%}.message-boxs-popover .message-item .message-body .media-message-content .message-content{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#4e5969;margin-bottom:18px}.message-boxs-popover .message-item .message-body .media-message-content .message-info{display:flex;align-items:center;justify-content:space-between;color:#1d2129;font-size:14px;line-height:14px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon{margin-right:4px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover{text-decoration:underline}.user-avater-content-info{width:328px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;padding-bottom:0;line-height:1}.user-avater-content-info .avatar{width:74px;height:74px;position:relative;border-radius:50%;overflow:hidden;margin-bottom:10px;display:flex;align-items:center;justify-content:center}.user-avater-content-info .avatar .arco-avatar{width:100%;height:100%}.user-avater-content-info .nick-name{font-size:16px;color:#1d2129;font-weight:500;margin-bottom:10px}.user-avater-content-info .user-email,.user-avater-content-info .user-name{font-size:14px;color:#86909c;margin-bottom:10px}.user-avater-content-info .org-alias{border:1px solid #ebeef5;padding:10px 20px;border-radius:40px}.user-avater-content-info .b_info_bottom{height:52px;padding:10px 16px;width:100%;display:flex;align-items:center;justify-content:center}
|
|
@@ -9,7 +9,7 @@ const _hoisted_1 = {
|
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "reference-btn"
|
|
11
11
|
};
|
|
12
|
-
const _hoisted_2 = { class: "
|
|
12
|
+
const _hoisted_2 = { class: "apps-box-popover" };
|
|
13
13
|
const _hoisted_3 = {
|
|
14
14
|
key: 0,
|
|
15
15
|
class: "app-title"
|
|
@@ -116,6 +116,7 @@ const _sfc_main = defineComponent({
|
|
|
116
116
|
return openBlock(), createElementBlock("div", null, [
|
|
117
117
|
createVNode(unref(Popover), {
|
|
118
118
|
trigger: "hover",
|
|
119
|
+
position: "bottom",
|
|
119
120
|
"arrow-style": { display: "none" },
|
|
120
121
|
"content-style": { padding: 0, minWidth: "400px" }
|
|
121
122
|
}, {
|
package/es/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
border-radius: 4px;
|
|
9
9
|
color: #5f5f5f;
|
|
10
10
|
}
|
|
11
|
-
.
|
|
11
|
+
.apps-box-popover {
|
|
12
12
|
position: relative;
|
|
13
13
|
padding: 10px;
|
|
14
14
|
}
|
|
@@ -92,3 +92,117 @@
|
|
|
92
92
|
top: 2px;
|
|
93
93
|
right: 4px;
|
|
94
94
|
}
|
|
95
|
+
.reference-btn {
|
|
96
|
+
border: none;
|
|
97
|
+
padding: 12px 16px;
|
|
98
|
+
border-radius: 4px;
|
|
99
|
+
color: #5f5f5f;
|
|
100
|
+
}
|
|
101
|
+
.message-boxs-popover {
|
|
102
|
+
width: 435px;
|
|
103
|
+
position: relative;
|
|
104
|
+
}
|
|
105
|
+
.message-boxs-popover .arco-tabs-content {
|
|
106
|
+
padding-top: 0;
|
|
107
|
+
}
|
|
108
|
+
.message-boxs-popover .msg-scroll-bar {
|
|
109
|
+
height: 80vh;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
display: block;
|
|
112
|
+
}
|
|
113
|
+
.message-boxs-popover .message-list {
|
|
114
|
+
margin: 0;
|
|
115
|
+
padding: 0;
|
|
116
|
+
list-style: none;
|
|
117
|
+
}
|
|
118
|
+
.message-boxs-popover .message-item {
|
|
119
|
+
padding: 16px;
|
|
120
|
+
padding-bottom: 0px;
|
|
121
|
+
}
|
|
122
|
+
.message-boxs-popover .message-item:last-child .message-body {
|
|
123
|
+
border-bottom: none;
|
|
124
|
+
}
|
|
125
|
+
.message-boxs-popover .message-item .message-body {
|
|
126
|
+
border-bottom: 1px solid rgba(0, 0, 0, 0.05);
|
|
127
|
+
padding-bottom: 16px;
|
|
128
|
+
}
|
|
129
|
+
.message-boxs-popover .message-item .message-body .media-message-content {
|
|
130
|
+
width: 100%;
|
|
131
|
+
}
|
|
132
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-content {
|
|
133
|
+
display: flex;
|
|
134
|
+
align-items: center;
|
|
135
|
+
justify-content: space-between;
|
|
136
|
+
font-size: 12px;
|
|
137
|
+
color: #4e5969;
|
|
138
|
+
margin-bottom: 18px;
|
|
139
|
+
}
|
|
140
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info {
|
|
141
|
+
display: flex;
|
|
142
|
+
align-items: center;
|
|
143
|
+
justify-content: space-between;
|
|
144
|
+
color: #1d2129;
|
|
145
|
+
font-size: 14px;
|
|
146
|
+
line-height: 14px;
|
|
147
|
+
}
|
|
148
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title {
|
|
149
|
+
overflow: hidden;
|
|
150
|
+
text-overflow: ellipsis;
|
|
151
|
+
white-space: nowrap;
|
|
152
|
+
}
|
|
153
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon {
|
|
154
|
+
margin-right: 4px;
|
|
155
|
+
}
|
|
156
|
+
.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover {
|
|
157
|
+
text-decoration: underline;
|
|
158
|
+
}
|
|
159
|
+
.user-avater-content-info {
|
|
160
|
+
width: 328px;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
align-items: center;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
padding: 24px;
|
|
166
|
+
padding-bottom: 0px;
|
|
167
|
+
line-height: 1;
|
|
168
|
+
}
|
|
169
|
+
.user-avater-content-info .avatar {
|
|
170
|
+
width: 74px;
|
|
171
|
+
height: 74px;
|
|
172
|
+
position: relative;
|
|
173
|
+
border-radius: 50%;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
margin-bottom: 10px;
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
}
|
|
180
|
+
.user-avater-content-info .avatar .arco-avatar {
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100%;
|
|
183
|
+
}
|
|
184
|
+
.user-avater-content-info .nick-name {
|
|
185
|
+
font-size: 16px;
|
|
186
|
+
color: #1D2129;
|
|
187
|
+
font-weight: 500;
|
|
188
|
+
margin-bottom: 10px;
|
|
189
|
+
}
|
|
190
|
+
.user-avater-content-info .user-name,
|
|
191
|
+
.user-avater-content-info .user-email {
|
|
192
|
+
font-size: 14px;
|
|
193
|
+
color: #86909C;
|
|
194
|
+
margin-bottom: 10px;
|
|
195
|
+
}
|
|
196
|
+
.user-avater-content-info .org-alias {
|
|
197
|
+
border: 1px solid #EBEEF5;
|
|
198
|
+
padding: 10px 20px;
|
|
199
|
+
border-radius: 40px;
|
|
200
|
+
}
|
|
201
|
+
.user-avater-content-info .b_info_bottom {
|
|
202
|
+
height: 52px;
|
|
203
|
+
padding: 10px 16px;
|
|
204
|
+
width: 100%;
|
|
205
|
+
display: flex;
|
|
206
|
+
align-items: center;
|
|
207
|
+
justify-content: center;
|
|
208
|
+
}
|
package/es/index.d.ts
CHANGED
package/es/index.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export { default } from "./components.js";
|
|
2
2
|
export { default as button } from "./button/index.js";
|
|
3
3
|
export { default as appCenter } from "./appCenter/index.js";
|
|
4
|
+
export { default as messageBox } from "./messageBox/index.js";
|
|
5
|
+
export { default as userAvater } from "./userAvater/index.js";
|
package/es/index.less
CHANGED
|
File without changes
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { defineComponent, useSlots, ref, onMounted, resolveDirective, openBlock, createElementBlock, createVNode, unref, withCtx, createElementVNode, withDirectives, createBlock, createTextVNode, renderSlot } from "vue";
|
|
2
|
+
import { Popover, Tabs, TabPane, Badge } from "@arco-design/web-vue";
|
|
3
|
+
import _sfc_main$1 from "./list.js";
|
|
4
|
+
import { setAllMsgRead, getNoticeList } from "./script/api.js";
|
|
5
|
+
const _hoisted_1 = { class: "message-boxs-container" };
|
|
6
|
+
const _hoisted_2 = {
|
|
7
|
+
key: 1,
|
|
8
|
+
class: "reference-btn"
|
|
9
|
+
};
|
|
10
|
+
const _hoisted_3 = { class: "message-boxs-popover" };
|
|
11
|
+
const _sfc_main = defineComponent({
|
|
12
|
+
...{ name: "messageBox" },
|
|
13
|
+
__name: "component",
|
|
14
|
+
props: {
|
|
15
|
+
BASE_API: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const BASE_API = props.BASE_API || "https://site.cmstop.xyz";
|
|
20
|
+
const slotTest = !!useSlots().reference;
|
|
21
|
+
const readMessagesCount = ref(0);
|
|
22
|
+
const unreadMessagesCount = ref(0);
|
|
23
|
+
const isLoadingMore = ref(false);
|
|
24
|
+
const unreadMessages = ref([]);
|
|
25
|
+
const readMessages = ref([]);
|
|
26
|
+
const isNoMore = ref(false);
|
|
27
|
+
const page = ref({ limit: 20, offset: 0 });
|
|
28
|
+
const handlePopupVisibleChange = (visible) => {
|
|
29
|
+
if (!visible) {
|
|
30
|
+
setAllMsgToRead();
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
const setAllMsgToRead = async () => {
|
|
34
|
+
try {
|
|
35
|
+
const res = await setAllMsgRead(BASE_API);
|
|
36
|
+
if (res.code === 0) {
|
|
37
|
+
setData();
|
|
38
|
+
}
|
|
39
|
+
} catch (error) {
|
|
40
|
+
console.log(error);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const setData = async () => {
|
|
44
|
+
isLoadingMore.value = true;
|
|
45
|
+
const res = await getNoticeList(BASE_API, {}).catch(() => {
|
|
46
|
+
isLoadingMore.value = false;
|
|
47
|
+
});
|
|
48
|
+
if ((res == null ? void 0 : res.code) === 0 && (res == null ? void 0 : res.message)) {
|
|
49
|
+
const data = res.message;
|
|
50
|
+
if (data.notice_state) {
|
|
51
|
+
unreadMessages.value = data.notice_state[0] && data.notice_state[0].notices || [];
|
|
52
|
+
readMessages.value = data.notice_state[1] && data.notice_state[1].notices || [];
|
|
53
|
+
}
|
|
54
|
+
readMessagesCount.value = data.readed || 0;
|
|
55
|
+
unreadMessagesCount.value = data.unread || 0;
|
|
56
|
+
isLoadingMore.value = false;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const loadMore = async () => {
|
|
60
|
+
if (unreadMessages.value.length !== 0)
|
|
61
|
+
return;
|
|
62
|
+
isLoadingMore.value = true;
|
|
63
|
+
try {
|
|
64
|
+
page.value.offset = readMessages.value.length;
|
|
65
|
+
const res = await getNoticeList(BASE_API, {
|
|
66
|
+
state: 1,
|
|
67
|
+
...page.value
|
|
68
|
+
}).catch(() => {
|
|
69
|
+
isLoadingMore.value = false;
|
|
70
|
+
});
|
|
71
|
+
if (res.code === 0 && res.message) {
|
|
72
|
+
const { notice_state } = res.message;
|
|
73
|
+
notice_state[1].notices.length < page.value.limit && (isNoMore.value = true);
|
|
74
|
+
readMessages.value = readMessages.value.concat(
|
|
75
|
+
notice_state[1] && notice_state[1].notices || []
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
isLoadingMore.value = false;
|
|
79
|
+
} catch (error) {
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
onMounted(() => {
|
|
83
|
+
setData();
|
|
84
|
+
});
|
|
85
|
+
return (_ctx, _cache) => {
|
|
86
|
+
const _directive_loading = resolveDirective("loading");
|
|
87
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
88
|
+
createVNode(unref(Popover), {
|
|
89
|
+
trigger: "hover",
|
|
90
|
+
position: "bottom",
|
|
91
|
+
"arrow-style": { display: "none" },
|
|
92
|
+
"content-style": { padding: 0, minWidth: "400px" },
|
|
93
|
+
"popup-visible-change": handlePopupVisibleChange
|
|
94
|
+
}, {
|
|
95
|
+
content: withCtx(() => [
|
|
96
|
+
createElementVNode("div", _hoisted_3, [
|
|
97
|
+
createVNode(unref(Tabs), null, {
|
|
98
|
+
default: withCtx(() => [
|
|
99
|
+
withDirectives((openBlock(), createBlock(unref(TabPane), { key: "1" }, {
|
|
100
|
+
title: withCtx(() => [
|
|
101
|
+
createTextVNode("\u6D88\u606F")
|
|
102
|
+
]),
|
|
103
|
+
default: withCtx(() => [
|
|
104
|
+
unreadMessages.value.length === 0 ? (openBlock(), createBlock(_sfc_main$1, {
|
|
105
|
+
key: 0,
|
|
106
|
+
list: readMessages.value,
|
|
107
|
+
"onUpdate:list": _cache[0] || (_cache[0] = ($event) => readMessages.value = $event),
|
|
108
|
+
"list-type": "unread",
|
|
109
|
+
"is-loading-more": isLoadingMore.value,
|
|
110
|
+
"is-no-more": isNoMore.value,
|
|
111
|
+
onLoadMoreMsg: loadMore
|
|
112
|
+
}, null, 8, ["list", "is-loading-more", "is-no-more"])) : (openBlock(), createBlock(_sfc_main$1, {
|
|
113
|
+
key: 1,
|
|
114
|
+
list: unreadMessages.value,
|
|
115
|
+
"onUpdate:list": _cache[1] || (_cache[1] = ($event) => unreadMessages.value = $event),
|
|
116
|
+
"list-type": "unread",
|
|
117
|
+
"is-loading-more": isLoadingMore.value,
|
|
118
|
+
"is-no-more": isNoMore.value,
|
|
119
|
+
onLoadMoreMsg: loadMore
|
|
120
|
+
}, null, 8, ["list", "is-loading-more", "is-no-more"]))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
})), [
|
|
124
|
+
[_directive_loading, isLoadingMore.value]
|
|
125
|
+
])
|
|
126
|
+
]),
|
|
127
|
+
_: 1
|
|
128
|
+
})
|
|
129
|
+
])
|
|
130
|
+
]),
|
|
131
|
+
default: withCtx(() => [
|
|
132
|
+
createVNode(unref(Badge), { count: unreadMessagesCount.value }, {
|
|
133
|
+
default: withCtx(() => [
|
|
134
|
+
slotTest ? renderSlot(_ctx.$slots, "reference", { key: 0 }) : (openBlock(), createElementBlock("button", _hoisted_2, "\u6D88\u606F\u5217\u8868"))
|
|
135
|
+
]),
|
|
136
|
+
_: 3
|
|
137
|
+
}, 8, ["count"])
|
|
138
|
+
]),
|
|
139
|
+
_: 3
|
|
140
|
+
})
|
|
141
|
+
]);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export { _sfc_main as default };
|
|
File without changes
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, openBlock, createElementBlock, Fragment, createVNode, unref, createCommentVNode, withCtx, renderList, createElementVNode, toDisplayString, createTextVNode, withModifiers } from "vue";
|
|
2
|
+
import { Empty, Scrollbar } from "@arco-design/web-vue";
|
|
3
|
+
import { IconRight } from "@arco-design/web-vue/es/icon";
|
|
4
|
+
const _hoisted_1 = {
|
|
5
|
+
key: 0,
|
|
6
|
+
class: "empty-list"
|
|
7
|
+
};
|
|
8
|
+
const _hoisted_2 = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "message-list"
|
|
11
|
+
};
|
|
12
|
+
const _hoisted_3 = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "message-body"
|
|
15
|
+
};
|
|
16
|
+
const _hoisted_4 = { class: "media-message-content" };
|
|
17
|
+
const _hoisted_5 = { class: "message-content" };
|
|
18
|
+
const _hoisted_6 = { class: "title" };
|
|
19
|
+
const _hoisted_7 = { key: 0 };
|
|
20
|
+
const _hoisted_8 = { class: "time" };
|
|
21
|
+
const _hoisted_9 = ["onClick"];
|
|
22
|
+
const _hoisted_10 = { class: "message-media-title" };
|
|
23
|
+
const _hoisted_11 = { class: "message-media-title-hover" };
|
|
24
|
+
const _hoisted_12 = { class: "action" };
|
|
25
|
+
const _sfc_main = defineComponent({
|
|
26
|
+
__name: "list",
|
|
27
|
+
props: {
|
|
28
|
+
listType: {},
|
|
29
|
+
list: {},
|
|
30
|
+
isLoadingMore: { type: Boolean },
|
|
31
|
+
isNorMore: { type: Boolean }
|
|
32
|
+
},
|
|
33
|
+
emits: ["loadMoreMsg"],
|
|
34
|
+
setup(__props, { emit: emits }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const isEmptyList = computed(() => {
|
|
37
|
+
if (props.list.length === 0) {
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
});
|
|
42
|
+
const listData = computed(() => {
|
|
43
|
+
return props.list;
|
|
44
|
+
});
|
|
45
|
+
const approvalStateMapText = ref({
|
|
46
|
+
approval_msg: { label: "\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\uFF0C\u5F85\u60A8\u5BA1\u6838", show_user_alias: true },
|
|
47
|
+
approval_cc_msg: { label: "\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\uFF0C\u6284\u9001\u7ED9\u60A8" },
|
|
48
|
+
approval_pass: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5DF2\u5BA1\u6838\u901A\u8FC7" },
|
|
49
|
+
approval_fail: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5BA1\u6838\u88AB\u9A73\u56DE" },
|
|
50
|
+
approval_retrial: { label: "\u60A8\u63D0\u4EA4\u4E86\u4E00\u9879\u5185\u5BB9\u5BA1\u6838\u88AB\u9A73\u56DE\u91CD\u5BA1" }
|
|
51
|
+
});
|
|
52
|
+
const openApprovalDetail = (msg) => {
|
|
53
|
+
console.log(msg);
|
|
54
|
+
};
|
|
55
|
+
const handleScroll = (event) => {
|
|
56
|
+
event && event.stopPropagation();
|
|
57
|
+
if (event.target) {
|
|
58
|
+
const { scrollTop, scrollHeight, clientHeight } = event.target;
|
|
59
|
+
if (scrollTop + clientHeight >= scrollHeight) {
|
|
60
|
+
if (props.isLoadingMore === false && !props.isNorMore) {
|
|
61
|
+
emits("loadMoreMsg", props.listType);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return openBlock(), createElementBlock(Fragment, null, [
|
|
68
|
+
isEmptyList.value === true ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
69
|
+
createVNode(unref(Empty))
|
|
70
|
+
])) : createCommentVNode("v-if", true),
|
|
71
|
+
createVNode(unref(Scrollbar), {
|
|
72
|
+
class: "msg-scroll-bar",
|
|
73
|
+
onScroll: handleScroll
|
|
74
|
+
}, {
|
|
75
|
+
default: withCtx(() => [
|
|
76
|
+
listData.value.length > 0 ? (openBlock(), createElementBlock("ul", _hoisted_2, [
|
|
77
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(listData.value, (item) => {
|
|
78
|
+
return openBlock(), createElementBlock("li", {
|
|
79
|
+
key: "list_" + item.msg.nid,
|
|
80
|
+
class: "message-item"
|
|
81
|
+
}, [
|
|
82
|
+
createCommentVNode(" \u901A\u77E5\u5185\u5BB9 "),
|
|
83
|
+
item.msg ? (openBlock(), createElementBlock("div", _hoisted_3, [
|
|
84
|
+
createElementVNode("div", _hoisted_4, [
|
|
85
|
+
createElementVNode("div", _hoisted_5, [
|
|
86
|
+
createElementVNode("span", _hoisted_6, [
|
|
87
|
+
approvalStateMapText.value[item.msg.t].show_user_alias ? (openBlock(), createElementBlock("span", _hoisted_7, toDisplayString(item.msg.alias), 1)) : createCommentVNode("v-if", true),
|
|
88
|
+
createTextVNode(" " + toDisplayString(approvalStateMapText.value[item.msg.t].label), 1)
|
|
89
|
+
]),
|
|
90
|
+
createElementVNode("span", _hoisted_8, toDisplayString(item.msg.time), 1)
|
|
91
|
+
]),
|
|
92
|
+
createElementVNode("div", {
|
|
93
|
+
class: "message-info",
|
|
94
|
+
onClick: withModifiers(($event) => openApprovalDetail(item.msg), ["stop"])
|
|
95
|
+
}, [
|
|
96
|
+
createElementVNode("div", _hoisted_10, [
|
|
97
|
+
createCommentVNode(' <FileTypeIcons\n class="icon"\n :file-type="item.msg.catalog"\n :doc-type="item.msg.series"\n ></FileTypeIcons> '),
|
|
98
|
+
createElementVNode("span", _hoisted_11, toDisplayString(item.msg.title), 1)
|
|
99
|
+
]),
|
|
100
|
+
createElementVNode("div", _hoisted_12, [
|
|
101
|
+
createVNode(unref(IconRight))
|
|
102
|
+
])
|
|
103
|
+
], 8, _hoisted_9)
|
|
104
|
+
])
|
|
105
|
+
])) : createCommentVNode("v-if", true)
|
|
106
|
+
]);
|
|
107
|
+
}), 128))
|
|
108
|
+
])) : createCommentVNode("v-if", true)
|
|
109
|
+
]),
|
|
110
|
+
_: 1
|
|
111
|
+
})
|
|
112
|
+
], 64);
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare function getNoticeList(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
5
|
+
export declare function setAllMsgRead(BASE_API: string, params?: Params): import("axios").AxiosPromise<any>;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import request from "../../utils/request.js";
|
|
2
|
+
function getNoticeList(BASE_API, params) {
|
|
3
|
+
return request(BASE_API, {
|
|
4
|
+
url: "/poplar/v2/notice",
|
|
5
|
+
method: "post",
|
|
6
|
+
data: params
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function setAllMsgRead(BASE_API, params) {
|
|
10
|
+
return request(BASE_API, {
|
|
11
|
+
url: "/poplar/v2/notice/readed",
|
|
12
|
+
method: "post",
|
|
13
|
+
data: params
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
export { getNoticeList, setAllMsgRead };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.css";
|