Browse Source

修改了部分源码实现在线编辑

luckysheet-xiaowang-Intelligen
mk 10 months ago
parent
commit
5dfa99b2ff
  1. 2
      public/luckysheet/css/luckysheet.css
  2. 42
      public/luckysheet/demoData/demoFeature.js
  3. 1578
      public/luckysheet/demoData/sheetCell.js
  4. 4918
      public/luckysheet/demoData/sheetChart.js
  5. 67
      public/luckysheet/demoData/sheetComment.js
  6. 6541
      public/luckysheet/demoData/sheetConditionFormat.js
  7. 579
      public/luckysheet/demoData/sheetDataVerification.js
  8. 6600
      public/luckysheet/demoData/sheetFormula.js
  9. 159
      public/luckysheet/demoData/sheetPicture.js
  10. 189
      public/luckysheet/demoData/sheetPivotTable.js
  11. 741
      public/luckysheet/demoData/sheetPivotTableData.js
  12. 7066
      public/luckysheet/demoData/sheetSparkline.js
  13. 1068
      public/luckysheet/demoData/sheetTable.js
  14. 1944
      public/luckysheet/index.html
  15. 128
      public/luckysheet/luckysheet.umd.js
  16. 6
      public/luckysheet/luckysheet.umd.js.map
  17. 46
      src/views/modules/base/smartExcel/cpts/excel-view.vue
  18. 52
      src/views/modules/base/smartExcel/index.vue

2
public/luckysheet/css/luckysheet.css

File diff suppressed because one or more lines are too long

42
public/luckysheet/demoData/demoFeature.js

@ -0,0 +1,42 @@
// Features specially written for demo
(function() {
// language
function language(params) {
var lang = navigator.language||navigator.userLanguage;//常规浏览器语言和IE浏览器
lang = lang.substr(0, 2);//截取lang前2位字符
return lang;
}
// Tencent Forum Link Button
function supportButton() {
const text = language() === 'zh' ? '反馈' : 'Forum';
const link = language() === 'zh' ? 'https://support.qq.com/product/288322' : 'https://groups.google.com/g/luckysheet';
document.querySelector("body").insertAdjacentHTML('beforeend', '<a id="container" href="'+ link +'" target="_blank" style="z-index:2;width:50px;height:50px;line-height:50px;position:fixed;right:40px;bottom:86px;border-radius:50px;cursor:pointer;background:rgb(71,133,249);color:#fff;text-align:center;text-decoration:none;">'+ text +'</a>');
}
supportButton()
/**
* Get url parameters
*/
function getRequest() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi,
function(m,key,value) {
vars[key] = value;
});
return vars;
}
window.luckysheetDemoUtil = {
language:language,
getRequest:getRequest
}
})()

1578
public/luckysheet/demoData/sheetCell.js

File diff suppressed because one or more lines are too long

4918
public/luckysheet/demoData/sheetChart.js

File diff suppressed because it is too large

67
public/luckysheet/demoData/sheetComment.js

@ -0,0 +1,67 @@
window.sheetComment = {
"name": "Comment",
"color": "",
"config": {
"columnlen": {
"2": 102
}
},
"index": "5",
"chart": [],
"status": 0,
"order": "5",
"column": 18,
"row": 36,
"celldata": [{
"r": 2,
"c": 2,
"v": {
"m": "HoverShown",
"ct": {
"fa": "General",
"t": "g"
},
"v": "HoverShown",
"bl": 1,
"ps": {
"left": null,
"top": null,
"width": null,
"height": null,
"value": "Hello world!",
"isshow": false
}
}
}, {
"r": 7,
"c": 2,
"v": {
"m": "Size",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Size",
"bl": 1,
"ps": {
"left": null,
"top": null,
"width": null,
"height": null,
"value": "Hello,world!",
"isshow": true
}
}
}],
"ch_width": 4748,
"rh_height": 1790,
"luckysheet_select_save": [{
"row": [0, 0],
"column": [0, 0]
}],
"luckysheet_selection_range": [],
"scrollLeft": 0,
"scrollTop": 0
}
// export default sheetComment;

