askbot-dragon 0.7.28 → 0.7.31

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "askbot-dragon",
3
- "version": "0.7.28",
3
+ "version": "0.7.31",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
package/public/index.html CHANGED
@@ -7,7 +7,10 @@
7
7
  <meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1, maximum-scale=1" />
8
8
  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
9
9
  <title><%= htmlWebpackPlugin.options.title %></title>
10
- <link rel="stylesheet" href="//at.alicdn.com/t/font_1566110_eump2lzv89s.css"/>
10
+ <!-- 项目图标 -->
11
+ <link rel="stylesheet" href="//at.alicdn.com/t/font_1566110_3hu6pyd938i.css"/>
12
+ <!-- guoran图标 -->
13
+ <link rel="stylesheet" href="//at.alicdn.com/t/font_2913049_aukej8oi7nm.css"/>
11
14
  <script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
12
15
  <script src="https://static.guoranbot.com/ckeditor5-build-classic/0.3.7/build/ckeditor.js"></script>
13
16
  <style>
@@ -1,9 +1,9 @@
1
1
  @font-face {
2
2
  font-family: 'iconfont'; /* Project id 2913049 */
3
- src: url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff2?t=1644465476099') format('woff2'),
4
- url('//at.alicdn.com/t/font_2913049_fhimnf31slu.woff?t=1644465476099') format('woff'),
5
- url('//at.alicdn.com/t/font_2913049_fhimnf31slu.ttf?t=1644465476099') format('truetype');
6
- }
3
+ src: url('//at.alicdn.com/t/font_2913049_aukej8oi7nm.woff2?t=1647920908718') format('woff2'),
4
+ url('//at.alicdn.com/t/font_2913049_aukej8oi7nm.woff?t=1647920908718') format('woff'),
5
+ url('//at.alicdn.com/t/font_2913049_aukej8oi7nm.ttf?t=1647920908718') format('truetype');
6
+ }
7
7
 
8
8
  .iconfont {
9
9
  font-family: "iconfont" !important;
@@ -14,4 +14,24 @@
14
14
  }
15
15
  .guoran-arsenalchess-pawn-solid1:before {
16
16
  content: "\e77f";
17
- }
17
+ }
18
+
19
+ .guoran-biaoqian:before {
20
+ content: '\e79f';
21
+ }
22
+ .guoran-miaoshu:before {
23
+ content: '\e799';
24
+ }
25
+ .guoran-xinghao:before {
26
+ content: '\e7a7';
27
+ }
28
+ .guoran-geren:before {
29
+ content: '\e745';
30
+ }
31
+ .guoran-bumen:before {
32
+ content: '\e79e';
33
+ }
34
+ .guoran-guanlizhe:before {
35
+ content: '\e79a';
36
+ }
37
+
@@ -1,6 +1,8 @@
1
1
  <!-- 消息记录容器 -->
2
2
  <template>
3
3
  <div id="conversation">
4
+ <asset-message></asset-message>
5
+ <!-- <asser-deatils></asser-deatils> -->
4
6
  <msg-loading v-if="inLoading"></msg-loading>
5
7
  <div style="position: relative" class="img_div">
6
8
  <img src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/24/07/35/45c878fd-6a8e-40e2-b599-bdba8e17cf8a/微信图片_20210423113520.jpg?x-oss-process=image/auto-orient,1/quality,q_90/watermark,text_MjE=,color_cccccc,size_48,rotate_315,fill_1,x_10,y_10,t_0" style="width: 100px"/>
@@ -26,8 +28,9 @@
26
28
  <ticket-message :content="contents"></ticket-message>
27
29
  <text-message :text="text" @submitClick="submitClick"></text-message>
28
30
  <div v-for="(item,index) in processAction" :key="index">
29
- <association-intention :msg="item" :msgType="item.type"></association-intention>
31
+ <association-intention :msg="item" :msgType="item.type" :isOpen="isOpen"></association-intention>
30
32
  </div>
33
+ <el-button @click="isOpen=!isOpen">切换</el-button>
31
34
  <!-- 满意组件 -->
32
35
  <action-satisfaction :msg="actionSatisfactions[0]"></action-satisfaction>
33
36
  <!-- 满意或不满意-->
@@ -60,6 +63,8 @@ import BotActionSatisfactor from "./botActionSatisfactor";
60
63
  import AnswerDissatisfaction from "./answerDissatisfaction";
61
64
  import ActionSendToBot from "./actionSendToBot";
62
65
  import VoiceCompontent from './voiceComponent'
