|
@@ -75,11 +75,10 @@
|
|
|
'styleType' + componentData.carouselStyleType
|
|
'styleType' + componentData.carouselStyleType
|
|
|
]"
|
|
]"
|
|
|
:style="{
|
|
:style="{
|
|
|
- height: componentData.advertNum == 0 ? '540px' : '400px',
|
|
|
|
|
borderRadius: componentData.carouselRadius + 'px'
|
|
borderRadius: componentData.carouselRadius + 'px'
|
|
|
}"
|
|
}"
|
|
|
>
|
|
>
|
|
|
- <el-carousel :height="componentData.advertNum == 0 ? '540px' : '400px'" arrow="always">
|
|
|
|
|
|
|
+ <el-carousel height="540px" arrow="always">
|
|
|
<template v-if="componentData.carouselList && componentData.carouselList.length > 0">
|
|
<template v-if="componentData.carouselList && componentData.carouselList.length > 0">
|
|
|
<el-carousel-item v-for="item in componentData.carouselList" :key="item">
|
|
<el-carousel-item v-for="item in componentData.carouselList" :key="item">
|
|
|
<el-image
|
|
<el-image
|
|
@@ -164,7 +163,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="real-box">
|
|
<div class="real-box">
|
|
|
<template v-for="(item, index) in realList" :key="index">
|
|
<template v-for="(item, index) in realList" :key="index">
|
|
|
- <div class="real-list ellipsis" v-if="componentData.realDataType == 2 ? true : Number(index) < componentData.realNumber">
|
|
|
|
|
|
|
+ <div class="real-list ellipsis" v-if="Number(index) < componentData.realNumber">
|
|
|
{{ item.announcementTitle }}
|
|
{{ item.announcementTitle }}
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
@@ -183,7 +182,6 @@ import logo2 from '@/assets/images/pcdiy/logo2.png';
|
|
|
import logo3 from '@/assets/images/pcdiy/logo3.png';
|
|
import logo3 from '@/assets/images/pcdiy/logo3.png';
|
|
|
import code from '@/assets/images/pcdiy/code.png';
|
|
import code from '@/assets/images/pcdiy/code.png';
|
|
|
import usePcdiyStore from '@/store/modules/pcdiy';
|
|
import usePcdiyStore from '@/store/modules/pcdiy';
|
|
|
-import { listAnnouncement } from '@/api/system/announcement';
|
|
|
|
|
const diyStore = usePcdiyStore();
|
|
const diyStore = usePcdiyStore();
|
|
|
const props = defineProps<{
|
|
const props = defineProps<{
|
|
|
index: number; // 确保声明 index 为可选属性
|
|
index: number; // 确保声明 index 为可选属性
|
|
@@ -196,24 +194,78 @@ onMounted(() => {
|
|
|
});
|
|
});
|
|
|
|
|
|
|
|
const getDataList = () => {
|
|
const getDataList = () => {
|
|
|
- realList.value = [];
|
|
|
|
|
- // 默认
|
|
|
|
|
- if (componentData.realDataType == 1) {
|
|
|
|
|
- listAnnouncement({ pageSize: 20 }).then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- realList.value = res.rows;
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else {
|
|
|
|
|
- //手动选择
|
|
|
|
|
- listAnnouncement({ pageSize: 20, ids: componentData.realIds.join(',') }).then((res) => {
|
|
|
|
|
- if (res.code == 200) {
|
|
|
|
|
- const result = res.rows.filter((item: any) => componentData.realIds.includes(item.id));
|
|
|
|
|
- realList.value = result;
|
|
|
|
|
- console.log('result', result);
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ realList.value = [
|
|
|
|
|
+ {
|
|
|
|
|
+ 'id': 1,
|
|
|
|
|
+ 'announcementNo': '00067',
|
|
|
|
|
+ 'announcementTitle': '喜讯丨中标"中国中车2026-2027年福利类供应商集中采购项目"',
|
|
|
|
|
+ 'announcementContent': '热烈祝贺我司成功中标中国中车2026-2027年福利类供应商集中采购项目!',
|
|
|
|
|
+ 'coverImage': '2005561851424944130',
|
|
|
|
|
+ 'coverImageUrl': '',
|
|
|
|
|
+ 'isShow': 0,
|
|
|
|
|
+ 'viewCount': 128,
|
|
|
|
|
+ 'sort': 1,
|
|
|
|
|
+ 'status': '0',
|
|
|
|
|
+ 'remark': null,
|
|
|
|
|
+ 'createTime': '2025-12-17 09:42:28'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 'id': 2,
|
|
|
|
|
+ 'announcementNo': '00066',
|
|
|
|
|
+ 'announcementTitle': '喜讯丨中标"2025年深圳阳光采购平台员工商城供应商采购项目"',
|
|
|
|
|
+ 'announcementContent': '我司成功中标深圳阳光采购平台员工商城供应商采购项目!',
|
|
|
|
|
+ 'coverImage': '2005561920278638594',
|
|
|
|
|
+ 'coverImageUrl': '',
|
|
|
|
|
+ 'isShow': 1,
|
|
|
|
|
+ 'viewCount': 96,
|
|
|
|
|
+ 'sort': 2,
|
|
|
|
|
+ 'status': '0',
|
|
|
|
|
+ 'remark': null,
|
|
|
|
|
+ 'createTime': '2025-12-15 17:41:12'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 'id': 3,
|
|
|
|
|
+ 'announcementNo': '00065',
|
|
|
|
|
+ 'announcementTitle': '喜讯丨中标"吉林大学通用办公用品、电子耗材采购项目"',
|
|
|
|
|
+ 'announcementContent': '我司成功中标吉林大学通用办公用品、电子耗材采购项目!',
|
|
|
|
|
+ 'coverImage': '2005561949982699522',
|
|
|
|
|
+ 'coverImageUrl': '',
|
|
|
|
|
+ 'isShow': 1,
|
|
|
|
|
+ 'viewCount': 85,
|
|
|
|
|
+ 'sort': 3,
|
|
|
|
|
+ 'status': '0',
|
|
|
|
|
+ 'remark': null,
|
|
|
|
|
+ 'createTime': '2025-12-15 16:54:06'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 'id': 4,
|
|
|
|
|
+ 'announcementNo': '00064',
|
|
|
|
|
+ 'announcementTitle': '喜讯丨中标"杭银消费金融公司2025年-2026年年度节日福利供应商遴选入库项目"',
|
|
|
|
|
+ 'announcementContent': '我司成功中标杭银消费金融公司年度节日福利供应商遴选入库项目!',
|
|
|
|
|
+ 'coverImage': '2005561989685981185',
|
|
|
|
|
+ 'coverImageUrl': '',
|
|
|
|
|
+ 'isShow': 1,
|
|
|
|
|
+ 'viewCount': 72,
|
|
|
|
|
+ 'sort': 4,
|
|
|
|
|
+ 'status': '0',
|
|
|
|
|
+ 'remark': null,
|
|
|
|
|
+ 'createTime': '2025-12-15 16:54:11'
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ 'id': 5,
|
|
|
|
|
+ 'announcementNo': '00063',
|
|
|
|
|
+ 'announcementTitle': '喜讯丨成功中标"华中科技大学同济医学院附属同济医院等单位物资采购平台电商服务采购项目"!',
|
|
|
|
|
+ 'announcementContent': '我司成功中标华中科技大学同济医学院附属同济医院物资采购平台电商服务采购项目!',
|
|
|
|
|
+ 'coverImage': '2005562052403408897',
|
|
|
|
|
+ 'coverImageUrl': '',
|
|
|
|
|
+ 'isShow': 1,
|
|
|
|
|
+ 'viewCount': 156,
|
|
|
|
|
+ 'sort': 5,
|
|
|
|
|
+ 'status': '0',
|
|
|
|
|
+ 'remark': null,
|
|
|
|
|
+ 'createTime': '2025-12-15 16:54:30'
|
|
|
|
|
+ }
|
|
|
|
|
+ ];
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
// 监听 componentData 变化,重新请求数据
|
|
// 监听 componentData 变化,重新请求数据
|