6541
public/luckysheet/demoData/sheetConditionFormat.js

File diff suppressed because it is too large

579
public/luckysheet/demoData/sheetDataVerification.js

@ -0,0 +1,579 @@
window.sheetDataVerification = {
"name": "Data Verification",
"index": "Sheet_pdolzzie5xwi_1600927444446",
"celldata": [{"r":0,"c":0,"v":{"ct":{"fa":"General","t":"g"},"m":"Drop Down List","v":"Drop Down List","bl":1}},{"r":0,"c":1,"v":{"m":"Checkbox","ct":{"fa":"General","t":"g"},"v":"Checkbox","bl":1}},{"r":0,"c":2,"v":{"ct":{"fa":"General","t":"g"},"v":"Number between 1-10","bl":1,"m":"Number between 1-10"}},{"r":0,"c":3,"v":{"m":"Text content include Luckysheet","ct":{"fa":"General","t":"g"},"v":"Text content include Luckysheet","bl":1}},{"r":0,"c":4,"v":{"ct":{"fa":"General","t":"g"},"v":"Text length between 1-5","m":"Text length between 1-5","bl":1}},{"r":0,"c":5,"v":{"m":"Date","ct":{"fa":"General","t":"g"},"v":"Date","bl":1}},{"r":0,"c":6,"v":{"m":"Identification Number","ct":{"fa":"General","t":"g"},"v":"Identification Number","bl":1}},{"r":0,"c":7,"v":{"m":"Phone Number","ct":{"fa":"General","t":"g"},"v":"Phone Number","bl":1}},{"r":1,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Fix","m":"Fix"}},{"r":1,"c":1,"v":{"m":"Fail","ct":{"fa":"General","t":"g"},"v":"Fail"}},{"r":1,"c":2,"v":{"v":1,"ct":{"fa":"General","t":"n"},"m":"1"}},{"r":1,"c":3,"v":{"m":"Luckysheet is good","ct":{"fa":"General","t":"g"},"v":"Luckysheet is good"}},{"r":1,"c":4,"v":{"m":"Welcome","ct":{"fa":"General","t":"g"},"v":"Welcome"}},{"r":1,"c":5,"v":{"m":"2020-09-24","ct":{"fa":"yyyy-MM-dd","t":"d"},"v":44098}},{"r":1,"c":6,"v":{"v":"311414199009138910","ct":{"fa":"@","t":"s"},"m":"311414199009138910"}},{"r":1,"c":7,"v":{"v":13678765439,"ct":{"fa":"General","t":"n"},"m":"13678765439"}},{"r":2,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Done","m":"Done"}},{"r":2,"c":1,"v":{"m":"Pass","ct":{"fa":"General","t":"g"},"v":"Pass"}},{"r":2,"c":2,"v":{"v":2,"ct":{"fa":"General","t":"n"},"m":"2"}},{"r":2,"c":3,"v":{"m":"I am Luckysheet","ct":{"fa":"General","t":"g"},"v":"I am Luckysheet"}},{"r":2,"c":4,"v":{"m":"Good","ct":{"fa":"General","t":"g"},"v":"Good"}},{"r":2,"c":5,"v":{"ct":{"fa":"General","t":"g"},"v":"Time","m":"Time"}},{"r":2,"c":6,"v":{"v":"31141419900913891","ct":{"fa":"@","t":"s"},"m":"31141419900913891"}},{"r":2,"c":7,"v":{"v":1367876544,"ct":{"fa":"General","t":"n"},"m":"1367876544"}},{"r":3,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Develop","m":"Develop"}},{"r":3,"c":1,"v":{"m":"Fail","ct":{"fa":"General","t":"g"},"v":"Fail"}},{"r":3,"c":2,"v":{"v":5,"ct":{"fa":"General","t":"n"},"m":"5"}},{"r":3,"c":3,"v":{"ct":{"fa":"General","t":"g"},"v":"I am luckyDemo","m":"I am luckyDemo"}},{"r":3,"c":4,"v":{"m":"Nice","ct":{"fa":"General","t":"g"},"v":"Nice"}},{"r":3,"c":5,"v":{"m":"2020-09-26","ct":{"fa":"yyyy-MM-dd","t":"d"},"v":44100}},{"r":3,"c":6,"v":{"v":"3114141990091389102","ct":{"fa":"@","t":"s"},"m":"3114141990091389102"}},{"r":3,"c":7,"v":{"v":136787654412,"ct":{"fa":"##0","t":"n"},"m":"136787654412"}},{"r":4,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Doing","m":"Doing"}},{"r":4,"c":1,"v":{"m":"Fail","ct":{"fa":"General","t":"g"},"v":"Fail"}},{"r":4,"c":2,"v":{"v":11,"ct":{"fa":"General","t":"n"},"m":"11"}},{"r":4,"c":3,"v":{"ct":{"fa":"General","t":"g"},"v":"Luckysheet Documentation","m":"Luckysheet Documentation"}},{"r":4,"c":4,"v":{"ct":{"fa":"General","t":"g"},"v":"Morning","m":"Morning"}},{"r":4,"c":5,"v":{"m":"2020-09-27","ct":{"fa":"yyyy-MM-dd","t":"d"},"v":44101}},{"r":4,"c":6,"v":{"v":"31141419900913891X","ct":{"fa":"@","t":"s"},"m":"31141419900913891X"}},{"r":4,"c":7,"v":{"v":49865342456,"ct":{"fa":"General","t":"n"},"m":"49865342456"}},{"r":5,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Develop","m":"Develop"}},{"r":5,"c":1,"v":{"m":"Fail","ct":{"fa":"General","t":"g"},"v":"Fail"}},{"r":5,"c":2,"v":{"v":3,"ct":{"fa":"General","t":"n"},"m":"3"}},{"r":5,"c":3,"v":{"m":"Luckyexcel","ct":{"fa":"General","t":"g"},"v":"Luckyexcel"}},{"r":5,"c":4,"v":{"ct":{"fa":"General","t":"g"},"v":"Tomorrow","m":"Tomorrow"}},{"r":5,"c":5,"v":{"ct":{"fa":"yyyy-MM-dd","t":"d"},"v":44071,"m":"2020-08-28"}},{"r":5,"c":6,"v":{"v":"Number","ct":{"fa":"@","t":"s"},"m":"Number"}},{"r":5,"c":7,"v":{"v":"Number","ct":{"fa":"General","t":"g"},"m":"Number"}},{"r":6,"c":0,"v":{"ct":{"fa":"General","t":"g"},"v":"Done","m":"Done"}},{"r":6,"c":1,"v":{"m":"Pass","ct":{"fa":"General","t":"g"},"v":"Pass"}},{"r":6,"c":2,"v":{"v":0,"ct":{"fa":"General","t":"n"},"m":"0"}},{"r":6,"c":3,"v":{"m":"Luckysheet Online","ct":{"fa":"General","t":"g"},"v":"Luckysheet Online"}},{"r":6,"c":4,"v":{"m":"Three","ct":{"fa":"General","t":"g"},"v":"Three"}},{"r":6,"c":5,"v":{"m":"2020-09-29","ct":{"fa":"yyyy-MM-dd","t":"d"},"v":44103}},{"r":6,"c":6,"v":{"v":"311414199301118910","ct":{"fa":"@","t":"s"},"m":"311414199301118910"}},{"r":6,"c":7,"v":{"v":23309873564,"ct":{"fa":"General","t":"n"},"m":"23309873564"}},{"r":7,"c":8,"v":{"v":null,"ct":{"fa":"General","t":"g"},"bl":1}}],
"row": 84,
"column": 60,
"config": {
"merge": {},
"rowlen": {},
"columnlen": {
"0": 109,
"2": 143,
"3": 200,
"4": 180,
"6": 178,
"7": 125
},
"customWidth": {
"2": 1,
"3": 1,
"4": 1,
"6": 1,
"7": 1
}
},
"luckysheet_select_save": [
{
"left": 963,
"width": 125,
"top": 240,
"height": 19,
"left_move": 963,
"width_move": 125,
"top_move": 240,
"height_move": 19,
"row": [
12,
12
],
"column": [
7,
7
],
"row_focus": 12,
"column_focus": 7
}
],
"dataVerification": {
"1_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"2_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"3_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"4_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"5_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"6_0": {
"type": "dropdown",
"type2": null,
"value1": "Develop,Fix,Done",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"1_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": false,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"2_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": true,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"3_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": false,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"4_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": false,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"5_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": false,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"6_1": {
"type": "checkbox",
"type2": null,
"value1": "Pass",
"value2": "Fail",
"checked": true,
"remote": true,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"1_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"2_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"3_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"4_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"5_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"6_2": {
"type": "number",
"type2": "bw",
"value1": "1",
"value2": "10",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"1_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"2_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"3_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"4_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"5_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"6_3": {
"type": "text_content",
"type2": "include",
"value1": "Luckysheet",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": true,
"hintText": "include Luckysheet"
},
"1_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"2_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"3_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"4_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"5_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"6_4": {
"type": "text_length",
"type2": "bw",
"value1": "1",
"value2": "5",
"checked": false,
"remote": false,
"prohibitInput": true,
"hintShow": false,
"hintText": ""
},
"1_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"2_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"3_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"4_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"5_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"6_5": {
"type": "date",
"type2": "bw",
"value1": "2020-09-23",
"value2": "2020-10-10",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"1_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"2_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"3_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"4_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"5_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"6_6": {
"type": "validity",
"type2": "card",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"1_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"2_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"3_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"4_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"5_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
},
"6_7": {
"type": "validity",
"type2": "phone",
"value1": "",
"value2": "",
"checked": false,
"remote": false,
"prohibitInput": false,
"hintShow": false,
"hintText": ""
}
}
}
// export default sheetDataVerification;

