Giter Site home page Giter Site logo

logiai / luckysheet_django Goto Github PK

View Code? Open in Web Editor NEW

This project forked from blue-fatman/luckysheet_django

0.0 0.0 0.0 13.85 MB

luckysheet + python +django后台实现多人在线协同操作excel

Home Page: http://49.234.35.155:8080/luckysheetindex/

Python 0.41% CSS 5.59% JavaScript 84.32% HTML 9.66% Batchfile 0.03%

luckysheet_django's Introduction

luckysheet_django

luckysheet + django实现多人在线协同操作excel

演示地址 http://49.234.35.155:8080/luckysheetindex/

QQ交流群: 697107880

使用起步:
1、安装python3.7
2、安装jdk,建议jdk8,因为我使用的就是该版本,因为当前py3的解压有bug (https://bugs.python.org/issue24301)
3、安装node.js
    安装
    npm install
    npm install gulp -g
    开发
    npm run dev
    打包
    npm run build

解决大图片无法通过wss传输的方法:

源码 https://github.com/mengshukeji/Luckysheet
解决方案:
        1.首先config里面添加自定义图片的发送配置
        2.把该配置添加到core.js里面
        3.添加一个自定义js文件,把发送图片函数写进去
        4.server.js里面修改原来的wss发送配置

详细修改如下: ######1、 config里面添加自定义图片的发送配置, 点击查看config.js

bigImageUpdateMethod:{"method":"POST", "url":"http://127.0.0.1:8000/luckysheetupdateurl"},  //自定义前端大图片大发送方式

config配置 ######2、 把该配置添加到core.js里面, 点击查看core.js

luckysheetConfigsetting.bigImageSendMethod = extendsetting.bigImageUpdateMethod;

core自定义图片配置 ######3、 src/controllers/里面添加一个自定义js文件,把发送图片函数写进去 代码块较多,详细请查看 src/controllers/imageUpdateCtrl.js

自定义图片发送方式

######4、 src/controllers/server.js 里面修改原来的wss发送配置 4.1 顶部导入所需变量、函数

import luckysheetConfigsetting from './luckysheetConfigsetting';
import {customBigImageUpdate} from './bigImageUpdate'

4.2 修改wss发送方式,代码较多,详细参考 src/controllers/server.js

自定义图片发送方式 自定义图片发送方式

初始化加载excel的效果图加载失败

1、 src\controllers\constant.js 里面将加载图片的路径改为 image://static/css/loading.gif

后台数据是如何保存的

1、 通过新页面上传,通过toJson的aip获取到数据,发送给后台,后台一边保存mysql一边放至redis
2、 如果是新进来的excel则全部放到redis里面,如果是已经有的,则更新已有的值
3、 定时从redis里面把每一个excel记录固化到mysql数据库中
4、 重新进入excel编辑的时候,通过gridekey从redis/mysql 获取最新的excel内容
键值更新方法:先获取sheet索引,然后再获取到具体的一个小格子位置,如果有则更新,没有则新增

当前问题

1、新建一个sheet页的时候,如果别的客户端不点击这个新页面一下电话,那新建一方在新sheet页面的修改就不会被同步到其他客户端。因此别的客户端必须点击 一下新的sheet页,才能把新sheet页的修改同步过来。--2021/02/01

2、筛选功能,当前只能把添加筛选功能同步到其他客户端,无法把去除筛选功能同步到其他客户端。--2021/02/01

3、当前由于py3的gzip的bug冲突,所以暂时解压数据得使用java包了,gzip的bug --2021/02/01

已解决问题

1、多人协同的时候,无法做到同步,卡在了返回值的这一步,返回格式未能对齐,单双引号导致的 --2021/02/01-问题已解决

luckysheet_django's People

Contributors

blue-fatman avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.