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/server.js
-
src/controllers/sheetBar.js
|
|
|
@ -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,10 +164,15 @@ const server = { |
|
|
|
|
|
|
|
//客户端接收服务端数据时触发
|
|
|
|
_this.websocket.onmessage = function(result){ |
|
|
|
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 成功或失败
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@ -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) { |
|
|
|
|