From ca73a173f008c8d7a9d700bad897ca24fe2d2203 Mon Sep 17 00:00:00 2001
From: k94314517 <8417338+k94314517@user.noreply.gitee.com>
Date: 星期一, 16 十月 2023 09:29:57 +0800
Subject: [PATCH] 111
---
minipro_standard/pages/plannedProgress/plannedProgress.vue | 176 +++++++++++++++++-----------------------------------------
1 files changed, 52 insertions(+), 124 deletions(-)
diff --git a/minipro_standard/pages/plannedProgress/plannedProgress.vue b/minipro_standard/pages/plannedProgress/plannedProgress.vue
index a36f4a1..fe0ae90 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">
@@ -95,13 +102,18 @@
</scroll-view>
</view>
<!-- 閫夋嫨鏃ユ湡 -->
- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm"></u-calendar>
+ <!-- <u-calendar :show="timeShow" mode="range" @confirm="timeConfirm" @close="timeShow = false"></u-calendar> -->
+ <l-calendar :lunar="false" v-model="timeShow" @change="timeConfirm" :isRange="true" activeBgColor="#305ED5"
+ rangeColor="#305ED5" rangeBgColor="rgba(48, 80, 213, 0.1)"></l-calendar>
</view>
</template>
<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 +129,7 @@
procedureIds: [],
departIds: '',
mixParam: '',
- cateIds: []
+ cateIds: null
},
tagList: [
{
@@ -142,118 +154,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 +172,15 @@
}).exec()
})
},
+ onLoad() {
+ this.getLists()
+ this.getOrganizations()
+ },
methods: {
+ // 鍒囨崲宸ュ簭
+ changeTag(i) {
+ this.data[i].isActive = !this.data[i].isActive
+ },
// 璺宠浆
jump(item) {
uni.navigateTo({
@@ -275,6 +190,16 @@
// 鑾峰彇澶撮儴缁勪欢楂樺害
getHeight(height) {
this.height = height
+ },
+ // 涓嬫媺鍒锋柊
+ async onRefresh() {
+ if (this.isLoading) return;
+ this.isLoading = true;
+ this.finished = false;
+ this.loading = false;
+ this.refreshing = false;
+ this.getLists();
+ // await this.pageCounts()
},
// 閲嶇疆
reset() {
@@ -291,13 +216,13 @@
if (this.data.length > 0) {
this.data.forEach(item => { item.isActive = false })
}
- // this.getLists()
- // this.pageCounts()
+ this.getLists()
+ this.pageCounts()
},
// 鏃ユ湡纭畾
timeConfirm(val) {
- this.listData.startDate = val[0]
- this.listData.endDate = val[val.length - 1]
+ this.listData.startDate = val.startDate
+ this.listData.endDate = val.endDate
this.timeShow = false
},
// 鍒囨崲宸ュ巶
@@ -326,11 +251,12 @@
},
// 鐐瑰嚮鏍囩鎼滅储
clickTag(ids) {
- this.listData.cateIds = ids
+ // ids ? ids.split(',') : []
+ this.listData.cateIds = ids ? ids.split(',') : []
this.listData.page = 0
this.finished = false
this.lists = []
- // this.getLists()
+ this.getLists()
},
// 鑾峰彇鍒楄〃缁熻
pageCounts() {
@@ -339,7 +265,7 @@
procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
startDate: this.listData.startDate,
endDate: this.listData.endDate,
- statusList: this.listData.cateIds
+ // statusList: this.listData.cateIds
}).then(res => {
if (res.code === 200 && res.data) {
this.tagList[0].num = res.data.allNum.toString()
@@ -395,24 +321,24 @@
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: {
mixParam: this.listData.mixParam,
- startDate: this.listData.startDate,
- endDate: this.listData.endDate,
+ planDateStartDate: this.listData.startDate,
+ planDateEndDate: this.listData.endDate,
procedureIdList: this.listData.procedureIds ? this.listData.procedureIds : [],
factoryId: this.listData.departIds,
statusList: this.listData.cateIds
+ // this.listData.cateIds ? this.listData.cateIds.split(',') : []
},
page: this.listData.page,
sorts: [
@@ -423,6 +349,7 @@
]
}).then(res => {
this.loading = false
+ this.isLoading = false;
this.listData.total = res.data.total
if (this.refreshing) {
this.lists = []
@@ -440,6 +367,7 @@
}).catch(err => {
this.loading = false
this.finished = true
+ this.isLoading = false;
if (this.refreshing) {
this.lists = []
this.refreshing = false;
--
Gitblit v1.9.3