doway-coms 1.6.48 → 1.6.49

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