|
@@ -28,6 +28,16 @@ $(function () {
|
|
|
projectObj.mainSpread.refresh();
|
|
|
refreshSubSpread();
|
|
|
});
|
|
|
+
|
|
|
+ const projectId = scUrlUtil.GetQueryString('project');
|
|
|
+ // 绑定点击事件
|
|
|
+ projectObj.mainSpread.bind(GC.Spread.Sheets.Events.CellClick, function(sender, info) {
|
|
|
+ if (info.row !== undefined && projectId !== undefined) {
|
|
|
+ setLocalCache('lastRow:' + projectId, info.row);
|
|
|
+ setLocalCache('lastCol:' + projectId, info.col);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
});
|
|
|
|
|
|
/**
|
|
@@ -85,12 +95,9 @@ function slideResize(rootElement, callback) {
|
|
|
callback();
|
|
|
drag = false;
|
|
|
// 存入本地缓存
|
|
|
- const storage = window.localStorage;
|
|
|
- if (storage) {
|
|
|
- const id = rootElement.attr('id');
|
|
|
- storage.setItem('topHeight:' + id, topChangeHeight);
|
|
|
- storage.setItem('bottomHeight:' + id, bottomChangeHeight);
|
|
|
- }
|
|
|
+ const id = rootElement.attr('id');
|
|
|
+ setLocalCache('topHeight:' + id, topChangeHeight);
|
|
|
+ setLocalCache('bottomHeight:' + id, bottomChangeHeight);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -103,12 +110,11 @@ function slideResize(rootElement, callback) {
|
|
|
* @return {void}
|
|
|
*/
|
|
|
function loadSize(tag, callback) {
|
|
|
- const storage = window.localStorage;
|
|
|
- if (!storage || tag === '') {
|
|
|
+ if (tag === '') {
|
|
|
return;
|
|
|
}
|
|
|
- const topHeight = storage.getItem('topHeight:' + tag);
|
|
|
- const bottomHeight = storage.getItem('bottomHeight:' + tag);
|
|
|
+ const topHeight = getLocalCache('topHeight:' + tag);
|
|
|
+ const bottomHeight = getLocalCache('bottomHeight:' + tag);
|
|
|
if (topHeight === null || bottomHeight === null) {
|
|
|
return;
|
|
|
}
|