后台取数逻辑修改+前台展示优化

This commit is contained in:
zhanghan11 2024-07-08 16:57:37 +08:00
parent 189b2712eb
commit c76a15ef05
2 changed files with 19 additions and 19 deletions

View File

@ -185,13 +185,13 @@
>
<div
class="extra-bar-item"
:style="`height: ${parseInt(l1 )}%;background-color:#6581f0;`"
:style="`height: ${parseInt(l1 || 0)}%;background-color:#6581f0;`"
></div>
<div
class="extra-bar-text"
:style="`height: calc(100% - ${parseInt(l1)}%);`"
:style="`height: calc(100% - ${parseInt(l1 || 0)}%);`"
>
{{ parseFloat(l1 ).toFixed(2) }}
{{ parseFloat(l1 || 0).toFixed(2) }}
</div>
</div>
<div
@ -206,13 +206,13 @@
>
<div
class="extra-bar-item"
:style="`height: ${parseInt(l2)}%;background-color:#19ca88;`"
:style="`height: ${parseInt(l2 || 0)}%;background-color:#19ca88;`"
></div>
<div
class="extra-bar-text"
:style="`height: calc(100% - ${parseInt(l2)}%);`"
:style="`height: calc(100% - ${parseInt(l2 || 0)}%);`"
>
{{ parseFloat(l2).toFixed(2) }}
{{ parseFloat(l2 || 0).toFixed(2) }}
</div>
</div>
<div
@ -249,13 +249,13 @@
>
<div
class="extra-bar-item"
:style="`height: ${parseInt(r1)}%;background-color:#19ca88;`"
:style="`height: ${parseInt(r1 || 0)}%;background-color:#19ca88;`"
></div>
<div
class="extra-bar-text"
:style="`height: calc(100% - ${parseInt(r1)}%);`"
:style="`height: calc(100% - ${parseInt(r1 || 0)}%);`"
>
{{ parseFloat(r1).toFixed(2) }}
{{ parseFloat(r1 || 0).toFixed(2) }}
</div>
</div>
<div
@ -270,13 +270,13 @@
>
<div
class="extra-bar-item"
:style="`height: ${parseInt(r2)}%;background-color:#6581f0;`"
:style="`height: ${parseInt(r2 || 0)}%;background-color:#6581f0;`"
></div>
<div
class="extra-bar-text"
:style="`height: calc(100% - ${parseInt(r2)}%);`"
:style="`height: calc(100% - ${parseInt(r2 || 0)}%);`"
>
{{ parseFloat(r2).toFixed(2) }}
{{ parseFloat(r2 || 0).toFixed(2) }}
</div>
</div>
<div
@ -798,9 +798,9 @@ export default {
const { pzAlarmStr, otherAlarmStr, ssat, rot, oip, ov, owc } =
operation;
this.initBottomR1(parseFloat(oip).toFixed(2));
this.initBottomR2(parseFloat(ov).toFixed(2));
this.initBottomR3(parseFloat(owc).toFixed(2));
this.initBottomR1(parseFloat(oip || 0).toFixed(2));
this.initBottomR2(parseFloat(ov || 0).toFixed(2));
this.initBottomR3(parseFloat(owc || 0).toFixed(2));
this.r1 = ssat;
this.r2 = rot;
@ -814,9 +814,9 @@ export default {
this.initChart3(xPlcData, pz4, pz6, pz14, pz21);
const { pzAlarmStr, otherAlarmStr, owc, ov, oip, rot, ssat } = drive;
this.initBottomL1(parseFloat(owc).toFixed(2));
this.initBottomL2(parseFloat(ov).toFixed(2));
this.initBottomL3(parseFloat(oip).toFixed(2));
this.initBottomL1(parseFloat(owc || 0).toFixed(2));
this.initBottomL2(parseFloat(ov || 0).toFixed(2));
this.initBottomL3(parseFloat(oip || 0).toFixed(2));
this.l1 = rot;
this.l2 = ssat;

View File

@ -203,7 +203,7 @@
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['ipc:config:edit']"
v-hasPermi="['ipc:rulesConfig:edit']"
>修改</el-button>
</template>
</el-table-column>