doway-coms 1.6.30 → 1.6.32
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/BaseGrid/src/index.vue +0 -1
- package/packages/LeaveAMessage/index.js +8 -0
- package/packages/LeaveAMessage/src/index.vue +355 -0
- package/packages/utils/api.js +29 -0
- package/dist/css/chunk-vendors.7f83d8f9.css +0 -8
- package/dist/css/index.7946d50b.css +0 -1
- package/dist/favicon.ico +0 -0
- package/dist/js/chunk-vendors.28fda91d.js +0 -340
- package/dist/js/index.49bc6add.js +0 -2
- package/lib/doway-coms.common.js +0 -120397
- package/lib/doway-coms.css +0 -1
- package/lib/doway-coms.umd.js +0 -120407
- package/lib/doway-coms.umd.min.js +0 -328
package/package.json
CHANGED
|
@@ -1862,7 +1862,6 @@ export default {
|
|
|
1862
1862
|
if (XEUtils.arrayIndexOf(fields,tempFieldName)>-1) {
|
|
1863
1863
|
this.internalColumns[i].formatter = formatterName
|
|
1864
1864
|
this.$refs.baseGrid.getColumnByField(tempFieldName).formatter = formatterName
|
|
1865
|
-
break
|
|
1866
1865
|
}
|
|
1867
1866
|
}
|
|
1868
1867
|
this.$refs.baseGrid.refreshColumn()
|
|
@@ -0,0 +1,355 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="liu-yan" style="background-color: #eaeef1">
|
|
3
|
+
<!-- style="overflow: auto" -->
|
|
4
|
+
<div class="list">
|
|
5
|
+
<a-list
|
|
6
|
+
item-layout="horizontal"
|
|
7
|
+
:data-source="remarkData"
|
|
8
|
+
style="box-shadow: 3px 3px 6px #cad1d7"
|
|
9
|
+
>
|
|
10
|
+
<a-list-item
|
|
11
|
+
slot="renderItem"
|
|
12
|
+
slot-scope="item, index"
|
|
13
|
+
:style="{
|
|
14
|
+
borderBottom: item.type === 'date' ? '0' : '1px solid #ddd',
|
|
15
|
+
backgroundColor: item.type === 'date' ? '#fff' : '#fff',
|
|
16
|
+
}"
|
|
17
|
+
>
|
|
18
|
+
<template v-if="item.type !== 'date'">
|
|
19
|
+
<a-comment :author="item.createUserName" :avatar="item.avatar">
|
|
20
|
+
<!-- <template slot="actions">
|
|
21
|
+
<span v-for="(action,index) in item.actions" :key="index">{{ action }}</span>
|
|
22
|
+
</template> -->
|
|
23
|
+
<template slot="content">
|
|
24
|
+
<div style="margin-bottom: 5px">
|
|
25
|
+
{{ item.body }}
|
|
26
|
+
</div>
|
|
27
|
+
<div
|
|
28
|
+
v-if="item.objectCommentAttachDtos.length > 0"
|
|
29
|
+
style="display: flex; flex-wrap: wrap"
|
|
30
|
+
>
|
|
31
|
+
<div
|
|
32
|
+
v-for="(item, index) in item.objectCommentAttachDtos"
|
|
33
|
+
:key="index"
|
|
34
|
+
class="msg-content"
|
|
35
|
+
@click="downloadFile(item)"
|
|
36
|
+
>
|
|
37
|
+
<div class="download-icon">
|
|
38
|
+
<a-icon
|
|
39
|
+
type="vertical-align-bottom"
|
|
40
|
+
style="font-size: 30px"
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
43
|
+
<a-icon
|
|
44
|
+
type="file-text"
|
|
45
|
+
style="font-size: 25px; margin-right: 5px"
|
|
46
|
+
/>
|
|
47
|
+
<span class="file-title">{{ item.attachName }}</span>
|
|
48
|
+
</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
<a-tooltip slot="datetime" :title="item.createTime">
|
|
52
|
+
<span>{{ item.fromNowTime }}</span>
|
|
53
|
+
</a-tooltip>
|
|
54
|
+
</a-comment>
|
|
55
|
+
</template>
|
|
56
|
+
<template v-else>
|
|
57
|
+
<a-divider>{{ item.createTime }}</a-divider>
|
|
58
|
+
</template>
|
|
59
|
+
</a-list-item>
|
|
60
|
+
</a-list>
|
|
61
|
+
</div>
|
|
62
|
+
<div class="input-box">
|
|
63
|
+
<!-- :auto-size="{ minRows: 2, maxRows: 2 }" -->
|
|
64
|
+
<a-textarea auto-size placeholder="写些什么..." v-model:value="remark" />
|
|
65
|
+
<a-upload
|
|
66
|
+
list-type="picture"
|
|
67
|
+
:headers="uploadHeaders"
|
|
68
|
+
:action="uploadData.picAction"
|
|
69
|
+
:data="uploadData"
|
|
70
|
+
:before-upload="beforeAvatarUpload"
|
|
71
|
+
@change="handleAvatarSuccess"
|
|
72
|
+
:file-list="fileList"
|
|
73
|
+
style="padding-top: 10px"
|
|
74
|
+
>
|
|
75
|
+
<a-icon
|
|
76
|
+
style="font-size: 16px; cursor: pointer; margin: 5px 10px"
|
|
77
|
+
type="paper-clip"
|
|
78
|
+
/>
|
|
79
|
+
</a-upload>
|
|
80
|
+
<div style="display: flex; justify-content: flex-end">
|
|
81
|
+
<a-button @click="addMsgRemark">发送</a-button>
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</template>
|
|
86
|
+
|
|
87
|
+
<script>
|
|
88
|
+
import moment from "moment";
|
|
89
|
+
import { notification } from "ant-design-vue";
|
|
90
|
+
import {
|
|
91
|
+
attachGetAttachUrlApi,
|
|
92
|
+
readObjectCommentApi,
|
|
93
|
+
searchObjectCommentApi,
|
|
94
|
+
addObjectCommentApi,
|
|
95
|
+
deleteObjectCommentApi,
|
|
96
|
+
} from "../../utils/api";
|
|
97
|
+
export default {
|
|
98
|
+
name: "transferOrderInfo",
|
|
99
|
+
props: {
|
|
100
|
+
limitSize: {
|
|
101
|
+
// 限制上传大小
|
|
102
|
+
type: Number,
|
|
103
|
+
default: 5,
|
|
104
|
+
},
|
|
105
|
+
limitType: {
|
|
106
|
+
// 限制上传类型
|
|
107
|
+
type: Array,
|
|
108
|
+
default: () => {
|
|
109
|
+
return [];
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
resId: {
|
|
113
|
+
type: String,
|
|
114
|
+
},
|
|
115
|
+
picType: {
|
|
116
|
+
type: String,
|
|
117
|
+
default: "cust",
|
|
118
|
+
},
|
|
119
|
+
dataName: {
|
|
120
|
+
type: String,
|
|
121
|
+
},
|
|
122
|
+
// formRow: {
|
|
123
|
+
// type: Object,
|
|
124
|
+
// default: () => {
|
|
125
|
+
// return {};
|
|
126
|
+
// },
|
|
127
|
+
// },
|
|
128
|
+
},
|
|
129
|
+
watch: {
|
|
130
|
+
resId: {
|
|
131
|
+
handler: function (newVal) {
|
|
132
|
+
this.uploadData.resId = newVal;
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
created() {
|
|
137
|
+
let viewDatas =
|
|
138
|
+
this.$store.getters.moduleViewInfo[this.$route.meta.moduleCode];
|
|
139
|
+
this.objectName = viewDatas.objectName;
|
|
140
|
+
console.log(viewDatas);
|
|
141
|
+
},
|
|
142
|
+
mounted() {
|
|
143
|
+
this.uploadHeaders.Authorization = `Bearer ${this.$store.getters.token}`;
|
|
144
|
+
this.uploadData.picType = this.picType;
|
|
145
|
+
this.uploadData.resId = this.resId;
|
|
146
|
+
this.internalServiceUrl = this.attachGetAttachUrlApi();
|
|
147
|
+
this.uploadData.picAction = this.internalServiceUrl + "/UploadAttach";
|
|
148
|
+
this.getMsgRemarkData();
|
|
149
|
+
},
|
|
150
|
+
data() {
|
|
151
|
+
return {
|
|
152
|
+
fileList: [],
|
|
153
|
+
remarkData: [],
|
|
154
|
+
uploadData: {
|
|
155
|
+
picType: "",
|
|
156
|
+
picAction: "",
|
|
157
|
+
resId: "",
|
|
158
|
+
},
|
|
159
|
+
uploadHeaders: {
|
|
160
|
+
Authorization: null,
|
|
161
|
+
},
|
|
162
|
+
remark: "",
|
|
163
|
+
attachment: [],
|
|
164
|
+
objectName: "",
|
|
165
|
+
};
|
|
166
|
+
},
|
|
167
|
+
methods: {
|
|
168
|
+
beforeAvatarUpload(file) {
|
|
169
|
+
// const isPic = file.type === 'image/jpeg' || file.type === 'image/png'
|
|
170
|
+
if (file.size / 1024 / 1024 > this.limitSize) {
|
|
171
|
+
notification.error({
|
|
172
|
+
message: "错误",
|
|
173
|
+
description: "上传图片大小不能超过 " + this.limitSize + "MB!",
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
if (this.limitType.length > 0 && !this.limitType[file.type]) {
|
|
177
|
+
notification.error({
|
|
178
|
+
message: "错误",
|
|
179
|
+
description: "上传附件格式错误!",
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
return true;
|
|
183
|
+
},
|
|
184
|
+
handleAvatarSuccess(info) {
|
|
185
|
+
this.fileList = info.fileList;
|
|
186
|
+
if (info.file.status == "done") {
|
|
187
|
+
this.attachment.push(info.file.response.content.id);
|
|
188
|
+
// this.$emit("add", this.dataName, info.file.response.content);
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
getMsgRemarkData() {
|
|
192
|
+
let postData = {
|
|
193
|
+
begin: 1,
|
|
194
|
+
size: 0,
|
|
195
|
+
expression: {
|
|
196
|
+
expressions: [
|
|
197
|
+
{
|
|
198
|
+
field: "objectName",
|
|
199
|
+
operator: "EQ",
|
|
200
|
+
value: this.objectName,
|
|
201
|
+
},
|
|
202
|
+
],
|
|
203
|
+
operator: "and",
|
|
204
|
+
},
|
|
205
|
+
sorts: [],
|
|
206
|
+
};
|
|
207
|
+
searchObjectCommentApi(postData).then((res) => {
|
|
208
|
+
let tmp = [];
|
|
209
|
+
res.content.forEach((item) => {
|
|
210
|
+
let flag = tmp.findIndex((titem) => {
|
|
211
|
+
return (
|
|
212
|
+
titem.createTime ===
|
|
213
|
+
moment(item.createTime).format("YYYY年MM月DD")
|
|
214
|
+
);
|
|
215
|
+
});
|
|
216
|
+
if (flag < 0) {
|
|
217
|
+
tmp.push({
|
|
218
|
+
type: "date",
|
|
219
|
+
createTime: moment(item.createTime).format("YYYY年MM月DD"),
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
item["avatar"] =
|
|
223
|
+
"https://hbimg.huabanimg.com/d08c4f41c5a1e4aa212eabb5a5a251af5e5665f859c82-yzRrGd_fw658";
|
|
224
|
+
item["fromNowTime"] = moment(item.createTime).fromNow();
|
|
225
|
+
tmp.push(item);
|
|
226
|
+
});
|
|
227
|
+
this.remarkData = tmp;
|
|
228
|
+
});
|
|
229
|
+
},
|
|
230
|
+
downloadFile(val) {
|
|
231
|
+
window.open(
|
|
232
|
+
this.internalServiceUrl +
|
|
233
|
+
"/DownAttachFile/" +
|
|
234
|
+
val.msgAttachId +
|
|
235
|
+
`?accessToken=${this.$store.getters.token}`
|
|
236
|
+
);
|
|
237
|
+
},
|
|
238
|
+
addMsgRemark() {
|
|
239
|
+
if (this.remark === "" && this.attachment.length < 1) {
|
|
240
|
+
return;
|
|
241
|
+
} else {
|
|
242
|
+
let postData = {
|
|
243
|
+
resId: this.resId,
|
|
244
|
+
objectName: this.objectName,
|
|
245
|
+
body: this.remark,
|
|
246
|
+
objectCommentAttachIds: this.attachment,
|
|
247
|
+
};
|
|
248
|
+
console.log(this.fileList);
|
|
249
|
+
addObjectCommentApi(postData).then((res) => {
|
|
250
|
+
this.remark = "";
|
|
251
|
+
this.attachment = [];
|
|
252
|
+
this.fileList = [];
|
|
253
|
+
this.getMsgRemarkData();
|
|
254
|
+
});
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
},
|
|
258
|
+
};
|
|
259
|
+
</script>
|
|
260
|
+
|
|
261
|
+
<style lang="less" scoped>
|
|
262
|
+
::v-deep(.ant-upload-list-picture .ant-upload-list-item) {
|
|
263
|
+
max-width: 185px;
|
|
264
|
+
min-width: 185px;
|
|
265
|
+
margin-right: 10px;
|
|
266
|
+
}
|
|
267
|
+
::v-deep(.ant-upload-list-picture .ant-upload-list-item-name) {
|
|
268
|
+
padding-right: 24px !important;
|
|
269
|
+
}
|
|
270
|
+
::v-deep(.ant-upload-list) {
|
|
271
|
+
display: flex;
|
|
272
|
+
flex-wrap: wrap;
|
|
273
|
+
}
|
|
274
|
+
::v-deep(.ant-list-item) {
|
|
275
|
+
padding: 12px 10px;
|
|
276
|
+
}
|
|
277
|
+
.list {
|
|
278
|
+
padding: 15px 15px;
|
|
279
|
+
height: 540px;
|
|
280
|
+
overflow: auto;
|
|
281
|
+
}
|
|
282
|
+
/*滚动条整体部分*/
|
|
283
|
+
.list::-webkit-scrollbar {
|
|
284
|
+
width: 5px;
|
|
285
|
+
height: 5px;
|
|
286
|
+
z-index: 10;
|
|
287
|
+
}
|
|
288
|
+
/*滚动条的轨道*/
|
|
289
|
+
.list::-webkit-scrollbar-track {
|
|
290
|
+
background-color: #ffffff;
|
|
291
|
+
z-index: 10;
|
|
292
|
+
}
|
|
293
|
+
/*滚动条里面的小方块,能向上向下移动*/
|
|
294
|
+
.list::-webkit-scrollbar-thumb {
|
|
295
|
+
background-color: #bfbfbf;
|
|
296
|
+
border-radius: 5px;
|
|
297
|
+
border: 1px solid #f1f1f1;
|
|
298
|
+
box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
|
|
299
|
+
z-index: 10;
|
|
300
|
+
}
|
|
301
|
+
.list::-webkit-scrollbar-thumb:hover {
|
|
302
|
+
background-color: #a8a8a8;
|
|
303
|
+
z-index: 10;
|
|
304
|
+
}
|
|
305
|
+
.list::-webkit-scrollbar-thumb:active {
|
|
306
|
+
background-color: #787878;
|
|
307
|
+
z-index: 10;
|
|
308
|
+
}
|
|
309
|
+
/*边角,即两个滚动条的交汇处*/
|
|
310
|
+
.list::-webkit-scrollbar-corner {
|
|
311
|
+
background-color: #ffffff;
|
|
312
|
+
z-index: 10;
|
|
313
|
+
}
|
|
314
|
+
::v-deep .vxe-modal--wrapper .vxe-modal--content {
|
|
315
|
+
padding: 0;
|
|
316
|
+
}
|
|
317
|
+
.input-box {
|
|
318
|
+
background-color: #fff;
|
|
319
|
+
padding: 10px 10px 0;
|
|
320
|
+
}
|
|
321
|
+
.msg-content {
|
|
322
|
+
box-sizing: border-box;
|
|
323
|
+
max-height: 40px;
|
|
324
|
+
min-height: 40px;
|
|
325
|
+
max-width: 140px;
|
|
326
|
+
min-width: 140px;
|
|
327
|
+
display: flex;
|
|
328
|
+
align-items: center;
|
|
329
|
+
border-bottom: 1px solid #ccc;
|
|
330
|
+
background: #eee;
|
|
331
|
+
border-radius: 5px;
|
|
332
|
+
padding: 0 10px;
|
|
333
|
+
margin-right: 8px;
|
|
334
|
+
margin-bottom: 8px;
|
|
335
|
+
cursor: pointer;
|
|
336
|
+
position: relative;
|
|
337
|
+
}
|
|
338
|
+
.download-icon {
|
|
339
|
+
position: absolute;
|
|
340
|
+
line-height: 50%;
|
|
341
|
+
left: 45%;
|
|
342
|
+
opacity: 0;
|
|
343
|
+
}
|
|
344
|
+
.msg-content:hover {
|
|
345
|
+
background: #ccc;
|
|
346
|
+
}
|
|
347
|
+
.msg-content:hover .download-icon {
|
|
348
|
+
opacity: 1;
|
|
349
|
+
}
|
|
350
|
+
.file-title {
|
|
351
|
+
overflow: hidden; //超出的文本隐藏
|
|
352
|
+
text-overflow: ellipsis; //溢出用省略号显示
|
|
353
|
+
white-space: nowrap; // 默认不换行;
|
|
354
|
+
}
|
|
355
|
+
</style>
|
package/packages/utils/api.js
CHANGED
|
@@ -43,4 +43,33 @@ export function licenseAuthorizeApi(data) {
|
|
|
43
43
|
method: 'post',
|
|
44
44
|
data: data
|
|
45
45
|
})
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function readObjectCommentApi(data) {
|
|
49
|
+
return request({
|
|
50
|
+
url: store.getters.msgUrl + '/v1/objectComment/read',
|
|
51
|
+
method: 'post',
|
|
52
|
+
data: data
|
|
53
|
+
})
|
|
54
|
+
}
|
|
55
|
+
export function searchObjectCommentApi(data) {
|
|
56
|
+
return request({
|
|
57
|
+
url: store.getters.msgUrl + '/v1/objectComment/search',
|
|
58
|
+
method: 'post',
|
|
59
|
+
data: data
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
export function addObjectCommentApi(data) {
|
|
63
|
+
return request({
|
|
64
|
+
url: store.getters.msgUrl + '/v1/objectComment/add',
|
|
65
|
+
method: 'post',
|
|
66
|
+
data: data
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
export function deleteObjectCommentApi(data) {
|
|
70
|
+
return request({
|
|
71
|
+
url: store.getters.msgUrl + '/v1/objectComment/delete',
|
|
72
|
+
method: 'post',
|
|
73
|
+
data: data
|
|
74
|
+
})
|
|
46
75
|
}
|