Merge branch 'master' of git.picaiba.com:g7hoo/chenzhou
This commit is contained in:
commit
43f7ccac4c
@ -33,10 +33,12 @@ watch(
|
||||
);
|
||||
|
||||
const rate = computed(() => {
|
||||
const _rate = ((props.rawData.nowYield / props.rawData.targetYield) * 100)
|
||||
.toFixed(2)
|
||||
.toString();
|
||||
return [parseInt(_rate), _rate.split(".")[1]];
|
||||
if (!props.rawData.nowYield || props.rawData.nowYield == 0) return [0, 0];
|
||||
// const _rate = ((props.rawData.nowYield / props.rawData.targetYield) * 100)
|
||||
// .toFixed(2)
|
||||
// .toString();
|
||||
// return [parseInt(_rate), _rate.split(".")[1]];
|
||||
return [parseInt(props.rawData.nowYield), props.rawData.nowYield.split(".")[1]];
|
||||
});
|
||||
|
||||
const chart = ref(null);
|
||||
|
@ -98,17 +98,17 @@ function loadData(monthlyTarget) {
|
||||
<p v-show="!show" class="empty-data-hint">暂无数据</p> -->
|
||||
<div class="container-body__h-full">
|
||||
<yield-chart
|
||||
v-if="displayProductionChart"
|
||||
:key="refreshToken + '_yield_chart'"
|
||||
:display-placeholder="!displayProductionChart"
|
||||
:key="refreshToken + '_yield_chart_linemonth'"
|
||||
:raw-data="websocketData"
|
||||
/>
|
||||
<rate-chart
|
||||
v-if="displayRateChart"
|
||||
:key="refreshToken + '_rate_chart'"
|
||||
:display-placeholder="!displayRateChart"
|
||||
:key="refreshToken + '_rate_chart_linemonth'"
|
||||
:raw-data="websocketData"
|
||||
:isOnlyChild="!displayProductionChart"
|
||||
/>
|
||||
<p
|
||||
<!-- <p
|
||||
v-if="!displayProductionChart && !displayRateChart"
|
||||
style="
|
||||
height: 100%;
|
||||
@ -121,7 +121,7 @@ function loadData(monthlyTarget) {
|
||||
"
|
||||
>
|
||||
暂无数据
|
||||
</p>
|
||||
</p> -->
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
|
@ -104,10 +104,12 @@ function loadData(dailyTarget) {
|
||||
<div class="container-body__h-full">
|
||||
<yield-chart
|
||||
:display-placeholder="!displayProductionChart"
|
||||
:key="refreshToken + '_yield_chart_linetoday'"
|
||||
:raw-data="websocketData"
|
||||
/>
|
||||
<rate-chart
|
||||
:display-placeholder="!displayRateChart"
|
||||
:key="refreshToken + '_rate_chart_linetoday'"
|
||||
:raw-data="websocketData"
|
||||
:isOnlyChild="!displayProductionChart"
|
||||
/>
|
||||
|
@ -36,7 +36,7 @@ const props = defineProps({
|
||||
}
|
||||
|
||||
.data-list {
|
||||
height: 100%;
|
||||
/* height: 100%; */
|
||||
width: 480px;
|
||||
|
||||
position: absolute;
|
||||
|
Loading…
Reference in New Issue
Block a user