From 3376c3106bef417ca184947c1afc6ef2532929a7 Mon Sep 17 00:00:00 2001 From: qushaowei <qushaowei@163.com> Date: 星期五, 22 三月 2024 10:01:43 +0800 Subject: [PATCH] 问题项修改 --- src/views/mdc/base/WorkshopSignageEntrance.vue | 70 +++++++++++++++++++++++++++++++++++ 1 files changed, 70 insertions(+), 0 deletions(-) diff --git a/src/views/mdc/base/WorkshopSignageEntrance.vue b/src/views/mdc/base/WorkshopSignageEntrance.vue new file mode 100644 index 0000000..1af14ee --- /dev/null +++ b/src/views/mdc/base/WorkshopSignageEntrance.vue @@ -0,0 +1,70 @@ +<template> + <div class="page-container"> + <a-list + :grid="{ gutter: [{xs: 0, sm: 24, md: 24, lg: 56, xl: 64, xxl: 80},20], xs: 1, sm: 2, md: 2, lg: 3, xl: 4, xxl: 4 }" + :data-source="workshopList"> + <a-list-item slot="renderItem" slot-scope="item, index"> + <div class="workshop-name" @click="navigateToWorkshopSignage(item.id)">{{item.workshopName}}</div> + </a-list-item> + </a-list> + + </div> +</template> + +<script> + import api from '@/api/mdc' + + export default { + name: 'WorkshopSignageEntrance', + data() { + return { + indexStyle: 1, + workshopList: [] + } + }, + created() { + this.getWorkshopListByApi() + }, + methods: { + /** + * 閫氳繃杞﹂棿Id璺宠浆鑷崇浉搴旇溅闂村ぇ灞忕湅鏉� + * @param id 杞﹂棿Id + */ + navigateToWorkshopSignage(id) { + const url = this.$router.resolve(`/MdcWorkshopSignage/${id}`).href + window.open(url, '_blank') + }, + /** + * 鑾峰彇杞﹂棿鍒楄〃 + */ + getWorkshopListByApi() { + api.getWorkshopListInHomePageApi().then(res => { + console.log('res', res) + if (res.result && res.result.length > 0) { + this.workshopList = res.result + } + }) + } + } + } +</script> + +<style lang="less" scoped> + .page-container { + padding: 30px 30px 0; + + .workshop-name { + width: 100%; + background: #fff; + padding: 55px 0; + border-radius: 20px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 30px; + cursor: pointer; + } + } + +</style> \ No newline at end of file -- Gitblit v1.9.3