李勇

1.白板模块增加删除当前页所有标注和撤销上一步操作的两个接口

@@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -73,7 +73,7 @@ return /******/ (function(modules) { // webpackBootstrap
73 /******/ } 73 /******/ }
74 74
75 /******/ var hotApplyOnUpdate = true; 75 /******/ var hotApplyOnUpdate = true;
76 -/******/ var hotCurrentHash = "a8ff19203f3da9a01be5"; // eslint-disable-line no-unused-vars 76 +/******/ var hotCurrentHash = "105140c15a6ca24bd951"; // eslint-disable-line no-unused-vars
77 /******/ var hotCurrentModuleData = {}; 77 /******/ var hotCurrentModuleData = {};
78 /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars 78 /******/ var hotCurrentParents = []; // eslint-disable-line no-unused-vars
79 79
@@ -829,6 +829,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -829,6 +829,7 @@ return /******/ (function(modules) { // webpackBootstrap
829 _this.sendInsertAnnotaion = _this._sendInsertAnnotaion; 829 _this.sendInsertAnnotaion = _this._sendInsertAnnotaion;
830 //this.sendDeleteAnnotaion=this._sendDeleteAnnotaion; 830 //this.sendDeleteAnnotaion=this._sendDeleteAnnotaion;
831 _this.sendDeleteAllAnnotation = _this._sendDeleteAllAnnotation; 831 _this.sendDeleteAllAnnotation = _this._sendDeleteAllAnnotation;
  832 + _this.sendDeleteCurPageAnnotation = _this._sendDeleteCurPageAnnotation;
832 _this.sendGotoPrev = _this._sendGotoPrev; 833 _this.sendGotoPrev = _this._sendGotoPrev;
833 834
834 //DocApe 835 //DocApe
@@ -1272,6 +1273,15 @@ return /******/ (function(modules) { // webpackBootstrap @@ -1272,6 +1273,15 @@ return /******/ (function(modules) { // webpackBootstrap
1272 _whiteboard_ape.sendDeleteAnnotaion(_param); 1273 _whiteboard_ape.sendDeleteAnnotaion(_param);
1273 } 1274 }
1274 } 1275 }
  1276 + //删除当前页面上的所有标注
  1277 +
  1278 + }, {
  1279 + key: '_sendDeleteCurPageAnnotation',
  1280 + value: function _sendDeleteCurPageAnnotation(_param) {
  1281 + if (_whiteboard_ape) {
  1282 + _whiteboard_ape.sendDeleteCurPageAnnotation(_param);
  1283 + }
  1284 + }
1275 //删除所有标注 1285 //删除所有标注
1276 1286
1277 }, { 1287 }, {
@@ -1287,7 +1297,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -1287,7 +1297,7 @@ return /******/ (function(modules) { // webpackBootstrap
1287 key: '_sendGotoPrev', 1297 key: '_sendGotoPrev',
1288 value: function _sendGotoPrev(_param) { 1298 value: function _sendGotoPrev(_param) {
1289 if (_whiteboard_ape) { 1299 if (_whiteboard_ape) {
1290 - _whiteboard_ape.gotoPrev(_param); 1300 + _whiteboard_ape.sendGotoPrev(_param);
1291 } 1301 }
1292 } 1302 }
1293 1303
@@ -17300,8 +17310,8 @@ return /******/ (function(modules) { // webpackBootstrap @@ -17300,8 +17310,8 @@ return /******/ (function(modules) { // webpackBootstrap
17300 //撤销上一步 17310 //撤销上一步
17301 17311
17302 }, { 17312 }, {
17303 - key: 'gotoPrev',  
17304 - value: function gotoPrev() { 17313 + key: 'sendGotoPrev',
  17314 + value: function sendGotoPrev() {
17305 loger.log("白板返回上一步"); 17315 loger.log("白板返回上一步");
17306 if (this.insertHistory == null || this.insertHistory.length < 1) { 17316 if (this.insertHistory == null || this.insertHistory.length < 1) {
17307 loger.warn("无法继续上一步操作,已经没有可以撤销的数据"); 17317 loger.warn("无法继续上一步操作,已经没有可以撤销的数据");
@@ -17310,14 +17320,25 @@ return /******/ (function(modules) { // webpackBootstrap @@ -17310,14 +17320,25 @@ return /******/ (function(modules) { // webpackBootstrap
17310 console.log(this.insertHistory); 17320 console.log(this.insertHistory);
17311 this.sendDeleteAnnotaion(this.insertHistory.pop()); 17321 this.sendDeleteAnnotaion(this.insertHistory.pop());
17312 } 17322 }
  17323 + //删除当前页码的所有标注
  17324 +
  17325 + }, {
  17326 + key: 'sendDeleteCurPageAnnotation',
  17327 + value: function sendDeleteCurPageAnnotation(_param) {
  17328 + for (var key in this.annoInfos) {
  17329 + var item = this.annoInfos[key];
  17330 + if (item && item.parentId == _GlobalConfig2.default.activeDocId && item.curPageNo == _GlobalConfig2.default.activeDocCurPage) {
  17331 + loger.log("sendDeleteCurPageAnnotation 删除当前页面上的标注", key);
  17332 + this.sendDeleteAnnotaion({ "itemIdx": key });
  17333 + }
  17334 + }
  17335 + }
17313 //删除所有标注 17336 //删除所有标注
17314 17337
17315 }, { 17338 }, {
17316 key: 'sendDeleteAllAnnotation', 17339 key: 'sendDeleteAllAnnotation',
17317 value: function sendDeleteAllAnnotation(_param) { 17340 value: function sendDeleteAllAnnotation(_param) {
17318 for (var key in this.annoInfos) { 17341 for (var key in this.annoInfos) {
17319 - //console.log("key:"+key);  
17320 - console.log("删除白板数据,itemIdx:" + key);  
17321 this.sendDeleteAnnotaion({ "itemIdx": key }); 17342 this.sendDeleteAnnotaion({ "itemIdx": key });
17322 } 17343 }
17323 } 17344 }
@@ -17571,7 +17592,7 @@ return /******/ (function(modules) { // webpackBootstrap @@ -17571,7 +17592,7 @@ return /******/ (function(modules) { // webpackBootstrap
17571 /* whiteBoardModelPdu.parentId=_param.parentId||0; 17592 /* whiteBoardModelPdu.parentId=_param.parentId||0;
17572 whiteBoardModelPdu.curPage=_param.curPage||1;*/ 17593 whiteBoardModelPdu.curPage=_param.curPage||1;*/
17573 17594
17574 - whiteBoardModelPdu.parentId = _GlobalConfig2.default.activeDocId; //当前激活的文档id 17595 + whiteBoardModelPdu.parentId = GlobalCoig.activeDocId; //当前激活的文档id
17575 whiteBoardModelPdu.curPageNo = _GlobalConfig2.default.activeDocCurPage; //当前激活的文档页码 17596 whiteBoardModelPdu.curPageNo = _GlobalConfig2.default.activeDocCurPage; //当前激活的文档页码
17576 17597
17577 whiteBoardModelPdu.pointGroup = _EngineUtils2.default.arrayToJsonString(_param.pointGroup); 17598 whiteBoardModelPdu.pointGroup = _EngineUtils2.default.arrayToJsonString(_param.pointGroup);
@@ -116,6 +116,7 @@ export default class MessageEntrance extends Emiter { @@ -116,6 +116,7 @@ export default class MessageEntrance extends Emiter {
116 this.sendInsertAnnotaion=this._sendInsertAnnotaion; 116 this.sendInsertAnnotaion=this._sendInsertAnnotaion;
117 //this.sendDeleteAnnotaion=this._sendDeleteAnnotaion; 117 //this.sendDeleteAnnotaion=this._sendDeleteAnnotaion;
118 this.sendDeleteAllAnnotation=this._sendDeleteAllAnnotation; 118 this.sendDeleteAllAnnotation=this._sendDeleteAllAnnotation;
  119 + this.sendDeleteCurPageAnnotation=this._sendDeleteCurPageAnnotation;
119 this.sendGotoPrev=this._sendGotoPrev; 120 this.sendGotoPrev=this._sendGotoPrev;
120 121
121 //DocApe 122 //DocApe
@@ -498,6 +499,12 @@ export default class MessageEntrance extends Emiter { @@ -498,6 +499,12 @@ export default class MessageEntrance extends Emiter {
498 _whiteboard_ape.sendDeleteAnnotaion(_param); 499 _whiteboard_ape.sendDeleteAnnotaion(_param);
499 } 500 }
500 } 501 }
  502 + //删除当前页面上的所有标注
  503 + _sendDeleteCurPageAnnotation(_param){
  504 + if(_whiteboard_ape){
  505 + _whiteboard_ape.sendDeleteCurPageAnnotation(_param);
  506 + }
  507 + }
501 //删除所有标注 508 //删除所有标注
502 _sendDeleteAllAnnotation(_param){ 509 _sendDeleteAllAnnotation(_param){
503 if(_whiteboard_ape){ 510 if(_whiteboard_ape){
@@ -507,7 +514,7 @@ export default class MessageEntrance extends Emiter { @@ -507,7 +514,7 @@ export default class MessageEntrance extends Emiter {
507 //返回上一步标注 514 //返回上一步标注
508 _sendGotoPrev(_param){ 515 _sendGotoPrev(_param){
509 if(_whiteboard_ape){ 516 if(_whiteboard_ape){
510 - _whiteboard_ape.gotoPrev(_param); 517 + _whiteboard_ape.sendGotoPrev(_param);
511 } 518 }
512 } 519 }
513 520
@@ -112,7 +112,7 @@ class WhiteBoardApe extends Ape { @@ -112,7 +112,7 @@ class WhiteBoardApe extends Ape {
112 this.sendUniform(adapterPdu,true); 112 this.sendUniform(adapterPdu,true);
113 } 113 }
114 //撤销上一步 114 //撤销上一步
115 - gotoPrev(){ 115 + sendGotoPrev(){
116 loger.log("白板返回上一步"); 116 loger.log("白板返回上一步");
117 if(this.insertHistory==null||this.insertHistory.length<1){ 117 if(this.insertHistory==null||this.insertHistory.length<1){
118 loger.warn("无法继续上一步操作,已经没有可以撤销的数据"); 118 loger.warn("无法继续上一步操作,已经没有可以撤销的数据");
@@ -121,11 +121,19 @@ class WhiteBoardApe extends Ape { @@ -121,11 +121,19 @@ class WhiteBoardApe extends Ape {
121 console.log(this.insertHistory); 121 console.log(this.insertHistory);
122 this.sendDeleteAnnotaion(this.insertHistory.pop()); 122 this.sendDeleteAnnotaion(this.insertHistory.pop());
123 } 123 }
  124 + //删除当前页码的所有标注
  125 + sendDeleteCurPageAnnotation(_param){
  126 + for (let key in this.annoInfos){
  127 + let item=this.annoInfos[key];
  128 + if(item&&item.parentId==GlobalConfig.activeDocId&&item.curPageNo==GlobalConfig.activeDocCurPage){
  129 + loger.log("sendDeleteCurPageAnnotation 删除当前页面上的标注",key);
  130 + this.sendDeleteAnnotaion({"itemIdx":key});
  131 + }
  132 + }
  133 + }
124 //删除所有标注 134 //删除所有标注
125 sendDeleteAllAnnotation(_param){ 135 sendDeleteAllAnnotation(_param){
126 for (let key in this.annoInfos){ 136 for (let key in this.annoInfos){
127 - //console.log("key:"+key);  
128 - console.log("删除白板数据,itemIdx:"+key);  
129 this.sendDeleteAnnotaion({"itemIdx":key}); 137 this.sendDeleteAnnotaion({"itemIdx":key});
130 } 138 }
131 } 139 }
@@ -356,7 +364,7 @@ class WhiteBoardApe extends Ape { @@ -356,7 +364,7 @@ class WhiteBoardApe extends Ape {
356 /* whiteBoardModelPdu.parentId=_param.parentId||0; 364 /* whiteBoardModelPdu.parentId=_param.parentId||0;
357 whiteBoardModelPdu.curPage=_param.curPage||1;*/ 365 whiteBoardModelPdu.curPage=_param.curPage||1;*/
358 366
359 - whiteBoardModelPdu.parentId=GlobalConfig.activeDocId;//当前激活的文档id 367 + whiteBoardModelPdu.parentId=GlobalCoig.activeDocId;//当前激活的文档id
360 whiteBoardModelPdu.curPageNo=GlobalConfig.activeDocCurPage;//当前激活的文档页码 368 whiteBoardModelPdu.curPageNo=GlobalConfig.activeDocCurPage;//当前激活的文档页码
361 369
362 whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString(_param.pointGroup); 370 whiteBoardModelPdu.pointGroup =EngineUtils.arrayToJsonString(_param.pointGroup);