askbot-dragon 1.6.20-beta → 1.6.22-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.6.20-beta",
3
+ "version": "1.6.22-beta",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build",
@@ -13,6 +13,8 @@
13
13
  "audio-loader": "^1.0.3",
14
14
  "ckeditor": "^4.12.1",
15
15
  "core-js": "^3.6.5",
16
+ "element-ui": "^2.15.14",
17
+ "esdk-obs-browserjs": "^3.23.5",
16
18
  "install": "^0.13.0",
17
19
  "jquery": "^3.5.1",
18
20
  "lodash": "^4.17.21",
@@ -30,7 +32,6 @@
30
32
  "@vue/cli-plugin-eslint": "~4.5.0",
31
33
  "@vue/cli-service": "~4.5.0",
32
34
  "babel-eslint": "^10.1.0",
33
- "element-ui": "^2.15.10",
34
35
  "eslint": "^6.7.2",
35
36
  "eslint-plugin-vue": "^6.2.2",
36
37
  "less": "^3.12.2",
package/public/index.html CHANGED
@@ -23,7 +23,7 @@
23
23
  });
24
24
  }
25
25
  </script>
26
- <script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/ckeditor5-build-classic/0.4.4/ckeditor.js"></script>
26
+ <script src="https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/npm-static/ckeditor5-build-classic/0.4.4/ckeditor.js"></script>
27
27
  <!-- 项目图标 -->
28
28
  <link rel="stylesheet" href="//at.alicdn.com/t/font_1566110_3hu6pyd938i.css"/>
29
29
  <!-- guoran图标 -->
@@ -48,12 +48,12 @@
48
48
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.5.141/pdf.worker.min.js" integrity="sha512-6UHd2tcWIvg5hIYHXb3lnNO61tWfriGen6KddwGYTSUUazWGYESTHDDxJFEQkCy1cSL//yXKc1gcL+51/DTLFQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
49
49
  <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.5.141/pdf_viewer.min.js" integrity="sha512-tYEGuMBQkCfSlBKJ3dNgS06wbb/MNE6nO2poZ1Y5brix8NajGcDcfEvuL38wJDOTkq0j5ojASNmrzv/8/wgGHQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
50
50
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.5.141/pdf_viewer.min.css" integrity="sha512-Jf9DLkegLgARLR151csVkPvcVt4cOUhslrSZwiTAe9mqFL/BbYRDmxCOioCtbHifEgjsBFbrVhOMQ3mYPDLrqQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> -->
51
-
52
-
53
- <script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.min.js" referrerpolicy="no-referrer"></script>
54
- <script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.worker.min.js" referrerpolicy="no-referrer"></script>
55
- <script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js" referrerpolicy="no-referrer"></script>
56
- <link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css" referrerpolicy="no-referrer" />
51
+
52
+
53
+ <script src="https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/npm-static/pdfJS2.1.266/pdf.min.js" referrerpolicy="no-referrer"></script>
54
+ <script src="https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/npm-static/pdfJS2.1.266/pdf.worker.min.js" referrerpolicy="no-referrer"></script>
55
+ <script src="https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/npm-static/pdfJS2.1.266/pdf_viewer.js" referrerpolicy="no-referrer"></script>
56
+ <link rel="stylesheet" href="https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/npm-static/pdfJS2.1.266/pdf_viewer_01.css" referrerpolicy="no-referrer" />
57
57
  <!-- hammer.js -->
58
58
  <!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/hammer.js/2.0.8/hammer.min.js" integrity="sha512-UXumZrZNiOwnTcZSHLOfcTs0aos2MzBWHXOHOuB0J/R44QB0dwY5JgfbvljXcklVf65Gc4El6RjZ+lnwd2az2g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script> -->
59
59
  <style>
@@ -3,15 +3,6 @@ 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
- }
15
6
  // 缩放事件的处理
16
7
  el.addEventListener('touchstart', function (event) {
17
8
  let touches = event.touches;
@@ -76,15 +67,13 @@ export function zoomElement (el) {
76
67
  newScale = 3;
77
68
  }
78
69
  // 最小缩放比例限制
79
- if(newScale < scale) {
80
- newScale = scale;
70
+ if(newScale < 1) {
71
+ newScale = 1;
81
72
  }
82
73
  // 记住使用的缩放值
83
74
  store.scale = newScale;
84
75
  // 图像应用缩放效果
85
76
  el.style.transform = 'scale(' + newScale + ')';
86
- el.style.transformOrigin = 'top left'
87
-
88
77
  }
89
78
  });