6600
public/luckysheet/demoData/sheetFormula.js

File diff suppressed because it is too large

159
public/luckysheet/demoData/sheetPicture.js

File diff suppressed because one or more lines are too long

189
public/luckysheet/demoData/sheetPivotTable.js

@ -0,0 +1,189 @@
window.sheetPivotTable = {
"name": "PivotTable",
"color": "",
"config": {},
"index": "7",
"chart": [],
"status": 0,
"order": "7",
"column": 18,
"row": 36,
"celldata": [{
"r": 0,
"c": 0,
"v": "count:score"
}, {
"r": 0,
"c": 1,
"v": "science"
}, {
"r": 0,
"c": 2,
"v": "mathematics"
}, {
"r": 0,
"c": 3,
"v": "foreign language"
}, {
"r": 0,
"c": 4,
"v": "English"
}, {
"r": 0,
"c": 5,
"v": "total"
}, {
"r": 1,
"c": 0,
"v": "Alex"
}, {
"r": 1,
"c": 1,
"v": 1
}, {
"r": 1,
"c": 2,
"v": 1
}, {
"r": 1,
"c": 3,
"v": 1
}, {
"r": 1,
"c": 4,
"v": 1
}, {
"r": 1,
"c": 5,
"v": 4
}, {
"r": 2,
"c": 0,
"v": "Joy"
}, {
"r": 2,
"c": 1,
"v": 1
}, {
"r": 2,
"c": 2,
"v": 1
}, {
"r": 2,
"c": 3,
"v": 1
}, {
"r": 2,
"c": 4,
"v": 1
}, {
"r": 2,
"c": 5,
"v": 4
}, {
"r": 3,
"c": 0,
"v": "Tim"
}, {
"r": 3,
"c": 1,
"v": 1
}, {
"r": 3,
"c": 2,
"v": 1
}, {
"r": 3,
"c": 3,
"v": 1
}, {
"r": 3,
"c": 4,
"v": 1
}, {
"r": 3,
"c": 5,
"v": 4
}, {
"r": 4,
"c": 0,
"v": "total"
}, {
"r": 4,
"c": 1,
"v": 3
}, {
"r": 4,
"c": 2,
"v": 3
}, {
"r": 4,
"c": 3,
"v": 3
}, {
"r": 4,
"c": 4,
"v": 3
}, {
"r": 4,
"c": 5,
"v": 12
}],
"ch_width": 4748,
"rh_height": 1790,
"luckysheet_select_save": [{
"row": [0, 0],
"column": [0, 0]
}],
"luckysheet_selection_range": [],
"scrollLeft": 0,
"scrollTop": 0,
"isPivotTable": true,
"pivotTable": {
"pivot_select_save": {
"left": 0,
"width": 73,
"top": 0,
"height": 19,
"left_move": 0,
"width_move": 369,
"top_move": 0,
"height_move": 259,
"row": [0, 12],
"column": [0, 4],
"row_focus": 0,
"column_focus": 0
},
"pivotDataSheetIndex": 6, //The sheet index where the source data is located
"column": [{
"index": 3,
"name": "subject",
"fullname": "subject"
}],
"row": [{
"index": 1,
"name": "student",
"fullname": "student"
}],
"filter": [],
"values": [{
"index": 4,
"name": "score",
"fullname": "count:score",
"sumtype": "COUNTA",
"nameindex": 0
}],
"showType": "column",
"pivotDatas": [
["count:score", "science", "mathematics", "foreign language", "English", "total"],
["Alex", 1, 1, 1, 1, 4],
["Joy", 1, 1, 1, 1, 4],
["Tim", 1, 1, 1, 1, 4],
["total", 3, 3, 3, 3, 12]
],
"drawPivotTable": false,
"pivotTableBoundary": [5, 6]
}
}
// export default sheetPivotTable;

