<template>
|
<!-- 小卡片 -->
|
<div class="the-box-card" :class="currentThemeMode === 'dark' ? 'box-card-dark' : ''">
|
<a-card class="card-box card-bg-1">
|
<div class="card-title">
|
<div class="title-left">
|
<icon-home />
|
<div style="margin-left: 10px">{{ title }}</div>
|
</div>
|
<div class="card-more" @click="handleDetails">详情 ></div>
|
</div>
|
<div class="card-content">
|
<div :span="8" class="card-box-col" @click="handleClick">
|
<div class="card-box-title">
|
<div>{{ unitTitle }}</div>
|
<div>></div>
|
</div>
|
<div class="title-people">
|
{{ unitNum }} <span>{{ unit }}</span>
|
</div>
|
</div>
|
<div :span="8" class="card-box-col" @click="handleClick">
|
<div class="card-box-title">
|
<div>{{ unitTitle }}</div>
|
<div>></div>
|
</div>
|
<div class="title-people">
|
{{ unitNum }} <span>{{ unit }}</span>
|
</div>
|
</div>
|
<div :span="8" class="card-box-col" @click="handleClick">
|
<div class="card-box-title">
|
<div>{{ unitTitle }}</div>
|
<div>></div>
|
</div>
|
<div class="title-people">
|
{{ unitNum }} <span>{{ unit }}</span>
|
</div>
|
</div>
|
</div>
|
<div class="card-content-footer">
|
<div class="card-footer-box">
|
<div><span>实名</span> | <span>未实名</span>:</div>
|
<div>
|
<span>{{ name }}</span> | <span>{{ notName }}</span>
|
</div>
|
</div>
|
<div class="card-footer-box">
|
<div><span>出租</span> | <span>空置</span> | <span>自住</span>:</div>
|
<div>
|
<span>{{ hire }}</span> | <span>{{ vacant }}</span> | <span>{{ selfOccupation }}</span>
|
</div>
|
</div>
|
<div class="card-footer-box">
|
<div><span>在业</span> | <span>关闭</span>:</div>
|
<div>
|
<span>{{ service }}</span> | <span>{{ closes }}</span>
|
</div>
|
</div>
|
</div>
|
</a-card>
|
</div>
|
</template>
|
<script lang="ts" setup name="TheIconCard">
|
import { useTheme } from "@/hooks/useTheme";
|
import { Svg } from "@easyfe/admin-component";
|
|
const { themeModeOptions, currentThemeMode, handleThemeChange } = useTheme();
|
const props = withDefaults(
|
defineProps<{
|
icon?: string;
|
title?: string;
|
unitTitle?: string;
|
unitNum?: number;
|
unit?: string;
|
name?: number;
|
notName?: number;
|
hire?: number;
|
vacant?: number;
|
selfOccupation?: number;
|
service?: number;
|
closes?: number;
|
}>(),
|
{
|
icon: "", //图标
|
title: "", //标题
|
unitTitle: "", //单位标题
|
unitNum: 0, //单位数量
|
unit: "", //单位
|
name: 0, //实名
|
notName: 0, //未实名
|
hire: 0, //出租
|
vacant: 0, //空置
|
selfOccupation: 0, //自住
|
service: 0, //在业
|
closes: 0 //关闭
|
}
|
);
|
const data = reactive({
|
icon: "",
|
title: "",
|
unitTitle: "",
|
unit: "",
|
name: "",
|
notName: "",
|
hire: 0,
|
vacant: 0,
|
selfOccupation: 0,
|
service: 0,
|
closes: 0
|
});
|
// const dateType = ref("hour");
|
|
// const emits = defineEmits<{
|
// (e: "init", value: echarts.ECharts): void;
|
// }>();
|
|
// function initChart(v: any) {
|
// emits("init", v);
|
// }
|
const emits = defineEmits<{
|
(e: "handleDetails", data: object): void;
|
(e: "handleClick", data: object): void;
|
}>();
|
const handleDetails = (item: any) => {
|
emits("handleDetails", item);
|
};
|
const handleClick = (item: any) => {
|
emits("handleClick", item);
|
};
|
</script>
|
<style lang="scss" scoped>
|
.box-card-dark {
|
.card-box {
|
// display: flex;
|
}
|
}
|
.the-box-card {
|
border-radius: 5px;
|
box-sizing: border-box;
|
margin-right: 10px;
|
min-width: 188px;
|
width: 382.5px;
|
max-height: 257px;
|
border-radius: 5px;
|
opacity: 1;
|
.card-title {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
.title-left {
|
display: flex;
|
color: rgb(var(--link-6));
|
font-size: 20px;
|
}
|
.card-more {
|
color: var(--color-text-3);
|
font-size: 14px;
|
cursor: pointer;
|
}
|
}
|
.card-content {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
margin-top: 13px;
|
.card-box-col {
|
background-color: var(--color-bg-3);
|
// margin-right: 10px;
|
width: 108px;
|
height: 70px;
|
border-radius: 5px;
|
padding: 10px;
|
line-height: 26px;
|
cursor: pointer;
|
.card-box-title {
|
display: flex;
|
justify-content: space-between;
|
align-items: center;
|
color: var(--color-text-1);
|
font-size: 14px;
|
}
|
.title-people {
|
color: #ffbd43;
|
font-size: 14px;
|
}
|
}
|
}
|
.card-content-footer {
|
margin-top: 10px;
|
line-height: 24px;
|
.card-footer-box {
|
display: flex;
|
align-items: center;
|
color: var(--color-text-1);
|
font-size: 14px;
|
}
|
}
|
|
.card-box {
|
width: 100%;
|
height: 100%;
|
}
|
:deep(.arco-card-body) {
|
// display: flex;
|
// align-items: center;
|
// justify-content: center;
|
}
|
}
|
</style>
|