|
|
@@ -833,11 +833,11 @@ const projTreeObj = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
- openTender: function (node, timeoutTime) {
|
|
|
+ openTender: function (ID, parent, timeoutTime) {
|
|
|
setTimeout(function () {
|
|
|
let newTab = window.open('about:blank');
|
|
|
- BeforeOpenProject(node.data.ID, {'fullFolder': GetFullFolder(node.parent)}, function () {
|
|
|
- let mainUrl = `/main?project=${node.data.ID}`;
|
|
|
+ BeforeOpenProject(ID, {'fullFolder': GetFullFolder(parent)}, function () {
|
|
|
+ let mainUrl = `/main?project=${ID}`;
|
|
|
CommonAjax.get(mainUrl, [], function () {
|
|
|
newTab.location.replace(mainUrl); //不能后退
|
|
|
});
|
|
|
@@ -980,27 +980,14 @@ const projTreeObj = {
|
|
|
ctx.drawImage(shareImg, x + 3, nowY - 7, shareImgWidth,shareImgHeight);
|
|
|
}
|
|
|
// Draw Text
|
|
|
- //x = x + (node.depth() + 1) * indent + node.depth() * levelIndent;
|
|
|
x = x + (node.depth() + 1) * indent + node.depth() * levelIndent + imgWidth + 3;
|
|
|
w = w - (node.depth() + 1) * indent - node.depth() * levelIndent - imgWidth - 3;
|
|
|
GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
|
|
|
- /* if (node.data.shareInfo && node.data.shareInfo.length > 0) {//分享标记在文本后
|
|
|
- let nowX = Math.floor(x) + w - 20;
|
|
|
- let nowY = Math.floor((y + (y + h)) / 2);
|
|
|
- ctx.drawImage(shareImg, nowX + 3, nowY - 7, shareImgWidth,shareImgHeight);
|
|
|
- }*/
|
|
|
};
|
|
|
TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
|
|
|
let info = {x: x, y: y, row: context.row, col: context.col, cellStyle: cellStyle, cellRect: cellRect, sheetArea: context.sheetArea};
|
|
|
let node = tree.items[info.row];
|
|
|
- let offset = -1;
|
|
|
- let centerX = info.cellRect.x + offset + node.depth() * indent + node.depth() * levelIndent + indent / 2;
|
|
|
- let text = context.sheet.getText(info.row, info.col);
|
|
|
- let value = context.sheet.getValue(info.row, info.col);
|
|
|
- let acStyle = context.sheet.getActualStyle(info.row, info.col),
|
|
|
- zoom = context.sheet.zoom();
|
|
|
- let textLength = this.getAutoFitWidth(value, text, acStyle, zoom, {sheet: context.sheet, row: info.row, col: info.col, sheetArea: GC.Spread.Sheets.SheetArea.viewport});
|
|
|
- if(info.x > centerX + halfBoxLength && info.x < centerX + halfBoxLength + imgWidth + indent/2+3 + textLength){
|
|
|
+ if (node && node.data.projType === projectType.tender) {
|
|
|
info.isReservedLocation = true;
|
|
|
}
|
|
|
return info;
|
|
|
@@ -1029,7 +1016,7 @@ const projTreeObj = {
|
|
|
if($('.slide-sidebar').hasClass('open')){
|
|
|
timeoutTime = 500;
|
|
|
}
|
|
|
- projTreeObj.openTender(node, timeoutTime);
|
|
|
+ projTreeObj.openTender(node.data.ID, node.parent, timeoutTime);
|
|
|
}
|
|
|
this.preClick = open ? null : thisClick;
|
|
|
this.preNode = open ? null : node;
|
|
|
@@ -1053,12 +1040,12 @@ const projTreeObj = {
|
|
|
hitinfo.sheet.repaint();
|
|
|
}
|
|
|
};
|
|
|
- /*TreeNodeCellType.prototype.processMouseMove = function (hitInfo) {
|
|
|
+ TreeNodeCellType.prototype.processMouseMove = function (hitInfo) {
|
|
|
let sheet = hitInfo.sheet;
|
|
|
-
|
|
|
let div = sheet.getParent().getHost();
|
|
|
let canvasId = div.id + "vp_vp";
|
|
|
let canvas = $(`#${canvasId}`)[0];
|
|
|
+ let node = tree.items[hitInfo.row];
|
|
|
//改变鼠标图案
|
|
|
if (sheet && hitInfo.isReservedLocation) {
|
|
|
canvas.style.cursor='pointer';
|
|
|
@@ -1067,7 +1054,7 @@ const projTreeObj = {
|
|
|
canvas.style.cursor='default';
|
|
|
}
|
|
|
return false;
|
|
|
- };*/
|
|
|
+ };
|
|
|
TreeNodeCellType.prototype.processMouseEnter = function (hitinfo) {
|
|
|
let text = hitinfo.sheet.getText(hitinfo.row, hitinfo.col);
|
|
|
let value = hitinfo.sheet.getValue(hitinfo.row, hitinfo.col);
|