From 0ed3d832736d6b0d506988953669b36663d828f4 Mon Sep 17 00:00:00 2001
From: zyy <1787816799@qq.com>
Date: Tue, 22 Sep 2020 18:45:20 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=A1=A8=E6=A0=BC=E9=85=8D?=
=?UTF-8?q?=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/iscs/shape/stateTable.js | 14 +++++++-------
.../iscs/iscsDraw/icscComponents/stateTable.vue | 14 ++++++++++++++
src/views/iscs/iscsDraw/icscComponents/text.vue | 2 +-
3 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/src/iscs/shape/stateTable.js b/src/iscs/shape/stateTable.js
index e971e3bd1..a3d4f0e35 100644
--- a/src/iscs/shape/stateTable.js
+++ b/src/iscs/shape/stateTable.js
@@ -191,7 +191,7 @@ export default class StateTable extends Group {
y2: rowNum * model.rowHeight
},
style: {
- stroke: '#FFF',
+ stroke: model.borderColor || '#FFF',
lineWidth: 2
}
});
@@ -208,7 +208,7 @@ export default class StateTable extends Group {
height: rowNum * model.rowHeight
},
style: {
- stroke: '#aFFF',
+ stroke: model.borderColor || '#aFFF',
fill: 'rgba(255, 255, 255, 0)',
lineWidth: 2
}
@@ -225,7 +225,7 @@ export default class StateTable extends Group {
y2: i * model.rowHeight
},
style: {
- stroke: '#FFF',
+ stroke: model.borderColor || '#FFF',
lineWidth: 2
}
});
@@ -244,7 +244,7 @@ export default class StateTable extends Group {
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[0],
- textFill: '#FFF',
+ textFill: model.textColor || '#FFF',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@@ -266,7 +266,7 @@ export default class StateTable extends Group {
fontSize: model.headerFontSize,
fontFamily: 'consolas',
text: model.headerContextList[i],
- textFill: '#FFF',
+ textFill: model.textColor || '#FFF',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@@ -310,7 +310,7 @@ export default class StateTable extends Group {
fontSize: model.fontSize,
fontFamily: 'consolas',
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].default : item['column' + (j + 1)],
- textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : '#4CCDE4',
+ textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].color : this.model.textColor ? this.model.textColor : '#4CCDE4',
textAlign: 'center',
textPosition: 'inside',
textVerticalAlign: 'bottom',
@@ -331,7 +331,7 @@ export default class StateTable extends Group {
fontSize: model.fontSize,
fontFamily: 'consolas',
text: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unit : '',
- textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : '#4CCDE4',
+ textFill: stateMap[item['column' + (j + 1)]] ? stateMap[item['column' + (j + 1)]].unitColor : this.model.textColor ? this.model.textColor : '#4CCDE4',
textAlign: 'right',
textPosition: 'inside',
textVerticalAlign: 'bottom',
diff --git a/src/views/iscs/iscsDraw/icscComponents/stateTable.vue b/src/views/iscs/iscsDraw/icscComponents/stateTable.vue
index 976eeb9e5..d89ad16cb 100644
--- a/src/views/iscs/iscsDraw/icscComponents/stateTable.vue
+++ b/src/views/iscs/iscsDraw/icscComponents/stateTable.vue
@@ -10,6 +10,12 @@
+
+
+
+
+
+
@@ -94,6 +100,8 @@ export default {
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],
+ textColor: '',
+ borderColor: '',
headerType: 'normal',
tableData: [{}],
headerContextList: [],
@@ -173,6 +181,8 @@ export default {
this.addModel.y = model.point.y;
this.addModel.columnNum = model.columnNum;
this.addModel.rowNum = model.rowNum;
+ this.addModel.textColor = model.textColor;
+ this.addModel.borderColor = model.borderColor;
this.addModel.columnWidthList = model.columnWidthList;
this.addModel.headerType = model.headerType;
this.addModel.tableData = model.tableData;
@@ -205,6 +215,8 @@ export default {
headerType: this.addModel.headerType,
tableData: this.addModel.tableData,
_type: 'StateTable',
+ textColor: this.addModel.textColor,
+ borderColor: this.addModel.borderColor,
headerFontSize: this.addModel.headerFontSize,
fontSize: this.addModel.fontSize,
headerContextList: this.addModel.headerContextList,
@@ -247,6 +259,8 @@ export default {
rowHeight: 25,
x: 10,
y: 10,
+ textColor: '',
+ borderColor: '',
columnNum: 2,
rowNum: 2,
columnWidthList: [50, 50],
diff --git a/src/views/iscs/iscsDraw/icscComponents/text.vue b/src/views/iscs/iscsDraw/icscComponents/text.vue
index 354550bc6..17fa17cbb 100644
--- a/src/views/iscs/iscsDraw/icscComponents/text.vue
+++ b/src/views/iscs/iscsDraw/icscComponents/text.vue
@@ -20,7 +20,7 @@
-
+