askbot-dragon 1.7.78-beta → 1.7.79-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 +3 -1
- package/public/index.html +5 -7
- package/src/assets/js/AliyunlssUtil.js +49 -25
- package/src/assets/js/common.js +5 -1
- package/src/assets/js/hammer.js +13 -2
- package/src/assets/less/converSationContainer/common.less +7 -0
- package/src/components/ActionAlertIframe.vue +24 -1
- package/src/components/AiGuide.vue +113 -150
- package/src/components/AnswerDocknowledge.vue +7 -19
- package/src/components/ConversationContainer.vue +99 -215
- package/src/components/MyEditor.vue +2 -1
- package/src/components/actionSatisfaction.vue +1 -1
- package/src/components/answerRadio.vue +1 -1
- package/src/components/askVideo.vue +23 -0
- package/src/components/associationIntention.vue +11 -7
- package/src/components/formTemplate.vue +54 -50
- package/src/components/intelligentSummary.vue +5 -1
- package/src/components/markDownText.vue +25 -5
- package/src/components/message/TextMessage.vue +5 -1
- package/src/components/message/swiper/ticketSwiper.vue +1 -1
- package/src/components/newPdfPosition.vue +878 -0
- package/src/components/pdfPosition.vue +190 -12
- package/src/components/previewDoc.vue +4 -0
- package/src/components/previewPdf.vue +369 -343
- package/src/components/senderMessagePlatform.vue +1 -1
- package/src/components/utils/ckeditor.js +1 -1
- package/src/components/welcomeKnowledgeFile.vue +5 -1
- package/src/components/welcomeLlmCard.vue +5 -1
- package/src/locales/jp.json +73 -0
- package/src/main.js +1 -1
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askbot-dragon",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.79-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"
|
|
10
11
|
},
|
|
11
12
|
"devDependencies": {
|
|
12
13
|
"marked": "^4.0.0",
|
|
@@ -33,6 +34,7 @@
|
|
|
33
34
|
"vue-markdown": "^2.2.4",
|
|
34
35
|
"eslint-plugin-vue": "^6.2.2",
|
|
35
36
|
"less": "^3.12.2",
|
|
37
|
+
"highlight.js": "^11.11.1",
|
|
36
38
|
"less-loader": "^7.0.2",
|
|
37
39
|
"vue-template-compiler": "^2.6.11",
|
|
38
40
|
"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,13 +25,11 @@
|
|
|
25
25
|
</script>
|
|
26
26
|
<!-- 项目图标 -->
|
|
27
27
|
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_ee8dx548hg.css"/>
|
|
28
|
-
<!--
|
|
28
|
+
<!-- iconfont图标 -->
|
|
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
|
-
|
|
32
|
-
<!-- aliyun-oss -->
|
|
31
|
+
<!-- aliyun-oss -->
|
|
33
32
|
<script src="https://static.guoranbot.com/cdn-common/alyun-oss/aliyun-oss-sdk-6.17.1.min.js"></script>
|
|
34
|
-
|
|
35
33
|
<!-- vue -->
|
|
36
34
|
<!-- <script src="https://static.guoranbot.com/vue/2.6.11/dist/vue.min.js"></script>
|
|
37
35
|
<script src="https://static.guoranbot.com/vue-router/3.3.2/dist/vue-router.min.js"></script> -->
|
|
@@ -43,7 +41,7 @@
|
|
|
43
41
|
<!-- vant -->
|
|
44
42
|
<!-- <script src="https://static.guoranbot.com/vant/2.12/lib/vant.min.js"></script>
|
|
45
43
|
<link rel="stylesheet" href="https://static.guoranbot.com/vant/2.12/lib/index.css" /> -->
|
|
46
|
-
|
|
44
|
+
|
|
47
45
|
<!-- pdf.js -->
|
|
48
46
|
<!-- <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>
|
|
49
47
|
<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>
|
|
@@ -71,5 +69,5 @@
|
|
|
71
69
|
<div id="app"></div>
|
|
72
70
|
<!-- built files will be auto injected -->
|
|
73
71
|
</body>
|
|
74
|
-
|
|
72
|
+
|
|
75
73
|
</html>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
+
|
|
3
4
|
// const OSS = require('ali-oss');
|
|
4
5
|
|
|
5
6
|
const OSS = window.OSS
|
|
@@ -26,11 +27,11 @@ const getPrivateOssConfig = () =>{
|
|
|
26
27
|
|
|
27
28
|
const ossConfig = {
|
|
28
29
|
region: "oss-cn-zhangjiakou",
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
31
|
+
accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
|
|
32
|
+
accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
|
|
33
|
+
// stsToken: '<Your securityToken(STS)>',
|
|
34
|
+
bucket: "guoranopen-zjk",
|
|
34
35
|
};
|
|
35
36
|
|
|
36
37
|
|
|
@@ -38,7 +39,7 @@ const ossConfig = {
|
|
|
38
39
|
let IDX = 256, HEX = [], SIZE = 256, BUFFER;
|
|
39
40
|
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
|
|
40
41
|
let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
|
|
41
|
-
function uid(len) {
|
|
42
|
+
function uid (len) {
|
|
42
43
|
let i = 0, tmp = (len || 11);
|
|
43
44
|
if (!BUFFER || ((IDX + tmp) > SIZE * 2)) {
|
|
44
45
|
for (BUFFER = '', IDX = 0; i < SIZE; i++) {
|
|
@@ -49,7 +50,7 @@ function uid(len) {
|
|
|
49
50
|
return BUFFER.substring(IDX, IDX++ + tmp);
|
|
50
51
|
}
|
|
51
52
|
|
|
52
|
-
function dataFormat(fmt, date = new Date()) {
|
|
53
|
+
function dataFormat (fmt, date = new Date()) {
|
|
53
54
|
const o = {
|
|
54
55
|
"M+": date.getMonth() + 1, //月份
|
|
55
56
|
"d+": date.getDate(), //日
|
|
@@ -65,12 +66,12 @@ function dataFormat(fmt, date = new Date()) {
|
|
|
65
66
|
return fmt;
|
|
66
67
|
}
|
|
67
68
|
|
|
68
|
-
function pathGenerate(filename) {
|
|
69
|
+
function pathGenerate (filename) {
|
|
69
70
|
return "front-oss/" + mainId + '/' + dataFormat("yyyy/MM/dd/hh/mm/") + uid(32) + "/" + filename;
|
|
70
71
|
}
|
|
71
72
|
|
|
72
73
|
|
|
73
|
-
async function upload(data) {
|
|
74
|
+
async function upload (data) {
|
|
74
75
|
let ossClient = new OSS(getPrivateOssConfig());
|
|
75
76
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
76
77
|
let objectKey = pathGenerate(data.name);
|
|
@@ -79,23 +80,46 @@ async function upload(data) {
|
|
|
79
80
|
return result;
|
|
80
81
|
}
|
|
81
82
|
|
|
82
|
-
async function multipartUpload(data, callback,extCallback) {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
83
|
+
async function multipartUpload (data, callback, extCallback) {
|
|
84
|
+
if (process.env.VUE_APP_UPLOAD_PRIVATE) {
|
|
85
|
+
return new Promise((resolve) => {
|
|
86
|
+
let url = process.env.VUE_APP_UPLOAD_PRIVATE
|
|
87
|
+
let xhr = new XMLHttpRequest()
|
|
88
|
+
const formData = new FormData()
|
|
89
|
+
formData.append('file', data)
|
|
90
|
+
xhr.open("POST", url, true);
|
|
91
|
+
// xhr.setRequestHeader("Content-Type", "multipart/form-data")
|
|
92
|
+
xhr.onload = (res) => {
|
|
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
|
+
})
|
|
92
101
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
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
|
+
}
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return res;
|
|
119
|
+
}
|
|
96
120
|
}
|
|
97
121
|
|
|
98
|
-
function ossFileUrl(path, cname) {
|
|
122
|
+
function ossFileUrl (path, cname) {
|
|
99
123
|
let ossConfig = getPrivateOssConfig()
|
|
100
124
|
if (cname == null) {
|
|
101
125
|
return '//' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
|
|
@@ -104,7 +128,7 @@ function ossFileUrl(path, cname) {
|
|
|
104
128
|
}
|
|
105
129
|
}
|
|
106
130
|
|
|
107
|
-
function uploadImageByBase64(blob) {
|
|
131
|
+
function uploadImageByBase64 ( blob) {
|
|
108
132
|
let ossClient = new OSS(getPrivateOssConfig());
|
|
109
133
|
|
|
110
134
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形 式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
@@ -114,4 +138,4 @@ function uploadImageByBase64(blob) {
|
|
|
114
138
|
return result;
|
|
115
139
|
}
|
|
116
140
|
|
|
117
|
-
export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig, getPrivateOssConfig}
|
|
141
|
+
export { upload, multipartUpload, ossFileUrl, uploadImageByBase64, ossConfig , getPrivateOssConfig}
|
package/src/assets/js/common.js
CHANGED
|
@@ -216,7 +216,11 @@ function newInitWaterMark(elId, textValue) {
|
|
|
216
216
|
mask_div.style.position = "absolute";
|
|
217
217
|
//奇偶行错开,这样水印就不对齐,显的不呆板
|
|
218
218
|
mask_div.style.left = x + 20 + "px";
|
|
219
|
-
|
|
219
|
+
if(defaultSettings.watermark_txt.startsWith('weWo')){
|
|
220
|
+
mask_div.innerHTML = `<ww-open-data type="userName" openid="${defaultSettings.watermark_txt}"></ww-open-data>`
|
|
221
|
+
} else {
|
|
222
|
+
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
|
|
223
|
+
}
|
|
220
224
|
|
|
221
225
|
mask_div.style.top = y + 10 + "px";
|
|
222
226
|
|
package/src/assets/js/hammer.js
CHANGED
|
@@ -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 <
|
|
71
|
-
newScale =
|
|
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{
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
class="grzh-iframe"
|
|
27
27
|
:src="actionAlertIframe.template"
|
|
28
28
|
width="100%"
|
|
29
|
-
height="
|
|
29
|
+
height="90%"
|
|
30
30
|
:scrolling="actionAlertIframe.scrolling"
|
|
31
31
|
frameborder="no"
|
|
32
32
|
border="0"
|
|
@@ -88,6 +88,29 @@ 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
|
+
})();
|
|
91
114
|
},
|
|
92
115
|
};
|
|
93
116
|
</script>
|