askbot-dragon 1.6.21-beta → 1.6.21
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 +8 -11
- package/public/index.html +9 -8
- package/src/assets/image/default_avt_ui.png +0 -0
- package/src/assets/image/filtType/audio.png +0 -0
- package/src/assets/image/filtType/excel1.png +0 -0
- package/src/assets/image/filtType/general.png +0 -0
- package/src/assets/image/filtType/image1.png +0 -0
- package/src/assets/image/filtType/link.png +0 -0
- package/src/assets/image/filtType/md2.png +0 -0
- package/src/assets/image/filtType/mode.png +0 -0
- package/src/assets/image/filtType/news.png +0 -0
- package/src/assets/image/filtType/pdf1.png +0 -0
- package/src/assets/image/filtType/ppt1.png +0 -0
- package/src/assets/image/filtType/selfadd1.png +0 -0
- package/src/assets/image/filtType/txt1.png +0 -0
- package/src/assets/image/filtType/video.png +0 -0
- package/src/assets/image/filtType/wechat.png +0 -0
- package/src/assets/image/filtType/word1.png +0 -0
- package/src/assets/image/loading.gif +0 -0
- package/src/assets/js/AliyunlssUtil.js +35 -10
- package/src/assets/js/common.js +241 -0
- package/src/components/ActionAlertIframe.vue +1 -0
- package/src/components/AiGuide.vue +7 -4
- package/src/components/AnswerDocknowledge.vue +930 -389
- package/src/components/ConversationContainer.vue +7111 -1058
- package/src/components/MyEditor.vue +342 -0
- package/src/components/QwFeedback.vue +303 -0
- package/src/components/actionSatisfaction.vue +2 -2
- package/src/components/actionSendToBot.vue +2 -2
- package/src/components/answerRadio.vue +145 -64
- package/src/components/askVideo.vue +3 -6
- package/src/components/assetDetails.vue +14 -6
- package/src/components/assetMessage.vue +14 -13
- package/src/components/associationIntention.vue +31 -6
- package/src/components/fielListView.vue +1 -1
- package/src/components/file/AliyunOssComponents.vue +1 -1
- package/src/components/formTemplate.vue +1590 -1674
- package/src/components/imgView.vue +32 -0
- package/src/components/intelligentSummary.vue +231 -0
- package/src/components/markDownText.vue +198 -0
- package/src/components/myPopup.vue +14 -11
- package/src/components/pagination.vue +129 -0
- package/src/components/pdfPosition.vue +112 -90
- package/src/components/popup.vue +8 -7
- package/src/components/preview/docView.vue +114 -0
- package/src/components/preview/excelView.vue +187 -0
- package/src/components/preview/newPositionPreview.vue +370 -0
- package/src/components/preview/pdfView.vue +824 -0
- package/src/components/previewDoc.vue +6 -0
- package/src/components/previewPdf.vue +963 -200
- package/src/components/receiverMessagePlatform.vue +25 -21
- package/src/components/recommend.vue +2 -2
- package/src/components/senderMessagePlatform.vue +21 -13
- package/src/components/tree.vue +116 -103
- package/src/components/utils/AliyunIssUtil.js +35 -13
- package/src/components/utils/ckeditor.js +64 -56
- package/src/components/welcomeKnowledgeFile.vue +344 -0
- package/src/components/welcomeLlmCard.vue +141 -0
- package/src/components/welcomeSuggest.vue +98 -0
- package/src/locales/cn.json +62 -0
- package/src/locales/en.json +62 -0
- package/src/main.js +19 -3
- package/vue.config.js +0 -1
- package/src/assets/js/obsBrowser.js +0 -63
- package/src/components/utils/ckeditorImageUpload/command.js +0 -112
- package/src/components/utils/ckeditorImageUpload/editing.js +0 -12
- package/src/components/utils/ckeditorImageUpload/plugin-image.js +0 -12
- package/src/components/utils/ckeditorImageUpload/toolbar-ui.js +0 -41
- package/src/components/utils/ckeditorfileUpload/common.js +0 -175
- package/src/components/utils/ckeditorfileUpload/editing.js +0 -12
- package/src/components/utils/ckeditorfileUpload/plugin_file.js +0 -12
- package/src/components/utils/ckeditorfileUpload/toolbar_ui.js +0 -35
package/package.json
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "askbot-dragon",
|
|
3
|
-
"version": "1.6.21
|
|
3
|
+
"version": "1.6.21",
|
|
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
|
-
|
|
11
|
-
|
|
12
|
-
"ali-oss": "^6.2.1",
|
|
10
|
+
},
|
|
11
|
+
"devDependencies": {
|
|
13
12
|
"audio-loader": "^1.0.3",
|
|
14
|
-
"ckeditor": "^4.12.1",
|
|
15
13
|
"core-js": "^3.6.5",
|
|
16
|
-
"element-ui": "^2.15.14",
|
|
17
|
-
"esdk-obs-browserjs": "^3.23.5",
|
|
18
14
|
"install": "^0.13.0",
|
|
19
15
|
"jquery": "^3.5.1",
|
|
20
16
|
"lodash": "^4.17.21",
|
|
@@ -25,18 +21,19 @@
|
|
|
25
21
|
"vue": "^2.6.11",
|
|
26
22
|
"vue-resource": "^1.5.1",
|
|
27
23
|
"vue-video-player": "^5.0.2",
|
|
28
|
-
"weixin-js-sdk": "^1.6.0"
|
|
29
|
-
},
|
|
30
|
-
"devDependencies": {
|
|
24
|
+
"weixin-js-sdk": "^1.6.0",
|
|
31
25
|
"@vue/cli-plugin-babel": "~4.5.0",
|
|
32
26
|
"@vue/cli-plugin-eslint": "~4.5.0",
|
|
33
27
|
"@vue/cli-service": "~4.5.0",
|
|
34
28
|
"babel-eslint": "^10.1.0",
|
|
29
|
+
"element-ui": "^2.15.10",
|
|
35
30
|
"eslint": "^6.7.2",
|
|
31
|
+
"vue-markdown": "^2.2.4",
|
|
36
32
|
"eslint-plugin-vue": "^6.2.2",
|
|
37
33
|
"less": "^3.12.2",
|
|
38
34
|
"less-loader": "^7.0.2",
|
|
39
|
-
"vue-template-compiler": "^2.6.11"
|
|
35
|
+
"vue-template-compiler": "^2.6.11",
|
|
36
|
+
"vue-i18n": "^8.26.4"
|
|
40
37
|
},
|
|
41
38
|
"eslintConfig": {
|
|
42
39
|
"root": true,
|
package/public/index.html
CHANGED
|
@@ -23,14 +23,15 @@
|
|
|
23
23
|
});
|
|
24
24
|
}
|
|
25
25
|
</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
26
|
<!-- 项目图标 -->
|
|
28
|
-
<link rel="stylesheet" href="//at.alicdn.com/t/
|
|
27
|
+
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_ee8dx548hg.css"/>
|
|
29
28
|
<!-- guoran图标 -->
|
|
30
|
-
<link rel="stylesheet" href="//at.alicdn.com/t/c/
|
|
29
|
+
<link rel="stylesheet" href="//at.alicdn.com/t/c/font_2913049_eje81c90ujh.css"/>
|
|
31
30
|
<script src="https://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
|
|
32
|
-
<!-- <script src="https://static.guoranbot.com/ckeditor5-build-classic/0.3.7/build/ckeditor.js"></script> -->
|
|
33
31
|
|
|
32
|
+
<!-- aliyun-oss -->
|
|
33
|
+
<script src="https://static.guoranbot.com/cdn-common/alyun-oss/aliyun-oss-sdk-6.17.1.min.js"></script>
|
|
34
|
+
|
|
34
35
|
<!-- vue -->
|
|
35
36
|
<!-- <script src="https://static.guoranbot.com/vue/2.6.11/dist/vue.min.js"></script>
|
|
36
37
|
<script src="https://static.guoranbot.com/vue-router/3.3.2/dist/vue-router.min.js"></script> -->
|
|
@@ -50,10 +51,10 @@
|
|
|
50
51
|
<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
|
|
|
52
53
|
|
|
53
|
-
<script src="https://
|
|
54
|
-
<script src="https://
|
|
55
|
-
<script src="https://
|
|
56
|
-
<link rel="stylesheet" href="https://
|
|
54
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.min.js" referrerpolicy="no-referrer"></script>
|
|
55
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf.worker.min.js" referrerpolicy="no-referrer"></script>
|
|
56
|
+
<script src="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer.js" referrerpolicy="no-referrer"></script>
|
|
57
|
+
<link rel="stylesheet" href="https://guoranopen-zjk.oss-cn-zhangjiakou.aliyuncs.com/cdn-common/pdfJS2.1.266/pdf_viewer_01.css" referrerpolicy="no-referrer" />
|
|
57
58
|
<!-- hammer.js -->
|
|
58
59
|
<!-- <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
60
|
<style>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
const OSS = require('ali-oss');
|
|
3
|
+
// const OSS = require('ali-oss');
|
|
4
4
|
|
|
5
|
-
const
|
|
5
|
+
const OSS = window.OSS
|
|
6
|
+
|
|
7
|
+
const getPrivateOssConfig = () =>{
|
|
8
|
+
let mainSource = sessionStorage.getItem('_mainSource') ? sessionStorage.getItem('_mainSource') : "askbot";
|
|
9
|
+
switch (mainSource) {
|
|
10
|
+
case "askbot":
|
|
11
|
+
return {
|
|
12
|
+
region: "oss-cn-zhangjiakou",
|
|
13
|
+
accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
|
|
14
|
+
accessKeySecret: "OwgdVfc5PeCkIgqIdug660xmiSPchn",
|
|
15
|
+
bucket: "guoranopen-zjk",
|
|
16
|
+
}
|
|
17
|
+
case "lishi":
|
|
18
|
+
return {
|
|
19
|
+
region: "oss-ap-southeast-1",
|
|
20
|
+
accessKeyId: "LTAI5tAusPLDNJJwkvUbqi2T",
|
|
21
|
+
accessKeySecret: "xqPVaunOIbvTe3g9qsXal2IZO6RftK",
|
|
22
|
+
bucket: "askbotopen-ls",
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const ossConfig = {
|
|
6
28
|
region: "oss-cn-zhangjiakou",
|
|
7
29
|
//云账号AccessKey有所有API访问权限,建议遵循阿里云安全最佳实践,创建并使用STS方式来进行API访问
|
|
8
30
|
accessKeyId: "LTAI4G3QtdEdwkEbihBngAsK",
|
|
@@ -11,6 +33,8 @@ const ossConfig={
|
|
|
11
33
|
bucket: "guoranopen-zjk",
|
|
12
34
|
};
|
|
13
35
|
|
|
36
|
+
|
|
37
|
+
|
|
14
38
|
let IDX = 256, HEX = [], SIZE = 256, BUFFER;
|
|
15
39
|
while (IDX--) HEX[IDX] = (IDX + 256).toString(16).substring(1);
|
|
16
40
|
let mainId = sessionStorage.getItem('_mainId') ? sessionStorage.getItem('_mainId') : "";
|
|
@@ -46,8 +70,8 @@ function pathGenerate(filename) {
|
|
|
46
70
|
}
|
|
47
71
|
|
|
48
72
|
|
|
49
|
-
async function upload(
|
|
50
|
-
let ossClient = new OSS(
|
|
73
|
+
async function upload(data) {
|
|
74
|
+
let ossClient = new OSS(getPrivateOssConfig());
|
|
51
75
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
52
76
|
let objectKey = pathGenerate(data.name);
|
|
53
77
|
let result = await ossClient.put(objectKey, data);
|
|
@@ -55,8 +79,8 @@ async function upload(ossConfig, data) {
|
|
|
55
79
|
return result;
|
|
56
80
|
}
|
|
57
81
|
|
|
58
|
-
async function multipartUpload(
|
|
59
|
-
let ossClient = new OSS(
|
|
82
|
+
async function multipartUpload(data, callback,extCallback) {
|
|
83
|
+
let ossClient = new OSS(getPrivateOssConfig());
|
|
60
84
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
61
85
|
let objectKey = pathGenerate(data.name);
|
|
62
86
|
let res = await ossClient.multipartUpload(objectKey, data, {
|
|
@@ -71,7 +95,8 @@ async function multipartUpload(ossConfig, data, callback,extCallback) {
|
|
|
71
95
|
return res;
|
|
72
96
|
}
|
|
73
97
|
|
|
74
|
-
function ossFileUrl(
|
|
98
|
+
function ossFileUrl(path, cname) {
|
|
99
|
+
let ossConfig = getPrivateOssConfig()
|
|
75
100
|
if (cname == null) {
|
|
76
101
|
return '//' + ossConfig.bucket + '.' + ossConfig.region + '.aliyuncs.com/' + path;
|
|
77
102
|
} else {
|
|
@@ -79,8 +104,8 @@ function ossFileUrl(ossConfig, path, cname) {
|
|
|
79
104
|
}
|
|
80
105
|
}
|
|
81
106
|
|
|
82
|
-
function uploadImageByBase64(
|
|
83
|
-
let ossClient = new OSS(
|
|
107
|
+
function uploadImageByBase64(blob) {
|
|
108
|
+
let ossClient = new OSS(getPrivateOssConfig());
|
|
84
109
|
|
|
85
110
|
// object-key可以自定义为文件名(例如file.txt)或目录(例如abc/test/file.txt)的形 式,实现将文件上传至当前Bucket或Bucket下的指定目录。
|
|
86
111
|
let objectKey = pathGenerate(new Date().getTime());
|
|
@@ -89,4 +114,4 @@ function uploadImageByBase64(ossConfig,blob) {
|
|
|
89
114
|
return result;
|
|
90
115
|
}
|
|
91
116
|
|
|
92
|
-
export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig}
|
|
117
|
+
export {upload, multipartUpload, ossFileUrl,uploadImageByBase64,ossConfig, getPrivateOssConfig}
|
package/src/assets/js/common.js
CHANGED
|
@@ -9,4 +9,245 @@ export function isMobile() {
|
|
|
9
9
|
bool = false
|
|
10
10
|
}
|
|
11
11
|
return bool
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let imageTypeObj = {
|
|
15
|
+
PDF: 'pdf1',
|
|
16
|
+
pdf: 'pdf1',
|
|
17
|
+
TXT: 'txt1',
|
|
18
|
+
txt: 'txt1',
|
|
19
|
+
selfadd: 'selfadd1',
|
|
20
|
+
md: "md2",
|
|
21
|
+
html: 'selfadd1',
|
|
22
|
+
mode: "mode",
|
|
23
|
+
general: 'general',
|
|
24
|
+
word: "word1",
|
|
25
|
+
Word: "word1",
|
|
26
|
+
docx: "word1",
|
|
27
|
+
doc: "word1",
|
|
28
|
+
docm: "word1",
|
|
29
|
+
dotm: "word1",
|
|
30
|
+
dotx: "word1",
|
|
31
|
+
wpt: "word1",
|
|
32
|
+
wps: "word1",
|
|
33
|
+
WORD: "word1",
|
|
34
|
+
Excel: 'excel1',
|
|
35
|
+
EXCEL: 'excel1',
|
|
36
|
+
excel: 'excel1',
|
|
37
|
+
PPT: 'ppt1',
|
|
38
|
+
ppt: 'ppt1',
|
|
39
|
+
pptx: 'ppt1',
|
|
40
|
+
img: "image1",
|
|
41
|
+
image: "image1",
|
|
42
|
+
video: "video",
|
|
43
|
+
audio: 'audio',
|
|
44
|
+
link: "link",
|
|
45
|
+
wechat: "wechat",
|
|
46
|
+
mp4: "video",
|
|
47
|
+
MP4: "video",
|
|
48
|
+
xlsx: "excel1",
|
|
49
|
+
xls: "excel1",
|
|
50
|
+
csv: "excel1",
|
|
51
|
+
jpg: "image1",
|
|
52
|
+
JPG: "image1",
|
|
53
|
+
jpeg: "image1",
|
|
54
|
+
JPEG: "image1",
|
|
55
|
+
png: "image1",
|
|
56
|
+
PNG: "image1",
|
|
57
|
+
webp: "image1",
|
|
58
|
+
WEBP: "image1",
|
|
59
|
+
gif: "image1",
|
|
60
|
+
GIF: "image1",
|
|
61
|
+
svg: "image1",
|
|
62
|
+
bmp: "image1",
|
|
63
|
+
avi: "video",
|
|
64
|
+
mov: "video",
|
|
65
|
+
rmvb: "video",
|
|
66
|
+
wav: "audio",
|
|
67
|
+
mp3: "audio",
|
|
68
|
+
MOV: "video",
|
|
69
|
+
AIV: "video",
|
|
70
|
+
aiv: "video",
|
|
71
|
+
news:"news"
|
|
72
|
+
}
|
|
73
|
+
function newInitWaterMark(elId, textValue) {
|
|
74
|
+
//默认设置
|
|
75
|
+
var defaultSettings = {
|
|
76
|
+
|
|
77
|
+
watermark_txt: "",
|
|
78
|
+
|
|
79
|
+
visitorWatermark_txt: "",
|
|
80
|
+
|
|
81
|
+
watermark_x: 0, //水印起始位置x轴坐标
|
|
82
|
+
|
|
83
|
+
watermark_y: 0, //水印起始位置Y轴坐标
|
|
84
|
+
|
|
85
|
+
watermark_rows: 0, //水印行数
|
|
86
|
+
|
|
87
|
+
watermark_cols: 0, //水印列数
|
|
88
|
+
|
|
89
|
+
watermark_x_space: 40, //水印x轴间隔
|
|
90
|
+
|
|
91
|
+
watermark_y_space: 60, //水印y轴间隔
|
|
92
|
+
|
|
93
|
+
watermark_color: "black", //水印字体颜色
|
|
94
|
+
|
|
95
|
+
watermark_alpha: 0.3, //水印透明度
|
|
96
|
+
|
|
97
|
+
watermark_fontsize: "12px", //水印字体大小
|
|
98
|
+
|
|
99
|
+
watermark_font: "微软雅黑", //水印字体
|
|
100
|
+
|
|
101
|
+
watermark_width: 100, //水印宽度
|
|
102
|
+
|
|
103
|
+
watermark_height: 60, //水印长度
|
|
104
|
+
|
|
105
|
+
watermark_angle: 20 //水印倾斜度数
|
|
106
|
+
|
|
107
|
+
};
|
|
108
|
+
let textWatermarkValue = textValue;
|
|
109
|
+
if (textWatermarkValue) {
|
|
110
|
+
defaultSettings.watermark_txt = textWatermarkValue;
|
|
111
|
+
}
|
|
112
|
+
if (!textWatermarkValue) {
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
//采用配置项替换默认值,作用类似jquery.extend
|
|
117
|
+
|
|
118
|
+
if (arguments.length === 1 && typeof arguments[0] === "object") {
|
|
119
|
+
|
|
120
|
+
// 获取参数配置
|
|
121
|
+
|
|
122
|
+
var src = arguments[0];
|
|
123
|
+
|
|
124
|
+
for (let key in src) {
|
|
125
|
+
|
|
126
|
+
if (src[key] && defaultSettings[key] && src[key] === defaultSettings[key])
|
|
127
|
+
|
|
128
|
+
continue;
|
|
129
|
+
|
|
130
|
+
else if (src[key])
|
|
131
|
+
|
|
132
|
+
defaultSettings[key] = src[key];
|
|
133
|
+
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
var oTemp = document.createDocumentFragment();
|
|
139
|
+
|
|
140
|
+
//获取页面最大宽度
|
|
141
|
+
|
|
142
|
+
var page_width = Math.max(document.getElementById(elId).scrollWidth, document.getElementById(elId).clientWidth);
|
|
143
|
+
|
|
144
|
+
var cutWidth = page_width * 0.0150;
|
|
145
|
+
|
|
146
|
+
page_width = page_width - cutWidth;
|
|
147
|
+
|
|
148
|
+
//获取页面最大高度
|
|
149
|
+
var page_height = document.getElementById(elId).scrollHeight;
|
|
150
|
+
console.log('page_height',page_height, page_width);
|
|
151
|
+
|
|
152
|
+
// var page_height = Math.max(document.body.scrollHeight, document.body.clientHeight);
|
|
153
|
+
|
|
154
|
+
// var page_height = document.body.scrollHeight+document.body.scrollTop;
|
|
155
|
+
|
|
156
|
+
//如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔
|
|
157
|
+
|
|
158
|
+
if (defaultSettings.watermark_cols == 0 || (parseInt(defaultSettings.watermark_x + defaultSettings
|
|
159
|
+
|
|
160
|
+
.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (
|
|
161
|
+
|
|
162
|
+
defaultSettings.watermark_cols - 1)) > page_width)) {
|
|
163
|
+
|
|
164
|
+
defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x + defaultSettings
|
|
165
|
+
|
|
166
|
+
.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings
|
|
167
|
+
|
|
168
|
+
.watermark_x_space));
|
|
169
|
+
|
|
170
|
+
defaultSettings.watermark_x_space = parseInt((page_width - defaultSettings.watermark_x -
|
|
171
|
+
|
|
172
|
+
defaultSettings
|
|
173
|
+
|
|
174
|
+
.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols - 1));
|
|
175
|
+
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
//如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔
|
|
179
|
+
|
|
180
|
+
if (defaultSettings.watermark_rows == 0 || (parseInt(defaultSettings.watermark_y + defaultSettings
|
|
181
|
+
|
|
182
|
+
.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (
|
|
183
|
+
|
|
184
|
+
defaultSettings.watermark_rows - 1)) > page_height)) {
|
|
185
|
+
|
|
186
|
+
defaultSettings.watermark_rows = parseInt((defaultSettings.watermark_y_space + page_height -
|
|
187
|
+
|
|
188
|
+
defaultSettings
|
|
189
|
+
|
|
190
|
+
.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space));
|
|
191
|
+
|
|
192
|
+
defaultSettings.watermark_y_space = parseInt(((page_height - defaultSettings.watermark_y) -
|
|
193
|
+
|
|
194
|
+
defaultSettings
|
|
195
|
+
|
|
196
|
+
.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows - 1));
|
|
197
|
+
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
var x;
|
|
201
|
+
var y;
|
|
202
|
+
for (var i = 0; i < defaultSettings.watermark_rows; i++) {
|
|
203
|
+
y = defaultSettings.watermark_y + (defaultSettings.watermark_y_space + defaultSettings.watermark_height) * i;
|
|
204
|
+
for (var j = 0; j < defaultSettings.watermark_cols; j++) {
|
|
205
|
+
x = defaultSettings.watermark_x + (defaultSettings.watermark_width + defaultSettings.watermark_x_space) * j;
|
|
206
|
+
var mask_div = document.createElement("div");
|
|
207
|
+
|
|
208
|
+
mask_div.id = "mask_div" + i + j;
|
|
209
|
+
mask_div.className = "mask_div";
|
|
210
|
+
mask_div.style.webkitTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
211
|
+
mask_div.style.MozTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
212
|
+
mask_div.style.msTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
213
|
+
mask_div.style.OTransform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
214
|
+
mask_div.style.transform = "rotate(-" + defaultSettings.watermark_angle + "deg)";
|
|
215
|
+
mask_div.style.visibility = "";
|
|
216
|
+
mask_div.style.position = "absolute";
|
|
217
|
+
//奇偶行错开,这样水印就不对齐,显的不呆板
|
|
218
|
+
mask_div.style.left = x + 20 + "px";
|
|
219
|
+
mask_div.appendChild(document.createTextNode(defaultSettings.watermark_txt));
|
|
220
|
+
|
|
221
|
+
mask_div.style.top = y + 10 + "px";
|
|
222
|
+
|
|
223
|
+
mask_div.style.overflow = "hidden";
|
|
224
|
+
|
|
225
|
+
mask_div.style.pointerEvents = "none"; //让水印不遮挡页面的点击事件
|
|
226
|
+
|
|
227
|
+
mask_div.style.opacity = defaultSettings.watermark_alpha;
|
|
228
|
+
|
|
229
|
+
mask_div.style.fontSize = defaultSettings.watermark_fontsize;
|
|
230
|
+
|
|
231
|
+
mask_div.style.fontFamily = defaultSettings.watermark_font;
|
|
232
|
+
|
|
233
|
+
mask_div.style.color = defaultSettings.watermark_color;
|
|
234
|
+
|
|
235
|
+
mask_div.style.textAlign = "center";
|
|
236
|
+
|
|
237
|
+
mask_div.style.width = defaultSettings.watermark_width + "px";
|
|
238
|
+
|
|
239
|
+
mask_div.style.height = defaultSettings.watermark_width + "px";
|
|
240
|
+
|
|
241
|
+
mask_div.style.display = "block";
|
|
242
|
+
|
|
243
|
+
mask_div.style.wordBreak = 'break-all'
|
|
244
|
+
|
|
245
|
+
oTemp.appendChild(mask_div);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
document.getElementById(elId).appendChild(oTemp);
|
|
249
|
+
}
|
|
250
|
+
export {
|
|
251
|
+
imageTypeObj,
|
|
252
|
+
newInitWaterMark
|
|
12
253
|
}
|
|
@@ -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
|
+
{{$t('dragonCommon.refresh')}}</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
|
}
|