741
public/luckysheet/demoData/sheetPivotTableData.js

@ -0,0 +1,741 @@
window.sheetPivotTableData = {
"name": "PivotTableData",
"color": "",
"config": {
"merge": {}
},
"index": "6",
"chart": [],
"status": 0,
"order": "6",
"hide": 0,
"column": 18,
"row": 36,
"celldata": [{
"r": 0,
"c": 0,
"v": {
"m": "Mock test",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Mock test"
}
}, {
"r": 0,
"c": 1,
"v": {
"m": "student",
"ct": {
"fa": "General",
"t": "g"
},
"v": "student"
}
}, {
"r": 0,
"c": 2,
"v": {
"m": "class",
"ct": {
"fa": "General",
"t": "g"
},
"v": "class"
}
}, {
"r": 0,
"c": 3,
"v": {
"m": "subject",
"ct": {
"fa": "General",
"t": "g"
},
"v": "subject"
}
}, {
"r": 0,
"c": 4,
"v": {
"m": "score",
"ct": {
"fa": "General",
"t": "g"
},
"v": "score"
}
}, {
"r": 1,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 1,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Joy",
"m": "Joy"
}
}, {
"r": 1,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 1,
"c": 3,
"v": {
"m": "English",
"ct": {
"fa": "General",
"t": "g"
},
"v": "English"
}
}, {
"r": 1,
"c": 4,
"v": {
"v": 96,
"ct": {
"fa": "General",
"t": "n"
},
"m": "96"
}
}, {
"r": 2,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 2,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Joy",
"m": "Joy"
}
}, {
"r": 2,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 2,
"c": 3,
"v": {
"m": "mathematics",
"ct": {
"fa": "General",
"t": "g"
},
"v": "mathematics"
}
}, {
"r": 2,
"c": 4,
"v": {
"v": 110,
"ct": {
"fa": "General",
"t": "n"
},
"m": "110"
}
}, {
"r": 3,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 3,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Joy",
"m": "Joy"
}
}, {
"r": 3,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 3,
"c": 3,
"v": {
"m": "foreign language",
"ct": {
"fa": "General",
"t": "g"
},
"v": "foreign language"
}
}, {
"r": 3,
"c": 4,
"v": {
"v": 87,
"ct": {
"fa": "General",
"t": "n"
},
"m": "87"
}
}, {
"r": 4,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 4,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Joy",
"m": "Joy"
}
}, {
"r": 4,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 4,
"c": 3,
"v": {
"m": "science",
"ct": {
"fa": "General",
"t": "g"
},
"v": "science"
}
}, {
"r": 4,
"c": 4,
"v": {
"v": 266,
"ct": {
"fa": "General",
"t": "n"
},
"m": "266"
}
}, {
"r": 5,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 5,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Tim",
"m": "Tim"
}
}, {
"r": 5,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 5,
"c": 3,
"v": {
"m": "English",
"ct": {
"fa": "General",
"t": "g"
},
"v": "English"
}
}, {
"r": 5,
"c": 4,
"v": {
"v": 92,
"ct": {
"fa": "General",
"t": "n"
},
"m": "92"
}
}, {
"r": 6,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 6,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Tim",
"m": "Tim"
}
}, {
"r": 6,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 6,
"c": 3,
"v": {
"m": "mathematics",
"ct": {
"fa": "General",
"t": "g"
},
"v": "mathematics"
}
}, {
"r": 6,
"c": 4,
"v": {
"v": 100,
"ct": {
"fa": "General",
"t": "n"
},
"m": "100"
}
}, {
"r": 7,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 7,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Tim",
"m": "Tim"
}
}, {
"r": 7,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 7,
"c": 3,
"v": {
"m": "foreign language",
"ct": {
"fa": "General",
"t": "g"
},
"v": "foreign language"
}
}, {
"r": 7,
"c": 4,
"v": {
"v": 90,
"ct": {
"fa": "General",
"t": "n"
},
"m": "90"
}
}, {
"r": 8,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 8,
"c": 1,
"v": {
"ct": {
"fa": "General",
"t": "g"
},
"v": "Tim",
"m": "Tim"
}
}, {
"r": 8,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 8,
"c": 3,
"v": {
"m": "science",
"ct": {
"fa": "General",
"t": "g"
},
"v": "science"
}
}, {
"r": 8,
"c": 4,
"v": {
"v": 255,
"ct": {
"fa": "General",
"t": "n"
},
"m": "255"
}
}, {
"r": 9,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 9,
"c": 1,
"v": {
"m": "Alex",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Alex"
}
}, {
"r": 9,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 9,
"c": 3,
"v": {
"m": "English",
"ct": {
"fa": "General",
"t": "g"
},
"v": "English"
}
}, {
"r": 9,
"c": 4,
"v": {
"v": 108,
"ct": {
"fa": "General",
"t": "n"
},
"m": "108"
}
}, {
"r": 10,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 10,
"c": 1,
"v": {
"m": "Alex",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Alex"
}
}, {
"r": 10,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 10,
"c": 3,
"v": {
"m": "mathematics",
"ct": {
"fa": "General",
"t": "g"
},
"v": "mathematics"
}
}, {
"r": 10,
"c": 4,
"v": {
"v": 117,
"ct": {
"fa": "General",
"t": "n"
},
"m": "117"
}
}, {
"r": 11,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 11,
"c": 1,
"v": {
"m": "Alex",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Alex"
}
}, {
"r": 11,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 11,
"c": 3,
"v": {
"m": "foreign language",
"ct": {
"fa": "General",
"t": "g"
},
"v": "foreign language"
}
}, {
"r": 11,
"c": 4,
"v": {
"v": 88,
"ct": {
"fa": "General",
"t": "n"
},
"m": "88"
}
}, {
"r": 12,
"c": 0,
"v": {
"m": "first round",
"ct": {
"fa": "General",
"t": "g"
},
"v": "first round"
}
}, {
"r": 12,
"c": 1,
"v": {
"m": "Alex",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Alex"
}
}, {
"r": 12,
"c": 2,
"v": {
"m": "Class one",
"ct": {
"fa": "General",
"t": "g"
},
"v": "Class one"
}
}, {
"r": 12,
"c": 3,
"v": {
"m": "science",
"ct": {
"fa": "General",
"t": "g"
},
"v": "science"
}
}, {
"r": 12,
"c": 4,
"v": {
"v": 278,
"ct": {
"fa": "General",
"t": "n"
},
"m": "278"
}
}],
"ch_width": 4748,
"rh_height": 1790,
"luckysheet_select_save": [{
"row": [0, 0],
"column": [0, 0]
}],
"luckysheet_selection_range": [],
"scrollLeft": 0,
"scrollTop": 0
}
// export default sheetPivotTableData;

