|
@@ -72,6 +72,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore :status="status" margin-top="20" margin-bottom="20" @loadmore="loadmore"/>
|
|
|
</view>
|
|
|
<view v-show="menuCurrent === 2">
|
|
|
<view class="header-box">
|
|
@@ -103,6 +104,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <u-loadmore :status="status" margin-top="20" margin-bottom="20" @loadmore="loadmore"/>
|
|
|
</view>
|
|
|
<view class="bottom-block"></view>
|
|
|
<view class="bottom-box">
|
|
@@ -128,7 +130,9 @@
|
|
|
import { ref, computed } from 'vue'
|
|
|
import { onLoad } from '@dcloudio/uni-app'
|
|
|
import {
|
|
|
- getReportCate
|
|
|
+ getReportCate,
|
|
|
+ loadReportHistory,
|
|
|
+ loadMyReport
|
|
|
} from '@/api/report.js'
|
|
|
|
|
|
import { useReportStore } from '@/store/reportStore.js'
|
|
@@ -136,7 +140,8 @@
|
|
|
const reportStore = useReportStore();
|
|
|
|
|
|
const categoryList = ref({});
|
|
|
-
|
|
|
+ const pageNum = ref(1);
|
|
|
+ const status = ref('loadmore');
|
|
|
|
|
|
const customButtonStyle = {
|
|
|
height: '40rpx',
|
|
@@ -153,11 +158,39 @@
|
|
|
|
|
|
const menuCurrent = ref(0)
|
|
|
function onMenuClick(index) {
|
|
|
- menuCurrent.value = index
|
|
|
+ menuCurrent.value = index;
|
|
|
+ searchForm.value.keyword = ""
|
|
|
+ status.value = 'loadmore'
|
|
|
+ if(index===1){
|
|
|
+ // 浏览记录
|
|
|
+ searchHistory("", 1)
|
|
|
+ }else if(index===2){
|
|
|
+ // 我的报告
|
|
|
+ searchMy("", 1)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ function searchHistory(keyword, pageNum, pageSize){
|
|
|
+ loadReportHistory({
|
|
|
+ keyword,
|
|
|
+ pageNumber: pageNum,
|
|
|
+ pageSize: pageSize?pageSize:10
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res, "历史记录")
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ function searchMy(keyword, pageNum, pageSize){
|
|
|
+ loadMyReport({
|
|
|
+ keyword,
|
|
|
+ pageNumber: pageNum,
|
|
|
+ pageSize: pageSize?pageSize:10
|
|
|
+ }).then(res=>{
|
|
|
+ console.log(res, "我的报告")
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
function toReportList(model, val) {
|
|
|
- // console.log(model,val)
|
|
|
uni.setStorageSync("reportCate", categoryList.value[model].child);
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/researchReport/reportList/reportList?model=${model}&value=${val}`
|