From 40f2e0a67cb3b788262f156deb7187d9735b5196 Mon Sep 17 00:00:00 2001 From: zhangnuoyan <9354631+zhangnuoyan@user.noreply.gitee.com> Date: 星期日, 25 八月 2024 14:25:38 +0800 Subject: [PATCH] feat: 增加一些组件 --- src/views/oneThree/house/index.vue | 233 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 230 insertions(+), 3 deletions(-) diff --git a/src/views/oneThree/house/index.vue b/src/views/oneThree/house/index.vue index 47354f1..66d697e 100644 --- a/src/views/oneThree/house/index.vue +++ b/src/views/oneThree/house/index.vue @@ -1,7 +1,234 @@ <template> - <div class="house">瀹炴湁鎴垮眿</div> + <div class="comprehensive"> + <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"> + <div class="menus"> + <div> + <the-a-select :data="['1鍙锋ゼ', '2鍙锋ゼ']" placeholder="璇烽�夋嫨" title="鎴垮眿鍦板潃"></the-a-select> + </div> + <div><the-a-select :data="['鏄�', '鍚�']" placeholder="璇烽�夋嫨" title="鎴垮眿鐘舵��"></the-a-select></div> + <div> + <the-a-select :data="['姝e簭', '鍊掑簭']" placeholder="璇烽�夋嫨" title="鎺掑簭"></the-a-select> + </div> + <div class="right"> + <div> + <icon-list size="20" /> + </div> + <div class="active"> + <icon-apps size="20" /> + </div> + </div> + </div> + <div class="cards"> + <the-house-card + v-for="(item, index) in list" + :key="index" + :tag="item.tag" + :content="item.content" + :title="item.title" + @handleClick="handleClick(item)" + @handleDetails="handleDetails(item)" + ></the-house-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="house"></script> +<script lang="ts" setup name="comprehensive"> +import { Svg } from "@easyfe/admin-component"; +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 list = reactive( + new Array(8) + .fill({ + title: "20-1", + content: "鎬�/鑰�/骞�: 3/2/1浜�", + tag: { + text: "鍑虹", + color: "rgba(227, 107, 77, 0.6)" + } + }) + .concat( + new Array(3).fill({ + title: "20-1", + content: "鎬�/鑰�/骞�: 3/2/1浜�", + tag: { + text: "鍑虹", + color: "rgba(50, 111, 255, 0.6)" + } + }) + ) + .concat( + new Array(5).fill({ + title: "20-1", + content: "鎬�/鑰�/骞�: 3/2/1浜�", + tag: { + text: "鍑虹", + color: "rgba(48, 193, 169, 0.6)" + } + }) + ) +); -<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> +.menus .right { + background: var(--color-fill-2); + padding: 2px; + display: flex; + position: absolute; + right: 0; + margin-right: 0; + > div { + width: 34px; + height: 34px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + &.active { + background: #1057fd; + color: #fff; + } + } +} +.main .menus { + padding: 0 !important; + margin-bottom: 20px; +} +.comprehensive { + display: flex; + flex-direction: column; + height: 100%; + padding: 20px; + .menus { + position: relative; + 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 { + border-radius: 5px; + } + .card-box-right { + margin-top: 10px; + display: flex; + justify-content: space-between; + } +} +</style> -- Gitblit v1.8.0