|
@@ -11,7 +11,7 @@
|
|
|
<link rel='stylesheet' href='/static/js/luckysheet/plugins/plugins.css' />
|
|
|
<link rel='stylesheet' href='/static/js/luckysheet/css/luckysheet.css' />
|
|
|
<link rel='stylesheet' href='/static/js/luckysheet/assets/iconfont/iconfont.css' />
|
|
|
- <link charset="utf-8" rel="stylesheet" href="/static/css/layui.css?v=1.0.0">
|
|
|
+ <link charset="utf-8" rel="stylesheet" href="/static/css/layui.css">
|
|
|
<script>
|
|
|
var _PageHeight = document.documentElement.clientHeight,
|
|
|
_PageWidth = document.documentElement.clientWidth;
|
|
@@ -29,15 +29,15 @@
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
- <script src="/static/js/layui.js?v=1.0.0"></script>
|
|
|
+ <script src="/static/js/layui.js"></script>
|
|
|
<script src="/static/js/exceljs.js"></script>
|
|
|
<script src="/static/js/fileSave.js"></script>
|
|
|
<script src="/static/js/luckysheet/luckSheetExcel.js"></script>
|
|
|
<script src="/static/js/luckysheet/plugins/js/plugin.js"></script>
|
|
|
<script src="/static/js/luckysheet/luckysheet.umd.js"></script>
|
|
|
<script src="/static/js/api.config.js"></script>
|
|
|
- <script src="/static/js/util.js?v=1.0.0"></script>
|
|
|
- <script src="/static/js/url.js?v=1.0.0"></script>
|
|
|
+ <script src="/static/js/util.js"></script>
|
|
|
+ <script src="/static/js/url.js"></script>
|
|
|
<script src="/static/js/exportExcel.js"></script>
|
|
|
<script src="/static/js/fullScreen.js"></script>
|
|
|
</head>
|
|
@@ -75,11 +75,22 @@
|
|
|
<button id="share" class="btn btn-primary"
|
|
|
style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">分享
|
|
|
</button>
|
|
|
+ <button id="saves" lass="btn btn-primary"
|
|
|
+ style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>
|
|
|
</div>
|
|
|
<div style="float: right;padding-right: 10px" id="newShareBtn">
|
|
|
<button id="newShare" class="btn btn-primary"
|
|
|
style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">分享
|
|
|
</button>
|
|
|
+ <input id="importspro" type="file" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;"></input>
|
|
|
+ <button id="savesid" class="btn btn-primary"
|
|
|
+ style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">保存</button>
|
|
|
+ <button id="closeExcel" class="btn btn-primary"
|
|
|
+ style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">返回</button><button id="fullScreen"
|
|
|
+ class="btn btn-primary" style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">全屏显示</button><button
|
|
|
+ id="exitFullScreen" class="btn btn-primary"
|
|
|
+ style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px;display:none">退出全屏</button>
|
|
|
+ <button id="exports"class="btn btn-primary" style="padding:3px 6px;font-size: 18px;margin-right: 10px;width: 100px">导出</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style="height:90%;width: 100%;">
|
|
@@ -161,22 +172,17 @@
|
|
|
console.log(type);
|
|
|
if (type == '2') {
|
|
|
if (isAdmin) {
|
|
|
- toolBar += '<input id="imports" type="file" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;"></input>';
|
|
|
+ // toolBar += '<input id="importspro" type="file" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;"></input>';
|
|
|
}
|
|
|
}
|
|
|
- console.log(5);
|
|
|
if (isAdmin) {
|
|
|
- toolBar += '<button id="exports" class="btn btn-primary btn-danger" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">导出</button>';
|
|
|
+ // toolBar += '<button id="exports" class="btn btn-primary btn-danger" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">导出</button>';
|
|
|
}
|
|
|
- console.log(6);
|
|
|
- toolBar += '<button id="saves" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>';
|
|
|
- toolBar += '<button id="closeExcel" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">返回</button><button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">全屏显示</button><button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;display:none">退出全屏</button>';
|
|
|
+ // toolBar += '<button id="savesid" class="btn btn-primary btn-danger" style=" padding:3px 6px; font-size: 12px; margin-right: 10px;">保存</button>';
|
|
|
+ // toolBar += '<button id="closeExcel" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">返回</button><button id="fullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;">全屏显示</button><button id="exitFullScreen" class="btn btn-primary" style="padding:3px 6px;font-size: 12px;margin-right: 10px;display:none">退出全屏</button>';
|
|
|
var eJson = res.body.excelJson;
|
|
|
- console.log(7);
|
|
|
// var cellData = luckysheet.transToCellData(eJson[0].data);
|
|
|
- console.log(8);
|
|
|
// eJson[0].celldata = cellData;
|
|
|
- console.log(res.body.excelJson);
|
|
|
initExcel(res.body.excelJson, '', excelId);
|
|
|
}
|
|
|
});
|
|
@@ -198,7 +204,6 @@
|
|
|
fileName = name;
|
|
|
}
|
|
|
try {
|
|
|
- console.log(123);
|
|
|
luckysheet.create({
|
|
|
container: 'luckysheet',
|
|
|
data: data,
|
|
@@ -207,7 +212,7 @@
|
|
|
window.location.protocol +
|
|
|
"//43.138.50.94:7777" +
|
|
|
"/sheet/worksheet/" +
|
|
|
- ids + '/' +JSON.parse(window.sessionStorage.userInfo).loginNo,
|
|
|
+ ids + '/' + JSON.parse(window.sessionStorage.userInfo).loginNo,
|
|
|
loadSheetUrl:
|
|
|
window.location.protocol +
|
|
|
"//43.138.50.94:7777" +
|
|
@@ -303,7 +308,7 @@
|
|
|
cellFormat: false, // 设置单元格格式
|
|
|
mComplete: false,
|
|
|
mCetup: false,
|
|
|
- mRevoke: false,
|
|
|
+ mRevoke: false
|
|
|
},
|
|
|
hook: {
|
|
|
cellMousedown: function (a, b, c) {
|
|
@@ -338,11 +343,11 @@
|
|
|
}
|
|
|
if (emptyExcel == true) {
|
|
|
$("#shareBtn").show();
|
|
|
- $("#saves").hide();
|
|
|
+ // $("#saves").hide();
|
|
|
$("#newShareBtn").hide();
|
|
|
} else {
|
|
|
$("#shareBtn").hide();
|
|
|
- $("#saves").show();
|
|
|
+ // $("#saves").show();
|
|
|
if (isAdmin) {
|
|
|
$("#newShareBtn").show();
|
|
|
}
|
|
@@ -513,6 +518,7 @@
|
|
|
})
|
|
|
//分享
|
|
|
$('#share').off("click").click(function () {
|
|
|
+ console.log(123);
|
|
|
if (fullScreenState) {
|
|
|
fullScreenState = false;
|
|
|
$("#fullScreen").html('全屏显示');
|
|
@@ -522,6 +528,7 @@
|
|
|
});
|
|
|
//新增分享
|
|
|
$('#newShare').off("click").click(function () {
|
|
|
+ console.log(123);
|
|
|
if (fullScreenState) {
|
|
|
fullScreenState = false;
|
|
|
$("#fullScreen").html('全屏显示');
|
|
@@ -530,7 +537,7 @@
|
|
|
processShare(2);
|
|
|
});
|
|
|
// 保存
|
|
|
- $('#saves').off("click").click(function () {
|
|
|
+ $('#savesid').off("click").click(function () {
|
|
|
console.log(123);
|
|
|
// 当前工作表名
|
|
|
var excelId = $(window.parent.document).find("#excelId").attr("value");
|
|
@@ -607,7 +614,9 @@
|
|
|
exportExcel(luckysheet.getluckysheetfile(), excelName)
|
|
|
})
|
|
|
// 导入
|
|
|
- $("#imports").change(function (evt) {
|
|
|
+ $("#importspro").change(function (evt) {
|
|
|
+ var excelId = $(window.parent.document).find("#excelId").attr("value");
|
|
|
+ console.log(evt);
|
|
|
var files = evt.target.files;
|
|
|
if (files == null || files.length == 0) {
|
|
|
window.top.$vm.$message({
|
|
@@ -643,7 +652,7 @@
|
|
|
// 重新加载
|
|
|
var a = exportJson.sheets[0];
|
|
|
a.name = '';
|
|
|
- initExcel([a], name.replace('.xlsx', ''));
|
|
|
+ initExcel([a], name.replace('.xlsx', ''),excelId);
|
|
|
// 绑定按钮事件
|
|
|
initHandel()
|
|
|
}
|