@flexem/fc-gui 3.0.0-alpha.73 → 3.0.0-alpha.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -148,41 +148,41 @@ export class AlarmElement extends ConditionalDisplayElement {
|
|
|
148
148
|
text-align: ${this.model.generalSetting.headerFont.textAlign};
|
|
149
149
|
${this.model.generalSetting.headerFont.isUnderline ? 'text-decoration: underline' : ''};
|
|
150
150
|
vertical-align: middle;`;
|
|
151
|
-
for (let
|
|
151
|
+
for (let row = 0; row < 4; row++) {
|
|
152
152
|
const th = document.createElement('th');
|
|
153
|
-
th.innerHTML = this.model.columLabels[
|
|
154
|
-
th.style.cssText = `width: ${this.model.widths[
|
|
153
|
+
th.innerHTML = this.model.columLabels[row];
|
|
154
|
+
th.style.cssText = `width: ${this.model.widths[row] / this.model.size.width * 100}%;
|
|
155
155
|
border-style: solid;
|
|
156
156
|
border-color: ${this.model.generalSetting.splitLine};
|
|
157
|
-
border-left-width: ${!
|
|
157
|
+
border-left-width: ${!row || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
|
|
158
158
|
tr.appendChild(th);
|
|
159
159
|
}
|
|
160
160
|
table.appendChild(tr);
|
|
161
161
|
const levelColors = ['#3695FF', '#FFE900', '#FFA800', '#E84F4F'];
|
|
162
|
-
for (let
|
|
162
|
+
for (let row = 0; row < this.pageSize; row++) {
|
|
163
163
|
tr = document.createElement('tr');
|
|
164
|
-
tr.style.cssText = `height: ${this.model.heights[
|
|
164
|
+
tr.style.cssText = `height: ${this.model.heights[row + 1]}px;
|
|
165
165
|
background: ${this.model.generalSetting.tableFillColor};
|
|
166
166
|
font: ${this.model.generalSetting.fontStyle};
|
|
167
167
|
color: ${this.model.generalSetting.fontColor};
|
|
168
168
|
text-align: ${this.model.generalSetting.textAlign};
|
|
169
169
|
vertical-align: middle;`;
|
|
170
|
-
for (let
|
|
170
|
+
for (let col = 0; col < 4; col++) {
|
|
171
171
|
const td = document.createElement('td');
|
|
172
172
|
td.style.cssText = `border-style: solid;
|
|
173
173
|
border-color: ${this.model.generalSetting.splitLine};
|
|
174
174
|
border-top-width: ${this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;
|
|
175
|
-
border-left-width: ${!
|
|
176
|
-
if (this.alarmList[
|
|
177
|
-
if (
|
|
178
|
-
td.innerHTML = this.alarmList[
|
|
175
|
+
border-left-width: ${!col || this.model.generalSetting.isHiddenColumnSplitLine ? 0 : 1}px;`;
|
|
176
|
+
if (this.alarmList[row]) {
|
|
177
|
+
if (col !== 2) {
|
|
178
|
+
td.innerHTML = this.alarmList[row][col];
|
|
179
179
|
td.style.cssText += `${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
|
|
180
180
|
}
|
|
181
181
|
else {
|
|
182
182
|
const alarmLevel = document.createElement('div');
|
|
183
183
|
let alarmHeight = parseInt(this.model.generalSetting.fontSize) + 15;
|
|
184
|
-
if (alarmHeight > this.model.heights[
|
|
185
|
-
alarmHeight = this.model.heights[
|
|
184
|
+
if (alarmHeight > this.model.heights[row + 1])
|
|
185
|
+
alarmHeight = this.model.heights[row + 1];
|
|
186
186
|
let margin = '0 15px';
|
|
187
187
|
if (this.model.generalSetting.textAlign === 'left') {
|
|
188
188
|
margin = '0 30px 0 0';
|
|
@@ -192,19 +192,32 @@ export class AlarmElement extends ConditionalDisplayElement {
|
|
|
192
192
|
}
|
|
193
193
|
alarmLevel.style.cssText = `margin: ${margin};
|
|
194
194
|
border-radius: 5px;
|
|
195
|
-
background: ${levelColors[this.alarmList[
|
|
195
|
+
background: ${levelColors[this.alarmList[row][col]]};
|
|
196
196
|
color: #ffffff;
|
|
197
|
-
width: ${this.model.widths[
|
|
197
|
+
width: ${this.model.widths[col] - 30}px;
|
|
198
198
|
height: ${alarmHeight}px;
|
|
199
|
-
max-height: ${this.model.heights[
|
|
199
|
+
max-height: ${this.model.heights[row + 1]}px;
|
|
200
200
|
display: flex;
|
|
201
201
|
justify-content: center;
|
|
202
202
|
align-items: center;
|
|
203
203
|
${this.model.generalSetting.isUnderline ? 'text-decoration: underline' : ''};`;
|
|
204
|
-
alarmLevel.innerHTML = this.model.levelText[this.alarmList[
|
|
204
|
+
alarmLevel.innerHTML = this.model.levelText[this.alarmList[row][col]];
|
|
205
205
|
td.appendChild(alarmLevel);
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
+
else if (col === 2) {
|
|
209
|
+
const alarmLevel = document.createElement('div');
|
|
210
|
+
let margin = '0 15px';
|
|
211
|
+
if (this.model.generalSetting.textAlign === 'left') {
|
|
212
|
+
margin = '0 30px 0 0';
|
|
213
|
+
}
|
|
214
|
+
else if (this.model.generalSetting.textAlign === 'right') {
|
|
215
|
+
margin = '0 0 0 30px';
|
|
216
|
+
}
|
|
217
|
+
alarmLevel.style.cssText = `margin: ${margin};
|
|
218
|
+
width: ${this.model.widths[col] - 30}px;`;
|
|
219
|
+
td.appendChild(alarmLevel);
|
|
220
|
+
}
|
|
208
221
|
tr.appendChild(td);
|
|
209
222
|
}
|
|
210
223
|
table.appendChild(tr);
|