zhangnuoyan
2024-08-25 54f5cd85e43bf92266a2617994642e1b8aa5bcb5
src/views/oneThree/actualPopulation/index.vue
@@ -1,7 +1,241 @@
<template>
    <div class="actualPopulation">实有人口</div>
    <div class="comprehensive">
        <div class="top-title">
            <the-icon-card
                v-for="(item, index) in dataList"
                :key="index"
                :title="item.title"
                :icon="item.icon"
                :unit="item.unit"
                :metering="item.metering"
                :color-bg="item.colorBg"
            ></the-icon-card>
        </div>
        <div class="menus">
            <the-a-cascader :data="cascaderData" placeholder="请选择" title="区域"></the-a-cascader>
            <div><the-a-search placeholder="请输入" title="搜索"></the-a-search></div>
            <div><the-a-change :data="changeData" default-value="custom"></the-a-change></div>
            <div><a-time-picker type="time-range" style="width: 250px" /></div>
            <div>
                <a-button type="primary">
                    <template #icon>
                        <icon-search />
                    </template>
                    <template #default>搜索</template>
                </a-button>
            </div>
            <div>
                <a-button>
                    <template #icon>
                        <icon-refresh />
                    </template>
                    <template #default>重置</template>
                </a-button>
            </div>
        </div>
        <the-a-tabs style="margin: 8px 0" :data="['流动人口', '实有人口']" :index="0" />
        <div class="main">
            <div class="cards">
                <a-card v-for="(item, key) in list" :key="key" class="card-box card-bg-custom">
                    <the-img-card :title="item.title" :icon="item.icon" :contents="item.contents"></the-img-card>
                    <div class="card-box-right">
                        <div>
                            <a-space>
                                <a-button type="primary" size="mini">{{ item.tags[0] }}</a-button>
                                <a-button type="primary" status="danger" size="mini">{{ item.tags[1] }}</a-button>
                            </a-space>
                        </div>
                        <div>
                            <a-space>
                                <icon-book />
                                <icon-bar-chart />
                            </a-space>
                        </div>
                    </div>
                </a-card>
            </div>
            <a-pagination :total="50" show-total show-jumper show-page-size style="margin-top: 8px" />
        </div>
    </div>
</template>
<script lang="ts" setup name="actualPopulation"></script>
<script lang="ts" setup name="comprehensive">
import { Svg } from "@easyfe/admin-component";
const list = reactive(
    new Array(5).fill({
        icon: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/a8c8cdb109cb051163646151a4a5083b.png~tplv-uwbnlip3yd-webp.webp",
        title: "张三",
        tags: ["上访", "涉毒"],
        contents: [
            {
                key: "人员编号",
                value: "H324343"
            },
            {
                key: "出现天数",
                value: "2天"
            },
            {
                key: "居住地址",
                value: "经济快速等级考试"
            },
            {
                key: "身份证号",
                value: "3673672627722"
            }
        ]
    })
);
const cascaderData = reactive([
    {
        value: "beijing",
        label: "Beijing",
        children: [
            {
                value: "chaoyang",
                label: "ChaoYang",
                children: [
                    {
                        value: "datunli",
                        label: "Datunli"
                    }
                ]
            },
            {
                value: "haidian",
                label: "Haidian"
            },
            {
                value: "dongcheng",
                label: "Dongcheng"
            },
            {
                value: "xicheng",
                label: "Xicheng",
                children: [
                    {
                        value: "jinrongjie",
                        label: "Jinrongjie"
                    },
                    {
                        value: "tianqiao",
                        label: "Tianqiao"
                    }
                ]
            }
        ]
    },
    {
        value: "shanghai",
        label: "Shanghai",
        children: [
            {
                value: "huangpu",
                label: "Huangpu"
            }
        ]
    }
]);
const dataList = reactive([
    {
        title: "实有房屋",
        icon: "icon-house",
        unit: "栋",
        metering: 110,
        colorBg: "#2e85ff"
    },
    {
        title: "自主",
        icon: "icon-people",
        unit: "栋",
        metering: 10,
        colorBg: "#30C1A9"
    },
    {
        title: "出租",
        icon: "icon-house",
        unit: "栋",
        metering: 220,
        colorBg: "#E36B4D"
    },
    {
        title: "实有人口",
        icon: "icon-people",
        unit: "人",
        metering: 420,
        colorBg: "#2E85FF"
    },
    {
        title: "流动人员",
        icon: "icon-people",
        unit: "人",
        metering: 220,
        colorBg: "#30C1A9"
    },
    {
        title: "实有单位",
        icon: "menu-house",
        unit: "个",
        metering: 220,
        colorBg: "#FF4343"
    },
    {
        title: "再业",
        icon: "menu-house",
        unit: "个",
        metering: 220,
        colorBg: "#9747FF"
    }
]);
<style lang="scss" scoped></style>
const handleClick = (item: any) => {
    console.log(item, 888);
};
const handleDetails = (item: any) => {
    console.log(item, 666);
};
</script>
<style lang="scss" scoped>
.comprehensive {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    .menus {
        background: var(--color-bg-2);
        margin-top: 8px;
        padding: 14px 20px;
        display: flex;
        > div {
            margin-left: 20px;
        }
    }
    .main {
        padding: 8px 20px;
        background: var(--color-bg-2);
        margin-top: 8px;
        flex: 1;
        .cards {
            overflow: hidden;
            > div {
                float: left;
                margin: 0 20px 20px 0;
            }
        }
    }
    .top-title {
        display: flex;
    }
    .card-box {
        width: 391px;
        height: 202px;
        border-radius: 5px;
    }
    .card-box-right {
        margin-top: 10px;
        display: flex;
        justify-content: space-between;
    }
}
</style>