askbot-dragon 88.0.35 → 888.0.1
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 +1 -1
- package/public/index.html +3 -0
- package/src/assets/js/AliyunlssUtil.js +9 -7
- package/src/components/AiGuide.vue +7 -4
- package/src/components/ConversationContainer.vue +1 -2
- package/src/components/MyEditor.vue +16 -18
- package/src/components/answerRadio.vue +3 -2
- package/src/components/askVideo.vue +119 -122
- package/src/components/file/AliyunOssComponents.vue +1 -1
- package/src/components/formTemplate.vue +52 -51
- package/src/components/utils/AliyunIssUtil.js +2 -1
- package/src/components/utils/ckeditor.js +16 -19
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -29,6 +29,9 @@
|
|
|
29
29
|
<!-- iconfont图标 -->
|
|
30
30
|
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_mfmhkqumc7i.css"/>
|
|
31
31
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
32
|
+
|
|
33
|
+
<!-- aliyun-oss -->
|
|
34
|
+
<script src="https://static.guoranbot.com/cdn-common/alyun-oss/aliyun-oss-sdk-6.17.1.min.js"></script>
|
|
32
35
|
|
|
33
36
|
<!-- vue -->
|
|
34
37
|
<!-- <script src="https://static.guoranbot.com/vue/2.6.11/dist/vue.min.js"></script>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
const OSS = require('ali-oss');
|
|
3
|
+
// const OSS = require('ali-oss');
|
|
4
|
+
|
|
5
|
+
const OSS = window.OSS
|
|
4
6
|
|
|
5
7
|
const ossConfig={
|
|
6
|
-
region: "oss-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
region: "oss-ap-southeast-1",
|
|
9
|
+
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
10
|
+
accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
|
|
11
|
+
accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
|
|
12
|
+
// stsToken: '<Your securityToken(STS)>',
|
|
13
|
+
bucket: "askbotopen-ls",
|
|
12
14
|
};
|
|
13
15
|
|
|
14
16
|
let IDX = 256, HEX = [], SIZE = 256, BUFFER;
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
class="ig-types-list-cell"
|
|
95
95
|
>
|
|
96
96
|
<span>{{ intentCell.questionName }}</span>
|
|
97
|
-
<span><
|
|
97
|
+
<span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12"><path d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z" p-id="96726" fill="#366aff"></path></svg></span
|
|
98
98
|
></span>
|
|
99
99
|
</div>
|
|
100
100
|
<!-- 横向排版 -->
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
class="ig-types-list-cell"
|
|
139
139
|
>
|
|
140
140
|
<span>{{ intentCell.exampleQuestion }}</span>
|
|
141
|
-
<span><
|
|
141
|
+
<span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12"><path d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z" p-id="96726" fill="#366aff"></path></svg></span
|
|
142
142
|
></span>
|
|
143
143
|
</div>
|
|
144
144
|
<!-- 横向排版 -->
|
|
@@ -182,7 +182,7 @@
|
|
|
182
182
|
class="ig-types-list-cell"
|
|
183
183
|
>
|
|
184
184
|
<span>{{ intentCell.exampleQuestion }}</span>
|
|
185
|
-
<span><
|
|
185
|
+
<span><svg t="1720148108415" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="96725" width="12" height="12"><path d="M246.728409 927.106061l414.195993-414.195993-409.542106-417.779487A57.615128 57.615128 0 0 1 256.036184 16.247187a49.377747 49.377747 0 0 1 37.2311-16.335145 48.02812 48.02812 0 0 1 37.231101 16.893611l446.773206 457.616765a57.568589 57.568589 0 0 1-4.653887 78.883394c0 1.489244 0 2.792333-4.653888 4.095421L325.844497 1006.408305a56.218962 56.218962 0 0 1-79.116088-0.605005 62.687865 62.687865 0 0 1 0-78.697239z" p-id="96726" fill="#366aff"></path></svg></span
|
|
186
186
|
></span>
|
|
187
187
|
</div>
|
|
188
188
|
<div
|
|
@@ -190,7 +190,8 @@
|
|
|
190
190
|
class="ig-change-list"
|
|
191
191
|
>
|
|
192
192
|
<span @click="changeIntellectGuide" class="ig-change-list-btn">
|
|
193
|
-
<
|
|
193
|
+
<svg t="1720148246364" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="136175" width="16" height="16"><path d="M225.6 540.8C240 686.4 363.2 800 512 800c76.8 0 150.4-30.4 203.2-84.8 12.8-12.8 32-12.8 44.8 0s12.8 32 0 44.8c-64 65.6-153.6 104-248 104-184 0-336-142.4-350.4-323.2l-43.2 41.6c-12.8 12.8-33.6 11.2-44.8 0s-11.2-33.6 0-44.8l99.2-96c12.8-12.8 33.6-11.2 44.8 0l92.8 96c12.8 12.8 11.2 33.6-1.6 44.8-12.8 12.8-33.6 11.2-44.8-1.6l-38.4-40zM800 497.6C792 345.6 665.6 224 512 224c-76.8 0-148.8 30.4-203.2 83.2-12.8 12.8-33.6 12.8-44.8 0-12.8-12.8-12.8-33.6 0-44.8 65.6-64 153.6-102.4 248-102.4 192 0 347.2 153.6 352 342.4l41.6-40c12.8-12.8 33.6-11.2 44.8 1.6 12.8 12.8 11.2 33.6-1.6 44.8l-94.4 89.6c-12.8 11.2-32 11.2-44.8 0l-97.6-96c-12.8-12.8-12.8-32 0-44.8 12.8-12.8 32-12.8 44.8 0l43.2 40z" p-id="136176" fill="#366aff"></path></svg>
|
|
194
|
+
换一批</span
|
|
194
195
|
>
|
|
195
196
|
</div>
|
|
196
197
|
</div>
|
|
@@ -463,6 +464,8 @@ export default {
|
|
|
463
464
|
font-weight: 600;
|
|
464
465
|
color: #366aff;
|
|
465
466
|
cursor: pointer;
|
|
467
|
+
display: flex;
|
|
468
|
+
align-items: center;
|
|
466
469
|
}
|
|
467
470
|
}
|
|
468
471
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
<answer-dissatisfaction :msg="answerDiss"></answer-dissatisfaction>
|
|
46
46
|
<feed-back :feedBack="feedBack"></feed-back>
|
|
47
47
|
<voice-compontent></voice-compontent> -->
|
|
48
|
-
|
|
48
|
+
<ai-guide :aiGuide="ActionAiGuideObj"></ai-guide>
|
|
49
49
|
<!-- <answer-voice :msg="answerVoiceObj"></answer-voice> -->
|
|
50
50
|
<!-- <answer-voice :msg="answerVoiceObj"></answer-voice> -->
|
|
51
51
|
<!-- <div v-for="(item,index) in processAction" :key="index">
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
import TextMessage from '@/components/message/TextMessage'
|
|
68
68
|
import FormTemplate from "@/components/formTemplate";
|
|
69
69
|
|
|
70
|
-
import FormTemplate from "@/components/formTemplate";
|
|
71
70
|
/* import TextMessage from "@/components/message/TextMessage";*/
|
|
72
71
|
|
|
73
72
|
// import FormTemplate from '@/components/formTemplate'
|
|
@@ -36,20 +36,19 @@
|
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
38
|
import { v4 as uuidv4 } from "uuid";
|
|
39
|
-
|
|
40
|
-
import { putObject } from "../assets/js/obsBrowser";
|
|
39
|
+
import { multipartUpload, ossFileUrl } from "./utils/AliyunIssUtil";
|
|
41
40
|
|
|
42
41
|
export default {
|
|
43
42
|
props: ["value", "placeholder", "havToolbar"],
|
|
44
43
|
data () {
|
|
45
44
|
return {
|
|
46
45
|
ossConfig: {
|
|
47
|
-
region: "oss-
|
|
46
|
+
region: "oss-ap-southeast-1",
|
|
48
47
|
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
49
|
-
accessKeyId: "
|
|
50
|
-
accessKeySecret: "
|
|
48
|
+
accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
|
|
49
|
+
accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
|
|
51
50
|
// stsToken: '<Your securityToken(STS)>',
|
|
52
|
-
bucket: "
|
|
51
|
+
bucket: "askbotopen-ls",
|
|
53
52
|
},
|
|
54
53
|
ischecked: false,
|
|
55
54
|
text: ''
|
|
@@ -159,15 +158,14 @@ export default {
|
|
|
159
158
|
let imgInfo = {
|
|
160
159
|
url: '',
|
|
161
160
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
let res = putObject(file)
|
|
161
|
+
let res = multipartUpload(
|
|
162
|
+
this.ossConfig,
|
|
163
|
+
file,
|
|
164
|
+
null,
|
|
165
|
+
imgInfo
|
|
166
|
+
);
|
|
169
167
|
res.then(resp => {
|
|
170
|
-
imgInfo.url = resp.
|
|
168
|
+
imgInfo.url = ossFileUrl(this.ossConfig, resp.name)
|
|
171
169
|
resolve({
|
|
172
170
|
name: resp.name,
|
|
173
171
|
default: imgInfo.url
|
|
@@ -292,10 +290,10 @@ export default {
|
|
|
292
290
|
-webkit-animation: rotate 1.5s linear infinite;
|
|
293
291
|
animation: rotate 1.5s linear infinite;
|
|
294
292
|
}
|
|
295
|
-
.wrap {
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
293
|
+
// .wrap {
|
|
294
|
+
// height: 1px;
|
|
295
|
+
// width: 100%;
|
|
296
|
+
// }
|
|
299
297
|
}
|
|
300
298
|
.editor_content:focus {
|
|
301
299
|
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.1) inset, 0, 0;
|
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
15
15
|
<div v-if="showPage" class="switch-page">
|
|
16
|
-
|
|
17
|
-
<span @click="showMore" class="switch-page-btn">查看更多</span>
|
|
16
|
+
<span @click="changeActivePage" class="switch-page-btn">换一批</span>
|
|
17
|
+
<!-- <span @click="showMore" class="switch-page-btn">查看更多</span> -->
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
20
|
</template>
|
|
@@ -71,6 +71,7 @@ export default {
|
|
|
71
71
|
} else {
|
|
72
72
|
this.activeIndex++;
|
|
73
73
|
}
|
|
74
|
+
this.showOptions = this.formatOptions[this.activeIndex]
|
|
74
75
|
},
|
|
75
76
|
chunkArray(array, size) {
|
|
76
77
|
let chunks = [];
|
|
@@ -1,142 +1,139 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
2
|
+
<div
|
|
3
|
+
v-loading="loading"
|
|
4
|
+
:element-loading-text="showProgress"
|
|
5
|
+
id="dragon-video"
|
|
6
|
+
>
|
|
7
|
+
<!-- <video-player
|
|
8
|
+
class="video-player vjs-custom-skin"
|
|
9
|
+
x5-video-player-type="h5"
|
|
10
|
+
:options="videoOptions(msg.content,msg.type)"
|
|
11
|
+
@pause="statechanged"
|
|
12
|
+
/> -->
|
|
13
|
+
<video
|
|
14
|
+
controls="controls"
|
|
15
|
+
:controlslist="nodownload&&'nodownload'"
|
|
16
|
+
:raw-controls="true"
|
|
17
|
+
x5-video-player-type="h5-page"
|
|
18
|
+
style="object-fit: contain;width: calc(100vw - 139px);height: 160px;background-color: black;border-radius: 25px;max-width: 230px;padding-left: 10px"
|
|
19
|
+
preload
|
|
20
|
+
:poster="videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'"
|
|
21
|
+
class="video-player vjs-custom-skin"
|
|
22
|
+
:id="msg.id+'key'">
|
|
23
|
+
<source :src="videoSrc"/>
|
|
24
|
+
</video>
|
|
25
|
+
<div id="output"></div>
|
|
26
|
+
</div>
|
|
27
27
|
</template>
|
|
28
28
|
<script>
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export default {
|
|
32
|
-
name: "ask_video",
|
|
33
|
-
props: ["msg", "url", "localUrl", "progress", "nodownload"],
|
|
34
|
-
data() {
|
|
35
|
-
return {
|
|
36
|
-
videoSrc:'',
|
|
37
|
-
poster:''
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
watch: {
|
|
41
|
-
},
|
|
42
|
-
computed: {
|
|
43
|
-
showProgress() {
|
|
44
|
-
return parseInt(this.progress * 100);
|
|
45
|
-
},
|
|
46
|
-
loading() {
|
|
47
|
-
return this.url == null || this.url === "";
|
|
48
|
-
},
|
|
49
|
-
src() {
|
|
50
|
-
return this.url ? this.url : this.localUrl;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
mounted() {
|
|
54
|
-
this.$nextTick(()=>{
|
|
55
|
-
let videoSrc = this.url ? this.url : this.localUrl
|
|
56
|
-
let newVideoSrc = videoSrc.replace("https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com","https://static.guoranbot.com")
|
|
57
|
-
this.videoSrc = newVideoSrc
|
|
58
|
-
console.debug('newVideoSrc',this.videoSrc,videoSrc)
|
|
59
|
-
this.poster = this.videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'
|
|
60
|
-
console.debug('poster',this.poster)
|
|
61
|
-
})
|
|
29
|
+
import {ossConfig,uploadImageByBase64} from "../assets/js/AliyunlssUtil";
|
|
62
30
|
|
|
31
|
+
export default {
|
|
32
|
+
name: "ask_video",
|
|
33
|
+
props: ["msg", "url", "localUrl", "progress", "nodownload"],
|
|
34
|
+
data() {
|
|
35
|
+
return {
|
|
36
|
+
videoSrc:'',
|
|
37
|
+
poster:''
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
watch: {
|
|
63
41
|
},
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
42
|
+
computed: {
|
|
43
|
+
showProgress() {
|
|
44
|
+
return parseInt(this.progress * 100);
|
|
45
|
+
},
|
|
46
|
+
loading() {
|
|
47
|
+
return this.url == null || this.url === "";
|
|
48
|
+
},
|
|
49
|
+
src() {
|
|
50
|
+
return this.url ? this.url : this.localUrl;
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
mounted() {
|
|
54
|
+
this.$nextTick(()=>{
|
|
55
|
+
let videoSrc = this.url ? this.url : this.localUrl
|
|
56
|
+
let newVideoSrc = videoSrc.replace("https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com","https://static.guoranbot.com")
|
|
57
|
+
this.videoSrc = newVideoSrc
|
|
58
|
+
console.debug('newVideoSrc',this.videoSrc,videoSrc)
|
|
59
|
+
this.poster = this.videoSrc+'?spm=qipa250&x-oss-process=video/snapshot,t_1000,f_jpg,w_0,h_0,m_fast'
|
|
60
|
+
console.debug('poster',this.poster)
|
|
61
|
+
})
|
|
69
62
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
63
|
+
},
|
|
64
|
+
methods:{
|
|
65
|
+
getImage(){
|
|
66
|
+
let that = this
|
|
67
|
+
var video,output;
|
|
68
|
+
var scale = 0.8;
|
|
76
69
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
70
|
+
var initialize = function() {
|
|
71
|
+
let id = that.msg.keyId+'key'
|
|
72
|
+
output = document.getElementById("output");
|
|
73
|
+
video = document.getElementById(id);
|
|
74
|
+
video.addEventListener('loadeddata',captureImage);
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
var captureImage = function() {
|
|
78
|
+
var canvas = document.createElement("canvas");
|
|
79
|
+
canvas.width = video.videoWidth * scale;
|
|
80
|
+
canvas.height = video.videoHeight * scale;
|
|
81
|
+
canvas.getContext('2d').drawImage(video, 0, 0, canvas.width, canvas.height);
|
|
82
|
+
/*var img = document.createElement("img");
|
|
83
|
+
img.crossOrigin = 'anonymous'
|
|
84
|
+
img.src = canvas.toDataURL("image/png");*/
|
|
85
|
+
let reg = /\.(png|jpg|gif)$/
|
|
86
|
+
console.debug('img.src',output)
|
|
87
|
+
let base64 = canvas.toDataURL("image/png")
|
|
88
|
+
let blob = that.dataURLtoFile(base64,'name')
|
|
89
|
+
let promise = uploadImageByBase64(ossConfig,blob);
|
|
90
|
+
promise.then((res)=>{
|
|
91
|
+
console.debug("upload base64 reslut",res);
|
|
92
|
+
if (res&&res.url){
|
|
93
|
+
that.poster = res.url
|
|
94
|
+
if (!reg.test(that.poster)){
|
|
95
|
+
that.poster +='.png'
|
|
100
96
|
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
};
|
|
97
|
+
}
|
|
98
|
+
console.debug('poster',that.poster)
|
|
99
|
+
});
|
|
100
|
+
};
|
|
104
101
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
}
|
|
116
|
-
//转换成file对象
|
|
117
|
-
return new File([u8arr], filename, {type:mime});
|
|
118
|
-
//转换成成blob对象
|
|
119
|
-
/*return new Blob([u8arr],{type:'image/png'});*/
|
|
102
|
+
initialize();
|
|
103
|
+
},
|
|
104
|
+
dataURLtoFile(dataurl, filename) {
|
|
105
|
+
var arr = dataurl.split(',');
|
|
106
|
+
var mime = arr[0].match(/:(.*?);/)[1];
|
|
107
|
+
var bstr = atob(arr[1]);
|
|
108
|
+
var n = bstr.length;
|
|
109
|
+
var u8arr = new Uint8Array(n);
|
|
110
|
+
while(n--){
|
|
111
|
+
u8arr[n] = bstr.charCodeAt(n);
|
|
120
112
|
}
|
|
113
|
+
//转换成file对象
|
|
114
|
+
return new File([u8arr], filename, {type:mime});
|
|
115
|
+
//转换成成blob对象
|
|
116
|
+
/*return new Blob([u8arr],{type:'image/png'});*/
|
|
121
117
|
}
|
|
122
|
-
|
|
123
118
|
}
|
|
119
|
+
|
|
120
|
+
}
|
|
124
121
|
</script>
|
|
125
122
|
<style scoped lang="less">
|
|
126
123
|
video::-webkit-media-controls-mute-button { display: none !important;}
|
|
127
124
|
#dragon-video{
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
|
|
125
|
+
position: relative;
|
|
126
|
+
#outputVideo{
|
|
127
|
+
position: absolute;
|
|
128
|
+
top: 0px;
|
|
129
|
+
/deep/img{
|
|
130
|
+
width: calc(100vw - 139px);
|
|
131
|
+
border-radius: 25px;
|
|
132
|
+
max-width: 230px;
|
|
133
|
+
height: 160px;
|
|
139
134
|
}
|
|
135
|
+
|
|
136
|
+
}
|
|
140
137
|
}
|
|
141
138
|
|
|
142
139
|
</style>
|
|
@@ -869,7 +869,6 @@ import Tree from '../components/tree'
|
|
|
869
869
|
import selectPopup from '../components/popup'
|
|
870
870
|
import fileListView from './fielListView.vue'
|
|
871
871
|
import { uniqueData } from './utils/math_utils'
|
|
872
|
-
import { putObject } from "../assets/js/obsBrowser";
|
|
873
872
|
export default {
|
|
874
873
|
name: "formTemplate",
|
|
875
874
|
data() {
|
|
@@ -945,12 +944,12 @@ export default {
|
|
|
945
944
|
fileType:['PICTURE','VIDEO','AUDIO'],
|
|
946
945
|
loading:'',
|
|
947
946
|
ossConfig: {
|
|
948
|
-
region: "oss-
|
|
947
|
+
region: "oss-ap-southeast-1",
|
|
949
948
|
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
950
|
-
accessKeyId: "
|
|
951
|
-
accessKeySecret: "
|
|
949
|
+
accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
|
|
950
|
+
accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
|
|
952
951
|
// stsToken: '<Your securityToken(STS)>',
|
|
953
|
-
bucket: "
|
|
952
|
+
bucket: "askbotopen-ls",
|
|
954
953
|
},
|
|
955
954
|
hideUploadEdit:false,
|
|
956
955
|
limitNum:1,
|
|
@@ -1636,43 +1635,40 @@ export default {
|
|
|
1636
1635
|
}
|
|
1637
1636
|
}
|
|
1638
1637
|
},
|
|
1639
|
-
uploadImgFun(content,name,fileCon,file){
|
|
1638
|
+
uploadImgFun (content, name, fileCon, file) {
|
|
1640
1639
|
console.log(fileCon)
|
|
1641
1640
|
let imageData = {
|
|
1642
|
-
urls:[]
|
|
1641
|
+
urls: []
|
|
1643
1642
|
}
|
|
1644
1643
|
let imageInfo = {
|
|
1645
|
-
name:"",
|
|
1646
|
-
status:'',
|
|
1647
|
-
url:''
|
|
1648
|
-
}
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
resp.then((res) => {
|
|
1644
|
+
name: "",
|
|
1645
|
+
status: '',
|
|
1646
|
+
url: ''
|
|
1647
|
+
}
|
|
1648
|
+
let res = multipartUpload(
|
|
1649
|
+
this.ossConfig,
|
|
1650
|
+
file,
|
|
1651
|
+
null,
|
|
1652
|
+
imageInfo
|
|
1653
|
+
);
|
|
1654
|
+
res.then((res) => {
|
|
1657
1655
|
console.log("upload result:", res);
|
|
1658
1656
|
// let filePath = res.name;
|
|
1659
|
-
|
|
1660
|
-
name:file.name,
|
|
1661
|
-
url:res.
|
|
1662
|
-
status:'success'
|
|
1663
|
-
}
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
imageInfo.
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
if (this.extInfoFieldValue[this.filedId][j].content && this.extInfoFieldValue[this.filedId][j].content === content){
|
|
1671
|
-
this.$set(this.extInfoFieldValue[this.filedId],j,imageInfo)
|
|
1657
|
+
imageData.urls.push({
|
|
1658
|
+
name: file.name,
|
|
1659
|
+
url: ossFileUrl(this.ossConfig, res.name),
|
|
1660
|
+
status: 'success'
|
|
1661
|
+
})
|
|
1662
|
+
imageInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
1663
|
+
imageInfo.status = 'success'
|
|
1664
|
+
imageInfo.name = file.name
|
|
1665
|
+
for (let j = 0; j < this.extInfoFieldValue[this.filedId].length; j++) {
|
|
1666
|
+
if (this.extInfoFieldValue[this.filedId][j].content && this.extInfoFieldValue[this.filedId][j].content === content) {
|
|
1667
|
+
this.$set(this.extInfoFieldValue[this.filedId], j, imageInfo)
|
|
1672
1668
|
delete this.extInfoFieldValue[this.filedId][j].content
|
|
1673
1669
|
}
|
|
1674
1670
|
}
|
|
1675
|
-
this.fileUpload=false
|
|
1671
|
+
this.fileUpload = false
|
|
1676
1672
|
}).catch((err) => {
|
|
1677
1673
|
console.debug("upload err", err);
|
|
1678
1674
|
});
|
|
@@ -2244,7 +2240,7 @@ export default {
|
|
|
2244
2240
|
bool[this.formShow.form.formFieldRelation[i].fieldId] = this.formShow.form.formFieldRelation[i].value && this.formShow.form.formFieldRelation[i].value.includes('\n') && !strVal
|
|
2245
2241
|
}
|
|
2246
2242
|
if (this.formShow.form.formFieldRelation[i].relationDisplay && this.formShow.form.formFieldRelation[i].display && this.formShow.form.formFieldRelation[i].fieldId !== 'workorder_description') {
|
|
2247
|
-
if(!this.formShow.form.formFieldRelation[i].value || bool[this.formShow.form.formFieldRelation[i].fieldId] || (Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)) {
|
|
2243
|
+
if(!this.formShow.form.formFieldRelation[i].value || this.strIsNull(this.formShow.form.formFieldRelation[i].value) || bool[this.formShow.form.formFieldRelation[i].fieldId] || (Array.isArray(this.formShow.form.formFieldRelation[i].value) && !this.formShow.form.formFieldRelation[i].value.length)) {
|
|
2248
2244
|
this.$message.error('请完善'+ this.formShow.form.formFieldRelation[i].formField.name)
|
|
2249
2245
|
return
|
|
2250
2246
|
}
|
|
@@ -2278,6 +2274,12 @@ export default {
|
|
|
2278
2274
|
this.disableds = true
|
|
2279
2275
|
this.submitValue = '已提交'
|
|
2280
2276
|
},
|
|
2277
|
+
strIsNull (str) {
|
|
2278
|
+
if (str == "") return true;
|
|
2279
|
+
let regu = "^[ ]+$";
|
|
2280
|
+
let re = new RegExp(regu);
|
|
2281
|
+
return re.test(str);
|
|
2282
|
+
},
|
|
2281
2283
|
//日期的点击事件
|
|
2282
2284
|
dateClick(id) {
|
|
2283
2285
|
if(this.disableds === false)
|
|
@@ -2551,7 +2553,7 @@ export default {
|
|
|
2551
2553
|
onCancel() {
|
|
2552
2554
|
this.showArea = false;
|
|
2553
2555
|
},
|
|
2554
|
-
aliyunOssRequest(data){
|
|
2556
|
+
aliyunOssRequest (data) {
|
|
2555
2557
|
|
|
2556
2558
|
this.loading = this.$loading({
|
|
2557
2559
|
lock: true,
|
|
@@ -2562,9 +2564,9 @@ export default {
|
|
|
2562
2564
|
let file = data.file;
|
|
2563
2565
|
console.debug("upload file:", file);
|
|
2564
2566
|
let imgInfo = {
|
|
2565
|
-
status:'',
|
|
2566
|
-
url:'',
|
|
2567
|
-
name:''
|
|
2567
|
+
status: '',
|
|
2568
|
+
url: '',
|
|
2569
|
+
name: ''
|
|
2568
2570
|
}
|
|
2569
2571
|
/* let imageData = {
|
|
2570
2572
|
id:cid,
|
|
@@ -2575,14 +2577,13 @@ export default {
|
|
|
2575
2577
|
progress: 0,
|
|
2576
2578
|
},
|
|
2577
2579
|
};*/
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
ress.then((res) => {
|
|
2580
|
+
let res = multipartUpload(
|
|
2581
|
+
this.ossConfig,
|
|
2582
|
+
file,
|
|
2583
|
+
null,
|
|
2584
|
+
imgInfo
|
|
2585
|
+
);
|
|
2586
|
+
res.then((res) => {
|
|
2586
2587
|
console.debug("upload result:", res);
|
|
2587
2588
|
// let filePath = res.name;
|
|
2588
2589
|
/* imageData.content.progress = 1;
|
|
@@ -2590,14 +2591,14 @@ export default {
|
|
|
2590
2591
|
ossFileUrl(this.ossConfig, res.name)
|
|
2591
2592
|
);
|
|
2592
2593
|
console.log('imageData',imageData)*/
|
|
2593
|
-
imgInfo.url = res.
|
|
2594
|
-
imgInfo.status='success'
|
|
2595
|
-
if (data.file){
|
|
2594
|
+
imgInfo.url = ossFileUrl(this.ossConfig, res.name)
|
|
2595
|
+
imgInfo.status = 'success'
|
|
2596
|
+
if (data.file) {
|
|
2596
2597
|
imgInfo.name = data.file.name
|
|
2597
2598
|
imgInfo.uid = data.file.uid
|
|
2598
2599
|
}
|
|
2599
|
-
if (!this.extInfoFieldValue[this.filedId]){
|
|
2600
|
-
this.$set(this.extInfoFieldValue,this.filedId,[])
|
|
2600
|
+
if (!this.extInfoFieldValue[this.filedId]) {
|
|
2601
|
+
this.$set(this.extInfoFieldValue, this.filedId, [])
|
|
2601
2602
|
}
|
|
2602
2603
|
this.extInfoFieldValue[this.filedId].push(imgInfo)
|
|
2603
2604
|
this.loading.close()
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
|
-
|
|
2
|
+
import {multipartUpload, ossFileUrl} from "./AliyunIssUtil";
|
|
3
3
|
import { v4 as uuidv4 } from "uuid";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
//
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
// }
|
|
4
|
+
const ossConfig = {
|
|
5
|
+
region: "oss-ap-southeast-1",
|
|
6
|
+
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
7
|
+
accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
|
|
8
|
+
accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
|
|
9
|
+
// stsToken: '<Your securityToken(STS)>',
|
|
10
|
+
bucket: "askbotopen-ls",
|
|
11
|
+
}
|
|
13
12
|
class MyUploadAdapter {
|
|
14
13
|
constructor( loader , editor ) {
|
|
15
14
|
// 要在上载期间使用的文件加载器实例
|
|
@@ -56,16 +55,14 @@ class MyUploadAdapter {
|
|
|
56
55
|
let imgInfo = {
|
|
57
56
|
url:'',
|
|
58
57
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
let res = putObject(file);
|
|
58
|
+
let res = multipartUpload(
|
|
59
|
+
ossConfig,
|
|
60
|
+
file,
|
|
61
|
+
null,
|
|
62
|
+
imgInfo
|
|
63
|
+
);
|
|
66
64
|
res.then(resp=>{
|
|
67
|
-
|
|
68
|
-
imgInfo.url = resp.url;
|
|
65
|
+
imgInfo.url = ossFileUrl(ossConfig, resp.name)
|
|
69
66
|
let root = this.editor.model.document.getRoot()
|
|
70
67
|
let children = root.getChildren()
|
|
71
68
|
for(let child of children){
|