|
@@ -20,7 +20,8 @@ let zmhs_obj = {
|
|
|
getText:{
|
|
|
forContent:function (item) {
|
|
|
if(gljUtil.isDef(item.select_code)&&item.select_code!=""){
|
|
|
- return item.select_code;
|
|
|
+ let option = _.find(item.option_list,{"value":item.select_code})
|
|
|
+ return option?option.text:item.select_code;
|
|
|
}else {
|
|
|
return item.content;
|
|
|
}
|
|
@@ -28,7 +29,7 @@ let zmhs_obj = {
|
|
|
}
|
|
|
},
|
|
|
autoFit:true,
|
|
|
- fitRow:['name']
|
|
|
+ fitRow:['name','content']
|
|
|
},
|
|
|
cusSpread:null,
|
|
|
cusSheet:null,
|
|
@@ -151,9 +152,12 @@ let zmhs_obj = {
|
|
|
|
|
|
getComboBoxForCodes:function (coe,i) {
|
|
|
this.coeSheet.getCell(i, 2, GC.Spread.Sheets.SheetArea.viewport).locked(false);
|
|
|
- let options = coe.option_codes.split("|");
|
|
|
+ let options = coe.option_list; //coe.option_codes.split("|");
|
|
|
let combo = sheetCommonObj.getDynamicCombo(true);
|
|
|
- combo.items(options);//itemHeight(options.length).
|
|
|
+ let buttonRow = this.coeSheet.getViewportBottomRow(1);
|
|
|
+ console.log(buttonRow);
|
|
|
+ combo.editorValueType(GC.Spread.Sheets.CellTypes.EditorValueType.value);
|
|
|
+ combo.items(options).maxDropDownItems(buttonRow - i -1 < 3 ?3:buttonRow - i -1 );//itemHeight(options.length).
|
|
|
this.coeSheet.setCellType(i, 2, combo, GC.Spread.Sheets.SheetArea.viewport);
|
|
|
this.coeSheet.setValue(i, 2, coe.select_code);
|
|
|
|
|
@@ -230,6 +234,7 @@ let zmhs_obj = {
|
|
|
|
|
|
refresh:function () {
|
|
|
$('#coeSpread').is(':visible')&&this.coeSpread?this.coeSpread.refresh():'';
|
|
|
+ $('#coeSpread').is(':visible')&&this.coeSpread?this.showDatas():'';//这里combobox下拉框要重新加载一下
|
|
|
$('#cusSpread').is(':visible')&&this.cusSpread?this.cusSpread.refresh():'';
|
|
|
$('#assSpread').is(':visible')&&this.assSpread?this.assSpread.refresh():'';
|
|
|
},
|