askbot-dragon 1.5.58-beta → 1.5.59-beta

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": "1.5.58-beta",
3
+ "version": "1.5.59-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -13,7 +13,6 @@
13
13
  "audio-loader": "^1.0.3",
14
14
  "ckeditor": "^4.12.1",
15
15
  "core-js": "^3.6.5",
16
- "esdk-obs-browserjs": "^3.23.5",
17
16
  "install": "^0.13.0",
18
17
  "jquery": "^3.5.1",
19
18
  "lodash": "^4.17.21",
@@ -3,6 +3,15 @@ export function zoomElement (el) {
3
3
  let store = {
4
4
  scale: 1
5
5
  };
6
+ if (!el){
7
+ return
8
+ }
9
+ let scale = 1;
10
+ if (el.style.transform){
11
+ let transForm = el.style.transform;
12
+ var values = transForm.split('(')[1].split(')')[0].split(',');
13
+ scale = values[0] ? values[0] : 1
14
+ }
6
15
  // 缩放事件的处理
7
16
  el.addEventListener('touchstart', function (event) {
8
17
  let touches = event.touches;
@@ -67,13 +76,15 @@ export function zoomElement (el) {
67
76
  newScale = 3;
68
77
  }
69
78
  // 最小缩放比例限制
70
- if(newScale < 1) {
71
- newScale = 1;
79
+ if(newScale < scale) {
80
+ newScale = scale;
72
81
  }
73
82
  // 记住使用的缩放值
74
83
  store.scale = newScale;
75
84
  // 图像应用缩放效果
76
85
  el.style.transform = 'scale(' + newScale + ')';
86
+ el.style.transformOrigin = 'top left'
87
+
77
88
  }
78
89
  });
79
90
  document.addEventListener('touchend', function () {
@@ -35,6 +35,13 @@
35
35
  border-radius: 6px;
36
36
  background-color: #bfceec !important;
37
37
  }
38
+ @media screen and (max-width: 767px){
39
+ ::-webkit-scrollbar {
40
+ width: 0;
41
+ height: 0;
42
+ background-color:@system_bordercolor_4;
43
+ }
44
+ }
38
45
 
39
46
  // 弹窗body
40
47
  .el-dialog__body{
@@ -234,7 +234,8 @@ export default {
234
234
  if(res.data.code == '0') {
235
235
  this.previewHref = res.data.data;
236
236
  this.sourceFileType = url.substring(url.lastIndexOf('.'))
237
- if (isMobile()){
237
+ let isOhmPc = sessionStorage.getItem('isOhmPc')
238
+ if (isMobile() || isOhmPc == 'true'){
238
239
  this.$refs.previewPdf.drawer = true;
239
240
  this.$refs.previewPdf.previewShowPopup = true;
240
241
  } else {
@@ -243,7 +244,18 @@ export default {
243
244
  }
244
245
  this.$refs.previewPdf.fileType = type
245
246
  this.$refs.previewPdf.tagIds = item.tagIds
246
- this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
247
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false ;
248
+ let index = url.indexOf("?");
249
+ let newFileInOssPath = url;
250
+ if (index !== -1){
251
+ newFileInOssPath = url.substring(0, url.indexOf("?"))
252
+ }
253
+ let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
254
+ if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt'|| fileName === '.html'){
255
+ this.$refs.previewPdf.fileName = fileName;
256
+ } else {
257
+ this.$refs.previewPdf.fileName = '';
258
+ }
247
259
  if(item.tagIds && item.tagIds.length != 0) {
248
260
  this.$refs.previewPdf.loading = false
249
261
  return
@@ -34,7 +34,7 @@
34
34
  </div> -->
35
35
 
36
36
  <text-message :text="text" @submitClick="submitClick"></text-message>
37
- <!-- <answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge> -->
37
+ <answer-docknowledge :isAskLightning="2" :msg="answerDocknowledge"></answer-docknowledge>
38
38
  <!-- <voice-component @closeVoice="closeVoice">
39
39
  <div slot="voiceTip">
40
40
  松开发送
@@ -105,7 +105,7 @@ import AnswerVoice from "@/components/AnswerVoice";
105
105
  // import ChatContent from "./chatContent";
106
106
  // import FeedBack from '@/components/feedBack'
107
107
  // 知识类型
108
- // import AnswerDocknowledge from "./AnswerDocknowledge.vue";
108
+ import AnswerDocknowledge from "./AnswerDocknowledge.vue";
109
109
  export default {
110
110
  name: 'ConversationContainer',
111
111
  components: {
@@ -131,7 +131,7 @@ export default {
131
131
  // FormTemplate,
132
132
  // FileType,
133
133
  // ChatContent,
134
- // AnswerDocknowledge,
134
+ AnswerDocknowledge,
135
135
  },
136
136
  props: {
137
137
  messages: Array
@@ -188,17 +188,48 @@ export default {
188
188
  answerDocknowledge:
189
189
  // {"content":{"knowledgeId":"64915d6e098ec248701da267","actionType":"answer_doc_knowledge","text":"跳舞不仅要有实力,还要有好的穿搭,本文针对街舞爱好者提供了穿搭指南,给你带来灵感和帮助!","list":[{"tagIds":[],"format":"html","updateTime":"2023-06-20 16:03:58","source":"WECHAT","url":"https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/137993c6d830416696bbd771fc61d423/1937/2023/06/20/16/03/微信同步/52720/501775e41a724d7da06e66b3b4686407.html","knowledgeId":"64915d6e098ec248701da267","from":"跳舞要有范儿,穿搭占一半!快来get你的街舞穿搭指南~"}],"renderType":0,"type":0,"isKnowledgeSummary":true},"type":"answer_doc_knowledge","sessionId":1687251699065,"keyId":"1a079f48-ace3-4064-89b4-8a292c6a8a93_________","isKnowledgeSummary":true},
190
190
 
191
- {
192
- "content": {
193
- "images": [{ url: 'https://static.guoranbot.com/images/knowledge/e0f6898c6b0d47fa98e8f71ceab1bde8/安全标志--禁止标志.png' }],
194
- "actionType": "answer_doc_knowledge",
195
- "text": "中国的省份名称有湖北省、广西壮族自治区等。",
196
- "list": [{ "tagIds": [], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-14 20:15:50", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/14/19/54/31/acc2421dcfd04db39eba0c37e7d3b580.html", "knowledgeId": "643940bb6cbe816b83ebbaaf", "knowledgePartId": "lPexf4cBYkmDoUE2eSUt", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": [], "format": "feishuhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:48", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/40/0e48cc7b15b34d2f84fe49fd1a89d606.html", "knowledgeId": "643817509ab4545bef50db64", "knowledgePartId": "NeYze4cBh77-s6lwjWOl", "from": "2.12 重要异常科室对照", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagIds": ['12312313123'], "format": "yqhtml", "srcContentId": "8ee0fa9bb5a89ea01f588843589bf931", "updateTime": "2023-04-13 23:19:02", "source": "YUQUE", "srcContent": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/yuque/7faaefde11374c7992c377731ea4dddc/dinga77cc098b0b5e113ee0f45d8e4f7c288/2023/4/13/22/20/18/5cdf1295ec1649f6ab73948aa82ea810.html", "knowledgeId": "643817509ab4545bef50db58", "knowledgePartId": "Hvcye4cBYkmDoUE21h6V", "from": "2.3 科室", "introduction": "功能概述分院科室的建立。分院科室医生关联。分院科室建立时,科室编码需要与集团提供的科室编码保持一致。科室维护进入扁鹊基础配置模块,如图进入科室维护界面进行科室新增输入科室信息进行科室增加。" }, { "tagId": "6475eab868110215ab821a7c", "tagIds": ["6475eab868110215ab821a7c"], "format": "xlsx", "srcContentId": "0bf639060655ff3ec217484a2fc7827d", "updateTime": "2023-05-30 20:28:21", "source": "CORP_LOCAL_FILE", "srcContent": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风", "url": "https://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/5ecf2fcd704541149201ab9c1c31162d/2023/05/30/20/11/85b7b2a5f61e2b060387656e88c02d50/VX30与VX50对比表.xlsx", "knowledgeId": "6475e7eac724c54c46cbfa2d", "knowledgePartId": "T_uhbIgB3v-0X8BLeDAh", "from": "VX30与VX50对比表", "introduction": "产品:外观,解释:VX50有两种套餐可下单: 套餐一:只购买VX50终端设备,不包含摄像头、麦克风 套餐二:除购买VX50终端设备外,可选购SC701云台摄像头及MC30/MC31麦克风" },],
197
- "renderType": 0,
198
- "type": 0
199
- },
200
- "type": "answer_doc_knowledge"
201
- },
191
+ {
192
+ "conditionList": null,
193
+ "apiKey": null,
194
+ "effectiveTime": null,
195
+ "intentId": null,
196
+ "msgId": null,
197
+ "actionCategory": null,
198
+ "id": null,
199
+ "type": "answer_doc_knowledge",
200
+ "nodeId": null,
201
+ "content": {
202
+ "knowledgeId": null,
203
+ "actionType": "answer_doc_knowledge",
204
+ "images": null,
205
+ "knowledgePartId": null,
206
+ "srcContentId": null,
207
+ "text": "新能源车是指采用新型能源的轿车、客车、货车等机动车辆,包括纯电动汽车、插电式混合动力汽车和燃料电池汽车。根据数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场将继续保持高速增长,销售量有望超过200万辆。政府对新能源汽车实行补贴政策,同时逐步放松对新能源车的限购和限行政策。此外,中国汽车企业在新能源车领域的技术研发能力也不断提升,各大品牌纷纷推出新能源车型,采用更优秀的动力电池和电控系统,提高了车辆的续航里程。因此,新能源车市场发展前景广阔。",
208
+ "list": [
209
+ {
210
+ "owner": null,
211
+ "tagId": "6525183560177f6223d52a14",
212
+ "enterprise": null,
213
+ "tagIds": [
214
+ "6525183560177f6223d52a14"
215
+ ],
216
+ "format": "docx",
217
+ "srcContentId": "99cada54a02161f979acc28c5b8b913e",
218
+ "updateTime": "2023-10-10 17:24:05",
219
+ "source": "CORP_LOCAL_FILE",
220
+ "srcContent": "新能源车指的是采用新型能源的轿车、客车、货车等机动车辆。目前主要的新能源车包括纯电动汽车、插电式混合动力汽车、燃料电池汽车等。以下是对新能源车的分析报告:市场发展趋势:随着环保和能源安全意识的增强,新能源车市场呈现快速发展态势。数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场仍将保持高速增长,销售量有望达到200万辆以上。政策扶持力度加大:我国政府对新能源汽车实行补贴政策,以鼓励消费者选择绿色出行方式。此外,对新能源车限购、限行等政策也逐步放松。政策扶持的加大将进一步促进新能",
221
+ "url": "http://guoranwisdom.oss-cn-zhangjiakou.aliyuncs.com/43aadcaac45f4be19b63fd18ca68f2e6/2023/10/10/17/23/a27c5c1dd534d180c5512c907d5c9888/新能源车分析报告 (1).docx?uploadId=0921CB01AB5847E8BEF44730EE5DACF7",
222
+ "knowledgeId": "6525182f002ff5198983a90c",
223
+ "knowledgePartId": "YfHmGIsBvcIPGxbfkvwK",
224
+ "from": "新能源车分析报告 (1)",
225
+ "introduction": "新能源车指的是采用新型能源的轿车、客车、货车等机动车辆。目前主要的新能源车包括纯电动汽车、插电式混合动力汽车、燃料电池汽车等。以下是对新能源车的分析报告:市场发展趋势:随着环保和能源安全意识的增强,新能源车市场呈现快速发展态势。数据显示,2020年我国新能源汽车销售量达到139万辆,同比增长10.9%。预计2021年新能源车市场仍将保持高速增长,销售量有望达到200万辆以上。政策扶持力度加大:我国政府对新能源汽车实行补贴政策,以鼓励消费者选择绿色出行方式。此外,对新能源车限购、限行等政策也逐步放松。政策扶持的加大将进一步促进新能"
226
+ }
227
+ ],
228
+ "renderType": 0,
229
+ "type": 0,
230
+ "srcContent": null
231
+ }
232
+ },
202
233
  ActionAiGuideObj: {
203
234
  // 智能引导
204
235
  type: "answer_intellect_guide",
@@ -9,10 +9,7 @@
9
9
  class="options-item"
10
10
  :class="index!==msg.content.options.length -1?'recommend-item':'last-item'"
11
11
  :key="msg.nodeId + '_' + index"
12
- @click="
13
- $emit(
14
- 'onRadioClick',msg.id +'_' + index + '_' + option.value + '_' + option.name,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:''
15
- )">
12
+ @click="radioClick(msg,option,index)">
16
13
 
17
14
  <!-- <el-tooltip class="item" effect="dark" :content="option.name" placement="bottom-start" v-if="!isMobile">
18
15
  <span > {{ option.name }}</span>
@@ -26,30 +23,34 @@
26
23
 
27
24
  <script>
28
25
  export default {
29
- name: "answerRadio",
30
- data(){
31
- return{
32
- isMobile:false,
33
- }
34
- },
35
- props:['msg'],
36
- mounted(){
37
- console.log(this.msg,'msg');
38
- this.judgeIsMobile();
39
- },
40
- methods:{
41
- judgeIsMobile() {
42
- let flag = navigator.userAgent.match(
43
- /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
44
- );
45
- if (flag) {
46
- this.isMobile = true;
47
- } else {
48
- this.isMobile = false;
49
- }
50
- console.log(this.isMobile,'this.isMobile');
51
- }
52
- }
26
+ name: "answerRadio",
27
+ data(){
28
+ return{
29
+ isMobile:false,
30
+ }
31
+ },
32
+ props:['msg'],
33
+ mounted(){
34
+ console.log(this.msg,'msg');
35
+ this.judgeIsMobile();
36
+ },
37
+ methods:{
38
+ judgeIsMobile() {
39
+ let flag = navigator.userAgent.match(
40
+ /(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i
41
+ );
42
+ if (flag) {
43
+ this.isMobile = true;
44
+ } else {
45
+ this.isMobile = false;
46
+ }
47
+ console.log(this.isMobile,'this.isMobile');
48
+ },
49
+ radioClick(msg,option,index){
50
+ let value = option.answerId ? msg.id +'_' + index + '_' + option.value + '_' + option.name + '_' + option.answerId : msg.id +'_' + index + '_' + option.value + '_' + option.name
51
+ this.$emit('onRadioClick',value,option.name, msg.apiKey,msg.actionCategory, msg.msgId?msg.msgId:'',option.apiKey)
52
+ }
53
+ }
53
54
 
54
55
  }
55
56
  </script>
@@ -25,7 +25,7 @@
25
25
  </div>
26
26
  </template>
27
27
  <script>
28
- import { putObject } from "../assets/js/obsBrowser";
28
+ import {ossConfig,uploadImageByBase64} from "../assets/js/AliyunlssUtil";
29
29
 
30
30
  export default {
31
31
  name: "ask_video",
@@ -85,10 +85,7 @@
85
85
  console.debug('img.src',output)
86
86
  let base64 = canvas.toDataURL("image/png")
87
87
  let blob = that.dataURLtoFile(base64,'name')
88
- // let promise = uploadImageByBase64(ossConfig,blob);
89
- const file = new File([blob], 'name', { type: 'text/plain', lastModified: Date.now() });
90
- console.debug('file',file)
91
- let promise = putObject(file);
88
+ let promise = uploadImageByBase64(ossConfig,blob);
92
89
  promise.then((res)=>{
93
90
  console.debug("upload base64 reslut",res);
94
91
  if (res&&res.url){
@@ -229,11 +229,11 @@
229
229
  index + 1
230
230
  }.png" align="middle">`;
231
231
  },
232
- onRadioClickReco(id, name, apikey) {
233
- this.$emit("onRadioClick", id, name, apikey);
232
+ onRadioClickReco(id, name, apikey,optionApiKey) {
233
+ this.$emit("onRadioClick", id, name, apikey,optionApiKey);
234
234
  },
235
235
  onImageClick(url){
236
- this.$emit('onImageClick',url)
236
+ this.$emit('onImageClick', encodeURI(url))
237
237
  },
238
238
  msgContent(content){
239
239
  console.debug('215',content)
@@ -833,7 +833,6 @@ import Tree from '../components/tree'
833
833
  import selectPopup from '../components/popup'
834
834
  import fileListView from './fielListView.vue'
835
835
  import { uniqueData } from './utils/math_utils'
836
- import { putObject } from "../assets/js/obsBrowser";
837
836
  export default {
838
837
  name: "formTemplate",
839
838
  data() {
@@ -1599,24 +1598,21 @@ export default {
1599
1598
  status:'',
1600
1599
  url:''
1601
1600
  }
1602
- // let res = multipartUpload(
1603
- // this.ossConfig,
1604
- // file,
1605
- // null,
1606
- // imageInfo
1607
- // );
1608
- let resp = putObject(file);
1609
- resp.then((res) => {
1601
+ let res = multipartUpload(
1602
+ this.ossConfig,
1603
+ file,
1604
+ null,
1605
+ imageInfo
1606
+ );
1607
+ res.then((res) => {
1610
1608
  console.log("upload result:", res);
1611
1609
  // let filePath = res.name;
1612
- let obj = {
1610
+ imageData.urls.push({
1613
1611
  name:file.name,
1614
- url:res.url,
1612
+ url:ossFileUrl(this.ossConfig, res.name),
1615
1613
  status:'success'
1616
- }
1617
- imageData.urls.push(obj)
1618
- // imageInfo.url = ossFileUrl(this.ossConfig, res.name)
1619
- imageInfo.url = res.url;
1614
+ })
1615
+ imageInfo.url = ossFileUrl(this.ossConfig, res.name)
1620
1616
  imageInfo.status='success'
1621
1617
  imageInfo.name=file.name
1622
1618
  for (let j=0;j<this.extInfoFieldValue[this.filedId].length;j++){
@@ -2502,14 +2498,13 @@ export default {
2502
2498
  progress: 0,
2503
2499
  },
2504
2500
  };*/
2505
- // let res = multipartUpload(
2506
- // this.ossConfig,
2507
- // file,
2508
- // null,
2509
- // imgInfo
2510
- // );
2511
- let ress = putObject(file)
2512
- ress.then((res) => {
2501
+ let res = multipartUpload(
2502
+ this.ossConfig,
2503
+ file,
2504
+ null,
2505
+ imgInfo
2506
+ );
2507
+ res.then((res) => {
2513
2508
  console.debug("upload result:", res);
2514
2509
  // let filePath = res.name;
2515
2510
  /* imageData.content.progress = 1;
@@ -2517,7 +2512,7 @@ export default {
2517
2512
  ossFileUrl(this.ossConfig, res.name)
2518
2513
  );
2519
2514
  console.log('imageData',imageData)*/
2520
- imgInfo.url = res.url
2515
+ imgInfo.url = ossFileUrl(this.ossConfig, res.name)
2521
2516
  imgInfo.status='success'
2522
2517
  if (data.file){
2523
2518
  imgInfo.name = data.file.name
@@ -125,7 +125,7 @@ export default {
125
125
  if (element.version == 1) {
126
126
  element.content.htmlList.forEach((item) => {
127
127
  item.tampList = [];
128
- item.list.forEach((cell, cellIndex) => {
128
+ item.list && item.list.forEach((cell, cellIndex) => {
129
129
  let tampCell = {
130
130
  html: cell,
131
131
  style: item.style[cellIndex]