项目最新进展-项目进度列表-项目详细全套
This commit is contained in:
parent
eef8bc7aad
commit
d15dd1949c
|
|
@ -301,7 +301,13 @@ export default {
|
||||||
return formattedHtml;
|
return formattedHtml;
|
||||||
},
|
},
|
||||||
loadMore() {
|
loadMore() {
|
||||||
this.winB_LoadMore();
|
// this.winB_LoadMore();
|
||||||
|
|
||||||
|
uni.navigateTo({
|
||||||
|
url:
|
||||||
|
"/pages/institutionalStructure/projectProgressList?formedId=" +
|
||||||
|
this.formedId,
|
||||||
|
});
|
||||||
},
|
},
|
||||||
goDonationRecord() {
|
goDonationRecord() {
|
||||||
// 跳转到捐款记录页面,传递建制ID
|
// 跳转到捐款记录页面,传递建制ID
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,9 @@
|
||||||
|
|
||||||
<!-- 内容区域 -->
|
<!-- 内容区域 -->
|
||||||
<view class="content-box">
|
<view class="content-box">
|
||||||
<rich-text :nodes="projectData.content"></rich-text>
|
<rich-text
|
||||||
|
:nodes="removeBackgroundStyle(projectData.content)"
|
||||||
|
></rich-text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
@ -49,13 +51,23 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
// 格式化日期
|
// 格式化日期
|
||||||
formatDate(timestamp) {
|
formatDate(timestamp) {
|
||||||
if (!timestamp) return "";
|
//return this.$u.date(timestamp, "yyyy-mm-dd");
|
||||||
const date = new Date(timestamp);
|
|
||||||
return `${date.getFullYear()}-${padZero(date.getMonth() + 1)}-${padZero(date.getDate())}`;
|
|
||||||
|
|
||||||
function padZero(num) {
|
// if (!timestamp) return "";
|
||||||
return num < 10 ? `0${num}` : num;
|
// const date = new Date(timestamp);
|
||||||
}
|
// return `${date.getFullYear()}-${padZero(date.getMonth() + 1)}-${padZero(date.getDate())}`;
|
||||||
|
//
|
||||||
|
// function padZero(num) {
|
||||||
|
// return num < 10 ? `0${num}` : num;
|
||||||
|
// }
|
||||||
|
return timestamp;
|
||||||
|
},
|
||||||
|
|
||||||
|
removeBackgroundStyle(html) {
|
||||||
|
if (!html) return [];
|
||||||
|
|
||||||
|
// 1. 移除背景色样式
|
||||||
|
return html.replace(/background-color:[^;"]*;?/g, "");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -7,36 +7,224 @@
|
||||||
/>
|
/>
|
||||||
<tile-grid />
|
<tile-grid />
|
||||||
<view :style="{ backgroundColor: CommonEnum.BASE_COLOR }" class="header">
|
<view :style="{ backgroundColor: CommonEnum.BASE_COLOR }" class="header">
|
||||||
|
<template>
|
||||||
|
<view class="construction-container">
|
||||||
|
<!-- 施工情况列表 -->
|
||||||
|
<view class="construction-list">
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in winB_List"
|
||||||
|
:key="index"
|
||||||
|
class="construction-card"
|
||||||
|
@click="goProjectDetail(item)"
|
||||||
|
>
|
||||||
|
<!-- 日期 -->
|
||||||
|
<text class="date">{{ item.createTime }}</text>
|
||||||
|
|
||||||
|
<!-- 标题 -->
|
||||||
|
<text class="title">{{ item.title }}</text>
|
||||||
|
|
||||||
|
<!-- 描述 -->
|
||||||
|
<rich-text
|
||||||
|
:nodes="removeBackgroundStyle(item.content)"
|
||||||
|
></rich-text>
|
||||||
|
|
||||||
|
<!-- <text class="description">{{ item.content }}</text>-->
|
||||||
|
|
||||||
|
<!-- 图片列表 -->
|
||||||
|
<view class="images-container">
|
||||||
|
<image
|
||||||
|
v-for="(imgUrl, imgIndex) in item.coverUrl
|
||||||
|
? item.coverUrl.split(',')
|
||||||
|
: []"
|
||||||
|
:key="imgIndex"
|
||||||
|
:src="imgUrl"
|
||||||
|
class="image-placeholder"
|
||||||
|
mode="aspectFill"
|
||||||
|
/>
|
||||||
|
</view>
|
||||||
|
|
||||||
|
<!-- <!– 分割线(最后一个不显示) –>-->
|
||||||
|
<!-- <view-->
|
||||||
|
<!-- v-if="index < constructionData.length - 1"-->
|
||||||
|
<!-- class="divider"-->
|
||||||
|
<!-- ></view>-->
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import CommonEnum from "../../enum/common";
|
import CommonEnum from "../../enum/common";
|
||||||
|
import { createPagination } from "../../composables/winB_Pagination";
|
||||||
|
import { getProjectSchedule } from "../../api/institutionalStructure/institutionalStructureDetail";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {},
|
components: {},
|
||||||
|
mixins: [
|
||||||
|
createPagination({
|
||||||
|
fetchData: getProjectSchedule,
|
||||||
|
mode: "loadMore",
|
||||||
|
pageSize: 3,
|
||||||
|
autoLoad: false, // 设置为 false,不自动加载
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
|
||||||
|
onLoad(options) {
|
||||||
|
if (options) {
|
||||||
|
console.log("接收到的参数:", options.formedId);
|
||||||
|
this.formedId = options.formedId;
|
||||||
|
// 更新参数并首次执行数据加载
|
||||||
|
this.winB_UpdateParams({ formedId: this.formedId });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
CommonEnum,
|
CommonEnum,
|
||||||
|
constructionData: [
|
||||||
|
{
|
||||||
|
date: "2025/06/23",
|
||||||
|
title: "施工情况",
|
||||||
|
description: "施工情况",
|
||||||
|
images: [
|
||||||
|
{ url: "/static/placeholder.png" },
|
||||||
|
{ url: "/static/placeholder.png" },
|
||||||
|
{ url: "/static/placeholder.png" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: "2025/06/23",
|
||||||
|
title: "施工情况",
|
||||||
|
description: "施工情况",
|
||||||
|
images: [{ url: "/static/placeholder.png" }],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
date: "2025/06/23",
|
||||||
|
title: "施工情况",
|
||||||
|
description: "施工情况",
|
||||||
|
images: [
|
||||||
|
{ url: "/static/placeholder.png" },
|
||||||
|
{ url: "/static/placeholder.png" },
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad() {},
|
|
||||||
methods: {},
|
methods: {
|
||||||
|
removeBackgroundStyle(html) {
|
||||||
|
if (!html) return [];
|
||||||
|
|
||||||
|
// 1. 移除背景色样式
|
||||||
|
return html.replace(/background-color:[^;"]*;?/g, "");
|
||||||
|
},
|
||||||
|
|
||||||
|
goProjectDetail(item) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/institutionalStructure/projectDetail?title=${encodeURIComponent(item.title)}&content=${encodeURIComponent(item.content)}&createTime=${encodeURIComponent(item.createTime)}&coverUrl=${encodeURIComponent(item.coverUrl)}`,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
onReachBottom() {
|
||||||
|
this.winB_LoadMore();
|
||||||
|
console.log("加载更多");
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.page {
|
.page {
|
||||||
//background: #f5f0e7;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
//min-height: 100vh;//可能导致页面留白
|
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
padding: 0 0 40rpx;
|
}
|
||||||
|
|
||||||
|
.construction-container {
|
||||||
|
background-color: #f5f5f5;
|
||||||
|
|
||||||
|
.header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 40rpx;
|
||||||
|
|
||||||
|
.title {
|
||||||
|
display: block;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a1a;
|
||||||
|
margin-bottom: 10rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.construction-list {
|
||||||
|
.construction-card {
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 24rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
|
||||||
|
|
||||||
|
.date {
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #666;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
font-size: 32rpx;
|
||||||
|
font-weight: 600;
|
||||||
|
color: #1a1a1a;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.description {
|
||||||
|
color: #666;
|
||||||
|
font-size: 28rpx;
|
||||||
|
margin-bottom: 20rpx;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.images-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 20rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
|
||||||
|
.image-placeholder {
|
||||||
|
width: 200rpx;
|
||||||
|
height: 200rpx;
|
||||||
|
background-color: #eaeaea;
|
||||||
|
border-radius: 16rpx;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #999;
|
||||||
|
font-size: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.divider {
|
||||||
|
height: 2rpx;
|
||||||
|
background-color: #eee;
|
||||||
|
margin: 30rpx 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user