zhangxiao
2024-08-26 57b66478e7e335379435b31c20da4619bd1411f5
src/views/oneThree/comprehensive/index.vue
@@ -1,59 +1,66 @@
<template>
    <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 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>
                <a-button>
                    <template #icon>
                        <icon-refresh />
                    </template>
                    <template #default>重置</template>
                </a-button>
            <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>
        </div>
        <div class="main">
            <the-box-card
                v-for="(item, index) in list"
                :id="item.id"
                :key="item.id"
                :icon="item.icon"
                :title="item.title"
                :unit-title="item.unitTitle"
                :unit-num="item.unitNum"
                :unit="item.unit"
                :name="item.name"
                :not-name="item.notName"
                :hire="item.hire"
                :vacant="item.vacant"
                :self-occupation="item.selfOccupation"
                :service="item.service"
                :closes="item.closes"
                @handleClick="handleClick(item)"
                @handleDetails="handleDetails(item)"
            ></the-box-card>
            <!-- <a-scrollbar class="box-scrollbar" style="height: calc(100vh - 300px) overflow: auto"> -->
            <div class="cards">
                <the-box-card
                    v-for="(item, index) in list"
                    :id="item.id"
                    :key="item.id"
                    :icon="item.icon"
                    :title="item.title"
                    :unit-title="item.unitTitle"
                    :unit-num="item.unitNum"
                    :unit="item.unit"
                    :name="item.name"
                    :not-name="item.notName"
                    :hire="item.hire"
                    :vacant="item.vacant"
                    :self-occupation="item.selfOccupation"
                    :service="item.service"
                    :closes="item.closes"
                    @handleClick="handleClick(item)"
                    @handleDetails="handleDetails(item)"
                ></the-box-card>
            </div>
            <a-pagination :total="50" show-total show-jumper show-page-size style="margin-top: 8px" />
            <!-- </a-scrollbar> -->
        </div>
    </div>
</template>
@@ -179,8 +186,8 @@
        colorBg: "#9747FF"
    }
]);
const list = reactive([
    {
const list = reactive(
    new Array(5).fill({
        icon: "",
        title: "A小区",
        unitTitle: "实有小区",
@@ -195,43 +202,8 @@
        selfOccupation: 45,
        service: 23,
        closes: 54
    }
]);
//列表
const columns = [
    {
        title: "序号",
        key: "1",
        dataIndex: "index",
        slotName: "index",
        width: 80
    },
    {
        title: "Name",
        dataIndex: "name",
        key: "2"
    },
    {
        title: "Address",
        dataIndex: "address",
        key: "3"
    },
    {
        title: "Email",
        dataIndex: "email",
        key: "4"
    },
    {
        title: "操作",
        key: "5",
        slotName: "action",
        width: 200
    }
    // 更多列...
];
    })
);
const handleClick = (item: any) => {
    console.log(item, 888);
@@ -261,9 +233,17 @@
        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;
        width: 100%;
    }
    .card-box {
        width: 391px;