From 3878c57a2bd710295931303ea85439a596838dfd Mon Sep 17 00:00:00 2001
From: Mr.Shi <1878285526@qq.com>
Date: 星期二, 05 九月 2023 16:01:31 +0800
Subject: [PATCH] 小程序

---
 minipro_standard/pages/plannedProgress/plannedProgress.vue |  156 ++++++++++++---------------------------------------
 1 files changed, 38 insertions(+), 118 deletions(-)

diff --git a/minipro_standard/pages/plannedProgress/plannedProgress.vue b/minipro_standard/pages/plannedProgress/plannedProgress.vue
index a36f4a1..5b72386 100644
--- a/minipro_standard/pages/plannedProgress/plannedProgress.vue
+++ b/minipro_standard/pages/plannedProgress/plannedProgress.vue
@@ -34,7 +34,14 @@
 		</view>
 		<view class="content_total" :style="{top: top}">鍏眥{listData.total}}鏉℃暟鎹�</view>
 		<view class="content_list">
-			<scroll-view @scrolltolower="getLists" scroll-y :style="{height: height}">
+			<scroll-view
+			:refresher-enabled="true"
+			:refresher-triggered="isLoading"
+			@refresherrefresh="onRefresh"
+			refresher-background="#fff"
+			@scrolltolower="getLists"
+			scroll-y
+			:style="{height: height}">
 				<view class="content_list_item" v-for="item in lists" :key="item.id" @click="jump(item)">
 					<view class="content_list_item_top">
 						<view class="content_list_item_top_left">
@@ -102,6 +109,9 @@
 <script>
 	import Search from '@/components/Search.vue'
 	import LabelSelection from '@/components/LabelSelection.vue'
+	import { getList, pageCount } from '@/util/api/PlanningAPI'
+	import { getWorkingProcedure, getOrganization } from '@/util/api'
+	import { gsdate } from '@/util/utils.js'
 	export default {
 		components: { Search, LabelSelection },
 		data() {
@@ -117,7 +127,7 @@
 					procedureIds: [],
 					departIds: '',
 					mixParam: '',
-					cateIds: []
+					cateIds: null
 				},
 				tagList: [
 					{
@@ -142,118 +152,13 @@
 					}
 				],
 				data: [],	// 宸ュ簭鏁版嵁
-				factoryList: [],
+				factoryList: [],	// 宸ュ巶
 				finished: true,
 				loading: false,
 				refreshing: false,
 				timeShow: false,
-				lists: [
-					{
-						id: 1,
-						status: 0,
-						urgent: 1,
-						num: 100,
-						batch: '11111',
-						planDate: '2023-08-29',
-						mmodel: {
-							name: '宸ュ簭璁″垝',
-							code: 'fbdseasafghb'
-						},
-						usermodel: {
-							realname: '璁″垝浜哄憳'
-						},
-						pmodel: {
-							name: '宸ュ簭璁″垝'
-						},
-						fmodel: {
-							name: '宸ュ巶'
-						}
-					},
-					{
-						id: 2,
-						status: 0,
-						urgent: 1,
-						num: 100,
-						batch: '11111',
-						planDate: '2023-08-29',
-						mmodel: {
-							name: '宸ュ簭璁″垝',
-							code: 'fbdseasafghb'
-						},
-						usermodel: {
-							realname: '璁″垝浜哄憳'
-						},
-						pmodel: {
-							name: '宸ュ簭璁″垝'
-						},
-						fmodel: {
-							name: '宸ュ巶'
-						}
-					},
-					{
-						id: 3,
-						status: 0,
-						urgent: 1,
-						num: 100,
-						batch: '11111',
-						planDate: '2023-08-29',
-						mmodel: {
-							name: '宸ュ簭璁″垝',
-							code: 'fbdseasafghb'
-						},
-						usermodel: {
-							realname: '璁″垝浜哄憳'
-						},
-						pmodel: {
-							name: '宸ュ簭璁″垝'
-						},
-						fmodel: {
-							name: '宸ュ巶'
-						}
-					},
-					{
-						id: 4,
-						status: 0,
-						urgent: 1,
-						num: 100,
-						batch: '11111',
-						planDate: '2023-08-29',
-						mmodel: {
-							name: '宸ュ簭璁″垝',
-							code: 'fbdseasafghb'
-						},
-						usermodel: {
-							realname: '璁″垝浜哄憳'
-						},
-						pmodel: {
-							name: '宸ュ簭璁″垝'
-						},
-						fmodel: {
-							name: '宸ュ巶'
-						}
-					},
-					{
-						id: 5,
-						status: 0,
-						urgent: 1,
-						num: 100,
-						batch: '11111',
-						planDate: '2023-08-29',
-						mmodel: {
-							name: '宸ュ簭璁″垝',
-							code: 'fbdseasafghb'
-						},
-						usermodel: {
-							realname: '璁″垝浜哄憳'
-						},
-						pmodel: {
-							name: '宸ュ簭璁″垝'
-						},
-						fmodel: {
-							name: '宸ュ巶'
-						}
-					}
-				]
+				lists: [],
+				isLoading: false
 			};
 		},
 		onReady() {
@@ -265,7 +170,15 @@
 				}).exec()
 			})
 		},
+		onLoad() {
+			this.getLists()
+			this.getOrganizations()
+		},
 		methods: {
+			// 鍒囨崲宸ュ簭
+			changeTag(i) {
+				this.data[i].isActive = !this.data[i].isActive
+			},
 			// 璺宠浆
 			jump(item) {
 				uni.navigateTo({
@@ -275,6 +188,14 @@
 			// 鑾峰彇澶撮儴缁勪欢楂樺害
 			getHeight(height) {
 				this.height = height
+			},
+			// 涓嬫媺鍒锋柊
+			async onRefresh() {
+				if (this.isLoading) return;
+				this.isLoading = true;
+				await this.getLists()
+				await this.pageCounts()
+				this.isLoading = false;
 			},
 			// 閲嶇疆
 			reset() {
@@ -291,8 +212,8 @@
 				if (this.data.length > 0) {
 					this.data.forEach(item => { item.isActive = false })
 				}
-				// this.getLists()
-				// this.pageCounts()
+				this.getLists()
+				this.pageCounts()
 			},
 			// 鏃ユ湡纭畾
 			timeConfirm(val) {
@@ -330,7 +251,7 @@
 				this.listData.page = 0
 				this.finished = false
 				this.lists = []
-				// this.getLists()
+				this.getLists()
 			},
 			// 鑾峰彇鍒楄〃缁熻
 			pageCounts() {
@@ -395,15 +316,14 @@
 				this.listData.page = 0
 				this.finished = false
 				this.lists = []
-				// this.getLists()
-				// this.pageCounts()
+				this.getLists()
+				this.pageCounts()
 			},
 			// 鑾峰彇璁″垝鍒楄〃鏁版嵁
 			getLists() {
-				console.log('getLists')
 				if (!this.finished) {
 					this.loading = true
-					this.listData.page = this.listData.page++
+					this.listData.page = this.listData.page += 1
 					getList({
 						capacity: this.listData.capacity,
 						model: {
@@ -412,7 +332,7 @@
 							endDate: this.listData.endDate,
 							procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
 							factoryId: this.listData.departIds,
-							statusList: this.listData.cateIds
+							statusList: this.listData.cateIds ? this.listData.cateIds.split(',') : []
 						},
 						page: this.listData.page,
 						sorts: [

--
Gitblit v1.9.3