doway-coms 1.7.3 → 1.7.5
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
CHANGED
|
@@ -17,15 +17,9 @@
|
|
|
17
17
|
>
|
|
18
18
|
<div class="liu-yan" style="background-color: #eaeef1">
|
|
19
19
|
<div class="input-box">
|
|
20
|
-
<a-tabs default-active-key="msg">
|
|
20
|
+
<a-tabs default-active-key="msg" @change="tabChange">
|
|
21
21
|
<a-tab-pane key="msg" tab="发送消息">
|
|
22
|
-
<div style="display:flex">
|
|
23
|
-
<!-- <div
|
|
24
|
-
style="display:flex;justify-content: center;align-items: center;margin-bottom:5px;flex:1"
|
|
25
|
-
>
|
|
26
|
-
<div style="flex:1">主题:</div>
|
|
27
|
-
<a-input v-model:value="subject" style="flex:3" size="small"></a-input>
|
|
28
|
-
</div>-->
|
|
22
|
+
<!-- <div style="display:flex">
|
|
29
23
|
<div
|
|
30
24
|
style="display:flex;justify-content: center;align-items: center;margin-bottom:5px;margin-left:5px;flex:1"
|
|
31
25
|
>
|
|
@@ -41,7 +35,20 @@
|
|
|
41
35
|
></a-select>
|
|
42
36
|
</div>
|
|
43
37
|
</div>
|
|
44
|
-
<a-textarea placeholder="写些什么..." v-model:value="remark"
|
|
38
|
+
<a-textarea placeholder="写些什么..." v-model:value="remark" />-->
|
|
39
|
+
|
|
40
|
+
<a-mentions
|
|
41
|
+
placeholder="写些什么..."
|
|
42
|
+
split=";"
|
|
43
|
+
v-model:value="remark"
|
|
44
|
+
rows="3"
|
|
45
|
+
>
|
|
46
|
+
<a-mentions-option
|
|
47
|
+
v-for="(item, index) in userList"
|
|
48
|
+
:key="index"
|
|
49
|
+
:value="item.value"
|
|
50
|
+
>{{ item.label }}</a-mentions-option>
|
|
51
|
+
</a-mentions>
|
|
45
52
|
<!-- <a-upload
|
|
46
53
|
list-type="picture"
|
|
47
54
|
:headers="uploadHeaders"
|
|
@@ -55,7 +62,7 @@
|
|
|
55
62
|
<a-icon style="font-size: 16px; cursor: pointer; margin: 5px 10px" type="paper-clip" />
|
|
56
63
|
</a-upload>-->
|
|
57
64
|
<div style="display: flex; justify-content: flex-end;margin-top:5px">
|
|
58
|
-
<a-button @click="sendMsg" :disabled="
|
|
65
|
+
<a-button @click="sendMsg" :disabled="remark ===''">发送</a-button>
|
|
59
66
|
</div>
|
|
60
67
|
</a-tab-pane>
|
|
61
68
|
<a-tab-pane key="remark" tab="记录备注">
|
|
@@ -373,17 +380,34 @@ export default {
|
|
|
373
380
|
this.userList = [];
|
|
374
381
|
res.content.forEach(item => {
|
|
375
382
|
this.userList.push({
|
|
376
|
-
value: item.
|
|
377
|
-
label: item.name
|
|
383
|
+
value: item.userName,
|
|
384
|
+
label: item.name,
|
|
385
|
+
code: item.id
|
|
378
386
|
});
|
|
379
387
|
});
|
|
380
388
|
});
|
|
381
389
|
},
|
|
382
390
|
sendMsg() {
|
|
383
|
-
let
|
|
391
|
+
let reg = /@(.*?);/;
|
|
392
|
+
let result;
|
|
393
|
+
let arr = [];
|
|
394
|
+
while ((result = reg.exec(this.remark))) {
|
|
395
|
+
arr.push(result[1]);
|
|
396
|
+
this.remark = this.remark.replace(/@(.*?);/, "");
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
let receiver = [];
|
|
400
|
+
arr.forEach(item => {
|
|
401
|
+
this.userList.forEach(uitem => {
|
|
402
|
+
if (uitem.value === item) {
|
|
403
|
+
receiver.push(uitem.code);
|
|
404
|
+
}
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
|
|
384
408
|
let postData = {
|
|
385
409
|
content: this.remark,
|
|
386
|
-
receiver:
|
|
410
|
+
receiver: receiver,
|
|
387
411
|
subject: this.topic,
|
|
388
412
|
objectName: this.objectName,
|
|
389
413
|
resId: this.resId
|
|
@@ -408,6 +432,9 @@ export default {
|
|
|
408
432
|
.indexOf(input.toLowerCase()) >= 0
|
|
409
433
|
);
|
|
410
434
|
}
|
|
435
|
+
},
|
|
436
|
+
tabChange(activeKey) {
|
|
437
|
+
this.remark = "";
|
|
411
438
|
}
|
|
412
439
|
}
|
|
413
440
|
};
|