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