@tencentcloud/ai-desk-customer-vue 1.1.0 → 1.4.0
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/CHANGELOG.md +16 -3
- package/assets/customer_avatar.png +0 -0
- package/assets/face.svg +10 -0
- package/assets/files.svg +5 -0
- package/assets/image.svg +8 -0
- package/assets/rating_tool_icon.svg +5 -0
- package/assets/rating_tool_icon_h5.svg +1 -0
- package/assets/video.svg +8 -0
- package/assets/video_h5.svg +1 -0
- package/components/CustomerServiceChat/chat-header/index-web.vue +16 -14
- package/components/CustomerServiceChat/index-web.vue +72 -16
- package/components/CustomerServiceChat/message-input/index-web.vue +31 -5
- package/components/CustomerServiceChat/message-input/message-input-editor-web.vue +24 -0
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/emoji-picker-dialog.vue +1 -1
- package/components/CustomerServiceChat/message-input-toolbar/emoji-picker/index.vue +1 -1
- package/components/CustomerServiceChat/message-input-toolbar/file-upload/index.vue +6 -8
- package/components/CustomerServiceChat/message-input-toolbar/image-upload/index.vue +11 -16
- package/components/CustomerServiceChat/message-input-toolbar/index-web.vue +61 -18
- package/components/CustomerServiceChat/message-input-toolbar/rating-tool/index.vue +72 -0
- package/components/CustomerServiceChat/message-input-toolbar/toolbar-item-container/style/h5.scss +10 -1
- package/components/CustomerServiceChat/message-input-toolbar/user-define-input-tool.vue +80 -0
- package/components/CustomerServiceChat/message-input-toolbar/video-upload/index.vue +9 -14
- package/components/CustomerServiceChat/message-list/index-web.vue +34 -6
- package/components/CustomerServiceChat/message-list/message-elements/message-bubble-web.vue +65 -19
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/marked.ts +1 -1
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-branch.vue +30 -11
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-concurrency-limit.vue +40 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-desk.vue +29 -7
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-branch/branch-pc.vue +107 -73
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-branch/index.vue +53 -52
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-mobile/input-mobile.vue +73 -80
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-mobile/label-mobile.vue +21 -24
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-mobile/radios-mobile.vue +115 -116
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-pc/input-pc.vue +69 -73
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-pc/label-pc.vue +21 -25
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/component-pc/radio-pc.vue +87 -77
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/form-mobile.vue +213 -200
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/form-pc.vue +122 -113
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-multi-form/index.vue +7 -7
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-order.vue +141 -0
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-rich-text.vue +5 -1
- package/components/CustomerServiceChat/message-list/message-elements/message-desk/message-desk-elements/message-stream.vue +25 -1
- package/components/CustomerServiceChat/message-list/message-elements/message-file.vue +1 -1
- package/components/CustomerServiceChat/message-list/scroll-button/index.vue +18 -6
- package/components/CustomerServiceChat/message-list/style/web.scss +2 -1
- package/components/CustomerServiceChat/message-toolbar-button/index.vue +111 -42
- package/components/CustomerServiceChat/message-toolbar-button/toolbar-button-end-human-service.vue +59 -0
- package/components/CustomerServiceChat/message-toolbar-button/toolbar-button-human-service.vue +55 -0
- package/components/CustomerServiceChat/message-toolbar-button/toolbar-button-service-rating.vue +59 -0
- package/components/common/BottomPopup/index.vue +1 -1
- package/constant.ts +25 -4
- package/interface.ts +35 -5
- package/locales/en/aidesk.ts +6 -3
- package/locales/fil/aidesk.ts +4 -1
- package/locales/id/aidesk.ts +7 -4
- package/locales/ja/aidesk.ts +5 -2
- package/locales/ms/aidesk.ts +5 -2
- package/locales/ru/aidesk.ts +6 -3
- package/locales/th/aidesk.ts +4 -1
- package/locales/vi/aidesk.ts +5 -2
- package/locales/zh_cn/aidesk.ts +5 -3
- package/locales/zh_tw/aidesk.ts +4 -1
- package/package.json +1 -1
- package/server.ts +11 -2
- package/utils/state.js +30 -0
- package/utils/utils.ts +48 -1
- package/assets/face.png +0 -0
- package/assets/files.png +0 -0
- package/assets/image.png +0 -0
- package/assets/video.png +0 -0
|
@@ -2,31 +2,32 @@
|
|
|
2
2
|
<div class="branch-card">
|
|
3
3
|
<div
|
|
4
4
|
v-if="content.header || content.title"
|
|
5
|
-
class="branch-body branch-bubble"
|
|
5
|
+
:class="['branch-body',isPC ? 'branch-bubble':'branch-bubble-h5']"
|
|
6
6
|
>
|
|
7
7
|
<Icon :src="iconQuestion" class="branch-title-icon"/>
|
|
8
8
|
{{ content.header || content.title }}
|
|
9
|
-
|
|
9
|
+
</div>
|
|
10
10
|
<div
|
|
11
11
|
v-for="(item, index) in content.items"
|
|
12
12
|
:key="index"
|
|
13
|
-
:class="['branch-body','branch-bubble','branch-item',isSelected ? 'branch-item-selected' : '']"
|
|
13
|
+
:class="['branch-body',isPC ? 'branch-bubble':'branch-bubble-h5','branch-item',isSelected ? 'branch-item-selected' : '', item.content ? '' : 'warning-item']"
|
|
14
14
|
:style="{ borderWidth: content.header ? '1px 0 0px 0' : '' }"
|
|
15
15
|
@click="handleContentListItemClick(item)"
|
|
16
16
|
>
|
|
17
|
-
{{ item.content }}
|
|
17
|
+
{{ item.content || TUITranslateService.t('AIDesk.分支选项异常') }}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
21
21
|
|
|
22
22
|
<script lang="ts">
|
|
23
23
|
import vue from '../../../../../../adapter-vue';
|
|
24
|
+
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
|
24
25
|
import { customerServicePayloadType } from '../../../../../../interface';
|
|
25
26
|
import iconRight from '../../../../../../assets/iconRight.svg';
|
|
26
27
|
import iconQuestion from '../../../../../../assets/icon_question.png';
|
|
27
28
|
import Icon from './customer-icon.vue';
|
|
29
|
+
import { isPC } from '../../../../../../utils/env';
|
|
28
30
|
const { computed, ref} = vue;
|
|
29
|
-
// const { computed,ref } = vue;
|
|
30
31
|
|
|
31
32
|
interface Props {
|
|
32
33
|
payload: customerServicePayloadType;
|
|
@@ -47,7 +48,7 @@ export default {
|
|
|
47
48
|
default: () => ({}),
|
|
48
49
|
},
|
|
49
50
|
},
|
|
50
|
-
emits: ['sendMessage'],
|
|
51
|
+
emits: ['sendMessage', 'heightChanged'],
|
|
51
52
|
setup(props: Props, { emit }) {
|
|
52
53
|
const isSelected = ref<boolean>(false);
|
|
53
54
|
const content = computed(() => {
|
|
@@ -60,6 +61,9 @@ export default {
|
|
|
60
61
|
});
|
|
61
62
|
|
|
62
63
|
const handleContentListItemClick = (branch: branchItem) => {
|
|
64
|
+
if (!branch.content) {
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
63
67
|
if(!isSelected.value) {
|
|
64
68
|
isSelected.value = true;
|
|
65
69
|
emit('sendMessage', { text: branch.content });
|
|
@@ -72,8 +76,13 @@ export default {
|
|
|
72
76
|
iconRight,
|
|
73
77
|
iconQuestion,
|
|
74
78
|
isSelected,
|
|
79
|
+
isPC,
|
|
80
|
+
TUITranslateService
|
|
75
81
|
};
|
|
76
82
|
},
|
|
83
|
+
mounted() {
|
|
84
|
+
this.$emit('heightChanged');
|
|
85
|
+
},
|
|
77
86
|
};
|
|
78
87
|
</script>
|
|
79
88
|
|
|
@@ -107,23 +116,33 @@ export default {
|
|
|
107
116
|
border-radius: 0 10px 10px;
|
|
108
117
|
margin-bottom: 8px;
|
|
109
118
|
}
|
|
119
|
+
.branch-bubble-h5 {
|
|
120
|
+
background: #fff;
|
|
121
|
+
border-radius: 0 10px 10px;
|
|
122
|
+
margin-bottom: 8px;
|
|
123
|
+
}
|
|
110
124
|
.branch-item {
|
|
111
|
-
color
|
|
125
|
+
color: #1c66e5;
|
|
112
126
|
cursor: pointer;
|
|
113
127
|
}
|
|
128
|
+
.warning-item {
|
|
129
|
+
color: #ff9800;
|
|
130
|
+
}
|
|
114
131
|
.branch-card {
|
|
115
132
|
min-width: 250px;
|
|
116
133
|
max-width: 350px;
|
|
117
|
-
display:flex;
|
|
118
|
-
flex-direction:column;
|
|
134
|
+
display: flex;
|
|
135
|
+
flex-direction: column;
|
|
119
136
|
align-items: flex-start;
|
|
120
137
|
}
|
|
121
138
|
.branch-item-selected {
|
|
122
|
-
cursor:
|
|
139
|
+
cursor: default;
|
|
123
140
|
color: #a0a7b8;
|
|
124
|
-
opacity:0.6;
|
|
141
|
+
opacity: 0.6;
|
|
125
142
|
}
|
|
126
143
|
.branch-title-icon {
|
|
127
144
|
margin-right: 5px;
|
|
145
|
+
align-items: flex-start !important;
|
|
146
|
+
margin-top: 2px;
|
|
128
147
|
}
|
|
129
148
|
</style>
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="['message-text-container']">
|
|
3
|
+
<span class="text">{{ TUITranslateService.t('AIDesk.并发限制') }}</span>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script lang="ts" setup>
|
|
8
|
+
import {TUITranslateService} from "@tencentcloud/chat-uikit-engine";
|
|
9
|
+
|
|
10
|
+
</script>
|
|
11
|
+
<style lang="scss" scoped>
|
|
12
|
+
.message-text-container {
|
|
13
|
+
display: inline;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.text-select {
|
|
17
|
+
-webkit-user-select: text;
|
|
18
|
+
-moz-user-select: text;
|
|
19
|
+
-ms-user-select: text;
|
|
20
|
+
user-select: text;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.text {
|
|
24
|
+
white-space: pre-wrap;
|
|
25
|
+
font-size: 14px;
|
|
26
|
+
text-size-adjust: none;
|
|
27
|
+
font-family: PingFangSC-Regular;
|
|
28
|
+
overflow-wrap: break-word;
|
|
29
|
+
word-break: break-all;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.text:lang(en) {
|
|
33
|
+
white-space: pre-wrap;
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
text-size-adjust: none;
|
|
36
|
+
font-family: PingFangSC-Regular;
|
|
37
|
+
overflow-wrap: break-word;
|
|
38
|
+
word-break: normal;
|
|
39
|
+
}
|
|
40
|
+
</style>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="message-custom">
|
|
3
|
-
|
|
4
3
|
<div class="custom">
|
|
5
4
|
<div
|
|
6
5
|
v-if="
|
|
@@ -13,6 +12,7 @@
|
|
|
13
12
|
<MessageBranch
|
|
14
13
|
:payload="payload"
|
|
15
14
|
@sendMessage="sendTextMessage"
|
|
15
|
+
@heightChanged="onHeightChanged"
|
|
16
16
|
/>
|
|
17
17
|
</div>
|
|
18
18
|
<div
|
|
@@ -35,7 +35,10 @@
|
|
|
35
35
|
<MessageProductCard :payload="payload" />
|
|
36
36
|
</div>
|
|
37
37
|
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.RICH_TEXT">
|
|
38
|
-
<MessageRichText
|
|
38
|
+
<MessageRichText
|
|
39
|
+
:payload="payload"
|
|
40
|
+
@heightChanged="onHeightChanged"
|
|
41
|
+
/>
|
|
39
42
|
</div>
|
|
40
43
|
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.STREAM_TEXT">
|
|
41
44
|
<MessageStream
|
|
@@ -44,7 +47,11 @@
|
|
|
44
47
|
/>
|
|
45
48
|
</div>
|
|
46
49
|
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.MULTI_BRANCH">
|
|
47
|
-
<MessageMultiBranch
|
|
50
|
+
<MessageMultiBranch
|
|
51
|
+
:payload="payload"
|
|
52
|
+
@sendMessage="sendTextMessage"
|
|
53
|
+
@heightChanged="onHeightChanged"
|
|
54
|
+
/>
|
|
48
55
|
</div>
|
|
49
56
|
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.MULTI_FORM && message.flow == 'in'">
|
|
50
57
|
<MessageMultiForm :payload="payload"
|
|
@@ -58,6 +65,12 @@
|
|
|
58
65
|
@sendMessage="sendCustomMessage"
|
|
59
66
|
/>
|
|
60
67
|
</div>
|
|
68
|
+
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.CONCURRENCY_LIMIT">
|
|
69
|
+
<MessageConcurrencyLimit />
|
|
70
|
+
</div>
|
|
71
|
+
<div v-if="payload.src === CUSTOM_MESSAGE_SRC.ORDER">
|
|
72
|
+
<MessageOrder :payload="payload" />
|
|
73
|
+
</div>
|
|
61
74
|
</div>
|
|
62
75
|
</div>
|
|
63
76
|
</template>
|
|
@@ -66,6 +79,7 @@ import { CustomMessagePayload, TextMessagePayload, customerServicePayloadType }
|
|
|
66
79
|
import MessageRating from './message-rating/index.vue';
|
|
67
80
|
import vue from '../../../../../../adapter-vue';
|
|
68
81
|
import { JSONToObject } from '../../../../../../utils/index';
|
|
82
|
+
import { isEnabledMessageReadReceiptGlobal } from '../../../../../../utils/utils';
|
|
69
83
|
import { CUSTOM_MESSAGE_SRC } from '../../../../../../constant';
|
|
70
84
|
import MessageBranch from './message-branch.vue';
|
|
71
85
|
import MessageForm from './message-single-form/index.vue';
|
|
@@ -75,6 +89,8 @@ import MessageRichText from './message-rich-text.vue';
|
|
|
75
89
|
import MessageStream from './message-stream.vue';
|
|
76
90
|
import MessageMultiBranch from './message-multi-branch/index.vue';
|
|
77
91
|
import MessageMultiForm from './message-multi-form/index.vue';
|
|
92
|
+
import MessageConcurrencyLimit from "./message-concurrency-limit.vue";
|
|
93
|
+
import MessageOrder from './message-order.vue';
|
|
78
94
|
import {
|
|
79
95
|
IMessageModel,
|
|
80
96
|
TUIChatService,
|
|
@@ -93,7 +109,9 @@ export default {
|
|
|
93
109
|
MessageStream,
|
|
94
110
|
MessageMultiBranch,
|
|
95
111
|
MessageMultiForm,
|
|
96
|
-
MessageRating
|
|
112
|
+
MessageRating,
|
|
113
|
+
MessageConcurrencyLimit,
|
|
114
|
+
MessageOrder,
|
|
97
115
|
},
|
|
98
116
|
props: {
|
|
99
117
|
message: {
|
|
@@ -106,11 +124,15 @@ export default {
|
|
|
106
124
|
const payload = computed<customerServicePayloadType>(() => {
|
|
107
125
|
return props.message && JSONToObject(props.message?.payload?.data);
|
|
108
126
|
});
|
|
109
|
-
const sendTextMessage = (payload: TextMessagePayload) => {
|
|
110
|
-
TUIChatService.sendTextMessage({
|
|
127
|
+
const sendTextMessage = (payload: TextMessagePayload, cloudCustomData?: string) => {
|
|
128
|
+
TUIChatService.sendTextMessage({
|
|
129
|
+
payload,
|
|
130
|
+
cloudCustomData: cloudCustomData || '',
|
|
131
|
+
needReadReceipt: isEnabledMessageReadReceiptGlobal()
|
|
132
|
+
});
|
|
111
133
|
};
|
|
112
134
|
const sendCustomMessage = (payload: CustomMessagePayload) => {
|
|
113
|
-
TUIChatService.sendCustomMessage({payload});
|
|
135
|
+
TUIChatService.sendCustomMessage({ payload });
|
|
114
136
|
};
|
|
115
137
|
const handleShowFormPopup = (data: boolean) => {
|
|
116
138
|
emit('showFormPopup', data);
|
|
@@ -1,79 +1,113 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
<div
|
|
10
|
-
v-if="props.payload.status == 0 && !isClicked"
|
|
11
|
-
v-for="(item, index) in props.payload.content.items"
|
|
12
|
-
:key="index"
|
|
13
|
-
class="form-branch-item"
|
|
14
|
-
@click="listItemClick(item)"
|
|
15
|
-
>
|
|
16
|
-
{{ item.content }}
|
|
17
|
-
</div>
|
|
2
|
+
<div class="form-branch-container">
|
|
3
|
+
<div
|
|
4
|
+
v-if="props.payload.content.header"
|
|
5
|
+
:class="['card-title-container',isPC ? 'card-title' : 'card-title-h5']"
|
|
6
|
+
>
|
|
7
|
+
{{ props.payload.content.header }}
|
|
18
8
|
</div>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
9
|
+
<div
|
|
10
|
+
v-if="props.payload.status === 0 && canSelect"
|
|
11
|
+
v-for="(item, index) in props.payload.content.items"
|
|
12
|
+
:key="index"
|
|
13
|
+
:class="['form-branch-item', item.content ? '' : 'warning-item']"
|
|
14
|
+
@click="listItemClick(item)"
|
|
15
|
+
>
|
|
16
|
+
{{ item.content || TUITranslateService.t('AIDesk.分支选项异常') }}
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import vue from '../../../../../../../adapter-vue';
|
|
23
|
+
import { TUITranslateService } from '@tencentcloud/chat-uikit-engine';
|
|
22
24
|
import { customerServicePayloadType } from '../../../../../../../interface';
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
25
|
+
import { isPC } from '../../../../../../../utils/env'
|
|
26
|
+
const { ref } = vue;
|
|
27
|
+
interface branchItem {
|
|
28
|
+
content: string;
|
|
29
|
+
desc: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
interface Props {
|
|
33
|
+
payload: customerServicePayloadType;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
props: {
|
|
38
|
+
payload: {
|
|
39
|
+
type: Object as () => customerServicePayloadType,
|
|
40
|
+
default: () => ({optionType: 0, taskInfo: { taskID: 0, nodeID: '', env: '' }, content: { header: '', items: [] }, status: 0}),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
emits: ['input-click'],
|
|
44
|
+
setup(props: Props, { emit }) {
|
|
45
|
+
let canSelect = ref(true);
|
|
46
|
+
const listItemClick = (branch: branchItem): void => {
|
|
47
|
+
if (!branch.content) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
let cloudCustomData;
|
|
51
|
+
if (props.payload.optionType === 0) {
|
|
52
|
+
cloudCustomData = '';
|
|
53
|
+
canSelect.value = false;
|
|
54
|
+
} else if (props.payload.optionType === 1) {
|
|
55
|
+
cloudCustomData = JSON.stringify({
|
|
56
|
+
BranchOptionInfo: {
|
|
57
|
+
taskID: props.payload.taskInfo?.taskID,
|
|
58
|
+
nodeID: props.payload.taskInfo?.nodeID,
|
|
59
|
+
env: props.payload.taskInfo?.env,
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
emit('input-click', branch, cloudCustomData);
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
return {
|
|
67
|
+
props,
|
|
68
|
+
canSelect,
|
|
69
|
+
listItemClick,
|
|
70
|
+
isPC,
|
|
71
|
+
TUITranslateService
|
|
72
|
+
};
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
</script>
|
|
76
|
+
<style lang="scss">
|
|
77
|
+
.form-branch-container {
|
|
78
|
+
.card-title-container {
|
|
79
|
+
padding: 12px;
|
|
80
|
+
border-radius: 0 10px 10px;
|
|
81
|
+
width:fit-content;
|
|
82
|
+
font-family: PingFangSC-Regular;
|
|
26
83
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
payload: customerServicePayloadType;
|
|
84
|
+
.card-title {
|
|
85
|
+
background-color: #f3f4f7;
|
|
30
86
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
<style lang="scss">
|
|
56
|
-
.form-branch-container {
|
|
57
|
-
.card-title {
|
|
58
|
-
background-color: #fbfbfb;
|
|
59
|
-
padding: 12px;
|
|
60
|
-
border-radius: 0 10px 10px;
|
|
61
|
-
width:fit-content;
|
|
62
|
-
font-family: PingFangSC-Regular;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.form-branch-item {
|
|
66
|
-
font-weight: 500;
|
|
67
|
-
color: rgba(54, 141, 255, 1);
|
|
68
|
-
background-color: #fbfbfb;
|
|
69
|
-
border: 1px solid rgba(0, 110, 255, 0.3);
|
|
70
|
-
padding: 12px;
|
|
71
|
-
border-radius: 25px;
|
|
72
|
-
margin-top: 8px;
|
|
73
|
-
cursor: pointer;
|
|
74
|
-
width:fit-content;
|
|
75
|
-
font-family: PingFangSC-Regular;
|
|
76
|
-
}
|
|
87
|
+
.card-title-h5 {
|
|
88
|
+
background-color: #fff;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.form-branch-item {
|
|
92
|
+
font-weight: 500;
|
|
93
|
+
color: #1C66E5;
|
|
94
|
+
background-color: #fff;
|
|
95
|
+
border: 1px solid rgba(0, 110, 255, 0.3);
|
|
96
|
+
padding: 12px;
|
|
97
|
+
border-radius: 20px;
|
|
98
|
+
margin-top: 8px;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
line-height: 16px;
|
|
101
|
+
width:fit-content;
|
|
102
|
+
font-family: PingFangSC-Regular;
|
|
103
|
+
min-width: 50px;
|
|
104
|
+
text-align: center;
|
|
105
|
+
overflow-wrap: break-word;
|
|
106
|
+
word-wrap: break-word;
|
|
107
|
+
word-break: normal;
|
|
108
|
+
}
|
|
109
|
+
.warning-item {
|
|
110
|
+
color: #ff9800;
|
|
77
111
|
}
|
|
78
|
-
|
|
79
|
-
|
|
112
|
+
}
|
|
113
|
+
</style>
|
|
@@ -1,59 +1,60 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
<div class="message-form">
|
|
3
|
+
<BranchPc
|
|
4
|
+
:payload ="payload"
|
|
5
|
+
@input-click="handleContentListItemClick"
|
|
6
|
+
/>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
7
9
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
payload: {
|
|
32
|
-
type: Object,
|
|
33
|
-
default: () => ({}),
|
|
34
|
-
},
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import vue from '../../../../../../../adapter-vue';
|
|
12
|
+
import BranchPc from './branch-pc.vue';
|
|
13
|
+
import { customerServicePayloadType } from '../../../../../../../interface';
|
|
14
|
+
const { computed} = vue;
|
|
15
|
+
|
|
16
|
+
interface branchItem {
|
|
17
|
+
content: string;
|
|
18
|
+
desc: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
interface Props {
|
|
22
|
+
payload: customerServicePayloadType;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export default {
|
|
26
|
+
components: {
|
|
27
|
+
BranchPc
|
|
28
|
+
},
|
|
29
|
+
props: {
|
|
30
|
+
payload: {
|
|
31
|
+
type: Object,
|
|
32
|
+
default: () => ({}),
|
|
35
33
|
},
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
},
|
|
35
|
+
emits: ['sendMessage', 'heightChanged'],
|
|
36
|
+
setup(props: Props, { emit }) {
|
|
38
37
|
const payload = computed<customerServicePayloadType>(() => {
|
|
39
38
|
return props.payload;
|
|
40
39
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
40
|
+
const handleContentListItemClick = (branch: branchItem, cloudCustomData?: string) => {
|
|
41
|
+
emit('sendMessage', { text: branch.content }, cloudCustomData || '');
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handleFormSaveInputSubmit = (text: string) => {
|
|
45
|
+
emit('sendMessage', { text });
|
|
46
|
+
};
|
|
47
|
+
return {
|
|
48
|
+
payload,
|
|
49
|
+
handleContentListItemClick,
|
|
50
|
+
handleFormSaveInputSubmit,
|
|
51
|
+
};
|
|
52
|
+
},
|
|
53
|
+
mounted() {
|
|
54
|
+
this.$emit('heightChanged');
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
</script>
|
|
58
|
+
<style lang="scss">
|
|
57
59
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
</style>
|