90
79
  document.addEventListener('touchend', function () {
@@ -0,0 +1,63 @@
1
+ // 创建ObsClient实例
2
+ import ObsClient from 'esdk-obs-browserjs';
3
+ const obsClient = new ObsClient({
4
+ access_key_id: "EE4MAFWH4YLQSQF7NNIP",
5
+ secret_access_key: "Dq9giqqwZoX77dqSIzhA1Yhhe9tarA3LRBGBF4eO",
6
+ server : 'https://obs.cn-east-3.myhuaweicloud.com',
7
+ timeout : 1000
8
+ });
9
+ let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
10
+ let IDX = 256, HEX = [], SIZE = 256, BUFFER;
11
+ while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
12
+ function uid(len) {
13
+ let i = 0, tmp = (len || 11);
14
+ if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
15
+ for (BUFFER = '', IDX = 0; i < SIZE; i++) {
16
+ BUFFER += HEX[Math.random() * 256 | 0];
17
+ }
18
+ }
19
+
20
+ return BUFFER.substring(IDX, IDX++ + tmp);
21
+ }
22
+
23
+ function dataFormat(fmt, date = new Date()) {
24
+ const o = {
25
+ "M+": date.getMonth() + 1, //月份
26
+ "d+": date.getDate(), //日
27
+ "h+": date.getHours(), //小时
28
+ "m+": date.getMinutes(), //分
29
+ "s+": date.getSeconds(), //秒
30
+ "q+": Math.floor((date.getMonth() + 3) / 3), //季度
31
+ "S": date.getMilliseconds() //毫秒
32
+ };
33
+ if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + "").substr(4 - RegExp.$1.length));
34
+ for (const k in o)
35
+ if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
36
+ return fmt;
37
+ }
38
+ async function putObject(file,callback){
39
+ let fileUrl = ''
40
+ let objName = (process.env.VUE_APP_ENV === 'development' ? 'dev_' : 'pro_') + file.name;
41
+ let fileName = "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + objName;
42
+ await obsClient.putObject({
43
+ Bucket: 'askbot-uat',
44
+ Key : fileName,
45
+ SourceFile : file,
46
+ ACL : obsClient.enums.AclPublicRead,
47
+ ProgressCallback: callback
48
+ }).then(function(result) {
49
+ if(result.CommonMsg.Status < 300){
50
+ console.log('Create object:' + JSON.stringify(result) + ' successfully!\n',process.env.VUE_APP_ENV);
51
+ let domain = process.env.VUE_APP_ENV ==='development' ? 'https://askbot-uat.obs.cn-east-3.myhuaweicloud.com/' : ''
52
+ fileUrl = {
53
+ url: domain + fileName,
54
+ name:file.name
55
+ }
56
+ }
57
+ });
58
+ return fileUrl
59
+ }
60
+
61
+ export {
62
+ putObject
63
+ }
@@ -35,13 +35,6 @@
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
- }
45
38
 
46
39
  // 弹窗body
47
40
  .el-dialog__body{
@@ -26,7 +26,7 @@
26
26
  class="grzh-iframe"
27
27
  :src="actionAlertIframe.template"
28
28
  width="100%"
29
- height="90%"
29
+ height="95%"
30
30
  :scrolling="actionAlertIframe.scrolling"
31
31
  frameborder="no"
32
32
  border="0"
@@ -87,29 +87,6 @@ export default {
87
87
  this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
88
88
  }
89
89
  this.actionAlertIframe.template = this.actionAlertIframe.template.split("&amp;").join("&")
90
-
91
- // 监听回退事件
92
- let _that = this;
93
-
94
- (function () {
95
- console.log(95, 'addEventListener window.onpopstate');
96
- if (window.history && window.history.pushState) {
97
- console.log(97, 'window.history && window.history.pushState');
98
- window.onpopstate = function (e) {
99
- console.log(9999, 'window.onpopstate innner', e);
100
- if (_that.showAskFullScreen) {
101
- window.history.go(1);
102
- }
103
- // window.history.pushState('forward', null, '');
104
- // window.history.forward(1);
105
- _that.showAskFullScreen = false;
106
- if ( e && e.stopPropagation ) {
107
- console.log(105, 'e.stopPropagation');
108
- e.stopPropagation();
109
- }
110
- };
111
- }
112
- })();
113
90
  },
