doway-coms 1.6.50 → 1.6.52
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 +1 -1
- package/packages/LeaveAMessage/src/index.vue +129 -65
- package/packages/utils/api.js +14 -0
- package/dist/css/chunk-vendors.7f83d8f9.css +0 -8
- package/dist/css/index.86478f73.css +0 -3
- package/dist/favicon.ico +0 -0
- package/dist/js/chunk-vendors.307eaa8f.js +0 -347
- package/dist/js/index.48e7f7ac.js +0 -2
package/package.json
CHANGED
|
@@ -1,28 +1,66 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="liu-yan" style="background-color: #eaeef1">
|
|
3
3
|
<div class="input-box">
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
4
|
+
<a-tabs default-active-key="msg">
|
|
5
|
+
<a-tab-pane key="msg" tab="发送消息">
|
|
6
|
+
<div style="display:flex">
|
|
7
|
+
<div
|
|
8
|
+
style="display:flex;justify-content: center;align-items: center;margin-bottom:5px;flex:1"
|
|
9
|
+
>
|
|
10
|
+
<div style="flex:1">主题:</div>
|
|
11
|
+
<a-input v-model:value="subject" style="flex:3" size="small"></a-input>
|
|
12
|
+
</div>
|
|
13
|
+
<div
|
|
14
|
+
style="display:flex;justify-content: center;align-items: center;margin-bottom:5px;margin-left:5px;flex:1"
|
|
15
|
+
>
|
|
16
|
+
<div style="flex:1">发送给:</div>
|
|
17
|
+
<a-select
|
|
18
|
+
v-model:value="sendUser"
|
|
19
|
+
mode="tags"
|
|
20
|
+
style="width: 85%;flex:3"
|
|
21
|
+
:options="userList"
|
|
22
|
+
size="small"
|
|
23
|
+
></a-select>
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<a-textarea placeholder="写些什么..." v-model:value="remark" />
|
|
27
|
+
<!-- <a-upload
|
|
28
|
+
list-type="picture"
|
|
29
|
+
:headers="uploadHeaders"
|
|
30
|
+
:action="uploadData.picAction"
|
|
31
|
+
:data="uploadData"
|
|
32
|
+
:before-upload="beforeAvatarUpload"
|
|
33
|
+
@change="handleAvatarSuccess"
|
|
34
|
+
:file-list="fileList"
|
|
35
|
+
style="padding-top: 10px"
|
|
36
|
+
>
|
|
37
|
+
<a-icon style="font-size: 16px; cursor: pointer; margin: 5px 10px" type="paper-clip" />
|
|
38
|
+
</a-upload>-->
|
|
39
|
+
<div style="display: flex; justify-content: flex-end;margin-top:5px">
|
|
40
|
+
<a-button @click="sendMsg">发送</a-button>
|
|
41
|
+
</div>
|
|
42
|
+
</a-tab-pane>
|
|
43
|
+
<a-tab-pane key="remark" tab="记录备注">
|
|
44
|
+
<a-textarea placeholder="写些什么..." v-model:value="remark" />
|
|
45
|
+
<a-upload
|
|
46
|
+
list-type="picture"
|
|
47
|
+
:headers="uploadHeaders"
|
|
48
|
+
:action="uploadData.picAction"
|
|
49
|
+
:data="uploadData"
|
|
50
|
+
:before-upload="beforeAvatarUpload"
|
|
51
|
+
@change="handleAvatarSuccess"
|
|
52
|
+
:file-list="fileList"
|
|
53
|
+
style="padding-top: 10px"
|
|
54
|
+
>
|
|
55
|
+
<a-icon style="font-size: 16px; cursor: pointer; margin: 5px 10px" type="paper-clip" />
|
|
56
|
+
</a-upload>
|
|
57
|
+
<div style="display: flex; justify-content: flex-end">
|
|
58
|
+
<a-button @click="addMsgRemark">记录</a-button>
|
|
59
|
+
</div>
|
|
60
|
+
</a-tab-pane>
|
|
61
|
+
</a-tabs>
|
|
24
62
|
</div>
|
|
25
|
-
<div class="list" :style="{ height: listHeight -
|
|
63
|
+
<div class="list" :style="{ height: listHeight - 215 + 'px' }">
|
|
26
64
|
<a-list
|
|
27
65
|
v-if="remarkData.length > 0"
|
|
28
66
|
item-layout="horizontal"
|
|
@@ -52,11 +90,9 @@
|
|
|
52
90
|
<a-comment :author="item.createUserName" :avatar="item.avatar">
|
|
53
91
|
<!-- <template slot="actions">
|
|
54
92
|
<span v-for="(action,index) in item.actions" :key="index">{{ action }}</span>
|
|
55
|
-
</template
|
|
93
|
+
</template>-->
|
|
56
94
|
<template slot="content">
|
|
57
|
-
<div style="margin-bottom: 5px">
|
|
58
|
-
{{ item.body }}
|
|
59
|
-
</div>
|
|
95
|
+
<div style="margin-bottom: 5px">{{ item.body }}</div>
|
|
60
96
|
<div
|
|
61
97
|
v-if="item.objectCommentAttachDtos.length > 0"
|
|
62
98
|
style="display: flex; flex-wrap: wrap"
|
|
@@ -68,15 +104,9 @@
|
|
|
68
104
|
@click="downloadFile(item)"
|
|
69
105
|
>
|
|
70
106
|
<div class="download-icon">
|
|
71
|
-
<a-icon
|
|
72
|
-
type="vertical-align-bottom"
|
|
73
|
-
style="font-size: 30px"
|
|
74
|
-
/>
|
|
107
|
+
<a-icon type="vertical-align-bottom" style="font-size: 30px" />
|
|
75
108
|
</div>
|
|
76
|
-
<a-icon
|
|
77
|
-
type="file-text"
|
|
78
|
-
style="font-size: 25px; margin-right: 5px"
|
|
79
|
-
/>
|
|
109
|
+
<a-icon type="file-text" style="font-size: 25px; margin-right: 5px" />
|
|
80
110
|
<span class="file-title">{{ item.attachName }}</span>
|
|
81
111
|
</div>
|
|
82
112
|
</div>
|
|
@@ -105,35 +135,37 @@ import {
|
|
|
105
135
|
searchObjectCommentApi,
|
|
106
136
|
addObjectCommentApi,
|
|
107
137
|
deleteObjectCommentApi,
|
|
138
|
+
sendMsgApi,
|
|
139
|
+
userInfoSearchApi
|
|
108
140
|
} from "../../utils/api";
|
|
109
141
|
export default {
|
|
110
142
|
name: "LeaveAMessage",
|
|
111
143
|
props: {
|
|
112
144
|
listHeight: {
|
|
113
|
-
type: Number
|
|
145
|
+
type: Number
|
|
114
146
|
},
|
|
115
147
|
limitSize: {
|
|
116
148
|
// 限制上传大小
|
|
117
149
|
type: Number,
|
|
118
|
-
default: 5
|
|
150
|
+
default: 5
|
|
119
151
|
},
|
|
120
152
|
limitType: {
|
|
121
153
|
// 限制上传类型
|
|
122
154
|
type: Array,
|
|
123
155
|
default: () => {
|
|
124
156
|
return [];
|
|
125
|
-
}
|
|
157
|
+
}
|
|
126
158
|
},
|
|
127
159
|
resId: {
|
|
128
|
-
type: String
|
|
160
|
+
type: String
|
|
129
161
|
},
|
|
130
162
|
picType: {
|
|
131
163
|
type: String,
|
|
132
|
-
default: "cust"
|
|
164
|
+
default: "cust"
|
|
133
165
|
},
|
|
134
166
|
dataName: {
|
|
135
|
-
type: String
|
|
136
|
-
}
|
|
167
|
+
type: String
|
|
168
|
+
}
|
|
137
169
|
// formRow: {
|
|
138
170
|
// type: Object,
|
|
139
171
|
// default: () => {
|
|
@@ -143,14 +175,15 @@ export default {
|
|
|
143
175
|
},
|
|
144
176
|
watch: {
|
|
145
177
|
resId: {
|
|
146
|
-
handler: function
|
|
178
|
+
handler: function(newVal) {
|
|
147
179
|
this.uploadData.resId = newVal;
|
|
148
|
-
}
|
|
149
|
-
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
150
182
|
},
|
|
151
183
|
created() {
|
|
152
|
-
let viewDatas =
|
|
153
|
-
this.$
|
|
184
|
+
let viewDatas = this.$store.getters.moduleViewInfo[
|
|
185
|
+
this.$route.meta.moduleCode
|
|
186
|
+
];
|
|
154
187
|
this.objectName = viewDatas.objectName;
|
|
155
188
|
this.userId = this.$store.getters.userId;
|
|
156
189
|
},
|
|
@@ -161,6 +194,7 @@ export default {
|
|
|
161
194
|
this.internalServiceUrl = attachGetAttachUrlApi();
|
|
162
195
|
this.uploadData.picAction = this.internalServiceUrl + "/UploadAttach";
|
|
163
196
|
this.getMsgRemarkData();
|
|
197
|
+
this.getUserInfo();
|
|
164
198
|
},
|
|
165
199
|
data() {
|
|
166
200
|
return {
|
|
@@ -170,14 +204,17 @@ export default {
|
|
|
170
204
|
uploadData: {
|
|
171
205
|
picType: "",
|
|
172
206
|
picAction: "",
|
|
173
|
-
resId: ""
|
|
207
|
+
resId: ""
|
|
174
208
|
},
|
|
175
209
|
uploadHeaders: {
|
|
176
|
-
Authorization: null
|
|
210
|
+
Authorization: null
|
|
177
211
|
},
|
|
212
|
+
subject: "",
|
|
213
|
+
sendUser: [],
|
|
214
|
+
userList: [],
|
|
178
215
|
remark: "",
|
|
179
216
|
attachment: [],
|
|
180
|
-
objectName: ""
|
|
217
|
+
objectName: ""
|
|
181
218
|
};
|
|
182
219
|
},
|
|
183
220
|
methods: {
|
|
@@ -186,13 +223,13 @@ export default {
|
|
|
186
223
|
if (file.size / 1024 / 1024 > this.limitSize) {
|
|
187
224
|
notification.error({
|
|
188
225
|
message: "错误",
|
|
189
|
-
description: "上传图片大小不能超过 " + this.limitSize + "MB!"
|
|
226
|
+
description: "上传图片大小不能超过 " + this.limitSize + "MB!"
|
|
190
227
|
});
|
|
191
228
|
}
|
|
192
229
|
if (this.limitType.length > 0 && !this.limitType[file.type]) {
|
|
193
230
|
notification.error({
|
|
194
231
|
message: "错误",
|
|
195
|
-
description: "上传附件格式错误!"
|
|
232
|
+
description: "上传附件格式错误!"
|
|
196
233
|
});
|
|
197
234
|
}
|
|
198
235
|
return true;
|
|
@@ -213,17 +250,22 @@ export default {
|
|
|
213
250
|
{
|
|
214
251
|
field: "objectName",
|
|
215
252
|
operator: "EQ",
|
|
216
|
-
value: this.objectName
|
|
253
|
+
value: this.objectName
|
|
217
254
|
},
|
|
255
|
+
{
|
|
256
|
+
field: "resId",
|
|
257
|
+
operator: "EQ",
|
|
258
|
+
value: this.resId
|
|
259
|
+
}
|
|
218
260
|
],
|
|
219
|
-
operator: "and"
|
|
261
|
+
operator: "and"
|
|
220
262
|
},
|
|
221
|
-
sorts: [[
|
|
263
|
+
sorts: [["createTime", "desc"]]
|
|
222
264
|
};
|
|
223
|
-
searchObjectCommentApi(postData).then(
|
|
265
|
+
searchObjectCommentApi(postData).then(res => {
|
|
224
266
|
let tmp = [];
|
|
225
|
-
res.content.forEach(
|
|
226
|
-
let flag = tmp.findIndex(
|
|
267
|
+
res.content.forEach(item => {
|
|
268
|
+
let flag = tmp.findIndex(titem => {
|
|
227
269
|
return (
|
|
228
270
|
titem.createTime ===
|
|
229
271
|
moment(item.createTime).format("YYYY年MM月DD")
|
|
@@ -232,7 +274,7 @@ export default {
|
|
|
232
274
|
if (flag < 0) {
|
|
233
275
|
tmp.push({
|
|
234
276
|
type: "date",
|
|
235
|
-
createTime: moment(item.createTime).format("YYYY年MM月DD")
|
|
277
|
+
createTime: moment(item.createTime).format("YYYY年MM月DD")
|
|
236
278
|
});
|
|
237
279
|
}
|
|
238
280
|
item["avatar"] =
|
|
@@ -259,10 +301,10 @@ export default {
|
|
|
259
301
|
resId: this.resId,
|
|
260
302
|
objectName: this.objectName,
|
|
261
303
|
body: this.remark,
|
|
262
|
-
objectCommentAttachIds: this.attachment
|
|
304
|
+
objectCommentAttachIds: this.attachment
|
|
263
305
|
};
|
|
264
306
|
console.log(this.fileList);
|
|
265
|
-
addObjectCommentApi(postData).then(
|
|
307
|
+
addObjectCommentApi(postData).then(res => {
|
|
266
308
|
this.remark = "";
|
|
267
309
|
this.attachment = [];
|
|
268
310
|
this.fileList = [];
|
|
@@ -272,12 +314,34 @@ export default {
|
|
|
272
314
|
},
|
|
273
315
|
delMsgRemark(val) {
|
|
274
316
|
deleteObjectCommentApi({
|
|
275
|
-
keyIds: [val.id]
|
|
276
|
-
}).then(
|
|
317
|
+
keyIds: [val.id]
|
|
318
|
+
}).then(res => {
|
|
277
319
|
this.getMsgRemarkData();
|
|
278
320
|
});
|
|
279
321
|
},
|
|
280
|
-
|
|
322
|
+
getUserInfo() {
|
|
323
|
+
userInfoSearchApi().then(res => {
|
|
324
|
+
res.content.forEach(item => {
|
|
325
|
+
this.userList.push({ value: item.id, label: item.name });
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
console.log(this.userList);
|
|
329
|
+
},
|
|
330
|
+
sendMsg() {
|
|
331
|
+
let postData = {
|
|
332
|
+
content: this.remark,
|
|
333
|
+
receiver: this.sendUser.join(","),
|
|
334
|
+
subject: this.subject,
|
|
335
|
+
objectName: this.objectName,
|
|
336
|
+
resId: this.resId
|
|
337
|
+
};
|
|
338
|
+
sendMsgApi(postData).then(res => {
|
|
339
|
+
this.remark = "";
|
|
340
|
+
this.sendUser = [];
|
|
341
|
+
this.getMsgRemarkData();
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
281
345
|
};
|
|
282
346
|
</script>
|
|
283
347
|
|
|
@@ -299,7 +363,7 @@ export default {
|
|
|
299
363
|
position: relative;
|
|
300
364
|
}
|
|
301
365
|
.list {
|
|
302
|
-
padding:
|
|
366
|
+
padding: 10px 15px;
|
|
303
367
|
overflow: auto;
|
|
304
368
|
.close-icon {
|
|
305
369
|
position: absolute;
|
|
@@ -346,8 +410,8 @@ export default {
|
|
|
346
410
|
.input-box {
|
|
347
411
|
background-color: #fff;
|
|
348
412
|
padding: 10px 10px 0;
|
|
349
|
-
min-height:
|
|
350
|
-
max-height:
|
|
413
|
+
min-height: 210px;
|
|
414
|
+
max-height: 210px;
|
|
351
415
|
}
|
|
352
416
|
.msg-content {
|
|
353
417
|
box-sizing: border-box;
|
package/packages/utils/api.js
CHANGED
|
@@ -72,4 +72,18 @@ export function deleteObjectCommentApi(data) {
|
|
|
72
72
|
method: 'post',
|
|
73
73
|
data: data
|
|
74
74
|
})
|
|
75
|
+
}
|
|
76
|
+
export function sendMsgApi(data) {
|
|
77
|
+
return request({
|
|
78
|
+
url: store.getters.msgUrl + '/sendMsg',
|
|
79
|
+
method: 'post',
|
|
80
|
+
data: data
|
|
81
|
+
})
|
|
82
|
+
}
|
|
83
|
+
export function userInfoSearchApi(data) {
|
|
84
|
+
return request({
|
|
85
|
+
url: store.getters.umsUrl + 'userInfo',
|
|
86
|
+
method: 'get',
|
|
87
|
+
params: data
|
|
88
|
+
})
|
|
75
89
|
}
|