askbot-dragon 0.7.89 → 0.7.93
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/README.md +27 -27
- package/babel.config.js +5 -5
- package/dragon.iml +7 -7
- package/package.json +55 -55
- package/public/index.html +30 -30
- package/src/App.vue +31 -31
- package/src/api/index.js +1 -1
- package/src/api/mock.http +2 -2
- package/src/api/requestUrl.js +185 -185
- package/src/assets/js/AliyunlssUtil.js +92 -92
- package/src/assets/js/Base64Util.js +22 -22
- package/src/assets/js/script.js +36 -36
- package/src/assets/less/common.css +6773 -6773
- package/src/assets/less/converSationContainer/common.less +191 -191
- package/src/assets/less/converSationContainer/converSatonContainer.less +493 -493
- package/src/assets/less/iconfont.css +37 -37
- package/src/assets/less/ticketMessage.less +211 -211
- package/src/components/ActionAlertIframe.vue +112 -112
- package/src/components/AiGuide.vue +467 -467
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +2110 -1318
- package/src/components/FileType.vue +86 -86
- package/src/components/Message.vue +27 -27
- package/src/components/actionSatisfaction.vue +107 -107
- package/src/components/actionSendToBot.vue +62 -62
- package/src/components/answerDissatisfaction.vue +62 -62
- package/src/components/answerRadio.vue +76 -76
- package/src/components/ask-components/DissatisfactionOptions.vue +57 -57
- package/src/components/ask-components/Msgloading.vue +37 -37
- package/src/components/ask-components/SatisfactionV2.vue +15 -15
- package/src/components/askVideo.vue +138 -138
- package/src/components/assetDetails.vue +370 -370
- package/src/components/assetMessage.vue +228 -228
- package/src/components/associationIntention.vue +229 -229
- package/src/components/botActionSatisfactor.vue +68 -68
- package/src/components/chatContent.vue +513 -513
- package/src/components/feedBack.vue +136 -136
- package/src/components/file/AliyunOssComponents.vue +108 -108
- package/src/components/formTemplate.vue +2524 -1969
- package/src/components/loadingProcess.vue +164 -164
- package/src/components/message/ActionAlertIframe.vue +112 -112
- package/src/components/message/ShopMessage.vue +164 -164
- package/src/components/message/TextMessage.vue +924 -924
- package/src/components/message/TicketMessage.vue +177 -177
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +502 -502
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- package/src/components/msgLoading.vue +231 -231
- package/src/components/myPopup.vue +71 -0
- package/src/components/popup.vue +184 -0
- package/src/components/recommend.vue +89 -89
- package/src/components/selector/hOption.vue +20 -20
- package/src/components/selector/hSelector.vue +199 -199
- package/src/components/selector/hWrapper.vue +216 -216
- package/src/components/source/BotMessage.vue +24 -24
- package/src/components/source/CustomMessage.vue +24 -24
- package/src/components/test.vue +260 -260
- package/src/components/tree.vue +159 -0
- package/src/components/utils/AliyunIssUtil.js +72 -72
- package/src/components/utils/ckeditor.js +123 -123
- package/src/components/utils/command.js +68 -68
- package/src/components/utils/editing.js +11 -11
- package/src/components/utils/format_date.js +25 -18
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +15 -15
- package/src/components/utils/plugin-image.js +11 -11
- package/src/components/utils/toolbar-ui.js +41 -41
- package/src/components/voiceComponent.vue +119 -119
- package/src/main.js +45 -45
- package/vue.config.js +43 -34
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="popUp">
|
|
3
|
+
<div class="topBtn">
|
|
4
|
+
<span class="cancel" @click="closeBtn">取消</span>
|
|
5
|
+
<span class="sure" @click="sure">确定</span>
|
|
6
|
+
</div>
|
|
7
|
+
<slot name="popup-header" class="popup-header"></slot>
|
|
8
|
+
<div class="popup-content">
|
|
9
|
+
<div
|
|
10
|
+
class="filter-item"
|
|
11
|
+
v-for="(item,index) in options"
|
|
12
|
+
:key="index"
|
|
13
|
+
@click="checked(item,index)"
|
|
14
|
+
>
|
|
15
|
+
<div :class="[checkIdList.includes(item[props.value]) && 'setColor', 'label']">{{item[props.label]}}</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="popup-footer">
|
|
19
|
+
<slot name="popup-footer"></slot>
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
export default {
|
|
26
|
+
data() {
|
|
27
|
+
return {
|
|
28
|
+
checkOptions: [],
|
|
29
|
+
checkIdList:[],
|
|
30
|
+
visable:false
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
props: {
|
|
34
|
+
options: {
|
|
35
|
+
type: Array,
|
|
36
|
+
default:function() {
|
|
37
|
+
return []
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
defaultValue: {
|
|
41
|
+
type: Array,
|
|
42
|
+
default:function() {
|
|
43
|
+
return []
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
props: {
|
|
47
|
+
type: Object,
|
|
48
|
+
default(){
|
|
49
|
+
return{
|
|
50
|
+
label: 'label',
|
|
51
|
+
value: 'value'
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
multiple: {
|
|
56
|
+
type: Boolean,
|
|
57
|
+
default: false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
methods: {
|
|
61
|
+
checked(item) {
|
|
62
|
+
if(this.multiple) {
|
|
63
|
+
let count = this.checkIdList.findIndex(element => { return element == item[this.props.value] } )
|
|
64
|
+
if(count !== -1) {
|
|
65
|
+
this.checkIdList.splice(count,1)
|
|
66
|
+
this.checkOptions.splice(count,1)
|
|
67
|
+
} else {
|
|
68
|
+
this.checkIdList.push(item[this.props.value])
|
|
69
|
+
this.checkOptions.push(item)
|
|
70
|
+
}
|
|
71
|
+
} else {
|
|
72
|
+
this.checkIdList = []
|
|
73
|
+
this.checkOptions = []
|
|
74
|
+
this.checkIdList.push(item[this.props.value])
|
|
75
|
+
this.checkOptions.push(item)
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
sure() {
|
|
79
|
+
if(this.checkOptions.length == 0 && this.checkIdList == 0){
|
|
80
|
+
this.$emit('onConfim',false,false)
|
|
81
|
+
return
|
|
82
|
+
}
|
|
83
|
+
let option = JSON.parse(JSON.stringify(this.checkOptions))
|
|
84
|
+
let list = JSON.parse(JSON.stringify(this.checkIdList))
|
|
85
|
+
if(this.multiple) {
|
|
86
|
+
this.$emit('onConfim',option, list)
|
|
87
|
+
} else {
|
|
88
|
+
this.$emit('onConfim',option[0], list[0])
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
closeBtn(){
|
|
92
|
+
this.$emit('onclose')
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
watch: {
|
|
96
|
+
defaultValue: {
|
|
97
|
+
handler(value) {
|
|
98
|
+
if (!value) {
|
|
99
|
+
// 定位当前位置
|
|
100
|
+
/* this.options.forEach(item => {})*/
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
deep: true,
|
|
104
|
+
immediate: true
|
|
105
|
+
},
|
|
106
|
+
visable(value) {
|
|
107
|
+
if(value) {
|
|
108
|
+
console.log(this.defaultValue,'=====');
|
|
109
|
+
this.checkOptions = []
|
|
110
|
+
if(Array.isArray(this.defaultValue)) {
|
|
111
|
+
this.checkIdList = [...this.defaultValue]
|
|
112
|
+
this.checkIdList.forEach(item =>{
|
|
113
|
+
this.options.forEach(res =>{
|
|
114
|
+
if(item == res[this.props.value]) {
|
|
115
|
+
this.checkOptions.push(res)
|
|
116
|
+
}
|
|
117
|
+
})
|
|
118
|
+
})
|
|
119
|
+
}
|
|
120
|
+
// else {
|
|
121
|
+
// this.checkIdList = this.defaultValue
|
|
122
|
+
// let obj = this.options.find(item =>{ return item[this.props.value] == this.defaultValue[0] })
|
|
123
|
+
// obj && this.checkOptions.push(obj)
|
|
124
|
+
// }
|
|
125
|
+
} else {
|
|
126
|
+
this.checkOptions = []
|
|
127
|
+
this.checkIdList = []
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
|
|
135
|
+
<style lang="less" scoped>
|
|
136
|
+
.popup-content {
|
|
137
|
+
/*padding-top: 8px;*/
|
|
138
|
+
.filter-item {
|
|
139
|
+
width: 100%;
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
height: 48px;
|
|
144
|
+
.setColor {
|
|
145
|
+
color: #366aff;
|
|
146
|
+
}
|
|
147
|
+
.label {
|
|
148
|
+
display: block;
|
|
149
|
+
width: 80%;
|
|
150
|
+
overflow: hidden;
|
|
151
|
+
text-overflow: ellipsis;
|
|
152
|
+
white-space:nowrap;
|
|
153
|
+
text-align: center;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
.topBtn {
|
|
158
|
+
width: 100%;
|
|
159
|
+
height: 40px;
|
|
160
|
+
display: flex;
|
|
161
|
+
align-items: center;
|
|
162
|
+
justify-content: space-between;
|
|
163
|
+
box-sizing: border-box;
|
|
164
|
+
padding: 0 20px;
|
|
165
|
+
.cancel {
|
|
166
|
+
color: #606266;
|
|
167
|
+
}
|
|
168
|
+
.sure {
|
|
169
|
+
color: #366aff;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
.popup-footer {
|
|
173
|
+
position: absolute;
|
|
174
|
+
max-height: 50px;
|
|
175
|
+
bottom: 0;
|
|
176
|
+
display: flex;
|
|
177
|
+
justify-content: center;
|
|
178
|
+
align-items: center;
|
|
179
|
+
width: 100%;
|
|
180
|
+
color: #366aff;
|
|
181
|
+
background: #eff2f5;
|
|
182
|
+
/*border-radius: 28px;*/
|
|
183
|
+
}
|
|
184
|
+
</style>
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="text-recommed-intent">
|
|
3
|
-
<p class="intent-des" v-if="msg.recommend&&msg.recommend.description" v-html="msg.recommend.description"></p>
|
|
4
|
-
<div class="bottom-link" v-if="msg.recommend&&msg.recommend.description"></div>
|
|
5
|
-
<div v-if="msg.recommend&&msg.recommend.list" class="options-list">
|
|
6
|
-
<p
|
|
7
|
-
v-for="(option, index) in msg.recommend.list"
|
|
8
|
-
class="options-item"
|
|
9
|
-
:class="index!==msg.recommend.list.length -1?'recommend-item':'last-item'"
|
|
10
|
-
:key="msg.nodeId + '_' + index"
|
|
11
|
-
@click="
|
|
12
|
-
$emit(
|
|
13
|
-
'onRadioClickReco',
|
|
14
|
-
'recdNodeId' +
|
|
15
|
-
'_' +
|
|
16
|
-
index +
|
|
17
|
-
'_' +
|
|
18
|
-
option.id +
|
|
19
|
-
'_' +
|
|
20
|
-
option.text,
|
|
21
|
-
option.text,
|
|
22
|
-
msg.apiKey
|
|
23
|
-
)
|
|
24
|
-
"
|
|
25
|
-
>
|
|
26
|
-
{{ option.text
|
|
27
|
-
}}<i class="arsenal_icon arsenalangle-right-solid"></i>
|
|
28
|
-
</p>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
|
|
36
|
-
export default {
|
|
37
|
-
name: "recommend",
|
|
38
|
-
props: ["msg"]
|
|
39
|
-
}
|
|
40
|
-
</script>
|
|
41
|
-
|
|
42
|
-
<style scoped lang="less">
|
|
43
|
-
.text-recommed-intent{
|
|
44
|
-
/* max-width: 300px;*/
|
|
45
|
-
background-color: white;
|
|
46
|
-
.intent-des{
|
|
47
|
-
word-wrap: break-word;
|
|
48
|
-
word-break: break-all;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
padding: 8px 0;
|
|
51
|
-
height: auto;
|
|
52
|
-
/*border-bottom: 1px solid #EEEEEE;*/
|
|
53
|
-
color: #A9B3C6;
|
|
54
|
-
font-size: 13px;
|
|
55
|
-
background-color: white;
|
|
56
|
-
}
|
|
57
|
-
.bottom-link{
|
|
58
|
-
height: 1px;
|
|
59
|
-
background-color:#EEEEEE;
|
|
60
|
-
}
|
|
61
|
-
.options-list{
|
|
62
|
-
padding-top: 4px;
|
|
63
|
-
min-width: 120px;
|
|
64
|
-
.options-item{
|
|
65
|
-
|
|
66
|
-
height: 25px;
|
|
67
|
-
line-height: 25px;
|
|
68
|
-
background-color: #ffffff;
|
|
69
|
-
color: #366aff;
|
|
70
|
-
cursor:pointer;
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
justify-content: space-between;
|
|
74
|
-
i{
|
|
75
|
-
padding-left: 10px;
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
.recommend-item{
|
|
79
|
-
padding: 8px 0;
|
|
80
|
-
}
|
|
81
|
-
.last-item{
|
|
82
|
-
padding-top: 8px;
|
|
83
|
-
}
|
|
84
|
-
.end{
|
|
85
|
-
border-bottom-left-radius: 25px !important;
|
|
86
|
-
border-bottom-right-radius: 25px !important;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div class="text-recommed-intent">
|
|
3
|
+
<p class="intent-des" v-if="msg.recommend&&msg.recommend.description" v-html="msg.recommend.description"></p>
|
|
4
|
+
<div class="bottom-link" v-if="msg.recommend&&msg.recommend.description"></div>
|
|
5
|
+
<div v-if="msg.recommend&&msg.recommend.list" class="options-list">
|
|
6
|
+
<p
|
|
7
|
+
v-for="(option, index) in msg.recommend.list"
|
|
8
|
+
class="options-item"
|
|
9
|
+
:class="index!==msg.recommend.list.length -1?'recommend-item':'last-item'"
|
|
10
|
+
:key="msg.nodeId + '_' + index"
|
|
11
|
+
@click="
|
|
12
|
+
$emit(
|
|
13
|
+
'onRadioClickReco',
|
|
14
|
+
'recdNodeId' +
|
|
15
|
+
'_' +
|
|
16
|
+
index +
|
|
17
|
+
'_' +
|
|
18
|
+
option.id +
|
|
19
|
+
'_' +
|
|
20
|
+
option.text,
|
|
21
|
+
option.text,
|
|
22
|
+
msg.apiKey
|
|
23
|
+
)
|
|
24
|
+
"
|
|
25
|
+
>
|
|
26
|
+
{{ option.text
|
|
27
|
+
}}<i class="arsenal_icon arsenalangle-right-solid"></i>
|
|
28
|
+
</p>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
|
|
32
|
+
</template>
|
|
33
|
+
|
|
34
|
+
<script>
|
|
35
|
+
|
|
36
|
+
export default {
|
|
37
|
+
name: "recommend",
|
|
38
|
+
props: ["msg"]
|
|
39
|
+
}
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style scoped lang="less">
|
|
43
|
+
.text-recommed-intent{
|
|
44
|
+
/* max-width: 300px;*/
|
|
45
|
+
background-color: white;
|
|
46
|
+
.intent-des{
|
|
47
|
+
word-wrap: break-word;
|
|
48
|
+
word-break: break-all;
|
|
49
|
+
overflow: hidden;
|
|
50
|
+
padding: 8px 0;
|
|
51
|
+
height: auto;
|
|
52
|
+
/*border-bottom: 1px solid #EEEEEE;*/
|
|
53
|
+
color: #A9B3C6;
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
background-color: white;
|
|
56
|
+
}
|
|
57
|
+
.bottom-link{
|
|
58
|
+
height: 1px;
|
|
59
|
+
background-color:#EEEEEE;
|
|
60
|
+
}
|
|
61
|
+
.options-list{
|
|
62
|
+
padding-top: 4px;
|
|
63
|
+
min-width: 120px;
|
|
64
|
+
.options-item{
|
|
65
|
+
|
|
66
|
+
height: 25px;
|
|
67
|
+
line-height: 25px;
|
|
68
|
+
background-color: #ffffff;
|
|
69
|
+
color: #366aff;
|
|
70
|
+
cursor:pointer;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
i{
|
|
75
|
+
padding-left: 10px;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
.recommend-item{
|
|
79
|
+
padding: 8px 0;
|
|
80
|
+
}
|
|
81
|
+
.last-item{
|
|
82
|
+
padding-top: 8px;
|
|
83
|
+
}
|
|
84
|
+
.end{
|
|
85
|
+
border-bottom-left-radius: 25px !important;
|
|
86
|
+
border-bottom-right-radius: 25px !important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
90
|
</style>
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<li class="h-selector-option">
|
|
3
|
-
<slot>{{value}}</slot>
|
|
4
|
-
</li>
|
|
5
|
-
</template>
|
|
6
|
-
|
|
7
|
-
<script>
|
|
8
|
-
export default {
|
|
9
|
-
name: "hOption",
|
|
10
|
-
props: {
|
|
11
|
-
value: {
|
|
12
|
-
type: [String,Number],
|
|
13
|
-
required: true
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<style scoped>
|
|
20
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<li class="h-selector-option">
|
|
3
|
+
<slot>{{value}}</slot>
|
|
4
|
+
</li>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "hOption",
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: [String,Number],
|
|
13
|
+
required: true
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<style scoped>
|
|
20
|
+
|
|
21
21
|
</style>
|