<template> <div class="index"> <div class="appointment"> <div class="type"><span class="point"></span> 待预约的服务</div> <div class="item-container"> <Item v-for="(item, index) in items" :item="item" :key="index" /> </div> </div> <div class="appointmented"> <div class="type"><span class="point"></span>已预约的服务</div> <div class="item-container"> <Item v-for="(item, index) in itemb" :item="item" :key="index" /> </div> </div> <!-- 新卡-初始对话框 --> <a-modal v-model="visible" title="个人基本信息填写" @ok="handleOk" :footer="null" > <Form /> </a-modal> </div> </template> <script> import Item from "./components/item.vue"; import Form from "./components/form.vue"; export default { components: { Item, Form }, data() { return { visible: true, items: [ { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 1, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 1, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 1, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 1, date: "2021-11-18", }, ], itemb: [ { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 2, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 2, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 2, date: "2021-11-18", }, { name: "体检套餐名称-某某单位-某某套餐", detailUrl: "http://baidu.com", type: 2, date: "2021-11-18", }, ], }; }, methods: { showModal() { this.visible = true; }, handleOk(e) { console.log(e); this.visible = false; }, }, }; </script> <style lang="less" scoped> .index { padding-bottom: 48px; padding-top: 20px; background-color: #fafafa; ::v-deep .ant-modal { background-color: saddlebrown; } ::v-deep .ant-modal-footer { display: none; } .appointment, .appointmented { padding: 19.5px 14.5px 33.5px 14.5px; background-color: white; width: 900px; margin: 0 auto; .point { display: inline-block; border-radius: 5px; width: 6px; height: 6px; background-color: #3f7ffb; margin-right: 6px; position: relative; top: -1px; } border-radius: 8px; .type { font-size: 14px; font-weight: bold; } .item-container { margin-top: 8.5px; } } .appointmented { margin-top: 20px; .point { background-color: #ffcc00; } } } </style>