| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190 | 
							- <template>
 
- 	<view class="container">
 
- 		<page-title>问题督办</page-title>
 
- 		<view class="cards-list">
 
- 			<view class="card" v-for="(item,index) in projectList" :key="index">
 
- 				<!-- 					<view>
 
- 						<view style="height:20rpx"></view>
 
- 			
 
- 						<view class="special-item">
 
- 			
 
- 							<view class="card-name">
 
- 								<view class="card-name-title">
 
- 									<text class="card-name-description">项目名称</text>
 
- 								</view>
 
- 			
 
- 								<text class="card-name-text">{{item.subName || "--"}}</text>
 
- 							</view>
 
- 						</view>
 
- 					</view> -->
 
- 				<card-title :numerator="index+1" :denominator="listTotal" isSpecial></card-title>
 
- 				<view class="card-name">
 
- 					<view class="card-name-title">
 
- 						<text class="card-name-description">申报单位</text>
 
- 					</view>
 
- 					<text class="card-name-text">{{item.unitTitle || "--"}}</text>
 
- 				</view>
 
- 				<view class="card-item">
 
- 					<view class="card-item-name">项目名称</view>
 
- 					<view class="card-item-content">{{item.sub_name || "--"}}</view>
 
- 				</view>
 
- 				<view class="card-item">
 
- 					<view class="card-item-name">当前状态</view>
 
- 					<view class="card-item-content">{{item.status || "--"}}</view>
 
- 				</view>
 
- 				<view class="card-item">
 
- 					<view class="card-item-name">问题描述</view>
 
- 					<view class="card-item-content">{{item.title || "--"}}</view>
 
- 				</view>
 
- 				<view class="card-item">
 
- 					<view class="card-item-name">要求解决日期</view>
 
- 					<view class="card-item-content">{{item.date_conf || "--"}}</view>
 
- 				</view>
 
- 			</view>
 
- 		</view>
 
- 		<empty-show v-if="projectList.length===0"></empty-show>
 
- 		<u-loading-page :loading="loading"></u-loading-page>
 
- 	</view>
 
- </template>
 
- <script setup>
 
- 	import {
 
- 		ref
 
- 	} from 'vue';
 
- 	import {
 
- 		onLoad,
 
- 		onUnload,
 
- 		onPullDownRefresh,
 
- 		onReachBottom,
 
- 		onPageScroll
 
- 	} from "@dcloudio/uni-app";
 
- 	import {
 
- 		getOverseeListBySubId,
 
- 	} from "@/api/work/oversee.js"
 
- 	import {
 
- 		addFocus,
 
- 		cancelFocus
 
- 	} from "@/api/work/focus.js";
 
- 	function backToBefore() {
 
- 		uni.reLaunch({
 
- 			url: "/pages/index"
 
- 		});
 
- 	};
 
- 	let scrollTop = ref(0)
 
- 	let loading = ref(true)
 
- 	// 参数
 
- 	let searchInfo = ref({
 
- 		pageNo: 1,
 
- 		pageSize: 10,
 
- 		subId: ''
 
- 	})
 
- 	// 触底加载flag
 
- 	let moreListFlag = true
 
- 	// 获取列表
 
- 	let projectList = ref([]);
 
- 	let listTotal = ref(0);
 
- 	function getList() {
 
- 		if (searchInfo.value.pageNo == 1) {
 
- 			loading.value = true
 
- 		}
 
- 		getOverseeListBySubId(searchInfo.value).then(res => {
 
- 			loading.value = false
 
- 			projectList.value = projectList.value.concat(res.data.list);
 
- 			listTotal.value = res.data.total;
 
- 			if (res.data.total == searchInfo.value.pageNo * searchInfo.value.pageSize - (10 - res.data.list
 
- 					.length)) moreListFlag = false;
 
- 		}).catch(() => {
 
- 			loading.value = false
 
- 		})
 
- 	}
 
- 	// function goToDetail(id, subName) {
 
- 	// 	uni.navigateTo({
 
- 	// 		url: `/pages/projectInfo/detail/index?id=${id}&subName=${subName}`
 
- 	// 	})
 
- 	// }
 
- 	// function goToPage(url) {
 
- 	// 	uni.navigateTo({
 
- 	// 		url
 
- 	// 	})
 
- 	// }
 
- 	// function goToReport(type, subId, subName) {
 
- 	// 	uni.navigateTo({
 
- 	// 		url: `/pages/projectInfo/report/index?type=${type}&subId=${subId}&subName=${subName}`
 
- 	// 	})
 
- 	// }
 
- 	onLoad((options) => {
 
- 		// uni.$on('projectInfoSearch', resolve => {
 
- 		// 	searchInfo.value = Object.assign(searchInfo.value, resolve);
 
- 		// 	searchInfo.value.pageNo = 1;
 
- 		// 	projectList.value = [];
 
- 		// 	listTotal.value = 0;
 
- 		// 	moreListFlag = true;
 
- 		// 	getList();
 
- 		// });
 
- 		console.log(options);
 
- 		searchInfo.value.subId = options.subId
 
- 		getList();
 
- 	});
 
- 	onUnload(() => {
 
- 		// uni.$off('projectInfoSearch');
 
- 	})
 
- 	onPageScroll((e) => {
 
- 		scrollTop.value = e.scrollTop
 
- 	})
 
- 	onPullDownRefresh(() => {
 
- 		searchInfo.value.pageNo = 1;
 
- 		projectList.value = [];
 
- 		moreListFlag = true;
 
- 		try {
 
- 			getList();
 
- 		} finally {
 
- 			uni.stopPullDownRefresh()
 
- 		}
 
- 	})
 
- 	onReachBottom(() => {
 
- 		if (!moreListFlag) {
 
- 			return uni.showToast({
 
- 				title: "已经到底了。",
 
- 				icon: "none",
 
- 				duration: 2000
 
- 			})
 
- 		}
 
- 		searchInfo.value.pageNo++;
 
- 		getList();
 
- 	})
 
- </script>
 
- <style lang="scss" scoped>
 
- </style>
 
 
  |