askbot-dragon 0.6.17 → 0.6.21
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 +54 -52
- package/public/index.html +27 -26
- 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/less/common.css +6760 -6760
- package/src/assets/less/converSationContainer/common.less +4751 -4751
- package/src/assets/less/converSationContainer/converSatonContainer.less +492 -492
- package/src/assets/less/ticketMessage.less +319 -319
- package/src/components/ActionAlertIframe.vue +117 -117
- package/src/components/AskIFrame.vue +15 -15
- package/src/components/ConversationContainer.vue +1388 -1388
- package/src/components/FileType.vue +88 -88
- package/src/components/Message.vue +27 -27
- 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/chatContent.vue +512 -512
- package/src/components/feedBack.vue +133 -133
- package/src/components/file/AliyunOssComponents.vue +109 -109
- package/src/components/formTemplate.vue +1898 -2039
- package/src/components/message/ActionAlertIframe.vue +116 -116
- package/src/components/message/ShopMessage.vue +168 -168
- package/src/components/message/TextMessage.vue +895 -895
- package/src/components/message/TicketMessage.vue +173 -173
- package/src/components/message/swiper/index.js +4 -4
- package/src/components/message/swiper/ticketSwiper.vue +530 -530
- package/src/components/message/swiper/ticketSwiperItem.vue +61 -61
- 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/utils/AliyunIssUtil.js +72 -72
- package/src/components/utils/ckeditor.js +124 -0
- package/src/components/utils/format_date.js +18 -18
- package/src/components/utils/index.js +6 -6
- package/src/components/utils/math_utils.js +15 -15
- package/src/main.js +44 -43
- package/vue.config.js +34 -28
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div>
|
|
3
|
-
<div v-for="(file,_index) in urls" :key="_index" class="fileType">
|
|
4
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/excel.png" v-if="fileType[_index]==='xls'||fileType[_index]==='xlsx'">
|
|
5
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/pdf.png" v-if="fileType[_index]==='pdf'">
|
|
6
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/ppt.png" v-if="fileType[_index]==='ppt'||fileType[_index] === 'pptx'">
|
|
7
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/word.png" v-if="fileType[_index]==='doc'||fileType[_index]==='docx'">
|
|
8
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/zip.jpg" v-if="fileType[_index] === 'zip'||fileType[_index]==='rar'">
|
|
9
|
-
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/file.png"
|
|
10
|
-
v-if="fileType[_index] !== 'zip'&& fileType[_index]!=='rar'&&fileType[_index]!=='doc'&&fileType[_index]!=='docx'&&fileType[_index]!=='xls'&&fileType[_index]!=='xlsx'
|
|
11
|
-
&&fileType[_index]!=='ppt'&&fileType[_index]!=='pptx'&&fileType[_index]!=='pdf'"
|
|
12
|
-
>
|
|
13
|
-
<div style="line-height: 30px;word-wrap:break-word;">
|
|
14
|
-
<a :href="file.response" target="_blank" :style="{color:color}">{{file.name}}</a>
|
|
15
|
-
</div>
|
|
16
|
-
</div>
|
|
17
|
-
</div>
|
|
18
|
-
</template>
|
|
19
|
-
|
|
20
|
-
<script>
|
|
21
|
-
let that
|
|
22
|
-
export default {
|
|
23
|
-
name: "FileType",
|
|
24
|
-
data(){
|
|
25
|
-
return{
|
|
26
|
-
fileType:[]
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
props:{
|
|
30
|
-
urls:Array,
|
|
31
|
-
color:String
|
|
32
|
-
},
|
|
33
|
-
methods:{
|
|
34
|
-
typeClick(){
|
|
35
|
-
for (let i=0;i<this.urls.length;i++)
|
|
36
|
-
{
|
|
37
|
-
let type=this.urls[i].name
|
|
38
|
-
console.log(type)
|
|
39
|
-
let nameType=type.split('.')
|
|
40
|
-
let suffix=nameType[nameType.length - 1]
|
|
41
|
-
/* let fileType=['pdf','ppt','doc','docx','xls','zip','txt','xlsx','pptx']*/
|
|
42
|
-
this.fileType[i]=suffix
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
console.log(this.fileType)
|
|
46
|
-
},
|
|
47
|
-
matchType(){
|
|
48
|
-
|
|
49
|
-
/* let result='';
|
|
50
|
-
let fileType=['pdf','ppt','doc','docx','xls','zip']
|
|
51
|
-
result=fileType.some(function (){
|
|
52
|
-
|
|
53
|
-
})
|
|
54
|
-
console.log(result)*/
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
beforeCreate() {
|
|
58
|
-
that=this
|
|
59
|
-
},
|
|
60
|
-
beforeMount() {
|
|
61
|
-
that.typeClick()
|
|
62
|
-
},
|
|
63
|
-
mounted() {
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<style lang="less">
|
|
70
|
-
.fileType{
|
|
71
|
-
display: flex;
|
|
72
|
-
align-items: center;
|
|
73
|
-
img{
|
|
74
|
-
width: 25px;
|
|
75
|
-
height: 25px;
|
|
76
|
-
margin-right: 10px;
|
|
77
|
-
align-items: center;
|
|
78
|
-
text-align: center;
|
|
79
|
-
}
|
|
80
|
-
a{
|
|
81
|
-
align-items: center;
|
|
82
|
-
color: black;
|
|
83
|
-
}
|
|
84
|
-
.el-link--inner{
|
|
85
|
-
display: flex!important;
|
|
86
|
-
align-items: center!important;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<div>
|
|
3
|
+
<div v-for="(file,_index) in urls" :key="_index" class="fileType">
|
|
4
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/excel.png" v-if="fileType[_index]==='xls'||fileType[_index]==='xlsx'">
|
|
5
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/pdf.png" v-if="fileType[_index]==='pdf'">
|
|
6
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/ppt.png" v-if="fileType[_index]==='ppt'||fileType[_index] === 'pptx'">
|
|
7
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/word.png" v-if="fileType[_index]==='doc'||fileType[_index]==='docx'">
|
|
8
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/zip.jpg" v-if="fileType[_index] === 'zip'||fileType[_index]==='rar'">
|
|
9
|
+
<img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/file.png"
|
|
10
|
+
v-if="fileType[_index] !== 'zip'&& fileType[_index]!=='rar'&&fileType[_index]!=='doc'&&fileType[_index]!=='docx'&&fileType[_index]!=='xls'&&fileType[_index]!=='xlsx'
|
|
11
|
+
&&fileType[_index]!=='ppt'&&fileType[_index]!=='pptx'&&fileType[_index]!=='pdf'"
|
|
12
|
+
>
|
|
13
|
+
<div style="line-height: 30px;word-wrap:break-word;">
|
|
14
|
+
<a :href="file.response" target="_blank" :style="{color:color}">{{file.name}}</a>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</template>
|
|
19
|
+
|
|
20
|
+
<script>
|
|
21
|
+
let that
|
|
22
|
+
export default {
|
|
23
|
+
name: "FileType",
|
|
24
|
+
data(){
|
|
25
|
+
return{
|
|
26
|
+
fileType:[]
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
props:{
|
|
30
|
+
urls:Array,
|
|
31
|
+
color:String
|
|
32
|
+
},
|
|
33
|
+
methods:{
|
|
34
|
+
typeClick(){
|
|
35
|
+
for (let i=0;i<this.urls.length;i++)
|
|
36
|
+
{
|
|
37
|
+
let type=this.urls[i].name
|
|
38
|
+
console.log(type)
|
|
39
|
+
let nameType=type.split('.')
|
|
40
|
+
let suffix=nameType[nameType.length - 1]
|
|
41
|
+
/* let fileType=['pdf','ppt','doc','docx','xls','zip','txt','xlsx','pptx']*/
|
|
42
|
+
this.fileType[i]=suffix
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
console.log(this.fileType)
|
|
46
|
+
},
|
|
47
|
+
matchType(){
|
|
48
|
+
|
|
49
|
+
/* let result='';
|
|
50
|
+
let fileType=['pdf','ppt','doc','docx','xls','zip']
|
|
51
|
+
result=fileType.some(function (){
|
|
52
|
+
|
|
53
|
+
})
|
|
54
|
+
console.log(result)*/
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
beforeCreate() {
|
|
58
|
+
that=this
|
|
59
|
+
},
|
|
60
|
+
beforeMount() {
|
|
61
|
+
that.typeClick()
|
|
62
|
+
},
|
|
63
|
+
mounted() {
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style lang="less">
|
|
70
|
+
.fileType{
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
img{
|
|
74
|
+
width: 25px;
|
|
75
|
+
height: 25px;
|
|
76
|
+
margin-right: 10px;
|
|
77
|
+
align-items: center;
|
|
78
|
+
text-align: center;
|
|
79
|
+
}
|
|
80
|
+
a{
|
|
81
|
+
align-items: center;
|
|
82
|
+
color: black;
|
|
83
|
+
}
|
|
84
|
+
.el-link--inner{
|
|
85
|
+
display: flex!important;
|
|
86
|
+
align-items: center!important;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
89
|
</style>
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
<!-- 消息记录容器 -->
|
|
2
|
-
<template>
|
|
3
|
-
<div class="conversation-container">
|
|
4
|
-
|
|
5
|
-
<div :class="message.source">
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
</div>
|
|
11
|
-
</template>
|
|
12
|
-
|
|
13
|
-
<script>
|
|
14
|
-
import TextMessage from "./message/TextMessage";
|
|
15
|
-
|
|
16
|
-
export default {
|
|
17
|
-
name: 'Message',
|
|
18
|
-
props: {
|
|
19
|
-
message: Object
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
</script>
|
|
23
|
-
|
|
24
|
-
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
25
|
-
<style scoped>
|
|
26
|
-
|
|
27
|
-
</style>
|
|
1
|
+
<!-- 消息记录容器 -->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="conversation-container">
|
|
4
|
+
|
|
5
|
+
<div :class="message.source">
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
</div>
|
|
11
|
+
</template>
|
|
12
|
+
|
|
13
|
+
<script>
|
|
14
|
+
import TextMessage from "./message/TextMessage";
|
|
15
|
+
|
|
16
|
+
export default {
|
|
17
|
+
name: 'Message',
|
|
18
|
+
props: {
|
|
19
|
+
message: Object
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
|
25
|
+
<style scoped>
|
|
26
|
+
|
|
27
|
+
</style>
|
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="media-body-ps">
|
|
3
|
-
<view class="other" v-html="message.content.replyText"></view>
|
|
4
|
-
<view
|
|
5
|
-
v-for="(reply_option, index) in message.content.replyOptions"
|
|
6
|
-
v-bind:class="[index == message.content.replyOptions.length - 1 ? 'end' : '', 'ps']"
|
|
7
|
-
:key="index"
|
|
8
|
-
:data-name="reply_option.name"
|
|
9
|
-
:data-answer="reply_option.answer"
|
|
10
|
-
@click="onClick(reply_option)" >
|
|
11
|
-
<view :data-name="reply_option.name"
|
|
12
|
-
:data-answer="reply_option.answer">{{ reply_option.name }}
|
|
13
|
-
</view>
|
|
14
|
-
</view>
|
|
15
|
-
</view>
|
|
16
|
-
</template>
|
|
17
|
-
<script>
|
|
18
|
-
export default {
|
|
19
|
-
name:"DissatisfactionOptions",
|
|
20
|
-
props:["message"],
|
|
21
|
-
methods:{
|
|
22
|
-
onClick(option){
|
|
23
|
-
this.$emit('onOption',option);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
<style lang='less'>
|
|
30
|
-
.other {
|
|
31
|
-
font-size: 14px;
|
|
32
|
-
word-wrap: break-word;
|
|
33
|
-
word-break: break-all;
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
padding: 8px 20px 8px 15px;
|
|
36
|
-
height: auto;
|
|
37
|
-
}
|
|
38
|
-
.ps {
|
|
39
|
-
padding: 8px 20px 8px 15px;
|
|
40
|
-
height: auto;
|
|
41
|
-
border-top: 1px solid #F4F8FC;
|
|
42
|
-
background-color: #ffffff;
|
|
43
|
-
color: var(--color);
|
|
44
|
-
cursor: pointer;
|
|
45
|
-
font-size: 14px;
|
|
46
|
-
display: flex;
|
|
47
|
-
flex-direction: row;
|
|
48
|
-
justify-content: space-between;
|
|
49
|
-
i{
|
|
50
|
-
margin-left: 20px;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
.end {
|
|
54
|
-
border: 1px solid #F4F8FC;
|
|
55
|
-
border-bottom-left-radius: 32px !important;
|
|
56
|
-
border-bottom-right-radius: 32px !important;
|
|
57
|
-
}
|
|
1
|
+
<template>
|
|
2
|
+
<view class="media-body-ps">
|
|
3
|
+
<view class="other" v-html="message.content.replyText"></view>
|
|
4
|
+
<view
|
|
5
|
+
v-for="(reply_option, index) in message.content.replyOptions"
|
|
6
|
+
v-bind:class="[index == message.content.replyOptions.length - 1 ? 'end' : '', 'ps']"
|
|
7
|
+
:key="index"
|
|
8
|
+
:data-name="reply_option.name"
|
|
9
|
+
:data-answer="reply_option.answer"
|
|
10
|
+
@click="onClick(reply_option)" >
|
|
11
|
+
<view :data-name="reply_option.name"
|
|
12
|
+
:data-answer="reply_option.answer">{{ reply_option.name }}
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
</view>
|
|
16
|
+
</template>
|
|
17
|
+
<script>
|
|
18
|
+
export default {
|
|
19
|
+
name:"DissatisfactionOptions",
|
|
20
|
+
props:["message"],
|
|
21
|
+
methods:{
|
|
22
|
+
onClick(option){
|
|
23
|
+
this.$emit('onOption',option);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
</script>
|
|
29
|
+
<style lang='less'>
|
|
30
|
+
.other {
|
|
31
|
+
font-size: 14px;
|
|
32
|
+
word-wrap: break-word;
|
|
33
|
+
word-break: break-all;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
padding: 8px 20px 8px 15px;
|
|
36
|
+
height: auto;
|
|
37
|
+
}
|
|
38
|
+
.ps {
|
|
39
|
+
padding: 8px 20px 8px 15px;
|
|
40
|
+
height: auto;
|
|
41
|
+
border-top: 1px solid #F4F8FC;
|
|
42
|
+
background-color: #ffffff;
|
|
43
|
+
color: var(--color);
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: row;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
i{
|
|
50
|
+
margin-left: 20px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.end {
|
|
54
|
+
border: 1px solid #F4F8FC;
|
|
55
|
+
border-bottom-left-radius: 32px !important;
|
|
56
|
+
border-bottom-right-radius: 32px !important;
|
|
57
|
+
}
|
|
58
58
|
</style>
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view class="media-body-loading">
|
|
3
|
-
<view class="bot_loading">
|
|
4
|
-
<span></span>
|
|
5
|
-
<span></span>
|
|
6
|
-
<span></span>
|
|
7
|
-
<span></span>
|
|
8
|
-
</view>
|
|
9
|
-
</view>
|
|
10
|
-
</template>
|
|
11
|
-
|
|
12
|
-
<script>
|
|
13
|
-
export default {
|
|
14
|
-
data() {
|
|
15
|
-
return {
|
|
16
|
-
name: ''
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<style lang="less">
|
|
23
|
-
.media-body-loading {
|
|
24
|
-
background-color: #f4f8fc;
|
|
25
|
-
border: 1px solid #f4f8fc;
|
|
26
|
-
word-break: break-word;
|
|
27
|
-
box-shadow: 0px 0px 5px 0px rgba(76, 97, 255, 0.38);
|
|
28
|
-
flex: 1;
|
|
29
|
-
min-height: 30px;
|
|
30
|
-
line-height: 30px;
|
|
31
|
-
border-radius: 32px;
|
|
32
|
-
border-top-left-radius: 0px;
|
|
33
|
-
padding: 8px 15px;
|
|
34
|
-
text-align: left;
|
|
35
|
-
margin-left: 5px;
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<view class="media-body-loading">
|
|
3
|
+
<view class="bot_loading">
|
|
4
|
+
<span></span>
|
|
5
|
+
<span></span>
|
|
6
|
+
<span></span>
|
|
7
|
+
<span></span>
|
|
8
|
+
</view>
|
|
9
|
+
</view>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script>
|
|
13
|
+
export default {
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
name: ''
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<style lang="less">
|
|
23
|
+
.media-body-loading {
|
|
24
|
+
background-color: #f4f8fc;
|
|
25
|
+
border: 1px solid #f4f8fc;
|
|
26
|
+
word-break: break-word;
|
|
27
|
+
box-shadow: 0px 0px 5px 0px rgba(76, 97, 255, 0.38);
|
|
28
|
+
flex: 1;
|
|
29
|
+
min-height: 30px;
|
|
30
|
+
line-height: 30px;
|
|
31
|
+
border-radius: 32px;
|
|
32
|
+
border-top-left-radius: 0px;
|
|
33
|
+
padding: 8px 15px;
|
|
34
|
+
text-align: left;
|
|
35
|
+
margin-left: 5px;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<view>
|
|
3
|
-
<view v-html="message.content.input"></view>
|
|
4
|
-
</view>
|
|
5
|
-
</template>
|
|
6
|
-
<script>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
name:"SatisfactionV2",
|
|
11
|
-
props:["message"],
|
|
12
|
-
methods:{
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<view>
|
|
3
|
+
<view v-html="message.content.input"></view>
|
|
4
|
+
</view>
|
|
5
|
+
</template>
|
|
6
|
+
<script>
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
name:"SatisfactionV2",
|
|
11
|
+
props:["message"],
|
|
12
|
+
methods:{
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
</script>
|