askbot-dragon 1.7.75-beta → 1.7.78-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 +6 -7
- package/public/index.html +7 -5
- package/src/assets/js/AliyunlssUtil.js +25 -49
- package/src/assets/js/hammer.js +2 -13
- package/src/assets/less/converSationContainer/common.less +0 -7
- package/src/components/ActionAlertIframe.vue +1 -24
- package/src/components/AiGuide.vue +151 -114
- package/src/components/AnswerDocknowledge.vue +19 -7
- package/src/components/ConversationContainer.vue +215 -99
- package/src/components/MyEditor.vue +1 -2
- package/src/components/actionSatisfaction.vue +1 -1
- package/src/components/answerRadio.vue +1 -1
- package/src/components/askVideo.vue +0 -23
- package/src/components/associationIntention.vue +7 -11
- package/src/components/formTemplate.vue +62 -56
- package/src/components/intelligentSummary.vue +1 -5
- package/src/components/markDownText.vue +1 -1
- package/src/components/message/TextMessage.vue +1 -5
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/pdfPosition.vue +12 -190
- package/src/components/preview/excelView.vue +10 -2
- package/src/components/previewDoc.vue +0 -4
- package/src/components/previewPdf.vue +395 -416
- package/src/components/senderMessagePlatform.vue +1 -1
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +1 -5
- package/src/components/welcomeLlmCard.vue +1 -5
- package/src/main.js +1 -1
- package/src/components/newPdfPosition.vue +0 -878
- package/src/locales/jp.json +0 -73
package/package.json
CHANGED
|
@@ -1,18 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askbot-dragon",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.78-beta",
|
|
4
4
|
"scripts": {
|
|
5
5
|
"serve": "vue-cli-service serve",
|
|
6
6
|
"build": "vue-cli-service build",
|
|
7
7
|
"lint": "vue-cli-service lint"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"vue-markdown": "^2.2.4"
|
|
11
10
|
},
|
|
12
11
|
"devDependencies": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"@vue/cli-service": "~4.5.0",
|
|
12
|
+
"marked": "^4.0.0",
|
|
13
|
+
"highlight.js": "^11.11.1",
|
|
16
14
|
"audio-loader": "^1.0.3",
|
|
17
15
|
"core-js": "^3.6.5",
|
|
18
16
|
"install": "^0.13.0",
|
|
@@ -26,14 +24,15 @@
|
|
|
26
24
|
"vue-resource": "^1.5.1",
|
|
27
25
|
"vue-video-player": "^5.0.2",
|
|
28
26
|
"weixin-js-sdk": "^1.6.0",
|
|
29
|
-
"
|
|
27
|
+
"@vue/cli-plugin-babel": "~4.5.0",
|
|
28
|
+
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
29
|
+
"@vue/cli-service": "~4.5.0",
|
|
30
30
|
"babel-eslint": "^10.1.0",
|
|
31
31
|
"element-ui": "^2.15.10",
|
|
32
32
|
"eslint": "^6.7.2",
|
|
33
33
|
"vue-markdown": "^2.2.4",
|
|
34
34
|
"eslint-plugin-vue": "^6.2.2",
|
|
35
35
|
"less": "^3.12.2",
|
|
36
|
-
"highlight.js": "^11.11.1",
|
|
37
36
|
"less-loader": "^7.0.2",
|
|
38
37
|
"vue-template-compiler": "^2.6.11",
|
|
39
38
|
"vue-i18n": "^8.26.4"
|
package/public/index.html
CHANGED
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
const o = {};
|
|
16
16
|
Object.keys(entries).forEach((key) => {
|
|
17
17
|
const [k, v] = entries[key];
|
|
18
|
-
|
|
18
|
+
|
|
19
19
|
o[k] = v;
|
|
20
20
|
});
|
|
21
21
|
return o;
|
|
@@ -25,11 +25,13 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
<!-- 项目图标 -->
|
|
27
27
|
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_ee8dx548hg.css"/>
|
|
28
|
-
<!--
|
|
28
|
+
<!-- guoran图标 -->
|
|
29
29
|
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_eje81c90ujh.css"/>
|
|
30
30
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
31
|
-
|
|
31
|
+
|
|
32
|
+
<!-- aliyun-oss -->
|
|
32
33
|
<script src="https://static.guoranbot.com/cdn-common/alyun-oss/aliyun-oss-sdk-6.17.1.min.js"></script>
|
|
34
|
+
|
|
33
35
|
<!-- vue -->
|
|
34
36
|
<!-- <script src="https://static.guoranbot.com/vue/2.6.11/dist/vue.min.js"></script>
|
|
35
37
|
<script src="https://static.guoranbot.com/vue-router/3.3.2/dist/vue-router.min.js"></script> -->
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
<!-- vant -->
|
|
42
44
|
<!-- <script src="https://static.guoranbot.com/vant/2.12/lib/vant.min.js"></script>
|
|
43
45
|
<link rel="stylesheet" href="https://static.guoranbot.com/vant/2.12/lib/index.css" /> -->
|
|
44
|
-
|
|
46
|
+
|
|
45
47
|
<!-- pdf.js -->
|
|
46
48
|
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.5.141/pdf.min.js" integrity="sha512-BagCUdQjQ2Ncd42n5GGuXQn1qwkHL2jCSkxN5+ot9076d5wAI8bcciSooQaI3OG3YLj6L97dKAFaRvhSXVO0/Q==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
47
49
|
<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>
|
|
@@ -69,5 +71,5 @@
|
|
|
69
71
|
<div id="app"></div>
|
|
70
72
|
<!-- built files will be auto injected -->
|
|
71
73
|
</body>
|
|
72
|
-
|
|
74
|
+
|
|
73
75
|
</html>
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
|
|
4
3
|
// const OSS = require('ali-oss');
|
|
5
4
|
|
|
6
5
|
const OSS = window.OSS
|
|
@@ -27,11 +26,11 @@ const getPrivateOssConfig = () =>{
|
|
|
27
26
|
|
|
28
27
|
const ossConfig = {
|
|
29
28
|
region: "oss-cn-zhangjiakou",
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
30
|
+
accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
|
|
31
|
+
accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
|
|
32
|
+
// stsToken: '<Your securityToken(STS)>',
|
|
33
|
+
bucket: "guoranopen-zjk",
|
|
35
34
|
};
|
|
36
35
|
|
|
37
36
|
|
|
@@ -39,7 +38,7 @@ const ossConfig = {
|
|
|
39
38
|
let IDX = 256, HEX = [], SIZE = 256, BUFFER;
|
|
40
39
|
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
|
|
41
40
|
let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
|
|
42
|
-
function uid
|
|
41
|
+
function uid(len) {
|
|
43
42
|
let i = 0, tmp = (len || 11);
|
|
44
43
|
if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
|
|
45
44
|
for (BUFFER = '', IDX = 0; i < SIZE; i++) {
|
|
@@ -50,7 +49,7 @@ function uid (len) {
|
|
|
50
49
|
return BUFFER.substring(IDX, IDX++ + tmp);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
function dataFormat
|
|
52
|
+
function dataFormat(fmt, date = new Date()) {
|
|
54
53
|
const o = {
|
|
55
54
|
"M+": date.getMonth() + 1, //月份
|
|
56
55
|
"d+": date.getDate(), //日
|
|
@@ -66,12 +65,12 @@ function dataFormat (fmt, date = new Date()) {
|
|
|
66
65
|
return fmt;
|
|
67
66
|
}
|
|
68
67
|
|
|
69
|
-
function pathGenerate
|
|
68
|
+
function pathGenerate(filename) {
|
|
70
69
|
return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
|
|
71
70
|
}
|
|
72
71
|
|
|
73
72
|
|
|
74
|
-
async function upload
|
|
73
|
+
async function upload(data) {
|
|
75
74
|
let ossClient = new OSS(getPrivateOssConfig());
|
|
76
75
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
77
76
|
let objectKey = pathGenerate(data.name);
|
|
@@ -80,46 +79,23 @@ async function upload (data) {
|
|
|
80
79
|
return result;
|
|
81
80
|
}
|
|
82
81
|
|
|
83
|
-
async function multipartUpload
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
let reslout = JSON.parse(res.target.response)
|
|
94
|
-
resolve({
|
|
95
|
-
code: reslout.code,
|
|
96
|
-
res: {
|
|
97
|
-
requestUrls: [reslout.data]
|
|
98
|
-
},
|
|
99
|
-
name: reslout.data
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
xhr.send(formData)
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
} else {
|
|
106
|
-
let ossClient = new OSS(getPrivateOssConfig());
|
|
107
|
-
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
108
|
-
let objectKey = pathGenerate(data.name);
|
|
109
|
-
let res = await ossClient.multipartUpload(objectKey, data, {
|
|
110
|
-
progress: function (p, checkpoint) {
|
|
111
|
-
console.debug('progress callback', p, checkpoint);
|
|
112
|
-
// 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
|
|
113
|
-
if (callback && callback instanceof Function) {
|
|
114
|
-
callback(p, checkpoint, data, extCallback);
|
|
115
|
-
}
|
|
82
|
+
async function multipartUpload(data, callback,extCallback) {
|
|
83
|
+
let ossClient = new OSS(getPrivateOssConfig());
|
|
84
|
+
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
85
|
+
let objectKey = pathGenerate(data.name);
|
|
86
|
+
let res = await ossClient.multipartUpload(objectKey, data, {
|
|
87
|
+
progress: function (p, checkpoint) {
|
|
88
|
+
console.debug('progress callback', p, checkpoint);
|
|
89
|
+
// 断点记录点。浏览器重启后无法直接继续上传,您需要手动触发上传操作。
|
|
90
|
+
if (callback && callback instanceof Function) {
|
|
91
|
+
callback(p, checkpoint,data,extCallback);
|
|
116
92
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
return res;
|
|
120
96
|
}
|
|
121
97
|
|
|
122
|
-
function ossFileUrl
|
|
98
|
+
function ossFileUrl(path, cname) {
|
|
123
99
|
let ossConfig = getPrivateOssConfig()
|
|
124
100
|
if (cname == null) {
|
|
125
101
|
return '//' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
|
|
@@ -128,7 +104,7 @@ function ossFileUrl (path, cname) {
|
|
|
128
104
|
}
|
|
129
105
|
}
|
|
130
106
|
|
|
131
|
-
function uploadImageByBase64
|
|
107
|
+
function uploadImageByBase64(blob) {
|
|
132
108
|
let ossClient = new OSS(getPrivateOssConfig());
|
|
133
109
|
|
|
134
110
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形 式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
@@ -138,4 +114,4 @@ function uploadImageByBase64 ( blob) {
|
|
|
138
114
|
return result;
|
|
139
115
|
}
|
|
140
116
|
|
|
141
|
-
export {
|
|
117
|
+
export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig, getPrivateOssConfig}
|
package/src/assets/js/hammer.js
CHANGED
|
@@ -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 <
|
|
80
|
-
newScale =
|
|
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 () {
|
|
@@ -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="
|
|
29
|
+
height="95%"
|
|
30
30
|
:scrolling="actionAlertIframe.scrolling"
|
|
31
31
|
frameborder="no"
|
|
32
32
|
border="0"
|
|
@@ -88,29 +88,6 @@ export default {
|
|
|
88
88
|
this.actionAlertIframe.template = this.actionAlertIframe.template + "&iframeId=" + this.tampId
|
|
89
89
|
}
|
|
90
90
|
this.actionAlertIframe.template = this.actionAlertIframe.template.split("&").join("&")
|
|
91
|
-
|
|
92
|
-
// 监听回退事件
|
|
93
|
-
let _that = this;
|
|
94
|
-
|
|
95
|
-
(function () {
|
|
96
|
-
console.log(95, 'addEventListener window.onpopstate');
|
|
97
|
-
if (window.history && window.history.pushState) {
|
|
98
|
-
console.log(97, 'window.history && window.history.pushState');
|
|
99
|
-
window.onpopstate = function (e) {
|
|
100
|
-
console.log(9999, 'window.onpopstate innner', e);
|
|
101
|
-
if (_that.showAskFullScreen) {
|
|
102
|
-
window.history.go(1);
|
|
103
|
-
}
|
|
104
|
-
// window.history.pushState('forward', null, '');
|
|
105
|
-
// window.history.forward(1);
|
|
106
|
-
_that.showAskFullScreen = false;
|
|
107
|
-
if ( e && e.stopPropagation ) {
|
|
108
|
-
console.log(105, 'e.stopPropagation');
|
|
109
|
-
e.stopPropagation();
|
|
110
|
-
}
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
})();
|
|
114
91
|
},
|
|
115
92
|
};
|
|
116
93
|
</script>
|