mengshukeji
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
15 additions and
7 deletions
-
src/controllers/handler.js
-
src/controllers/imageCtrl.js
-
src/controllers/server.js
-
src/controllers/sheetBar.js
|
|
|
@ -2356,7 +2356,7 @@ export default function luckysheetHandler() { |
|
|
|
col = col_location[1], |
|
|
|
col_pre = col_location[0], |
|
|
|
col_index = col_location[2]; |
|
|
|
|
|
|
|
|
|
|
|
if ((x + 3) - Store.luckysheet_cols_change_size_start[0] > 30 && x < winW + scrollLeft - 100) { |
|
|
|
$("#luckysheet-change-size-line").css({ "left": x }); |
|
|
|
$("#luckysheet-cols-change-size").css({ "left": x - 2 }); |
|
|
|
|
|
|
|
@ -51,7 +51,7 @@ const imageCtrl = { |
|
|
|
copyImgItemObj: null, |
|
|
|
inserImg: function(src){ |
|
|
|
let _this = this; |
|
|
|
|
|
|
|
|
|
|
|
let rowIndex = Store.luckysheet_select_save[0].row_focus || 0; |
|
|
|
let colIndex = Store.luckysheet_select_save[0].column_focus || 0; |
|
|
|
let left = colIndex == 0 ? 0 : Store.visibledatacolumn[colIndex - 1]; |
|
|
|
|
|
|
|
@ -12,6 +12,7 @@ import { getSheetIndex } from '../methods/get'; |
|
|
|
import Store from '../store'; |
|
|
|
import locale from '../locale/locale'; |
|
|
|
import dayjs from "dayjs"; |
|
|
|
import imageCtrl from './imageCtrl'; |
|
|
|
|
|
|
|
const server = { |
|
|
|
gridKey: null, |
|
|
|
@ -163,16 +164,21 @@ const server = { |
|
|
|
|
|
|
|
//客户端接收服务端数据时触发
|
|
|
|
_this.websocket.onmessage = function(result){ |
|
|
|
let data = eval('(' + result.data + ')'); |
|
|
|
console.info(data); |
|
|
|
let type = data.type; |
|
|
|
|
|
|
|
Store.result = result |
|
|
|
let data = eval('(' + result.data + ')'); |
|
|
|
console.info(data); |
|
|
|
let type = data.type; |
|
|
|
let {message,id} = data; |
|
|
|
// 用户退出时,关闭协同编辑时其提示框
|
|
|
|
if(message === '用户退出') { |
|
|
|
$("#luckysheet-multipleRange-show-" + id).hide(); |
|
|
|
} |
|
|
|
if(type == 1){ //send 成功或失败
|
|
|
|
|
|
|
|
} |
|
|
|
else if(type == 2){ //更新数据
|
|
|
|
let item = JSON.parse(data.data); |
|
|
|
_this.wsUpdateMsg(item); |
|
|
|
_this.wsUpdateMsg(item); |
|
|
|
} |
|
|
|
else if(type == 3){ //多人操作不同选区("t": "mv")(用不同颜色显示其他人所操作的选区)
|
|
|
|
let id = data.id; |
|
|
|
|
|
|
|
@ -206,6 +206,8 @@ export function initialSheetBar(){ |
|
|
|
|
|
|
|
let $t = $(this), $cur = $(e.target); |
|
|
|
luckysheetsheetrightclick($t, $cur, e); |
|
|
|
let result = Store.result |
|
|
|
server.websocket.onmessage(result) |
|
|
|
}); |
|
|
|
|
|
|
|
let luckysheetsheetnameeditor = function ($t) { |
|
|
|
|