doway-coms 1.6.40 → 1.6.42

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.
@@ -24,7 +24,7 @@
24
24
  v-if="!status.notButton"
25
25
  class="status-primary"
26
26
  :class="
27
- status.value === formRow.status
27
+ status.value === (workFlowStatus?workFlowStatus:formRow.status)
28
28
  ? 'current-status'
29
29
  : 'inactive-status'
30
30
  "
@@ -80,6 +80,11 @@
80
80
  },
81
81
  deep: true
82
82
  },
83
+ workFlowStatus: {
84
+ // 对象信息
85
+ type: String,
86
+ default: ''
87
+ },
83
88
  objectName: {
84
89
  // 对象信息
85
90
  type: String,
package/packages/index.js CHANGED
@@ -22,7 +22,6 @@ import BaseGantt from "./BaseGantt/index";
22
22
  import BaseKanbanEmpty from "./BaseKanbanEmpty/index";
23
23
  import BaseSearch from "./BaseSearch/index";
24
24
  import BaseButton from "./BaseButton/index";
25
- import LeaveAMessage from "./LeaveAMessage/index";
26
25
 
27
26
  import store from './utils/store'
28
27
  import request from './utils/request'
@@ -34,7 +33,7 @@ const components = [
34
33
  BaseTextArea, BaseSelect, BaseSelectMulti, BaseTime, BasePagination,
35
34
  BaseNumberInput, BaseTool, BaseToolStatus, BasePulldown, BaseIntervalInput,
36
35
  BaseForm, BasePictureCard, BaseGrid, BasePrintPreview, BaseGantt,
37
- BaseKanbanEmpty, BaseSearch, BaseButton,LeaveAMessage
36
+ BaseKanbanEmpty, BaseSearch, BaseButton
38
37
  ];
39
38
  // 定义 install 方法,接收 Vue 作为参数。如果使用 use 注册插件,则所有的组件都将被注册
40
39
 
@@ -162,7 +161,6 @@ export {
162
161
  BaseKanbanEmpty,
163
162
  BaseSearch,
164
163
  BaseButton,
165
- LeaveAMessage,
166
164
  store,
167
165
  request,
168
166
  }
@@ -43,33 +43,4 @@ 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
- })
75
46
  }
@@ -1,8 +0,0 @@
1
- // 导入组件,组件必须声明 name
2
- import LeaveAMessage from './src/index.vue';
3
- // 为组件提供 install 安装方法,供按需引入
4
- LeaveAMessage.install = function(Vue) {
5
- Vue.component(LeaveAMessage.name, LeaveAMessage);
6
- };
7
- // 默认导出组件
8
- export default LeaveAMessage;
@@ -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>