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