66
+ // import AsserDeatils from './assetDetails.vue'
67
+ import AssetMessage from './assetMessage.vue'
63
68
  /* import TicketMessage from "@/components/message/TicketMessage";
64
69
  import TicketMessage from "@/components/message/TicketMessage";
65
70
  import TextMessage from "@/components/message/TextMessage";
@@ -81,7 +86,8 @@ export default {
81
86
  AssociationIntention,
82
87
  /* VoiceComponent,*/
83
88
  TicketMessage,
84
-
89
+ // AsserDeatils,
90
+ AssetMessage,
85
91
  AnswerRadio,
86
92
  FormTemplate,
87
93
  TextMessage,
@@ -923,7 +929,7 @@ export default {
923
929
  processAction:[
924
930
  {
925
931
  content:{
926
- html:'哈哈哈哈',
932
+ html:'<p style="line-height: 16px;"><img onclick=\'previewImage(this)\' src="https://test.open.guoranbot.com/UEditor/dialogs/attachment/fileTypeImages/icon_txt.gif"/><a style="font-size:12px; color:#0066cc;" href="https://static.guoranbot.com/ueditor/2022/03/11/c788d2d7fea04be680cc920e1f99db8e/分析报告 (1).xlsx" title="分析报告 (1).xlsx">分析报告 (1).xlsx</a></p><p><br/></p>',
927
933
  recommend:{
928
934
  description: "关联意图测试描述",
929
935
  list:[
@@ -1119,7 +1125,8 @@ export default {
1119
1125
  },
1120
1126
  type:'answer_radio'
1121
1127
  },
1122
- htmlContainer:'<input placeholder="请输入"></input>'
1128
+ htmlContainer:'<input placeholder="请输入"></input>',
1129
+ isOpen:true
1123
1130
  };
1124
1131
  },
1125
1132
  methods: {
@@ -0,0 +1,249 @@
1
+ <template>
2
+ <div class="asset-details">
3
+ <section class="details-title">
4
+ <p>您正在咨询</p>
5
+ <span @click="rotateClick" :class="rotateFlag ? 'rotate' : ''">
6
+ <i class="arsenal_icon arsenalangle-up-solid"></i>
7
+ </span>
8
+ </section>
9
+ <div class="details-content">
10
+ <img
11
+ class="backgroundImg"
12
+ v-if="dataDetails.product.productImgPathes"
13
+ :src="dataDetails.product.productImgPathes"
14
+ alt=""
15
+ />
16
+ <div class="background-null" v-else>
17
+ {{ dataDetails.productName[0] | filterName }}
18
+ </div>
19
+ <div class="content-text">
20
+ <p class="text-title">{{ dataDetails.productName }}</p>
21
+ <section class="text-label">
22
+ <p class="text-type">
23
+ <i class="iconfont guoran-biaoqian"></i>
24
+ <span>{{
25
+ dataDetails.typeName ? dataDetails.typeName : "--"
26
+ }}</span>
27
+ </p>
28
+ <p class="text-SN">
29
+ <i class="iconfont guoran-xinghao"></i>
30
+ <span>{{ dataDetails.snNo ? dataDetails.snNo : "--" }}</span>
31
+ </p>
32
+ </section>
33
+ </div>
34
+ </div>
35
+ <div class="details-content-hide" v-if="rotateFlag">
36
+ <p>
37
+ <i class="iconfont guoran-miaoshu"></i>
38
+ <span>{{ dataDetails.description }}</span>
39
+ </p>
40
+ <p>
41
+ <i class="arsenal_icon arsenalweizhi"></i>
42
+ <span> {{ dataDetails.officeAreaName }} </span>
43
+ </p>
44
+ <p>
45
+ <i class="iconfont guoran-geren"></i>
46
+ <span>
47
+ {{
48
+ dataDetails.userName && dataDetails.userName.length != 0
49
+ ? dataDetails.userName[0]
50
+ : "--"
51
+ }}
52
+ </span>
53
+ </p>
54
+ <p>
55
+ <i class="iconfont guoran-bumen"></i>
56
+ <span>
57
+ {{
58
+ dataDetails.deptNames && dataDetails.deptNames.length != 0
59
+ ? dataDetails.deptNames[0]
60
+ : "--"
61
+ }}
62
+ </span>
63
+ </p>
64
+ <p>
65
+ <i class="iconfont guoran-guanlizhe"></i>
66
+ <span>
67
+ {{
68
+ dataDetails.managerNames && dataDetails.managerNames.length != 0
69
+ ? dataDetails.managerNames[0]
70
+ : "--"
71
+ }}
72
+ </span>
73
+ </p>
74
+ </div>
75
+ </div>
76
+ </template>
77
+
78
+ <script>
79
+ export default {
80
+ props: {
81
+ data: {
82
+ type: Object,
83
+ },
84
+ },
85
+ data() {
86
+ return {
87
+ detailVisable: false,
88
+ rotateFlag: true,
89
+ };
90
+ },
91
+ filters: {
92
+ filterName(value) {
93
+ let str = "";
94
+ let reg =
95
+ /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/;
96
+ if (reg.test(value[0])) {
97
+ str = value[0];
98
+ } else {
99
+ str = value[0] + value[1];
100
+ }
101
+ return str;
102
+ },
103
+ },
104
+ computed: {
105
+ dataDetails() {
106
+ let dataDetails = this.data;
107
+ let reg = /<\/?.+?\/?>/g;
108
+ dataDetails.description = this.data.description
109
+ ? this.data.description.replace(reg, "")
110
+ : "";
111
+ return dataDetails;
112
+ },
113
+ },
114
+ methods: {
115
+ rotateClick() {
116
+ this.rotateFlag = !this.rotateFlag;
117
+ console.log(this.rotateFlag);
118
+ },
119
+ },
120
+ };
121
+ </script>
122
+
123
+ <style lang="less" scoped>
124
+ .asset-details {
125
+ width: 100%;
126
+ // height: 130px;
127
+ box-sizing: border-box;
128
+ background: #ffffff;
129
+ box-shadow: 0px 0px 10px 0px rgba(0, 0, 0, 0.03);
130
+ border-radius: 13px;
131
+ .details-title {
132
+ display: flex;
133
+ height: 45px;
134
+ justify-content: space-between;
135
+ align-items: center;
136
+ border-bottom: 1px solid #eeeeee;
137
+ box-sizing: border-box;
138
+ padding: 10px;
139
+ p {
140
+ font-size: 17px;
141
+ font-weight: bold;
142
+ color: #000000;
143
+ }
144
+ span {
145
+ width: 25px;
146
+ height: 25px;
147
+ line-height: 25px;
148
+ text-align: center;
149
+ border-radius: 25px;
150
+ border: 1px solid #366aff;
151
+ i {
152
+ color: #366aff;
153
+ }
154
+ }
155
+ .rotate {
156
+ transform: rotate(180deg);
157
+ }
158
+ }
159
+ .details-content {
160
+ width: 100%;
161
+ height: 85px;
162
+ box-sizing: border-box;
163
+ padding: 15px 15px;
164
+ display: flex;
165
+ align-items: center;
166
+ .backgroundImg {
167
+ width: 67px;
168
+ height: 51px;
169
+ margin-right: 15px;
170
+ }
171
+ .background-null {
172
+ width: 51px;
173
+ height: 51px;
174
+ background: #366aff;
175
+ border-radius: 51px;
176
+ line-height: 51px;
177
+ text-align: center;
178
+ font-size: 24px;
179
+ color: #ffffff;
180
+ margin-right: 15px;
181
+ }
182
+ .content-text {
183
+ width: calc(100% - 90px);
184
+ height: 100%;
185
+ display: flex;
186
+ flex-direction: column;
187
+ justify-content: space-between;
188
+ .text-title {
189
+ width: 100%;
190
+ font-weight: bold;
191
+ color: #000000;
192
+ font-size: 15px;
193
+ text-overflow: hidden;
194
+ // overflow-wrap: each();
195
+ }
196
+ .text-label {
197
+ width: 100%;
198
+ display: flex;
199
+ p {
200
+ margin-right: 10px;
201
+ display: flex;
202
+ align-items: center;
203
+ i {
204
+ margin-right: 3px;
205
+ }
206
+ }
207
+ .text-type {
208
+ background: #e1faf9;
209
+ box-sizing: border-box;
210
+ padding: 3px 5px;
211
+ i {
212
+ color: #00c2bb;
213
+ }
214
+ span {
215
+ color: #00c2bb;
216
+ }
217
+ }
218
+ .text-SN {
219
+ background: #edf2ff;
220
+ box-sizing: border-box;
221
+ padding: 3px 5px;
222
+ i {
223
+ color: #366aff;
224
+ }
225
+ span {
226
+ color: #366aff;
227
+ }
228
+ }
229
+ }
230
+ }
231
+ }
232
+ .details-content-hide {
233
+ width: 100%;
234
+ height: 140px;
235
+ box-sizing: border-box;
236
+ padding: 10px 15px;
237
+ border-top: 1px solid #eeeeee;
238
+ p {
239
+ margin-bottom: 5px;
240
+ display: flex;
241
+ align-items: center;
242
+ i {
243
+ margin-right: 10px;
244
+ color: #366aff;
245
+ }
246
+ }
247
+ }
248
+ }
249
+ </style>
@@ -0,0 +1,228 @@
1
+ <template>
2
+ <div class="asset-details">
3
+ <div class="details-content">
4
+ <img
5
+ class="backgroundImg"
6
+ v-if="dataDetails.product.productImgPathes"
7
+ :src="dataDetails.product.productImgPathes"
8
+ alt=""
9
+ />
10
+ <div class="background-null" v-else>
11
+ {{ dataDetails.productName[0] | filterName }}
12
+ </div>
13
+ <div class="content-text">
14
+ <p class="text-title">{{ dataDetails.productName }}</p>
15
+ <section class="text-label">
16
+ <p class="text-type">
17
+ <i class="iconfont guoran-biaoqian"></i>
18
+ <span>{{
19
+ dataDetails.typeName ? dataDetails.typeName : "--"
20
+ }}</span>
21
+ </p>
22
+ <p class="text-SN">
23
+ <i class="iconfont guoran-xinghao"></i>
24
+ <span>{{ dataDetails.snNo ? dataDetails.snNo : "--" }}</span>
25
+ </p>
26
+ </section>
27
+ </div>
28
+ </div>
29
+ <div class="details-content-hide">
30
+ <p>
31
+ <i class="iconfont guoran-miaoshu"></i>
32
+ <span>描述</span>
33
+ <b>{{ dataDetails.description }}</b>
34
+ </p>
35
+ <p>
36
+ <i class="arsenal_icon arsenalweizhi"></i>
37
+ <span>位置</span>
38
+ <b> {{ dataDetails.officeAreaName }} </b>
39
+ </p>
40
+ <p>
41
+ <i class="iconfont guoran-geren"></i>
42
+ <span>使用者</span>
43
+ <b>
44
+ {{
45
+ dataDetails.userName && dataDetails.userName.length != 0
46
+ ? dataDetails.userName[0]
47
+ : "--"
48
+ }}
49
+ </b>
50
+ </p>
51
+ <p>
52
+ <i class="iconfont guoran-bumen"></i>
53
+ <span>部门</span>
54
+ <b>
55
+ {{
56
+ dataDetails.deptNames && dataDetails.deptNames.length != 0
57
+ ? dataDetails.deptNames[0]
58
+ : "--"
59
+ }}
60
+ </b>
61
+ </p>
62
+ <p>
63
+ <i class="iconfont guoran-guanlizhe"></i>
64
+ <span>管理者</span>
65
+ <b>
66
+ {{
67
+ dataDetails.managerNames && dataDetails.managerNames.length != 0
68
+ ? dataDetails.managerNames[0]
69
+ : "--"
70
+ }}
71
+ </b>
72
+ </p>
73
+ </div>
74
+ </div>
75
+ </template>
76
+
77
+ <script>
78
+ export default {
79
+ props: {
80
+ data: {
81
+ type: Object,
82
+ },
83
+ },
84
+ data() {
85
+ return {
86
+ };
87
+ },
88
+ filters: {
89
+ filterName(value) {
90
+ let str = "";
91
+ let reg =
92
+ /^(?:[\u3400-\u4DB5\u4E00-\u9FEA\uFA0E\uFA0F\uFA11\uFA13\uFA14\uFA1F\uFA21\uFA23\uFA24\uFA27-\uFA29]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879][\uDC00-\uDFFF]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0])+$/;
93
+ if (reg.test(value[0])) {
94
+ str = value[0];
95
+ } else {
96
+ str = value[0] + value[1];
97
+ }
98
+ return str;
99
+ },
100
+ },
101
+ computed: {
102
+ dataDetails() {
103
+ let dataDetails = this.data;
104
+ let reg = /<\/?.+?\/?>/g;
105
+ dataDetails.description = this.data.description
106
+ ? this.data.description.replace(reg, "")
107
+ : "";
108
+ return dataDetails;
109
+ },
110
+ }
111
+ };
112
+ </script>
113
+
114
+ <style lang="less" scoped>
115
+ .asset-details {
116
+ width: 100%;
117
+ height: 100vh;
118
+ box-sizing: border-box;
119
+ background: #ffffff;
120
+ padding: 15px;
121
+ .details-content {
122
+ width: 100%;
123
+ height: 120px;
124
+ box-sizing: border-box;
125
+ padding: 15px 15px;
126
+ display: flex;
127
+ align-items: center;
128
+ .backgroundImg {
129
+ width: 80px;
130
+ height: 80px;
131
+ margin-right: 15px;
132
+ }
133
+ .background-null {
134
+ width: 80px;
135
+ height: 80px;
136
+ background: #366aff;
137
+ border-radius: 51px;
138
+ line-height: 80px;
139
+ text-align: center;
140
+ font-size: 34px;
141
+ color: #ffffff;
142
+ margin-right: 15px;
143
+ }
144
+ .content-text {
145
+ width: calc(100% - 90px);
146
+ height: 100%;
147
+ display: flex;
148
+ flex-direction: column;
149
+ justify-content: space-around;
150
+ .text-title {
151
+ width: 100%;
152
+ font-weight: bold;
153
+ color: #000000;
154
+ font-size: 15px;
155
+ text-overflow: hidden;
156
+ }
157
+ .text-label {
158
+ width: 100%;
159
+ display: flex;
160
+ p {
161
+ margin-right: 10px;
162
+ display: flex;
163
+ align-items: center;
164
+ i {
165
+ margin-right: 3px;
166
+ }
167
+ }
168
+ .text-type {
169
+ background: #e1faf9;
170
+ box-sizing: border-box;
171
+ padding: 3px 5px;
172
+ i {
173
+ color: #00c2bb;
174
+ }
175
+ span {
176
+ color: #00c2bb;
177
+ }
178
+ }
179
+ .text-SN {
180
+ background: #edf2ff;
181
+ box-sizing: border-box;
182
+ padding: 3px 5px;
183
+ i {
184
+ color: #366aff;
185
+ }
186
+ span {
187
+ color: #366aff;
188
+ }
189
+ }
190
+ }
191
+ }
192
+ }
193
+ .details-content-hide {
194
+ width: 100%;
195
+ height: auto;
196
+ min-height: 194px;
197
+ box-sizing: border-box;
198
+ padding: 20px 15px;
199
+ background: #f6f8fd;
200
+ border-radius: 17px;
201
+ p {
202
+ min-height: 20px;
203
+ height: auto;
204
+ margin-bottom: 10px;
205
+ display: flex;
206
+ align-items: flex-start;
207
+ font-size: 16px;
208
+ i {
209
+ font-size: 14px;
210
+ color: #a9b3c6;
211
+ }
212
+ span {
213
+ width: 60px;
214
+ color: #a9b3c6;
215
+ margin-left: 10px;
216
+ line-height: 16px;
217
+ }
218
+ b {
219
+ line-height: 16px;
220
+ flex: 1 0;
221
+ color: #000000;
222
+ font-weight: 400;
223
+ word-break: break-all;
224
+ }
225
+ }
226
+ }
227
+ }
228
+ </style>
@@ -45,7 +45,7 @@
45
45
  export default {
46
46
  name: "associationIntention",
47
47
  components: {Recommend, askVideo},
48
- props: ["msg",'msgType'],
48
+ props: ["msg",'msgType','isOpen'],
49
49
  filters: {
50
50
  imageStyle: function (html) {
51
51
  //富文本内图片自适应高度宽度
@@ -72,6 +72,33 @@
72
72
  onImageClick(url){
73
73
  this.$emit('onImageClick',url)
74
74
  },
75
+ },
76
+ watch:{
77
+ isOpen:{
78
+ handler(value){
79
+ if (value){
80
+ let reg = this.msg.content.html
81
+ if (reg){
82
+ reg = reg.replace('<a',"<span class='isReplace'")
83
+ reg = reg.replace('</a>','</span>')
84
+ console.debug('reg',reg)
85
+ this.msg.content.html = reg
86
+ }
87
+
88
+ }
89
+ else {
90
+ let reg = this.msg.content.html
91
+ console.debug('reg',reg)
92
+ if (reg){
93
+ reg = reg.replace("<span class='isReplace'","<a download")
94
+ let reg2 = reg
95
+ reg2 = reg2.replace('</span>','</a>')
96
+ this.msg.content.html = reg2
97
+ console.debug('reg',reg2)
98
+ }
99
+ }
100
+ }
101
+ }
75
102
  }
76
103
  }
77
104
  </script>