From 08a0f50e46f2d540ccf24fa2f8a2b41ff88da0c9 Mon Sep 17 00:00:00 2001 From: bjang03 Date: Thu, 9 May 2024 09:20:32 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=B7=A5=E5=BA=8F=E6=8A=A5=E5=B7=A5-?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E9=A1=B5=E9=87=8D=E5=A4=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../processReportPeopleCheck.vue | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/pages/mes/workScheduling/processReportPeopleCheck.vue b/src/pages/mes/workScheduling/processReportPeopleCheck.vue index 224460f..b997156 100644 --- a/src/pages/mes/workScheduling/processReportPeopleCheck.vue +++ b/src/pages/mes/workScheduling/processReportPeopleCheck.vue @@ -2,10 +2,10 @@ - + - + {{ item.personName }} @@ -48,27 +48,36 @@ const data = ref({ const status = ref('loadmore') /* 列表数据集 */ const list = ref([]) - +let checked: string | any[] = [] +function checkChange(checkedArray: any[]) { + checked = checkedArray +} /* 打开详情页 */ function openDetail(item: any) { console.log(item) // proxy.$tab.navigateTo(`/pages/mes/orderDapPlan/detail?obj=${item}`) } - +function filterList(){ + list.value = [] + uni.getStorageSync("processReportList").forEach(person=>{ + if (person.personName.includes(data.value.nickName)){ + list.value.push(person) + } + }) +} /* 通用方法 */ onShow(() => { }) function onSubmit() { - list.value.forEach(item=>{ - if (item.checked){ - uni.setStorageSync("processReportList", list.value) - uni.redirectTo({ - url: "./processReportForm" - }) - return - } - }) - _toast("请选择人员") + if (checked.length == 0){ + _toast("请选择人员") + return + }else{ + uni.setStorageSync("processReportList", list.value) + uni.redirectTo({ + url: "/pages/mes/workScheduling/processReportForm" + }) + } } onLoad((option) => { list.value = uni.getStorageSync("processReportList")