askbot-dragon 1.5.46-beta → 1.5.48-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.
@@ -54,7 +54,7 @@
54
54
  </div>
55
55
  <div id="drawer_content_pre">
56
56
  <template v-if="tagIds && tagIds.length != 0 && drawer">
57
- <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord" :fileName="fileName" ref="pdfPosition"></pdfPosition>
57
+ <pdfPosition :tagIds="tagIds" :isMessageRecord="isMessageRecord"></pdfPosition>
58
58
  </template>
59
59
  <template v-else>
60
60
  <div v-if="fileType == 'VIDEO'" style="width: 100%;">
@@ -97,7 +97,6 @@ export default {
97
97
  tagIds: [],
98
98
  // '6454aa1a70573a6ead6f0f7d', '6454aa1a70573a6ead6f0f81',
99
99
  loading:true,
100
- fileName:''
101
100
  }
102
101
  },
103
102
  mounted() {
@@ -127,20 +126,9 @@ export default {
127
126
  drawer(value) {
128
127
  if(value) {
129
128
  this.$nextTick(() =>{
130
- if (this.tagIds && this.tagIds.length != 0){
131
- zoomElement(document.getElementById('pdf_container_view'))
132
- }
129
+ zoomElement(document.getElementById('drawer_content_pre'))
133
130
  })
134
131
  }
135
- setTimeout(() => {
136
- let previewIframe = document.getElementsByClassName('preview_iframe')
137
- Array.from(previewIframe).forEach(item =>{
138
- item.onload = () =>{
139
- console.debug('previewIframe 106',previewIframe,this.drawer)
140
- item.style.backgroundImage = 'none'
141
- }
142
- })
143
- })
144
132
  }
145
133
  },
146
134
  computed:{
@@ -294,6 +282,10 @@ export default {
294
282
  overflow: auto;
295
283
  height: calc(100% - 50px);
296
284
  background: #FFF;
285
+ background-image: url('https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/images/loading.gif');
286
+ background-position: center;
287
+ background-size: 50px;
288
+ background-repeat: no-repeat;
297
289
  }
298
290
  }
299
291
  @media screen and (min-width: 768px) {
@@ -1,6 +1,7 @@
1
1
  /* eslint-disable */
2
2
  import {multipartUpload, ossFileUrl} from "./AliyunIssUtil";
3
3
  import { v4 as uuidv4 } from "uuid";
4
+ import { putObject } from "../../assets/js/obsBrowser";
4
5
  const ossConfig = {
5
6
  region: "oss-cn-zhangjiakou",
6
7
  //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
@@ -55,14 +56,16 @@ class MyUploadAdapter {
55
56
  let imgInfo = {
56
57
  url:'',
57
58
  }
58
- let res = multipartUpload(
59
- ossConfig,
60
- file,
61
- null,
62
- imgInfo
63
- );
59
+ // let res = multipartUpload(
60
+ // ossConfig,
61
+ // file,
62
+ // null,
63
+ // imgInfo
64
+ // );
65
+ let res = putObject(file);
64
66
  res.then(resp=>{
65
- imgInfo.url = ossFileUrl(ossConfig, resp.name)
67
+ // imgInfo.url = ossFileUrl(ossConfig, resp.name)
68
+ imgInfo.url = resp.url;
66
69
  let root = this.editor.model.document.getRoot()
67
70
  let children = root.getChildren()
68
71
  for(let child of children){
@@ -1,5 +1,6 @@
1
1
  import Command from "@ckeditor/ckeditor5-core/src/command";
2
2
  import { multipartUpload, ossFileUrl } from "../AliyunIssUtil";
3
+ import { putObject } from "../../../assets/js/obsBrowser";
3
4
  const ossConfig = {
4
5
  region: "oss-cn-zhangjiakou",
5
6
  //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
@@ -91,15 +92,16 @@ export default class ImageCommand extends Command {
91
92
  let imgInfo = {
92
93
  url: '',
93
94
  }
94
- let res = multipartUpload(
95
- ossConfig,
96
- file,
97
- null,
98
- imgInfo
99
- );
95
+ // let res = multipartUpload(
96
+ // ossConfig,
97
+ // file,
98
+ // null,
99
+ // imgInfo
100
+ // );
101
+ let res = putObject(file)
100
102
  console.log(res,'resprespresp');
101
103
  res.then(resp => {
102
- imgInfo.url = ossFileUrl(ossConfig, resp.name)
104
+ imgInfo.url = resp.url;
103
105
  console.log(resp,'resprespresp');
104
106
  console.log(imgInfo)
105
107
  resolve({
@@ -1,15 +1,6 @@
1
1
  import Command from "@ckeditor/ckeditor5-core/src/command";
2
- import { multipartUpload, ossFileUrl } from "../AliyunIssUtil";
3
2
  import { v4 as uuidv4 } from "uuid";
4
-
5
- const ossConfig = {
6
- region: "oss-cn-zhangjiakou",
7
- //云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
8
- accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
9
- accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
10
- // stsToken: '<Your securityToken(STS)>',
11
- bucket: "guoranopen-zjk",
12
- }
3
+ import { putObject } from "../../../assets/js/obsBrowser";
13
4
 
14
5
  function findListener(askPluginListeners, type) {
15
6
  for (let i = 0, len = askPluginListeners.length; i < len; i++) {
@@ -164,14 +155,16 @@ export default class FileCommand extends Command {
164
155
  let imgInfo = {
165
156
  url: '',
166
157
  }
167
- let res = multipartUpload(
168
- ossConfig,
169
- file,
170
- null,
171
- imgInfo
172
- );
158
+ // let res = multipartUpload(
159
+ // ossConfig,
160
+ // file,
161
+ // null,
162
+ // imgInfo
163
+ // );
164
+ let res = putObject(file);
173
165
  res.then(resp => {
174
- imgInfo.url = ossFileUrl(ossConfig, resp.name)
166
+ // imgInfo.url = ossFileUrl(ossConfig, resp.name)
167
+ imgInfo.url = resp.url;
175
168
  resolve({
176
169
  name: resp.name,
177
170
  default: imgInfo.url