zhangnuoyan
2024-08-24 392765e4c6823745345fe349e5422e1b98ca8f09
feat: 增加主题配色、增加组件
4个文件已添加
3个文件已修改
561 ■■■■ 已修改文件
src/styles/theme.scss 31 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/the-a-cascader/index.vue 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/the-a-change/index.vue 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/the-a-search/index.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/components/the-box-card/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/oneThree/comprehensive/index.vue 200 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/oneThree/comprehensive/index1.vue 247 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/styles/theme.scss
@@ -2,17 +2,18 @@
    --color-black: #000000;
    --color-border: #333335;
    --color-bg-1: #17171a;
    --color-bg-2: #1f2935;
    --color-bg-3: #2a2a2b;
    --color-bg-2: #0f2a58;
    --color-bg-popup: #0f2a58;
    --color-bg-3: rgba(255, 255, 255, 0.1);
    --color-bg-4: #313132;
    --color-bg-5: #373739;
    --color-bg-5: #1057fd;
    --color-bg-white: #f6f6f6;
    --color-text-1: rgba(255, 255, 255, 0.9);
    --color-text-2: rgba(255, 255, 255, 0.7);
    --color-text-3: rgba(255, 255, 255, 0.5);
    --color-text-4: rgba(255, 255, 255, 0.3);
    --color-fill-1: rgba(255, 255, 255, 0.04);
    --color-fill-2: rgba(255, 255, 255, 0.08);
    --color-fill-2: #0d2448;
    --color-fill-3: rgba(255, 255, 255, 0.12);
    --color-fill-4: rgba(255, 255, 255, 0.16);
    --color-border-1: #2e2e30;
@@ -46,7 +47,7 @@
    --color-tooltip-bg: #373739;
    --color-spin-layer-bg: rgba(51, 51, 51, 0.6);
    --color-menu-dark-bg: #232324;
    --color-menu-light-bg: linear-gradient(180deg, #1d4765 0%, #425365 100%);
    --color-menu-light-bg: #0f2a58;
    --color-menu-dark-hover: var(--color-fill-2);
    --color-mask-bg: rgba(23, 23, 26, 0.6);
    --red-1: 77, 0, 10;
@@ -194,7 +195,7 @@
    --primary-3: var(--arcoblue-3);
    --primary-4: var(--arcoblue-4);
    --primary-5: var(--arcoblue-5);
    --primary-6: var(--arcoblue-6);
    --primary-6: #fff;
    --primary-7: var(--arcoblue-7);
    --primary-8: var(--arcoblue-8);
    --primary-9: var(--arcoblue-9);
@@ -240,8 +241,20 @@
    --warning-9: var(--orange-9);
    --warning-10: var(--orange-10);
    .arco-card {
        background: rgba(0, 0, 10, 0.8);
        border: 1px solid #0e9cff;
        box-shadow: inset 0px 0px 87px 0px rgba(1, 194, 255, 0.4);
        border: none;
    }
    .card-bg-1 {
        background: #0d2448;
    }
    .arco-timepicker-container {
        background-color: var(--color-bg-1);
    }
    .arco-btn-primary,
    .arco-btn-primary[type="button"],
    .arco-btn-primary[type="submit"] {
        background-color: #1057fd;
        &:hover {
            opacity: 0.9;
        }
    }
}
src/views/components/the-a-cascader/index.vue
New file
@@ -0,0 +1,29 @@
<template>
    <div>
        <p>{{ title }}</p>
        <a-cascader :options="data" :style="{ width: '250px' }" :placeholder="placeholder" />
    </div>
</template>
<script lang="ts" setup name="TheACascader">
const props = withDefaults(
    defineProps<{
        placeholder?: string;
        title?: string;
        data?: Array<any>;
    }>(),
    {
        data: () => [],
        placeholder: "",
        title: ""
    }
);
</script>
<style lang="scss" scoped>
div {
    display: flex;
    align-items: center;
    > p {
        margin-right: 10px;
    }
}
</style>
src/views/components/the-a-change/index.vue
New file
@@ -0,0 +1,25 @@
<template>
    <a-radio-group type="button">
        <a-radio v-for="item in data" :key="item.value" :value="item.value">{{ item.name }}</a-radio>
    </a-radio-group>
    {{ defaultData }}
