|
@@ -164,21 +164,19 @@ var TREE_SHEET_HELPER = {
|
|
|
sheet.setTag(iRow, iCol,tag);
|
|
|
}*/
|
|
|
if(colSetting.data.field=="code"){
|
|
|
- let tag ="";
|
|
|
+ let tag =null;
|
|
|
if(node.sourceType == ModuleNames.ration){//定额的时候换算子目
|
|
|
tag = node.data.adjustState?node.data.adjustState:'';
|
|
|
}/*else if(node.sourceType == ModuleNames.bills &&projectObj.ifItemCharHiden(setting)){//清单、并且项目特征列隐藏的时候悬浮提示 这里改成在 计量单位那里提示
|
|
|
tag = node.data.itemCharacterText?node.data.itemCharacterText:'';
|
|
|
}*/
|
|
|
- sheet.setTag(iRow, iCol,tag);
|
|
|
+ if(tag!=null&&tag!="") sheet.setTag(iRow, iCol,tag);
|
|
|
}
|
|
|
/*if(colSetting.data.field=="name"){ 2018-08-06 改成在编号列悬浮提示
|
|
|
let tag = node.data.itemCharacterText?node.data.itemCharacterText:'';
|
|
|
sheet.setTag(iRow, iCol,tag);
|
|
|
}*/
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
if(colSetting.visible == false) return;//隐藏列不做其它操作
|
|
|
var cell = sheet.getCell(iRow, iCol, GC.Spread.Sheets.SheetArea.viewport);
|
|
|
if (colSetting.data.getText && Object.prototype.toString.apply(colSetting.data.getText) === "[object Function]") {
|
|
@@ -211,7 +209,7 @@ var TREE_SHEET_HELPER = {
|
|
|
}
|
|
|
});
|
|
|
if(setting.setAutoFitRow){
|
|
|
- setting.setAutoFitRow(sheet,node)
|
|
|
+ setting.setAutoFitRow(sheet,node)//自动行高功能比较费时,400行,启用和不启用相差2秒左右
|
|
|
}
|
|
|
if (recursive) {
|
|
|
TREE_SHEET_HELPER.refreshTreeNodeData(setting, sheet, node.children, recursive);
|
|
@@ -508,9 +506,9 @@ var TREE_SHEET_HELPER = {
|
|
|
$editor.css("height", cellRect.height);
|
|
|
$editor.attr("gcUIElement", "gcEditingInput");//padding:0 //value="${context.sheet.getValue(context.row,context.col)}"
|
|
|
$editor.html(` <div class="input-group input-group-sm">
|
|
|
- <input type="text" id="esInput" class="form-control" aria-label="Text input with dropdown button" autocomplete="off" style="background-color:${cellStyle.backColor}">
|
|
|
+ <input type="text" id="esInput" class="form-control" aria-label="Text input with dropdown button" autocomplete="off" style=" background-color:${cellStyle.backColor}">
|
|
|
<div class="">
|
|
|
- <div class="triangle-border_dropdown tb-border_dropdown" id="esBtn" style="left: ${cellRect.width - 15+"px"}"></div>
|
|
|
+ <div class="triangle-border_dropdown tb-border_dropdown" id="esBtn" style="z-index:10; left: ${cellRect.width - 15+"px"};top:${cellRect.height/2-2+"px"}"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
`);
|
|
@@ -521,15 +519,16 @@ var TREE_SHEET_HELPER = {
|
|
|
|
|
|
TreeNodeCellType.prototype.updateEditor = function (editorContext, cellStyle, cellRect, context) {
|
|
|
let me = this;
|
|
|
- $(editorContext).append(`<div><ul class="es-list" style="display: block;background-color:${cellStyle.backColor}"></ul></div>`);//<li class="" data-value="" style=""> <br></li>
|
|
|
+ $(editorContext).append(`<div><ul class="es-list" style="display: block;"></ul></div>`);//<li class="" data-value="" style=""> <br></li> //background-color:${cellStyle.backColor}
|
|
|
$('#esInput').val(context.sheet.getValue(context.row,context.col));
|
|
|
$('#esInput').select();
|
|
|
projectObj.project.Ration.getNearRations(initNode.data,function(rations){
|
|
|
if(rations.length > 0){
|
|
|
let li_html = "";
|
|
|
for(let r of rations){
|
|
|
- if(r.code==initNode.data.code) continue; //排除自已
|
|
|
- li_html += `<li class="es_li" data-value="${r.code}" >${r.code} ${r.name} ${r.unit}</li>`;//定额编码+空格+定额名称+空格+定额单位。
|
|
|
+ let selfstyle = ""
|
|
|
+ if(r.code==initNode.data.code) selfstyle="es-list-selected" //continue; //改为不排除,标记本身
|
|
|
+ li_html += `<li class="es_li ${selfstyle}" data-value="${r.code}" >${r.code} ${r.name} ${r.unit}</li>`;//定额编码+空格+定额名称+空格+定额单位。
|
|
|
}
|
|
|
$(".es-list").html(li_html);
|
|
|
$(".es-list").css("min-width",cellRect.width);
|
|
@@ -541,6 +540,13 @@ var TREE_SHEET_HELPER = {
|
|
|
$(".es-list").hide();
|
|
|
context.sheet.endEdit();
|
|
|
})
|
|
|
+ $(".es-list").children(".es_li").hover(function(){
|
|
|
+ $(this).css("background-color",cellStyle.backColor);
|
|
|
+ },function(){
|
|
|
+ $(this).css("background-color","");
|
|
|
+ });
|
|
|
+
|
|
|
+
|
|
|
$("#esBtn").bind('click',function(e){
|
|
|
$(".es-list").toggle();
|
|
|
});
|
|
@@ -610,7 +616,7 @@ var TREE_SHEET_HELPER = {
|
|
|
let left = setting.pos.x + hitinfo.cellRect.x;
|
|
|
$(this._toolTipElement).css("top", top).css("left", left);*/
|
|
|
//显示在下方,三角形指
|
|
|
- let top = setting.pos.y + hitinfo.cellRect.y+26;
|
|
|
+ let top = setting.pos.y +hitinfo.cellRect.y+ hitinfo.cellRect.height+10;
|
|
|
let left = setting.pos.x + hitinfo.cellRect.x;
|
|
|
$(this._toolTipElement).css("top", top).css("left", left);
|
|
|
|