114
91
  };
115
92
  </script>
@@ -16,7 +16,7 @@
16
16
  <span v-html="aiGuide.content.description"></span>
17
17
  </div>
18
18
  <!-- 一级分类 -->
19
- <div v-show="aiGuide.content.typesVisible && aiGuide.content.options && aiGuide.content.options.length > 0" class="ig-types-f">
19
+ <div v-show="aiGuide.content.typesVisible" class="ig-types-f">
20
20
  <span
21
21
  v-for="(fType, fTypeIndex) in aiGuide.content.options"
22
22
  :key="`f_${fTypeIndex}`"
@@ -31,7 +31,9 @@
31
31
  >
32
32
  </div>
33
33
  <!-- 二级分类 -->
34
- <div v-if="aiGuide.content.typesVisible && aiGuide.content.options[activeFirstTypeIndex] && aiGuide.content.options[activeFirstTypeIndex].types && aiGuide.content.options[activeFirstTypeIndex].types.length !== 0" class="ig-types-s">
34
+ <div v-show="aiGuide.content.typesVisible && aiGuide.content.options[
35
+ activeFirstTypeIndex
36
+ ].types.length !== 0" class="ig-types-s">
35
37
  <span
36
38
  v-for="(sType, sTypeIndex) in aiGuide.content.options[
37
39
  activeFirstTypeIndex
@@ -232,11 +234,11 @@ export default {
232
234
  beforeMount() {},
233
235
  mounted() {
234
236
  this.isMobile();
235
- if (this.aiGuide.content.options[0] && this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types.length === 0) {
237
+ if (this.aiGuide.content.options[0].types.length === 0) {
236
238
  this.activeOtherObj = this.aiGuide.content.options[0];
237
239
  } else {
238
240
  this.activeSecondTypeIndex = 0;
239
- this.activeOtherObj = this.aiGuide.content.options[0] && this.aiGuide.content.options[0].types && this.aiGuide.content.options[0].types[0] ? this.aiGuide.content.options[0].types[0] : [];
241
+ this.activeOtherObj = this.aiGuide.content.options[0].types[0];
240
242
  }
241
243
  },
242
244
  methods: {
@@ -69,8 +69,11 @@
69
69
  </div>
70
70
  </div>
71
71
  </div>
72
+ <div class="ad-loadmore" v-if="loadMoreFlag" @click="lazyLoadKnowledegList">
73
+ 查看更多
74
+ </div>
72
75
  </div>
73
- <previewPdf ref="previewPdf" :url="previewHref" :watermark="watermark" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
76
+ <previewPdf ref="previewPdf" :url="previewHref" :sourceFileType="sourceFileType" officePreviewType="pdf"></previewPdf>
74
77
  </div>
75
78
  </template>
76
79
 
@@ -155,32 +158,28 @@ export default {
155
158
  yqhtml: "yqhtml",
156
159
  feishuhtml:"feishuhtml"
157
160
  },
158
- watermark: {
159
- textWatermarkValue:'',
160
- visitorWatermarkValue:'',
161
- source:""
162
- }
161
+ allKnowledgeList:[],
162
+ loadMoreFlag:false
163
163
  }
164
164
  },
165
165
  props: ['msg','isAskLightning', 'isMessageRecord',"isApp"],
166
166
  beforeMounted() {
167
-
168
167
  },
169
168
  watch:{
170
- msg:{
171
- handler(n){
172
- console.log(n,'answerDocknowledge');
173
- n.content.list.forEach(element => {
174
- console.log(this.imageObj[element.format],1111);
175
- element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
176
- if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
177
- element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
178
- }
179
- });
180
- },
181
- deep:true,
182
- immediate:true
183
- }
169
+ msg:{
170
+ handler(n){
171
+ console.log(n,'answerDocknowledge');
172
+ n.content.list.forEach(element => {
173
+ console.log(this.imageObj[element.format],1111);
174
+ element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/' + this.imageObj[element.format] + '.png';
175
+ if ((element.format === "txt" || element.format === "html") && element.source === "WECHAT") {
176
+ element.src = 'https://static.guoranbot.com/cdn-office-website/askbot_doc/wechat.png';
177
+ }
178
+ });
179
+ },
180
+ deep:true,
181
+ immediate:true
182
+ }
184
183
  },
