code init

This commit is contained in:
chenxiaoxi
2021-05-25 18:06:45 +08:00
parent 02698d6dab
commit f54a8d4fa1
1367 changed files with 540755 additions and 21713 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

+13 -32
View File
@@ -1,37 +1,18 @@
<!DOCTYPE html>
<html lang="zh-cmn-Hans">
<html>
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width,initial-scale=1.0" />
<link rel="icon" href="<%= BASE_URL %>favicon.ico" />
<title><%= VUE_APP_TITLE %></title>
<link rel="stylesheet" href="<%= BASE_URL %>static/css/loading.css" />
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
<title>全球标准法规系统</title>
<script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script>
</head>
<body>
<div id="foton">
<div class="first-loading-wrp">
<div class="loading-wrp">
<span class="dot dot-spin">
<i></i>
<i></i>
<i></i>
<i></i>
</span>
</div>
<h1><%= VUE_APP_TITLE %></h1>
</div>
</div>
<script>
if (window.location.hostname !== 'localhost') {
var _hmt = _hmt || []
;(function () {
var hm = document.createElement('script')
hm.src = 'https://hm.baidu.com/hm.js?7174bade1219f9cc272e7978f9523fc8'
var s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s)
})()
}
</script>
<body class="el-drawer-body">
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
View File
-99
View File
@@ -1,99 +0,0 @@
/**
* @description 雪花屏代码,基于ant-design修改
**/
.first-loading-wrp {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 90vh;
min-height: 90vh;
}
.first-loading-wrp > h1 {
font-size: 30px;
font-weight: bolder;
}
.first-loading-wrp .loading-wrp {
display: flex;
align-items: center;
justify-content: center;
padding: 98px;
}
.dot {
position: relative;
box-sizing: border-box;
display: inline-block;
width: 64px;
height: 64px;
font-size: 64px;
transform: rotate(45deg);
animation: antRotate 1.2s infinite linear;
}
.dot i {
position: absolute;
display: block;
width: 28px;
height: 28px;
background-color: #1890ff;
border-radius: 100%;
opacity: 0.3;
transform: scale(0.75);
transform-origin: 50% 50%;
animation: antSpinMove 1s infinite linear alternate;
}
.dot i:nth-child(1) {
top: 0;
left: 0;
}
.dot i:nth-child(2) {
top: 0;
right: 0;
-webkit-animation-delay: 0.4s;
animation-delay: 0.4s;
}
.dot i:nth-child(3) {
right: 0;
bottom: 0;
-webkit-animation-delay: 0.8s;
animation-delay: 0.8s;
}
.dot i:nth-child(4) {
bottom: 0;
left: 0;
-webkit-animation-delay: 1.2s;
animation-delay: 1.2s;
}
@keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@-webkit-keyframes antRotate {
to {
-webkit-transform: rotate(405deg);
transform: rotate(405deg);
}
}
@keyframes antSpinMove {
to {
opacity: 1;
}
}
@-webkit-keyframes antSpinMove {
to {
opacity: 1;
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 290 B

+158
View File
@@ -0,0 +1,158 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<title>在线编辑</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="http://106.2.13.189:9001/web-apps/apps/api/documents/api.js"></script>
<!-- <script type="text/javascript" src="http://172.20.10.5/web-apps/apps/api/documents/api.js"></script>-->
</head>
<body style="height: 100%">
<div class="form" style="height: 100%">
<div id="iframeEditor"></div>
</div>
<script type="text/javascript">
var fileName = GetQueryValue('fileName')
var fileUrl = GetQueryValue('fileUrl')
var standNo = GetQueryValue('standNo')
var key = GetQueryValue('key')
// var attId = GetQueryValue('attId')
var fileSuffix = GetQueryValue('fileType')
//将文件后缀处理掉
// fileSuffix = fileSuffix.split(".").join("");
var docEditor;
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onAppReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
// console.log(key)
// console.log(fileUrl)
// console.log(attId)
// console.log(fileName)
// const fileUrl = 'http://172.20.10.2:9090/conver.docx'
var config = {
"document": {
"fileType": 'docx',
"key": key,
"title": fileName,
"url": fileUrl
},
"documentType": "text",
"editorConfig": {
// 此处配置回调地址
"callbackUrl": `http://39.98.140.126:10005/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${standNo}`,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
// "forcesave": "true"
// }
}
};
// var config = {
// "type": "desktop",
// "mode": "edit",
// "documentType": "text",
// "document": {
// "title": "new.docx",
// "url": "http://172.20.10.2:9090/conver.docx",
// "fileType": "docx",
// "key": "-1988670278",
// "permissions": {
// "comment": true,
// "download": true,
// "edit": true,
// "fillForms": true,
// "modifyFilter": true,
// "modifyContentControl": true,
// "review": true
// }
// },
// "editorConfig": {
// "mode": "edit",
// "callbackUrl": "http://39.98.140.126:10005/api/IndexServlet?type=track&fileName=new.docx&userAddress=172.20.10.2",
// "lang": "zh",
// "user": {
// "id": "uid-1",
// "name": "John Smith"
// },
// "customization": {
// "goback": {
// "url": "http://39.98.140.126:10005/api/IndexServlet"
// },
// "about": true,
// "feedback": false
// },
// "canCoAuthoring": true,
// "canUseHistory": false,
// "canHistoryClose": false,
// "canHistoryRestore": false,
// "canSendEmailAddresses": false,
// "canRequestEditRights": true,
// "canRequestClose": false,
// "canRename": false,
// "canMakeActionLink": true,
// "canRequestUsers": false,
// "canRequestSendNotify": false,
// "canRequestSaveAs": false,
// "canRequestInsertImage": false,
// "canRequestMailMergeRecipients": false,
// "canRequestCompareFile": false,
// "canRequestSharingSettings": false,
// "canRequestCreateNew": false
// },
// "width": "100%",
// "height": "100%",
// "events": {},
// "frameEditorId": "iframeEditor",
// "parentOrigin": "http://172.20.10.2:8081"
// }
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
/**
* [通过参数名获取url中的参数值]
* 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
* @param {[string]} queryName [参数名]
* @return {[string]} [参数值]
*/
function GetQueryValue(queryName) {
var query = decodeURI(window.location.search.substring(1));
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == queryName) { return pair[1]; }
}
return null;
}
</script>
</body>
</html>
@@ -0,0 +1,90 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<title>OCR在线编辑</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="http://106.2.13.189:9001/web-apps/apps/api/documents/api.js"></script>
</head>
<body style="height: 100%">
<div class="form" style="height: 100%">
<div id="iframeEditor"></div>
</div>
<script type="text/javascript" language="javascript">
var fileName = GetQueryValue('fileName')
var fileUrl = GetQueryValue('fileUrl')
var key = GetQueryValue('key')
var ocrId = GetQueryValue('ocrId')
var docEditor;
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onAppReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
var config = {
"document": {
"fileType": 'docx',
"key": key,
"title": fileName,
"url": fileUrl
},
"documentType": "text",
"editorConfig": {
// 此处配置回调地址
"callbackUrl": "http://106.2.13.189:10001/api/att/attFile/recieveFileByOcr?ocrId=" + ocrId + '&orifileUrl=' + fileUrl,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
// "forcesave": "true"
// }
}
};
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
/**
* [通过参数名获取url中的参数值]
* 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
* @param {[string]} queryName [参数名]
* @return {[string]} [参数值]
*/
function GetQueryValue(queryName) {
var query = decodeURI(window.location.search.substring(1));
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == queryName) { return pair[1]; }
}
return null;
}
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+128
View File
@@ -0,0 +1,128 @@
let DEFAULT_URL = ''
let url = decodeURIComponent(window.location.search)
let attIdIndex = url.indexOf('&fileId=')
let typeIndex = url.indexOf('?sarType=')
let numberIndex = url.indexOf('&pageNumber=')
let attId = ''
let sarType = 'INLAND_STAND'
let pageNumber = 1
let pageCount = 1
let fileId = ''
let queryAttUrl = '/api/lawss/sarStandFile/queryConvertAtt'
if (attIdIndex > -1) {
attId = url.substring(attIdIndex + 8, url.length)
pageNumber = url.substring(numberIndex + 12, attIdIndex)
sarType = url.substring(typeIndex + 9, numberIndex)
if (sarType === 'INLAND_LAWS' || sarType === 'FOREIGN_LAWS') {
queryAttUrl = '/api/lawss/sarLawsFile/queryConvertAtt'
} else if (sarType === 'BUSS') {
queryAttUrl = '/api/lawss/sarBussStandFile/queryConvertAtt'
}
$.ajax({
url: queryAttUrl,
async: false,
type: 'GET',
data: {
attId: attId
},
success: function (res) {
// res = JSON.parse(res)
if (res.data != null) {
pageCount = res.data.pageCount
if (res.data.fileOldName !== null && res.data.fileOldName !== undefined) {
document.title = res.data.fileOldName + '-在线查看'
}
// $('#pageCount').html(res.data.pageCount)
fileId = res.data.id
getFileInfo()
} else {
alert('文档未转换成功或本地读取不到该文档')
}
},
error: function (data) {
alert('文档未转换成功或本地读取不到该文档')
}
})
}
// document.onkeydown = function () {
// var e = window.event || arguments[0]
// if (e.keyCode === 123) {
// return false
// } else if (e.ctrlKey || e.keyCode === 73) {
// return false
// }
// }
// document.oncontextmenu = function () {
// return false
// }
function getFileInfo () {
$.ajax({
url: '/api/lawss/sarFileInfo/getPdfFileInfo',
async: false,
type: 'GET',
data: {
sarFileId: fileId,
filePageNumber: pageNumber
},
success: function (res) {
res = JSON.parse(res)
if (res.data != null) {
if (res.data.fileInfo != null) {
let data = res.data.fileInfo
let resultFileMsg = data.substring(30, data.length - 50)
resultFileMsg = resultFileMsg.replace(/\*/g, 'A')
let password = res.data.filePwd
sessionStorage.setItem('fileInfoSteam', password)
writeFile(resultFileMsg)
}
}
},
error: function (data) {
alert('文档未转换成功或本地读取不到该文档')
}
})
}
function writeFile (data) {
var BASE64_MARKER = ';base64,' // 声明文件流编码格式
var pdfAsDataUri = data
var pdfAsArray = convertDataURIToBinary(pdfAsDataUri)
DEFAULT_URL = pdfAsArray
if (Number(pageCount) > 1) {
if (Number(pageNumber) === 1 && Number(pageNumber) !== Number(pageCount)) {
$('#upLoadingFile').hide()
$('#downLoadingFile').show()
} else if (Number(pageNumber) !== 1 && Number(pageNumber) !== Number(pageCount)) {
$('#upLoadingFile').show()
$('#downLoadingFile').show()
} else {
$('#upLoadingFile').hide()
$('#downLoadingFile').hide()
}
} else {
$('#upLoadingFile').hide()
$('#downLoadingFile').hide()
}
}
function clickLoadFile (type) {
if (type === 'up') {
pageNumber = Number(pageNumber) - Number(1)
} else {
pageNumber = Number(pageNumber) + Number(1)
}
window.location.href = '/static/pdf/web/viewer.html?sarType=' + sarType + '&pageNumber=' + pageNumber + '&fileId=' + encodeURIComponent(attId)
}
function convertDataURIToBinary (dataURI) {
var raw = window.atob(dataURI) // 这个方法在ie内核下无法正常解析。
var rawLength = raw.length
// 转换成pdf.js能直接解析的Uint8Array类型
var array = new Uint8Array(new ArrayBuffer(rawLength))
for (let i = 0; i < rawLength; i++) {
array[i] = raw.charCodeAt(i)
}
return array
}

Some files were not shown because too many files have changed in this diff Show More