9/10
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
<div class="searchLabel">选择日期</div>
|
||||
<el-date-picker
|
||||
v-model="date"
|
||||
type="date"
|
||||
placeholder="选择日期"
|
||||
value-format="YYYY-MM-DD"
|
||||
style="width: 400px; margin-right: 10px"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
></el-date-picker>
|
||||
<el-button type="primary" @click="querySelect">查询</el-button>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
@@ -46,7 +46,7 @@
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px; position: relative; z-index: 2" :gutter="20">
|
||||
<el-row :gutter="20" style="margin-top: 20px; position: relative; z-index: 2">
|
||||
<el-col :lg="24" :xl="24">
|
||||
<div class="cardbox w-full" style="height: 400px">
|
||||
<Echarts :options="options3"></Echarts>
|
||||
@@ -63,7 +63,7 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue';
|
||||
import Echarts from '@/components/Echarts/index.vue';
|
||||
import { EChartsOption } from 'echarts';
|
||||
@@ -589,7 +589,7 @@ function MoveInFun() {
|
||||
const total = res.data.totalHouse;
|
||||
const occupied = res.data.occupiedHouse || 0; // 确保有值
|
||||
// 计算入住率,防止除以0
|
||||
const rate = total > 0 ? ((occupied / total) * 100).toFixed(1) : '0.0';
|
||||
const rate = total > 0 ? ((occupied / total) * 100).toFixed(2) : '0.0';
|
||||
// 返回带换行符的字符串:第一行是百分比,第二行是文字
|
||||
return `{rate|${rate}%}\n{title|入住率}`;
|
||||
};
|
||||
@@ -644,7 +644,7 @@ function MoveInPersonAge() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.personnel {
|
||||
position: relative;
|
||||
background: #deedff;
|
||||
|
||||
Reference in New Issue
Block a user