185
184
  created() {
186
185
  var system = {};
@@ -201,14 +200,21 @@ export default {
201
200
  // });
202
201
  },
203
202
  mounted() {
204
-
203
+ console.log(this.msg.content,'this.msg.content');
204
+ // if(this.msg.content.type == 1) {
205
+
206
+ // }
207
+ if(this.msg.content.list && this.msg.content.list.length > 0) {
208
+ this.loadMoreFlag = true
209
+ this.allKnowledgeList = JSON.parse(JSON.stringify(this.msg.content.list))
210
+ // console.log(this.allKnowledgeList.length, 'this.allKnowledgeList');
211
+ this.msg.content.list = []
212
+ this.lazyLoadKnowledegList()
213
+ }
205
214
  },
206
215
  methods: {
207
216
  //预览图片
208
217
  lookAttach(url, item, event) {
209
- // console.log(item.knowledgeId);
210
- // this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + "642ffbccde420e2772f7787b")
211
- // debugger
212
218
  event.preventDefault();
213
219
  if (this.isAskLightning == 1 && !this.isApp){
214
220
  window.parent.postMessage({
@@ -241,10 +247,8 @@ export default {
241
247
  }
242
248
  this.$http.post(httpUrl, {
243
249
  "fileInOssPath":url
244
- }).then(async res =>{
250
+ }).then(res =>{
245
251
  if(res.data.code == '0') {
246
- this.watermark = await this.getknowledgeBaseStructure(item.knowledgeId);
247
- this.watermark.source = item.source;
248
252
  this.previewHref = res.data.data;
249
253
  this.sourceFileType = url.substring(url.lastIndexOf('.'))
250
254
  let isOhmPc = sessionStorage.getItem('isOhmPc')
@@ -257,18 +261,7 @@ export default {
257
261
  }
258
262
  this.$refs.previewPdf.fileType = type
259
263
  this.$refs.previewPdf.tagIds = item.tagIds
260
- this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false ;
261
- let index = url.indexOf("?");
262
- let newFileInOssPath = url;
263
- if (index !== -1){
264
- newFileInOssPath = url.substring(0, url.indexOf("?"))
265
- }
266
- let fileName = newFileInOssPath.substring(newFileInOssPath.lastIndexOf('.'))
267
- if (fileName === '.doc' || fileName === '.docx' || fileName === '.txt'|| fileName === '.html'){
268
- this.$refs.previewPdf.fileName = fileName;
269
- } else {
270
- this.$refs.previewPdf.fileName = '';
271
- }
264
+ this.$refs.previewPdf.isMessageRecord = this.isMessageRecord ? true : false
272
265
  if(item.tagIds && item.tagIds.length != 0) {
273
266
  this.$refs.previewPdf.loading = false
274
267
  return
@@ -320,23 +313,20 @@ export default {
320
313
  })
321
314
  // return imgurl
322
315
  },
323
- async getknowledgeBaseStructure(knowledgeId) {
324
- let watermark = {
325
- textWatermarkValue:'',
326
- visitorWatermarkValue:''
327
- }
328
- await this.$http.get("/knowledge-api/internal/knowledgeBaseStructure/" + knowledgeId).then( async res =>{
329
- if(res.data) {
330
- watermark.textWatermarkValue = await res.data.textWatermarkValue
331
- if(res.data.visitorWatermark) {
332
- let userInfo = sessionStorage.getItem('userInfo') || localStorage.getItem('userInfo')
333
- if(userInfo && userInfo !== 'null') {
334
- watermark.visitorWatermarkValue = JSON.parse(userInfo).realName
335
- }
336
- }
316
+ lazyLoadKnowledegList() {
317
+ if(this.allKnowledgeList.length !== 0) {
318
+ let arr = this.allKnowledgeList.splice(0, 5)
319
+ if(arr.length < 5) {
320
+ this.loadMoreFlag = false
321
+ this.msg.content.list = [...this.msg.content.list, ...arr]
322
+ return
337
323
  }
338
- })
339
- return watermark
324
+ if(this.allKnowledgeList.length == 0) {
325
+ this.loadMoreFlag = false
326
+ }
327
+ this.msg.content.list = [...this.msg.content.list, ...arr]
328
+ return
329
+ }
340
330
  }
341
331
  }
342
332
  }
@@ -447,8 +437,6 @@ export default {
447
437
  }
448
438
  }
449
439
  .alc-box-introduction-previewImage {
450
- width: 100%;
451
- display: block;
452
440
  overflow: hidden;
453
441
  text-overflow: ellipsis;
454
442
  display: -webkit-box;
@@ -552,6 +540,18 @@ export default {
552
540
  }
553
541
  }
554
542
  }
543
+ .ad-loadmore {
544
+ width: 100%;
545
+ height: 40px;
546
+ display: flex;
547
+ align-items: center;
548
+ justify-content: center;
549
+ // background: #FFFFFF;
550
+ color: #366AFF;
551
+ font-size: 14px;
552
+ margin-top: 8px;
553
+ cursor: pointer;
554
+ }
555
555
  }
556
556
  }
557
557
  </style>
@@ -211,7 +211,7 @@ export default {
211
211
  "knowledgeId": "658a93de63d378228271913a",
212
212
  "knowledgePartId": "ypZaqYwBD3jzLtPbz5K8",
213
213
  "from": "ppt_preview",
214
- "introduction": "Spark是什么Spark 是一个开源的大数据处理引擎,它提供了一整套开发 API,。",
214
+ "introduction": "Spark是什么Spark 是一个开源的大数据处理引擎,它提供了一整套开发 API,包括流计算和机器学习。它支持批处理和流处理。Spark 的一个显著特点是它能够在内存中进行迭代计算,从而加快数据处理速度。尽管 Spark 是用 Scala 开发的,但它也为 Java、Scala、Python 和 R 等高级编程语言提供了开发接口。",
215
215
  "previewImage": "https://askbot-pdf-all.oss-cn-zhangjiakou.aliyuncs.com/31623ccfe9dd4957bbd59c5823878bbe/2023/12/27/03/39/08/658b9c477cf604285f7cb81d/pdf-image-1913302477976388839.png"
216
216
  }
217
217
  ],
@@ -4652,7 +4652,6 @@ export default {
4652
4652
  url:
4653
4653
  'https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/2021/08/24/07/35/41221223-c180-4f3f-bdc8-94875b693965/WeChat_20210719215122.mp4',
4654
4654
  videoFlag: false,
4655
- nodownload: false,
4656
4655
  videoUploadPercent: 0,
4657
4656
  isShowUploadVideo: true,
4658
4657
  recommend: {
@@ -15,21 +15,18 @@
15
15
  :controlslist="nodownload&&'nodownload'"
16
16
  :raw-controls="true"
17
17
  x5-video-player-type="h5-page"
18
- style="object-fit: contain;width: calc(100vw - 169px);height: 160px;background-color: black;border-radius: 25px;max-width: 200px;padding-left: 10px"
18
+ style="object-fit: contain;width: calc(100vw - 139px);height: 160px;background-color: black;border-radius: 25px;max-width: 230px;padding-left: 10px"
19
19
  preload
20
20
  :poster="videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'"
21
21
  class="video-player vjs-custom-skin"
22
22
  :id="msg.id+'key'">
23
23
  <source :src="videoSrc"/>
24
24
  </video>
25
- <div v-show="!nodownload" class="dragon-video-download">
26
- <a :href="msg.content.url" download><span class="el-icon-download"></span></a>
27
- </div>
28
25
  <div id="output"></div>
29
26
  </div>
30
27
  </template>
31
28
  <script>
32
- import {ossConfig,uploadImageByBase64} from "../assets/js/AliyunlssUtil";
29
+ import { putObject } from "../assets/js/obsBrowser";
33
30
 
34
31
  export default {
35
32
  name: "ask_video",
@@ -89,7 +86,10 @@
89
86
  console.debug('img.src',output)
90
87
  let base64 = canvas.toDataURL("image/png")
91
88
  let blob = that.dataURLtoFile(base64,'name')
92
- let promise = uploadImageByBase64(ossConfig,blob);
89
+ // let promise = uploadImageByBase64(ossConfig,blob);
90
+ const file = new File([blob], 'name', { type: 'text/plain', lastModified: Date.now() });
91
+ console.debug('file',file)
92
+ let promise = putObject(file);
93
93
  promise.then((res)=>{
94
94
  console.debug("upload base64 reslut",res);
95
95
  if (res&&res.url){
@@ -126,8 +126,6 @@
126
126
  video::-webkit-media-controls-mute-button { display: none !important;}
127
127
  #dragon-video{
128
128
  position: relative;
129
- width: calc(100vw - 109px);
130
- max-width: 260px;
131
129
  #outputVideo{
132
130
  position: absolute;
133
131
  top: 0px;
@@ -139,24 +137,6 @@ video::-webkit-media-controls-mute-button { display: none !important;}
139
137
  }
140
138
 
141
139
  }
142
- .dragon-video-download{
143
- position: absolute;
144
- width: 40px;
145
- height: 26px;
146
- background-color: rgba(54, 106, 255, 0.5);
147
- border-radius: 13px;
148
- text-align: center;
149
- bottom: 2px;
150
- right: 6px;
151
- a {
152
- span {
153
- height: 26px;
154
- line-height: 26px;
155
- display: block;
156
- color: white;
157
- }
158
- }
159
- }
160
140
  }
161
141
 
162
142
  </style>
@@ -233,7 +233,7 @@
233
233
  this.$emit("onRadioClick", id, name, apikey,optionApiKey);
234
234
  },
235
235
  onImageClick(url){
236
- this.$emit('onImageClick', encodeURI(url))
236
+ this.$emit('onImageClick',url)
237
237
  },
238
238
  msgContent(content){
239
239
  console.debug('215',content)
@@ -343,12 +343,6 @@
343
343
  display: block;
344
344
  }
345
345
  }
346
- /deep/ img {
347
- height: auto;
348
- width: calc(100vw - 137px);
349
- border-radius: 25px;
350
- max-width: 230px;
351
- }
352
346
  }
353
347
  /deep/.el-drawer__body{
354
348
  height: 100%;
@@ -860,6 +860,7 @@ import Tree from '../components/tree'
860
860
  import selectPopup from '../components/popup'
861
861
  import fileListView from './fielListView.vue'
862
862
  import { uniqueData } from './utils/math_utils'
863
+ import { putObject } from "../assets/js/obsBrowser";
863
864
  export default {
864
865
  name: "formTemplate",
865
866
  data() {
@@ -1649,21 +1650,24 @@ export default {
1649
1650
  status:'',
1650
1651
  url:''
1651
1652
  }
1652
- let res = multipartUpload(
1653
- this.ossConfig,
1654
- file,
1655
- null,
1656
- imageInfo
1657
- );
1658
- res.then((res) => {
1653
+ // let res = multipartUpload(
1654
+ // this.ossConfig,
1655
+ // file,
1656
+ // null,
1657
+ // imageInfo
1658
+ // );
1659
+ let resp = putObject(file);
1660
+ resp.then((res) => {
1659
1661
  console.log("upload result:", res);
1660
1662
  // let filePath = res.name;
1661
- imageData.urls.push({
1663
+ let obj = {
1662
1664
  name:file.name,
1663
- url:ossFileUrl(this.ossConfig, res.name),
1665
+ url:res.url,
1664
1666
  status:'success'
1665
- })
1666
- imageInfo.url = ossFileUrl(this.ossConfig, res.name)
1667
+ }
1668
+ imageData.urls.push(obj)
1669
+ // imageInfo.url = ossFileUrl(this.ossConfig, res.name)
1670
+ imageInfo.url = res.url;
1667
1671
  imageInfo.status='success'
1668
1672
  imageInfo.name=file.name
1669
1673
  for (let j=0;j<this.extInfoFieldValue[this.filedId].length;j++){
@@ -2575,13 +2579,14 @@ export default {
2575
2579
  progress: 0,
2576
2580
  },
2577
2581
  };*/
2578
- let res = multipartUpload(
2579
- this.ossConfig,
2580
- file,
2581
- null,
2582
- imgInfo
2583
- );
2584
- res.then((res) => {
2582
+ // let res = multipartUpload(
2583
+ // this.ossConfig,
2584
+ // file,
2585
+ // null,
2586
+ // imgInfo
2587
+ // );
2588
+ let ress = putObject(file)
2589
+ ress.then((res) => {
2585
2590
  console.debug("upload result:", res);
2586
2591
  // let filePath = res.name;
2587
2592
  /* imageData.content.progress = 1;
@@ -2589,7 +2594,7 @@ export default {
2589
2594
  ossFileUrl(this.ossConfig, res.name)
2590
2595
  );
2591
2596
  console.log('imageData',imageData)*/
2592
- imgInfo.url = ossFileUrl(this.ossConfig, res.name)
2597
+ imgInfo.url = res.url
2593
2598
  imgInfo.status='success'
2594
2599
  if (data.file){
2595
2600
  imgInfo.name = data.file.name