</template>
<script lang="ts" setup name="TheAChange">
const props = withDefaults(
    defineProps<{
        data?: Array<any>;
    }>(),
    {
        data: () => []
    }
);
</script>
<style lang="scss" scoped>
div {
    display: flex;
    align-items: center;
    > p {
        margin-right: 10px;
    }
}
</style>
src/views/components/the-a-search/index.vue
New file
@@ -0,0 +1,27 @@
<template>
    <div>
        <p>{{ title }}</p>
        <a-input-search :style="{ width: '250px' }" :placeholder="placeholder" />
    </div>
</template>
<script lang="ts" setup name="TheASearch">
const props = withDefaults(
    defineProps<{
        title?: string;
        placeholder?: string;
    }>(),
    {
        placeholder: "",
        title: ""
    }
);
</script>
<style lang="scss" scoped>
div {
    display: flex;
    align-items: center;
    > p {
        margin-right: 10px;
    }
}
</style>
src/views/components/the-box-card/index.vue
@@ -1,7 +1,7 @@
<template>
    <!-- 小卡片 -->
    <div class="the-box-card" :class="currentThemeMode === 'dark' ? 'box-card-dark' : ''">
        <a-card class="card-box">
        <a-card class="card-box card-bg-1">
            <div class="card-title">
                <div class="title-left">
                    <icon-home />
src/views/oneThree/comprehensive/index.vue
@@ -8,82 +8,126 @@
                :icon="item.icon"
                :unit="item.unit"
                :metering="item.metering"
                :colorBg="item.colorBg"
                :color-bg="item.colorBg"
            ></the-icon-card>
        </div>
        <div></div>
        <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>
        <div class="main">
            <the-box-card
                v-for="(item, index) in list"
                :id="item.id"
                :key="item.id"
                :icon="item.icon"
                :title="item.title"
                :unitTitle="item.unitTitle"
                :unitNum="item.unitNum"
                :unit-title="item.unitTitle"
                :unit-num="item.unitNum"
                :unit="item.unit"
                :id="item.id"
                :name="item.name"
                :notName="item.notName"
                :not-name="item.notName"
                :hire="item.hire"
                :vacant="item.vacant"
                :selfOccupation="item.selfOccupation"
                :self-occupation="item.selfOccupation"
                :service="item.service"
                :closes="item.closes"
                @handleClick="handleClick(item)"
                @handleDetails="handleDetails(item)"
            ></the-box-card>
        </div>
        <div>
            <a-card class="card-box">
                <the-img-card></the-img-card>
                <div class="card-box-right">
                    <div>
                        <a-space>
                            <a-button type="primary" size="mini">上访</a-button>
                            <a-button type="primary" status="danger" size="mini">涉毒</a-button>
                        </a-space>
                    </div>
                    <div>
                        <a-space>
                            <icon-book />
                            <icon-bar-chart />
                        </a-space>
                    </div>
                </div>
            </a-card>
        </div>
        <div>
            <the-a-table
                :columns="columns"
                :data="data"
                :pagination="false"
                :checkedValue="checkedValue"
                :colOpenShow="true"
                :showSelection="false"
                @selTableCol="selTableCol"
            >
                <template #index="{ record, rowIndex, column }">
                    {{ rowIndex + 1 }}
                </template>
                <template #action="{ record, rowIndex, column }">
                    <a-button type="text" size="small">查看</a-button>
                    <a-button type="text" size="small">管理</a-button>
                    <a-button type="text" size="small">关闭</a-button>
                </template>
            </the-a-table>
        </div>
        <div>
            <a-pagination :total="50" show-total show-jumper show-page-size />
            <a-pagination :total="50" show-total show-jumper show-page-size style="margin-top: 8px" />
        </div>
    </div>