7066
public/luckysheet/demoData/sheetSparkline.js

File diff suppressed because it is too large

1068
public/luckysheet/demoData/sheetTable.js

File diff suppressed because it is too large

1944
public/luckysheet/index.html

File diff suppressed because one or more lines are too long

128
public/luckysheet/luckysheet.umd.js

File diff suppressed because one or more lines are too long

6
public/luckysheet/luckysheet.umd.js.map

File diff suppressed because one or more lines are too long

46
src/views/modules/base/smartExcel/cpts/excel-view.vue

@ -76,34 +76,43 @@ export default {
},
watch: {},
mounted() {
this.initSocket()
this.loadWorkBook()
// this.initSocket()
this.$nextTick(()=>{
this.loadWorkBook()
})
},
methods: {
async loadWorkBook() {
const data = await this.$http.post(`/actual/base/luckySheet/workbook/load?workbookId=${this.workbookId}`)
loadWorkBook() {
// const { data, code, msg } = await requestPost(`/actual/base/luckySheet/workbook/load?workbookId=${this.workbookId}`)
// if (code === 0) {
window.luckysheet.destroy();
options.data = data.data;
// options.title = data.fileName;
const {id} = this.$store.state.user;
options.gridKey = this.workbookId;
options.allowUpdate = true;
options.loadUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/load?workbookId=${this.workbookId}`
options.updateUrl = `ws://219.146.91.110:30801/api/actual/base/ws/luckysheet/${this.workbookId}/${id}`
options.loadSheetUrl = `http://219.146.91.110:30801/api/actual/base/luckySheet/workbook/loadSheets?workbookId=${this.workbookId}`
window.luckysheet.create({
...options,
hook: {
cellEditBefore: this.handleCellEditBefore,
updated: this.handleCellUpdateBefore,
// cellUpdateBefore: this.handleCellUpdateBefore,
sheetCreateAfter: this.handleSheetCreateAfter,
cellUpdated: this.handleCellUpdated,
// cellUpdated: this.handleCellUpdated,
},
});
// } else {
// console.log(msg);
// }
},
handleSheetCreateAfter(e) {
console.log('setsheet', e);
},
isOpen(ws) {
return ws.readyState === ws.OPEN
},
initSocket() {
const {id} = this.$store.state.user;//${location.origin}
const token = localStorage.getItem("token")
this.socket = new WebSocket(`ws://219.146.91.110:30801/api/actual/base/ws/luckysheet/${this.workbookId}/${id}`,token);
this.socket = new WebSocket(`ws://192.168.1.144/api/actual/base/ws/luckysheet/${this.workbookId}/${id}`,token);
this.socket.addEventListener('open', () => {
console.log('WebSocket连接已打开');
});
@ -114,17 +123,15 @@ export default {
});
},
sendMessage(message) {
if (this.isOpen(this.socket)) {
this.socket.send(JSON.stringify(message));
} else {
console.info('链接已经断开');
}
this.socket.send(JSON.stringify(message));
this.newMessage = '';
},
handleClickMenu(i) {
this.menuActive = i;
},
loadExcel() {
var url = 'http://localhost:9001/epmet-work-pc/test.xlsx'
var that = this
fetch(url).then(response => response.blob()) // Blob
.then(blob => {
@ -174,10 +181,9 @@ export default {
let obj = {
r,
c,
t:'v',
...newValue
}
this.sendMessage(obj)
// this.sendMessage(obj)
},
handleCellEditBefore(e) {
console.log(e, '--11')
@ -185,8 +191,8 @@ export default {
this.selectedCell = "第" + row + "行" + "第" + column + "列";
},
handleCellUpdateBefore(e) {
console.log(e);
handleCellUpdateBefore() {
this.selectedCell = "";
},
handleTabClick(tab, event) {
console.log(tab, event);

52
src/views/modules/base/smartExcel/index.vue

@ -4,36 +4,36 @@
<div class="m-search">
<el-form :inline="true" :model="formData" ref="ref_searchform" :label-width="'100px'">
<div>
<el-form-item label="发布组织" prop="agencyId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model.trim="formData.agencyId"
<el-form-item label="发布组织" prop="orgId">
<el-cascader class="u-item-width-normal" size="small" ref="myCascader" v-model.trim="formData.orgId"
:options="orgOptions" :props="orgOptionProps" :show-all-levels="false" @change="handleChangeAgency"
clearable></el-cascader>
</el-form-item>
<el-form-item label="任务主题" prop="eventContent">
<el-input v-model.trim="formData.eventContent" class="u-item-width-normal" size="small" clearable
<el-form-item label="任务主题" prop="taskTitle">
<el-input v-model.trim="formData.taskTitle" class="u-item-width-normal" size="small" clearable
placeholder="请输入">
</el-input>
</el-form-item>
<el-form-item label="创建时间" prop="startTime">
<el-date-picker v-model.trim="formData.startTime" :picker-options="startPickerOptions"
<el-form-item label="创建时间" prop="taskIntroduction">
<el-date-picker v-model.trim="formData.taskIntroduction" :picker-options="startPickerOptions"
class="u-item-width-daterange" size="small" type="date" value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd" placeholder="开始时间">
</el-date-picker>
<span class="u-data-tag"></span>
<el-date-picker v-model.trim="formData.endTime" :picker-options="endPickerOptions"
<el-date-picker v-model.trim="formData.startTime" :picker-options="endPickerOptions"
class="u-item-width-daterange u-data-tag" size="small" type="date" value-format="yyyy-MM-dd HH:mm:ss"
value="yyyy-MM-dd" placeholder="结束时间">
</el-date-picker>
</el-form-item>
<el-form-item label="状态" prop="status">
<!-- <el-form-item label="状态" prop="status">
<el-select class="u-item-width-normal" v-model.trim="formData.status" placeholder="请选择" size="small"
clearable>
<el-option v-for="item in statusArray" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
</el-form-item> -->
<el-row>
<el-col :span="24" align="right">
@ -71,7 +71,7 @@
<el-table-column prop="name" align="center" width="100" label="任务状态" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="satisfactionName" align="center" width="100" label="创建人" :show-overflow-tooltip="true">
<el-table-column prop="createdBy" align="center" width="100" label="创建人" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="happenTime" align="center" width="140" :show-overflow-tooltip="true" label="创建时间">
@ -119,12 +119,12 @@ export default {
let endDisabledDate = (time) => {
//datareturn
let nowData = Date.now();
if (this.formData.startTime) {
let startTime = new Date(this.formData.startTime);
if (this.formData.taskIntroduction) {
let taskIntroduction = new Date(this.formData.taskIntroduction);
return (
time.getTime() > nowData ||
time.getTime() < startTime ||
time.getTime() === startTime
time.getTime() < taskIntroduction ||
time.getTime() === taskIntroduction
);
} else {
return time.getTime() > nowData;
@ -147,24 +147,14 @@ export default {
pageType: "list", // list add info
tableData: [],
formData: {
agencyId: '',
eventContent: '',
startTime: '',
endTime: '',
status: ''
orgId: '',//Id
taskTitle:'',//
taskType: '',//
taskIntroduction: '',//
startTime: '',//
createdBy:''//
},
statusArray: [
{
label: '1',
value: '1'
}, {
label: '2',
value: '2'
}, {
label: '3',
value: '3'
},
],
orgOptionProps,
orgOptions: [],
pageNo: 1,

Loading…
Cancel
Save