|
@@ -747,11 +747,11 @@ const projTreeObj = {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- openTender: function (node, timeoutTime) {
|
|
|
|
|
|
|
+ openTender: function (ID, parent, timeoutTime) {
|
|
|
setTimeout(function () {
|
|
setTimeout(function () {
|
|
|
let newTab = window.open('about:blank');
|
|
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 () {
|
|
CommonAjax.get(mainUrl, [], function () {
|
|
|
newTab.location.replace(mainUrl); //不能后退
|
|
newTab.location.replace(mainUrl); //不能后退
|
|
|
});
|
|
});
|
|
@@ -907,14 +907,7 @@ const projTreeObj = {
|
|
|
TreeNodeCellType.prototype.getHitInfo = function (x, y, cellStyle, cellRect, context) {
|
|
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 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 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;
|
|
info.isReservedLocation = true;
|
|
|
}
|
|
}
|
|
|
return info;
|
|
return info;
|
|
@@ -935,21 +928,23 @@ const projTreeObj = {
|
|
|
}
|
|
}
|
|
|
if(hitinfo.sheet.name() === "projectSheet"){//只有项目管理界面才执行
|
|
if(hitinfo.sheet.name() === "projectSheet"){//只有项目管理界面才执行
|
|
|
//单项文件,进入造价书界面
|
|
//单项文件,进入造价书界面
|
|
|
- if(node.data.projType === projectType.tender && withingClickArea()){
|
|
|
|
|
- /*let thisClick = Date.now(),
|
|
|
|
|
|
|
+ if(node.data.projType === projectType.tender){
|
|
|
|
|
+ let thisClick = Date.now(),
|
|
|
open = false;
|
|
open = false;
|
|
|
if (this.preNode === node && this.preClick && thisClick - this.preClick <= 300) {
|
|
if (this.preNode === node && this.preClick && thisClick - this.preClick <= 300) {
|
|
|
- open = true;*/
|
|
|
|
|
|
|
+ open = true;
|
|
|
let timeoutTime = 200;
|
|
let timeoutTime = 200;
|
|
|
if($('.slide-sidebar').hasClass('open')){
|
|
if($('.slide-sidebar').hasClass('open')){
|
|
|
timeoutTime = 500;
|
|
timeoutTime = 500;
|
|
|
}
|
|
}
|
|
|
- projTreeObj.openTender(node, timeoutTime);
|
|
|
|
|
- /*}
|
|
|
|
|
|
|
+ projTreeObj.openTender(node.data.ID, node.parent, timeoutTime);
|
|
|
|
|
+ }
|
|
|
this.preClick = open ? null : thisClick;
|
|
this.preClick = open ? null : thisClick;
|
|
|
- this.preNode = open ? null : node;*/
|
|
|
|
|
|
|
+ this.preNode = open ? null : node;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (!node || node.children.length === 0) {
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
- if (!node || node.children.length === 0) { return; }
|
|
|
|
|
}
|
|
}
|
|
|
//统一改成方框外1像素内都有效
|
|
//统一改成方框外1像素内都有效
|
|
|
if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
|
|
if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
|