iscs状态表调整
This commit is contained in:
parent
f6b6dd2f46
commit
cd57807d1f
@ -59,6 +59,12 @@ export default class StateTable extends Group {
|
||||
});
|
||||
this.lines = [];
|
||||
let columnWidth = 0;
|
||||
let rowNum = model.rowNum;
|
||||
let contentIndex = 2;
|
||||
if (model.headerType === 'none') {
|
||||
rowNum = model.rowNum - 1;
|
||||
contentIndex = 1;
|
||||
}
|
||||
model.columnWidthList.forEach(item => {
|
||||
columnWidth += item;
|
||||
const line = new Line({
|
||||
@ -68,7 +74,7 @@ export default class StateTable extends Group {
|
||||
x1: columnWidth,
|
||||
y1: model.headerType === 'merge' ? model.rowHeight : 0,
|
||||
x2: columnWidth,
|
||||
y2: model.rowNum * model.rowHeight
|
||||
y2: rowNum * model.rowHeight
|
||||
},
|
||||
style: {
|
||||
stroke: '#FFF',
|
||||
@ -85,7 +91,7 @@ export default class StateTable extends Group {
|
||||
x: 0,
|
||||
y: 0,
|
||||
width: columnWidth,
|
||||
height: model.rowNum * model.rowHeight
|
||||
height: rowNum * model.rowHeight
|
||||
},
|
||||
style: {
|
||||
stroke: '#aFFF',
|
||||
@ -94,7 +100,7 @@ export default class StateTable extends Group {
|
||||
}
|
||||
});
|
||||
this.grouper.add(this.tabelBorder);
|
||||
for (let i = 0; i < model.rowNum; i++) {
|
||||
for (let i = 0; i < rowNum; i++) {
|
||||
const line = new Line({
|
||||
zlevel: this.zlevel,
|
||||
z: this.z,
|
||||
@ -168,7 +174,7 @@ export default class StateTable extends Group {
|
||||
_subType: stateMap[item['column' + (j + 1)]],
|
||||
style:{
|
||||
x: elem / 2 + width,
|
||||
y: model.rowHeight * (i + 2),
|
||||
y: model.rowHeight * (i + contentIndex),
|
||||
fontWeight: 'normal',
|
||||
fontSize: model.fontSize,
|
||||
fontFamily: 'consolas',
|
||||
|
@ -159,6 +159,7 @@ export default {
|
||||
this.addModel.tableData = model.tableData;
|
||||
this.addModel.headerFontSize = model.headerFontSize;
|
||||
this.addModel.fontSize = model.fontSize;
|
||||
this.addModel.headerContextList = model.headerContextList;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user