|
@@ -404,6 +404,7 @@ var gljOprObj = {
|
|
|
rationGLJEditCheck:function (args) {//true 可以编辑,false 不能编辑
|
|
|
var me = gljOprObj;
|
|
|
var header = me.setting.header;
|
|
|
+ if(me.sheet.getTag(args.row,args.col)=="locked") return false;//如果是双击树节点编号里设置了锁定标记,不能编辑
|
|
|
if (_.includes(me.setting.view.lockColumns, args.col)) return false;//如果是锁定的列,不能编辑
|
|
|
if(me.sheetData[args.row] != undefined){
|
|
|
if(me.sheetData[args.row].isMixRatio){//对于组成物列
|
|
@@ -1277,6 +1278,7 @@ var gljOprObj = {
|
|
|
let margin = 3;
|
|
|
|
|
|
function TreeNodeCellType() {
|
|
|
+ this.ctx = null;
|
|
|
}
|
|
|
function drowRect(ctx, x, y, w, h) {
|
|
|
ctx.save();
|
|
@@ -1328,9 +1330,9 @@ var gljOprObj = {
|
|
|
ctx.restore();
|
|
|
return offset;
|
|
|
}
|
|
|
-
|
|
|
TreeNodeCellType.prototype = comboboxOptions?sheetCommonObj.getDynamicCombo():new ns.CellTypes.Text();
|
|
|
TreeNodeCellType.prototype.paint = function (ctx, value, x, y, w, h, style, options) {
|
|
|
+ this.ctx= ctx;
|
|
|
if (style.backColor) {//先画背景色
|
|
|
ctx.save();
|
|
|
ctx.fillStyle = style.backColor;
|
|
@@ -1387,8 +1389,13 @@ var gljOprObj = {
|
|
|
return;
|
|
|
}
|
|
|
}
|
|
|
- GC.Spread.Sheets.CellTypes.ComboBox.prototype.processMouseDown.apply(this, arguments);
|
|
|
- // GC.Spread.Sheets.CellTypes.Text.prototype.paint.apply(this, arguments);
|
|
|
+ if(comboboxOptions&&hitinfo.x > hitinfo.cellRect.x+hitinfo.cellRect.width -15){//点击了下拉框按钮,这里要判断下拉框是否会被挡住,从而决定是否自动调整滚动条
|
|
|
+ hitinfo.sheet.setTag(hitinfo.row,hitinfo.col,"");
|
|
|
+ sheetCommonObj.scrollSheetForOption(hitinfo.sheet,this.ctx,hitinfo.cellRect,hitinfo.row,comboboxOptions);//下拉框超出显示后自动调整滚动条
|
|
|
+ GC.Spread.Sheets.CellTypes.ComboBox.prototype.processMouseDown.apply(this, arguments);
|
|
|
+ }else {
|
|
|
+ hitinfo.sheet.setTag(hitinfo.row,hitinfo.col,"locked")//通过这个来控制除了点击下拉框的三角形,点击其它地方不充许进入编辑状态,不然不好控制下拉框超出页面后调整滚动条
|
|
|
+ }
|
|
|
};
|
|
|
let cellType = new TreeNodeCellType();
|
|
|
if(comboboxOptions){
|
|
@@ -1409,7 +1416,7 @@ var gljOprObj = {
|
|
|
locateZTree: function(ID) {
|
|
|
let zTree = $.fn.zTree.getZTreeObj("gljTree");
|
|
|
let node = null;
|
|
|
- if (ID) node = zTree.getNodesByParam('ID', ID, null)[0]
|
|
|
+ if (ID) node = zTree.getNodesByParam('ID', ID, null)[0];
|
|
|
if (!node) node = zTree.getNodeByTId('gljTree_1');
|
|
|
zTree.selectNode(node);
|
|
|
gljOprObj.gljCurTypeId = ID;
|