|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <u-navbar :titleStyle="{ color: '#000' }" :autoBack="true" :title="dataList[0]?.createBy + '的日报'" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
|
|
|
+ <u-navbar v-if="dataList[0]?.createBy" :titleStyle="{ color: '#000' }" :autoBack="true" :title="dataList[0]?.createBy + '的日报'" :placeholder="true" :safeAreaInsetTop="true" bgColor="#fff">
|
|
|
<template #left>
|
|
|
<view class="u-navbar__content__left__item">
|
|
|
<u-icon name="arrow-left" size="20" color="#000"></u-icon>
|
|
@@ -8,22 +8,30 @@
|
|
|
</u-navbar>
|
|
|
|
|
|
<oa-scroll
|
|
|
- customClass="record-details-container scroll-height"
|
|
|
- :style="{
|
|
|
+ customClass="record-container scroll-height"
|
|
|
+ :pageSize="pageSize"
|
|
|
+ :total="total"
|
|
|
+ :isSticky="true"
|
|
|
+ :customStyle="{
|
|
|
//#ifdef APP-PLUS || MP-WEIXIN
|
|
|
- height: `calc(100vh - (44px + ${proxy.$settingStore.StatusBarHeight}))`,
|
|
|
+ height: `calc(100vh - (138px + ${proxy.$settingStore.StatusBarHeight}))`,
|
|
|
+ //#endif
|
|
|
+ //#ifdef H5
|
|
|
+ height: `calc(100vh - (138px))`,
|
|
|
//#endif
|
|
|
}"
|
|
|
- :refresherLoad="false"
|
|
|
- :refresherEnabled="false"
|
|
|
- :refresherEnabledTitle="false"
|
|
|
+ :refresherLoad="true"
|
|
|
+ :refresherEnabled="true"
|
|
|
:refresherDefaultStyle="'none'"
|
|
|
:refresherThreshold="44"
|
|
|
+ :lowerThreshold="44"
|
|
|
:refresherBackground="'#f5f6f7'"
|
|
|
+ @load="load"
|
|
|
+ @refresh="refresh"
|
|
|
:data-theme="'theme-' + proxy.$settingStore.themeColor.name"
|
|
|
>
|
|
|
<template #default>
|
|
|
- <view class="content-area radius bg-white" v-for="(item, index) in dataList" :key="index">
|
|
|
+ <view class="content-area radius bg-white" v-for="(item, index) in dataList" :key="index" style="margin-top: 6px">
|
|
|
<view class="content-area-header flex mb10">
|
|
|
<img :src="item.avatar" class="content-area-header-avatarImg mr10" v-if="item.avatar" />
|
|
|
<u-avatar
|
|
@@ -139,9 +147,12 @@ const state = reactive({
|
|
|
{ name: "未读", value: 1 },
|
|
|
],
|
|
|
tabsCurrent: 0,
|
|
|
+ pageSize:1,
|
|
|
+ total:10,
|
|
|
+ submitDate:undefined,
|
|
|
});
|
|
|
|
|
|
-const { dataList, userData, tabsList, tabsCurrent } = toRefs(state);
|
|
|
+const { dataList, userData, tabsList, tabsCurrent, pageSize, total } = toRefs(state);
|
|
|
|
|
|
/**
|
|
|
* @tabs点击事件
|
|
@@ -174,6 +185,7 @@ function init() {
|
|
|
})
|
|
|
.then((requset) => {
|
|
|
dataList.value = requset.data.records;
|
|
|
+ state.submitDate = requset.data.records[0].submitDate;
|
|
|
state.loading = false;
|
|
|
pmReportReaders.value = requset.data.records[0].pmReportReaders;
|
|
|
state.tabsList[0].name = state.tabsList[0].name + "(" + pmReportReaders.value.read + ")";
|
|
@@ -187,6 +199,7 @@ function init() {
|
|
|
files.forEach(function (item) {
|
|
|
state.files.push(item.url);
|
|
|
});
|
|
|
+ load()
|
|
|
})
|
|
|
.catch((err) => {
|
|
|
state.loading = false;
|
|
@@ -200,6 +213,47 @@ function init() {
|
|
|
function toProjectMange(id) {
|
|
|
proxy.$tab.navigateTo(`/pages/business/common/projectMange/overview/index?id=${id}`);
|
|
|
}
|
|
|
+/**
|
|
|
+ * @scrollView加载数据
|
|
|
+ */
|
|
|
+ function load() {
|
|
|
+ projectApi().ReportRecord(
|
|
|
+ {
|
|
|
+ upOrDown:0,
|
|
|
+ slideSum:1,
|
|
|
+ submitDate:state.submitDate,
|
|
|
+ projectAscription:2
|
|
|
+ }
|
|
|
+ ).then((requset) => {
|
|
|
+ dataList.value.push(requset.data.records[0]);
|
|
|
+ if(dataList.value.length>2){
|
|
|
+ delete dataList.value[0]
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ * @scrollView刷新数据
|
|
|
+ */
|
|
|
+ function refresh() {
|
|
|
+ projectApi().ReportRecord(
|
|
|
+ {
|
|
|
+ upOrDown:1,
|
|
|
+ slideSum:1,
|
|
|
+ submitDate:state.submitDate,
|
|
|
+ projectAscription:2
|
|
|
+ }
|
|
|
+ ).then((requset) => {
|
|
|
+ dataList.value.unshift(requset.data.records[0]);
|
|
|
+ state.submitDate = requset.data.records[0].submitDate;
|
|
|
+ if(dataList.value.length>2){
|
|
|
+ delete dataList.value[2]
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // console.log(dataList.value)
|
|
|
+
|
|
|
+ // state.pageSize = 20;
|
|
|
+ // init();
|
|
|
+}
|
|
|
onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
@@ -255,4 +309,9 @@ onUnload(() => {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+.uni-scroll-view-content .content-area:nth-child(3){
|
|
|
+ height:96px;
|
|
|
+ overflow: hidden;
|
|
|
+ background-image: linear-gradient(to top, #f3f2f2 30%, #fff 100%);
|
|
|
+}
|
|
|
</style>
|