tree_sheet_helper.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520
  1. /**
  2. * Created by Mai on 2017/4/1.
  3. */
  4. var TREE_SHEET_HELPER = {
  5. getObjPos: function (obj) {
  6. let target = obj;
  7. let pos = {x: obj.offsetLeft, y: obj.offsetTop};
  8. target = obj.offsetParent;
  9. while (target) {
  10. pos.x += target.offsetLeft;
  11. pos.y += target.offsetTop;
  12. target = target.offsetParent;
  13. }
  14. return pos;
  15. },
  16. /**
  17. * 初始化setting,需要提示单元格text时,必须先初始化setting
  18. * @param obj
  19. * @param setting
  20. */
  21. /*initSetting: function (obj, setting) {
  22. setting.pos = this.getObjPos(obj);
  23. },*/
  24. initSetting: function (obj, setting) {
  25. setting.pos = this.getObjPos(obj);
  26. },
  27. createNewSpread: function (obj) {
  28. var spread = new GC.Spread.Sheets.Workbook(obj, {sheetCount: 1});
  29. spread.options.tabStripVisible = false;
  30. spread.options.scrollbarMaxAlign = true;
  31. spread.options.cutCopyIndicatorVisible = false;
  32. spread.options.allowCopyPasteExcelStyle = false;
  33. spread.options.allowUserDragDrop = false;
  34. spread.getActiveSheet().setRowCount(3);
  35. return spread;
  36. },
  37. getSheetCellStyle: function (setting) {
  38. var style = new GC.Spread.Sheets.Style();
  39. //style.locked = setting.readOnly ? true : false;
  40. style.name = setting.id;
  41. //style.font = setting.data.font;
  42. style.hAlign = setting.data.hAlign;
  43. style.vAlign = setting.data.vAlign;
  44. style.wordWrap = setting.data.wordWrap;
  45. if (setting.data.formatter) {
  46. style.formatter = setting.data.formatter;
  47. }
  48. return style;
  49. },
  50. loadSheetHeader: function (setting, sheet) {
  51. this.massOperationSheet(sheet, function () {
  52. if (setting.frozenCols) {
  53. sheet.frozenColumnCount(setting.frozenCols);
  54. }
  55. sheet.setColumnCount(setting.cols.length);
  56. sheet.setRowCount(setting.headRows, GC.Spread.Sheets.SheetArea.colHeader);
  57. setting.headRowHeight.forEach(function (rowHeight, index) {
  58. sheet.setRowHeight(index, rowHeight, GC.Spread.Sheets.SheetArea.colHeader);
  59. });
  60. setting.cols.forEach(function (col, index) {
  61. var i, iRow = 0, cell;
  62. for (i = 0; i < col.head.spanCols.length; i++) {
  63. if (col.head.spanCols[i] !== 0) {
  64. cell = sheet.getCell(iRow, index, GC.Spread.Sheets.SheetArea.colHeader);
  65. //cell.value(col.head.titleNames[i]).font(col.head.font).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
  66. cell.value(col.head.titleNames[i]).hAlign(col.head.hAlign[i]).vAlign(col.head.vAlign[i]).wordWrap(true);
  67. }
  68. if (col.head.spanCols[i] > 1 || col.head.spanRows[i] > 1) {
  69. sheet.addSpan(iRow, index, col.head.spanRows[i], col.head.spanCols[i], GC.Spread.Sheets.SheetArea.colHeader);
  70. }
  71. iRow += col.head.spanRows[i];
  72. };
  73. sheet.setColumnWidth(index, col.width);
  74. sheet.setColumnVisible(index, col.visible && true);
  75. });
  76. });
  77. },
  78. protectdSheet: function (sheet) {
  79. var option = {
  80. allowSelectLockedCells: true,
  81. allowSelectUnlockedCells: true,
  82. allowResizeRows: true,
  83. allowResizeColumns: true
  84. };
  85. sheet.options.protectionOptions = option;
  86. sheet.options.isProtected = true;
  87. sheet.options.allowCellOverflow = false;
  88. },
  89. massOperationSheet: function (sheet, Operation) {
  90. sheet.suspendPaint();
  91. sheet.suspendEvent();
  92. Operation();
  93. sheet.resumeEvent();
  94. sheet.resumePaint();
  95. },
  96. refreshNodesVisible: function (nodes, sheet, recursive) {
  97. nodes.forEach(function (node) {
  98. var iRow;
  99. iRow = node.serialNo();
  100. sheet.setRowVisible(iRow, node.visible, GC.Spread.Sheets.SheetArea.viewport);
  101. if (recursive) {
  102. TREE_SHEET_HELPER.refreshNodesVisible(node.children, sheet, recursive);
  103. }
  104. })
  105. },
  106. refreshTreeNodeData: function (setting, sheet, nodes, recursive) {
  107. nodes.forEach(function (node) {
  108. let iRow = node.serialNo();
  109. if(typeof projectObj !== 'undefined'){
  110. let nodeStyle = projectObj.getNodeColorStyle(sheet, node);
  111. if(node.data.bgColour){
  112. nodeStyle.backColor = node.data.bgColour;
  113. }
  114. if(nodeStyle){
  115. sheet.setStyle(iRow, -1, nodeStyle);
  116. }
  117. }
  118. setting.cols.forEach(function (colSetting, iCol) {
  119. var cell = sheet.getCell(iRow, iCol, GC.Spread.Sheets.SheetArea.viewport);
  120. /* if(typeof projectObj !== 'undefined'){ 7/28 取消黑体显示
  121. let boldFontStyle = projectObj.getBoldFontStyle(node, colSetting);
  122. sheet.setStyle(iRow, iCol, boldFontStyle);
  123. }
  124. }*/
  125. // var getFieldText = function () {
  126. // var fields = colSetting.data.field.split('.');
  127. // var validField = fields.reduce(function (field1, field2) {
  128. // if (eval('node.data.' + field1)) {
  129. // return field1 + '.' + field2
  130. // } else {
  131. // return field1;
  132. // }
  133. // });
  134. // if (eval('node.data.' + validField)) {
  135. // return eval('node.data.' + validField);
  136. // } else {
  137. // return '';
  138. // }
  139. // };
  140. var getFieldText2 = function () {
  141. var fields = colSetting.data.field.split('.'), iField, data = node.data;
  142. for (iField = 0; iField < fields.length; iField++) {
  143. if (data[fields[iField]] && data[fields[iField]]!='0') {
  144. data = data[fields[iField]];
  145. } else {
  146. return '';
  147. }
  148. }
  149. return data;
  150. };
  151. if(sheet.name()=="mainSheet"){
  152. if(colSetting.data.field=="quantity"){
  153. let tag = node.data.quantityEXP?node.data.quantityEXP:'';
  154. sheet.setTag(iRow, iCol,tag);
  155. }
  156. if(colSetting.data.field=="code"){
  157. let tag = node.data.adjustState?node.data.adjustState:'';
  158. sheet.setTag(iRow, iCol,tag);
  159. }
  160. if(colSetting.data.field=="name"){
  161. let tag = node.data.itemCharacterText?node.data.itemCharacterText:'';
  162. sheet.setTag(iRow, iCol,tag);
  163. }
  164. }
  165. if (colSetting.data.getText && Object.prototype.toString.apply(colSetting.data.getText) === "[object Function]") {
  166. cell.value(colSetting.data.getText(node));
  167. } else {
  168. cell.value(getFieldText2());
  169. }
  170. if (colSetting.data.cellType && Object.prototype.toString.apply(colSetting.data.cellType) !== "[object String]") {
  171. cell.cellType(colSetting.data.cellType(node));
  172. }
  173. if(colSetting.data.autoHeight == true){
  174. colSetting.setAutoHeight(cell,node);
  175. }
  176. if(colSetting.editChecking&&colSetting.editChecking(node)){
  177. cell.locked(true);
  178. }else if (colSetting.readOnly) {
  179. if(typeof projectReadOnly !== 'undefined' && projectReadOnly){
  180. cell.locked(true);
  181. }else {
  182. if (Object.prototype.toString.apply(colSetting.readOnly) === "[object Function]") {
  183. cell.locked(colSetting.readOnly(node));
  184. } else {
  185. cell.locked(true);
  186. }
  187. }
  188. } else {
  189. cell.locked(typeof projectReadOnly !== 'undefined' && projectReadOnly ? true : false);
  190. }
  191. });
  192. if(setting.setAutoFitRow){
  193. setting.setAutoFitRow(sheet,node)
  194. }
  195. if (recursive) {
  196. TREE_SHEET_HELPER.refreshTreeNodeData(setting, sheet, node.children, recursive);
  197. }
  198. });
  199. },
  200. refreshChildrenVisiable:function(sheet,tree,node,row,visiable){
  201. let iCount = node.posterityCount(), i, child;
  202. for (i = 0; i < iCount; i++) {
  203. child = tree.items[row + i +1];
  204. sheet.setRowVisible(row + i + 1, visiable?visiable:child.visible, GC.Spread.Sheets.SheetArea.viewport);
  205. }
  206. sheet.invalidateLayout();
  207. },
  208. showTreeData: function (setting, sheet, tree) {
  209. let indent = 20;
  210. let levelIndent = -5;
  211. let halfBoxLength = 5;
  212. let halfExpandLength = 3;
  213. let TreeNodeCellType = function () {
  214. };
  215. TreeNodeCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
  216. TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
  217. if (style.backColor) {
  218. ctx.save();
  219. ctx.fillStyle = style.backColor;
  220. ctx.fillRect(x, y, w, h);
  221. ctx.restore();
  222. } else {
  223. ctx.clearRect(x, y, w, h);
  224. }
  225. // ������(x1, y1)���(��, ��), (x2, y2)�յ�(��, ��), ��ɫ
  226. let drawLine = function (canvas, x1, y1, x2, y2, color) {
  227. ctx.save();
  228. // ����ƫ����
  229. ctx.translate(0.5, 0.5);
  230. ctx.beginPath();
  231. ctx.moveTo(x1, y1);
  232. ctx.lineTo(x2, y2);
  233. ctx.strokeStyle = color;
  234. ctx.stroke();
  235. ctx.restore();
  236. };
  237. let drawExpandBox = function (ctx, x, y, w, h, centerX, centerY, expanded) {
  238. let rect = {}, h1, h2, offset = 1;
  239. rect.top = centerY - halfBoxLength;
  240. rect.bottom = centerY + halfBoxLength;
  241. rect.left = centerX - halfBoxLength;
  242. rect.right = centerX + halfBoxLength;
  243. if (rect.left < x + w) {
  244. rect.right = Math.min(rect.right, x + w);
  245. ctx.save();
  246. // ����ƫ����
  247. ctx.translate(0.5, 0.5);
  248. ctx.strokeStyle = 'black';
  249. ctx.beginPath();
  250. ctx.moveTo(rect.left, rect.top);
  251. ctx.lineTo(rect.left, rect.bottom);
  252. ctx.lineTo(rect.right, rect.bottom);
  253. ctx.lineTo(rect.right, rect.top);
  254. ctx.lineTo(rect.left, rect.top);
  255. ctx.stroke();
  256. ctx.fillStyle = 'white';
  257. ctx.fill();
  258. ctx.restore();
  259. // Draw Horizontal Line
  260. h1 = centerX - halfExpandLength;
  261. h2 = Math.min(centerX + halfExpandLength, x + w);
  262. if (h2 > h1) {
  263. drawLine(ctx, h1, centerY, h2, centerY, 'black');
  264. }
  265. // Draw Vertical Line
  266. if (!expanded && (centerX < x + w)) {
  267. drawLine(ctx, centerX, centerY - halfExpandLength, centerX, centerY + halfExpandLength, 'black');
  268. }
  269. }
  270. }
  271. let node = tree.items[options.row];
  272. let showTreeLine = true;
  273. if (!node) { return; }
  274. let centerX = Math.floor(x) + node.depth() * indent + node.depth() * levelIndent + indent / 2;
  275. let x1 = centerX + indent / 2;
  276. let centerY = Math.floor((y + (y + h)) / 2);
  277. let y1;
  278. // Draw Sibling Line
  279. if (showTreeLine) {
  280. // Draw Horizontal Line
  281. if (centerX < x + w) {
  282. drawLine(ctx, centerX, centerY, Math.min(x1, x + w), centerY, 'gray');
  283. }
  284. // Draw Vertical Line
  285. if (centerX < x + w) {
  286. y1 = node.isLast() ? centerY : y + h;
  287. if (node.isFirst() && !node.parent) {
  288. drawLine(ctx, centerX, centerY, centerX, y1, 'gray');
  289. } else {
  290. drawLine(ctx, centerX, y, centerX, y1, 'gray');
  291. }
  292. }
  293. }
  294. // Draw Expand Box
  295. if (node.children.length > 0) {
  296. drawExpandBox(ctx, x, y, w, h, centerX, centerY, node.expanded);
  297. }
  298. // Draw Parent Line
  299. if (showTreeLine) {
  300. var parent = node.parent, parentCenterX = centerX - indent - levelIndent;
  301. while (parent) {
  302. if (!parent.isLast()) {
  303. if (parentCenterX < x + w) {
  304. drawLine(ctx, parentCenterX, y, parentCenterX, y + h, 'gray');
  305. }
  306. }
  307. parent = parent.parent;
  308. parentCenterX -= (indent + levelIndent);
  309. }
  310. };
  311. // Draw Text
  312. x = x + (node.depth() + 1) * indent + node.depth() * levelIndent;
  313. w = w - (node.depth() + 1) * indent - node.depth() * levelIndent;
  314. GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
  315. };
  316. TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
  317. return {
  318. x: x,
  319. y: y,
  320. row: context.row,
  321. col: context.col,
  322. cellStyle: cellStyle,
  323. cellRect: cellRect,
  324. sheetArea: context.sheetArea
  325. };
  326. };
  327. TreeNodeCellType.prototype.processMouseDown = function (hitinfo) {
  328. let offset = -1;
  329. let node = tree.items[hitinfo.row];
  330. tree.selected = node;
  331. if (!node || node.children.length === 0) { return; }
  332. let centerX = hitinfo.cellRect.x + offset + node.depth() * indent + node.depth() * levelIndent + indent / 2;
  333. let centerY = (hitinfo.cellRect.y + offset + (hitinfo.cellRect.y + offset + hitinfo.cellRect.height)) / 2;
  334. if (hitinfo.x > centerX - halfBoxLength && hitinfo.x < centerX + halfBoxLength && hitinfo.y > centerY - halfBoxLength && hitinfo.y < centerY + halfBoxLength) {
  335. node.setExpanded(!node.expanded);
  336. let sheetName = hitinfo.sheet.name();
  337. if(sheetName === 'stdBillsLib_bills'){
  338. sessionStorage.setItem('stdBillsLibExpState', billsLibObj.stdBillsTree.getExpState(billsLibObj.stdBillsTree.items));
  339. }
  340. else if(sheetName === 'stdRationLib_chapter'){
  341. sessionStorage.setItem('stdRationLibExpState', rationLibObj.tree.getExpState(rationLibObj.tree.items));
  342. }
  343. else if(sheetName === 'stdBillsGuidance_bills'){
  344. sessionStorage.setItem('stdBillsGuidanceExpState', billsGuidance.bills.tree.getExpState(billsGuidance.bills.tree.items));
  345. }
  346. TREE_SHEET_HELPER.massOperationSheet(hitinfo.sheet, function () {
  347. let iCount = node.posterityCount(), i, child;
  348. for (i = 0; i < iCount; i++) {
  349. child = tree.items[hitinfo.row + i + 1];
  350. hitinfo.sheet.setRowVisible(hitinfo.row + i + 1, child.visible, hitinfo.sheetArea);
  351. //hitinfo.sheet.setRowVisible(hitinfo.row + i + 1, child.vis(), hitinfo.sheetArea);
  352. }
  353. hitinfo.sheet.invalidateLayout();
  354. });
  355. hitinfo.sheet.repaint();
  356. }
  357. };
  358. TreeNodeCellType.prototype.processMouseEnter = function(hitinfo){
  359. let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
  360. let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
  361. if(tag){
  362. TREE_SHEET_HELPER.showTipsDiv(tag,setting,hitinfo);
  363. }
  364. };
  365. TreeNodeCellType.prototype.processMouseLeave = function (hitinfo) {
  366. let me = this;
  367. TREE_SHEET_HELPER.tipDiv = 'hide';
  368. if (me._toolTipElement) {
  369. $(me._toolTipElement).hide();
  370. me._toolTipElement = null;
  371. };
  372. TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
  373. };
  374. let TipCellType = function () {};
  375. TipCellType.prototype = new GC.Spread.Sheets.CellTypes.Text();
  376. TipCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
  377. return {
  378. x: x,
  379. y: y,
  380. row: context.row,
  381. col: context.col,
  382. cellStyle: cellStyle,
  383. cellRect: cellRect,
  384. sheet: context.sheet,
  385. sheetArea: context.sheetArea
  386. };
  387. };
  388. TipCellType.prototype.processMouseEnter = function (hitinfo) {
  389. let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
  390. let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
  391. let tag = hitinfo.sheet.getTag(hitinfo.row, hitinfo.col);
  392. let acStyle = hitinfo.sheet.getActualStyle(hitinfo.row, hitinfo.col),
  393. zoom = hitinfo.sheet.zoom();
  394. let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: hitinfo.sheet, row: hitinfo.row, col: hitinfo.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
  395. let cellWidth = hitinfo.sheet.getCell(-1, hitinfo.col).width();
  396. let dataField = setting.cols[hitinfo.col].data.field;
  397. if(tag==''&&hitinfo.sheet.getCell(hitinfo.row,hitinfo.col).wordWrap()==true){//显示其它列的标记为空并且设置了自动换行
  398. return;
  399. }
  400. if(dataField === 'itemCharacterText' || dataField === 'jobContentText' || dataField === 'adjustState'){
  401. if((hitinfo.sheet.getParent() === projectObj.mainSpread||hitinfo.sheet.getParent() === tender_obj.tenderSpread) && textLength <= cellWidth)
  402. return;
  403. }
  404. if(hitinfo.sheet.name()=="mainSheet"){
  405. if(dataField=="quantity"){//显示工程量明细
  406. text = tag;
  407. }if(dataField=="name"){//项目特征及内容隐藏时,显示特征及内容
  408. if(projectObj.ifItemCharHiden(setting)&&tag!=''){
  409. text = tag;
  410. }else if(textLength <= cellWidth){
  411. return;
  412. }
  413. }
  414. else if(tag !== undefined && tag) {
  415. text = tag;
  416. }
  417. }
  418. TREE_SHEET_HELPER.showTipsDiv(text,setting,hitinfo);
  419. };
  420. TipCellType.prototype.processMouseLeave = function (hitinfo) {
  421. let me = this;
  422. TREE_SHEET_HELPER.tipDiv = 'hide';
  423. if (me._toolTipElement) {
  424. $(me._toolTipElement).hide();
  425. me._toolTipElement = null;
  426. };
  427. TREE_SHEET_HELPER.tipDivCheck();//延时检查:当tips正在show的时候,就调用了hide方法,会导致tips一直存在,所以设置一个超时处理
  428. }
  429. TREE_SHEET_HELPER.protectdSheet(sheet);
  430. TREE_SHEET_HELPER.massOperationSheet(sheet, function () {
  431. sheet.rowOutlines.direction(GC.Spread.Sheets.Outlines.OutlineDirection.backward);
  432. sheet.showRowOutline(false);
  433. if (setting.defaultRowHeight) {
  434. sheet.defaults.rowHeight = setting.defaultRowHeight;
  435. }
  436. sheet.setRowCount(tree.count() + setting.emptyRows, GC.Spread.Sheets.SheetArea.viewport);
  437. sheet.getRange(tree.count(), -1, setting.emptyRows, -1).locked(true);
  438. setting.cols.forEach(function (colSetting, iCol) {
  439. sheet.setStyle(-1, iCol, TREE_SHEET_HELPER.getSheetCellStyle(colSetting));
  440. if (colSetting.showHint) {
  441. sheet.getRange(-1, iCol, -1, 1).cellType(new TipCellType());
  442. }
  443. if(colSetting.formatter){
  444. sheet.setFormatter(-1, iCol, colSetting.formatter, GC.Spread.Sheets.SheetArea.viewport);
  445. }
  446. });
  447. sheet.getRange(-1, setting.treeCol, -1, 1).cellType(new TreeNodeCellType());
  448. TREE_SHEET_HELPER.refreshTreeNodeData(setting, sheet, tree.roots, true);
  449. TREE_SHEET_HELPER.refreshNodesVisible(tree.roots, sheet, true);
  450. });
  451. },
  452. showTipsDiv:function (text,setting,hitinfo) {
  453. if (setting.pos && text && text !== '') {
  454. if (!this._toolTipElement) {
  455. let div = $('#autoTip')[0];
  456. if (!div) {
  457. div = document.createElement("div");
  458. $(div).css("position", "absolute")
  459. .css("border", "1px #C0C0C0 solid")
  460. .css("box-shadow", "1px 2px 5px rgba(0,0,0,0.4)")
  461. .css("font", "9pt Arial")
  462. .css("background", "white")
  463. .css("padding", 5)
  464. .attr("id", 'autoTip');
  465. $(div).hide();
  466. document.body.insertBefore(div, null);
  467. }
  468. this._toolTipElement = div;
  469. //实时读取位置信息
  470. if(hitinfo.sheet && hitinfo.sheet.getParent().qo){
  471. setting.pos = SheetDataHelper.getObjPos(hitinfo.sheet.getParent().qo);
  472. }
  473. $(this._toolTipElement).text(text);
  474. //清单指引、清单库做特殊处理
  475. if($(hitinfo.sheet.getParent().qo).attr('id') === 'stdBillsSpread' || $(hitinfo.sheet.getParent().qo).attr('id') === 'billsGuidance_bills'){
  476. $(this._toolTipElement).css('top', '').css('left', '').css('width', '');
  477. let marginLeftMouse;
  478. if($(this._toolTipElement).width() < hitinfo.x){
  479. marginLeftMouse = hitinfo.x - $(this._toolTipElement).width();
  480. }
  481. $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y + 15).css("left", marginLeftMouse ? setting.pos.x + marginLeftMouse : setting.pos.x);
  482. }
  483. else {
  484. $(this._toolTipElement).css("top", setting.pos.y + hitinfo.y + 15).css("left", setting.pos.x + hitinfo.x + 15);
  485. }
  486. $(this._toolTipElement).show("fast");
  487. TREE_SHEET_HELPER.tipDiv = 'show';//做个标记
  488. }
  489. }
  490. },
  491. tipDivCheck(){
  492. setTimeout(function () {
  493. let tips = $('#autoTip');
  494. if(TREE_SHEET_HELPER.tipDiv == 'show'){
  495. return;
  496. } else if(TREE_SHEET_HELPER.tipDiv == 'hide'&&tips){
  497. tips.hide();
  498. TREE_SHEET_HELPER._toolTipElement = null;
  499. }
  500. },600)
  501. }
  502. };