</template>
<script lang="ts" setup name="comprehensive">
import { useTheme } from "@/hooks/useTheme";
import { Svg } from "@easyfe/admin-component";
const { themeModeOptions, currentThemeMode, handleThemeChange } = useTheme();
const changeData = reactive([
    {
        name: "1天",
        value: "1"
    },
    {
        name: "2天",
        value: "2"
    },
    {
        name: "3天",
        value: "3"
    },
    {
        name: "自定义",
        value: "custom"
    }
]);
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: "实有房屋",
@@ -189,36 +233,6 @@
    // 更多列...
];
const checkedValue = ref<string[]>(["序号", "Name", "Email", "操作"]);
// const onChange = (checkedValues: string[]) => {
//     console.log("checked = ", checkedValues);
//     checkedValue.value = checkedValues;
// };
const data = [
    {
        id: "1",
        name: "John Doe",
        age: 32,
        email: "john@example.com",
        address: "New York No. 1 Lake Park"
    },
    {
        id: "2",
        name: "Jane Smith",
        age: 28,
        email: "jane@example.com",
        address: "London No. 1 Lake Park"
    }
    // 更多数据项...
];
const selTableCol = (val: any) => {
    checkedValue.value = val;
    console.log(val);
};
const handleClick = (item: any) => {
    console.log(item, 888);
};
@@ -229,7 +243,25 @@
<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;
    }
    .top-title {
        display: flex;
    }
src/views/oneThree/comprehensive/index1.vue
New file
@@ -0,0 +1,247 @@
<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></div>
        <div>
            <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>
        <div>
            <a-card class="card-box">
                <the-img-card></the-img-card>
                <div class="card-box-right">
                    <div>
                        <a-space>
                            <a-button type="primary" size="mini">上访</a-button>
                            <a-button type="primary" status="danger" size="mini">涉毒</a-button>
                        </a-space>
                    </div>
                    <div>
                        <a-space>
                            <icon-book />
                            <icon-bar-chart />
                        </a-space>
                    </div>
                </div>
            </a-card>
        </div>
        <div>
            <the-a-table
                :columns="columns"
                :data="data"
                :pagination="false"
                :checked-value="checkedValue"
                :col-open-show="true"
                :show-selection="false"
                @selTableCol="selTableCol"
            >
                <template #index="{ record, rowIndex, column }">
                    {{ rowIndex + 1 }}
                </template>
                <template #action="{ record, rowIndex, column }">
                    <a-button type="text" size="small">查看</a-button>
                    <a-button type="text" size="small">管理</a-button>
                    <a-button type="text" size="small">关闭</a-button>
                </template>
            </the-a-table>
        </div>
        <div>
            <a-pagination :total="50" show-total show-jumper show-page-size />
        </div>
    </div>
</template>
<script lang="ts" setup name="comprehensive">
import { useTheme } from "@/hooks/useTheme";
import { Svg } from "@easyfe/admin-component";
const { themeModeOptions, currentThemeMode, handleThemeChange } = useTheme();
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"
    }
]);
const list = reactive([
    {
        icon: "",
        title: "A小区",
        unitTitle: "实有小区",
        unitNum: 32,
        unit: "栋",
        id: 1,
        metering: 0,
        name: 23,
        notName: 54,
        hire: 2,
        vacant: 43,
        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 checkedValue = ref<string[]>(["序号", "Name", "Email", "操作"]);
// const onChange = (checkedValues: string[]) => {
//     console.log("checked = ", checkedValues);
//     checkedValue.value = checkedValues;
// };
const data = [
    {
        id: "1",
        name: "John Doe",
        age: 32,
        email: "john@example.com",
        address: "New York No. 1 Lake Park"
    },
    {
        id: "2",
        name: "Jane Smith",
        age: 28,
        email: "jane@example.com",
        address: "London No. 1 Lake Park"
    }
    // 更多数据项...
];
const selTableCol = (val: any) => {
    checkedValue.value = val;
    console.log(val);
};
const handleClick = (item: any) => {
    console.log(item, 888);
};
const handleDetails = (item: any) => {
    console.log(item, 666);
};
</script>
<style lang="scss" scoped>
.comprehensive {
    padding: 20px;
    .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>