|
|
@@ -833,6 +833,17 @@ const projTreeObj = {
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ openTender: function (node, 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}`;
|
|
|
+ CommonAjax.get(mainUrl, [], function () {
|
|
|
+ newTab.location.replace(mainUrl); //不能后退
|
|
|
+ });
|
|
|
+ });
|
|
|
+ }, timeoutTime);
|
|
|
+ },
|
|
|
getTreeNodeCell: function (tree) {
|
|
|
let me = projTreeObj;
|
|
|
let indent = 20;
|
|
|
@@ -1009,23 +1020,23 @@ const projTreeObj = {
|
|
|
return hitinfo.x > centerX + halfBoxLength && hitinfo.x < centerX + halfBoxLength + imgWidth + indent/2+3 + textLength;
|
|
|
}
|
|
|
if(hitinfo.sheet.name() === "projectSheet"){//只有项目管理界面才执行
|
|
|
- //单项文件,进入造价书界面
|
|
|
- if(node.data.projType === projectType.tender && withingClickArea()){
|
|
|
- let timeoutTime = 200;
|
|
|
- if($('.slide-sidebar').hasClass('open')){
|
|
|
- timeoutTime = 500;
|
|
|
+ if(node.data.projType === projectType.tender){
|
|
|
+ let thisClick = Date.now(),
|
|
|
+ open = false;
|
|
|
+ if (this.preNode === node && this.preClick && thisClick - this.preClick <= 300) {
|
|
|
+ open = true;
|
|
|
+ let timeoutTime = 200;
|
|
|
+ if($('.slide-sidebar').hasClass('open')){
|
|
|
+ timeoutTime = 500;
|
|
|
+ }
|
|
|
+ projTreeObj.openTender(node, 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}`;
|
|
|
- CommonAjax.get(mainUrl, [], function () {
|
|
|
- newTab.location.replace(mainUrl); //不能后退
|
|
|
- });
|
|
|
- });
|
|
|
- }, timeoutTime);
|
|
|
+ this.preClick = open ? null : thisClick;
|
|
|
+ this.preNode = open ? null : node;
|
|
|
+ }
|
|
|
+ if (!node || node.children.length === 0) {
|
|
|
+ return;
|
|
|
}
|
|
|
- if (!node || node.children.length === 0) { return; }
|
|
|
}
|
|
|
//统一改成方框外1像素内都有效
|
|
|
if (hitinfo.x >= centerX - halfBoxLength - 2 && hitinfo.x <= centerX + halfBoxLength + 2 &&
|
|
|
@@ -1042,7 +1053,7 @@ const projTreeObj = {
|
|
|
hitinfo.sheet.repaint();
|
|
|
}
|
|
|
};
|
|
|
- TreeNodeCellType.prototype.processMouseMove = function (hitInfo) {
|
|
|
+ /*TreeNodeCellType.prototype.processMouseMove = function (hitInfo) {
|
|
|
let sheet = hitInfo.sheet;
|
|
|
|
|
|
let div = sheet.getParent().getHost();
|
|
|
@@ -1056,7 +1067,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);
|