|
|
|
@ -19,18 +19,17 @@
|
|
|
|
|
</head> |
|
|
|
|
|
|
|
|
|
<body> |
|
|
|
|
<div class="panel-group container" id="accordion"> |
|
|
|
|
<h1>文件预览项目接入和测试界面</h1> |
|
|
|
|
<div class="panel-group" id="accordion"> |
|
|
|
|
|
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
<h4 class="panel-title"> |
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion" |
|
|
|
|
href="#collapseOne"> |
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> |
|
|
|
|
接入说明 |
|
|
|
|
</a> |
|
|
|
|
</h4> |
|
|
|
|
</div> |
|
|
|
|
<div id="collapseOne" class="panel-collapse collapse"> |
|
|
|
|
<div class="panel-body"> |
|
|
|
|
<div> |
|
|
|
|
如果你的项目需要接入文件预览项目,达到对docx、excel、ppt、jpg等文件的预览效果,那么通过在你的项目中加入下面的代码就可以 |
|
|
|
@ -49,7 +48,6 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
<h4 class="panel-title"> |
|
|
|
@ -59,12 +57,11 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
</a> |
|
|
|
|
</h4> |
|
|
|
|
</div> |
|
|
|
|
<div id="collapseTwo" class="panel-collapse collapse"> |
|
|
|
|
<div class="panel-body"> |
|
|
|
|
<div style="padding: 10px"> |
|
|
|
|
<form enctype="multipart/form-data" id="fileUpload"> |
|
|
|
|
<input type="file" name="file"/> |
|
|
|
|
<input type="button" id="btnsubmit" value=" 上 传 " /> |
|
|
|
|
<input type="button" id="btnubmit" value=" 上 传 "/> |
|
|
|
|
</form> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
@ -72,21 +69,18 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="panel panel-default"> |
|
|
|
|
<div class="panel-heading"> |
|
|
|
|
<h4 class="panel-title"> |
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion" |
|
|
|
|
href="#collapseThree"> |
|
|
|
|
更新记录 |
|
|
|
|
<a data-toggle="collapse" data-parent="#accordion" href="#collapseThree"> |
|
|
|
|
发版记录 |
|
|
|
|
</a> |
|
|
|
|
</h4> |
|
|
|
|
</div> |
|
|
|
|
<div id="collapseThree" class="panel-collapse collapse in"> |
|
|
|
|
<div class="panel-body"> |
|
|
|
|
<div> |
|
|
|
|
2020年12月27日 :<br> |
|
|
|
|
2020年年终大版本更新,架构全面设计,代码全面重构,代码质量全面提升,二次开发更便捷,欢迎拉源码品鉴,提issue、pr共同建设 |
|
|
|
|
2020年年终大版本更新,架构全面设计,代码全面重构,代码质量全面提升,二次开发更便捷,欢迎拉源码品鉴,提issue、pr共同建设<br> |
|
|
|
|
1. 架构模块调整,大量的代码重构,代码质量提升N个等级,欢迎品鉴<br> |
|
|
|
|
2. 增强XML文件预览效果,新增XML文档数结构预览<br> |
|
|
|
|
3. 新增markdown文件预览支持,预览支持md渲染和源文本切换支持<br> |
|
|
|
@ -154,7 +148,7 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
2.项目github开源:<a href="https://github.com/kekingcn/kkFileView" target="_blank">https://github.com/kekingcn/kkFileView</a>
|
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="panel-body"> |
|
|
|
|
<div id="comments"></div> |
|
|
|
|
</div> |
|
|
|
@ -190,7 +184,7 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
url: '${baseUrl}deleteFile?fileName=' + encodeURIComponent(fileName), |
|
|
|
|
success: function (data) { |
|
|
|
|
// 删除完成,刷新table
|
|
|
|
|
if (1 == data.code) { |
|
|
|
|
if (1 === data.code) { |
|
|
|
|
alert(data.msg); |
|
|
|
|
} else { |
|
|
|
|
$('#table').bootstrapTable('refresh', {}); |
|
|
|
@ -201,6 +195,7 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$(function () { |
|
|
|
|
$('#table').bootstrapTable({ |
|
|
|
|
url: 'listFiles', |
|
|
|
@ -228,12 +223,12 @@ window.open('http://127.0.0.1:8012/picturesPreview?urls='+encodeURIComponent(bas
|
|
|
|
|
$(".loading_container").css("height", height).show(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
$("#btnsubmit").click(function () { |
|
|
|
|
$("#btnSubmit").click(function () { |
|
|
|
|
showLoadingDiv(); |
|
|
|
|
$("#fileUpload").ajaxSubmit({ |
|
|
|
|
success: function (data) { |
|
|
|
|
// 上传完成,刷新table
|
|
|
|
|
if (1 == data.code) { |
|
|
|
|
if (1 === data.code) { |
|
|
|
|
alert(data.msg); |
|
|
|
|
} else { |
|
|
|
|
$('#table').bootstrapTable('refresh', {}); |
|
|
|
|