From 3d1a4b4bf3d37e29a3d3345e00f9f84c0d7959a6 Mon Sep 17 00:00:00 2001 From: Mr.Shi <1878285526@qq.com> Date: 星期一, 21 八月 2023 09:16:05 +0800 Subject: [PATCH] 改bug --- h5_standard/src/views/productionInspection/selectWorkOrder.vue | 82 +++++++++++++++++++++++++++++----------- 1 files changed, 59 insertions(+), 23 deletions(-) diff --git a/h5_standard/src/views/productionInspection/selectWorkOrder.vue b/h5_standard/src/views/productionInspection/selectWorkOrder.vue index 1334dd6..2f99138 100644 --- a/h5_standard/src/views/productionInspection/selectWorkOrder.vue +++ b/h5_standard/src/views/productionInspection/selectWorkOrder.vue @@ -96,7 +96,7 @@ <script setup lang="ts"> import { reactive, ref, onMounted, onActivated } from "vue" - import { useRouter } from "vue-router" + import { useRouter, useRoute } from "vue-router" import { gsdate, judgmentPlatform } from '@/utils/utils' import { getList, pageCount } from '@/apis/WorkOrderAPI' import { model } from '@/interface' @@ -104,6 +104,7 @@ import vLableSelection from '@/components/common/LabelSelection.vue' const router = useRouter() + const route = useRoute() // 鎼滅储鏁版嵁鎺ュ彛 interface form extends model { @@ -140,23 +141,25 @@ const refreshing = ref(false) // 鎼滅储鍒嗙被鏍囩 - let tagList: any = reactive([ - { - id: [0,1], - name: '寰呯敓浜�', - num: '' - }, - { - id: [2,3], - name: '鐢熶骇涓�', - num: '' - }, - { - id: [4,5,6], - name: '宸插畬鎴�', - num: '' - } - ]) + let tagList: any = ref([]) + + // [ + // { + // id: [0,1], + // name: '寰呯敓浜�', + // num: '' + // }, + // { + // id: [2,3,7], + // name: '鐢熶骇涓�', + // num: '' + // }, + // { + // id: [4,5,6], + // name: '宸插畬鎴�', + // num: '' + // } + // ] // 閲嶇疆 const reset = () => { @@ -240,7 +243,7 @@ mixParam: form.mixParam, startDate: form.startDate, endDate: form.endDate, - statusList: form.statusList.length === 0 ? tagList[0].id : form.statusList + statusList: form.statusList.length === 0 ? tagList.value[0].id : form.statusList } }).then(res => { if (refreshing.value) { @@ -277,16 +280,49 @@ const pageCounts = () => { pageCount({}).then(res => { if (res.code === 200) { - tagList[0].num = String(res.data.startNum) - tagList[1].num = String(res.data.ingNum) - tagList[2].num = String(res.data.endNum) + tagList.value.forEach((item: any) => { + if (item.name == '寰呯敓浜�') { + item.num = String(res.data.startNum) + } + if (item.name == '鐢熶骇涓�') { + item.num = String(res.data.ingNum) + } + if (item.name == '宸插畬鎴�') { + item.num = String(res.data.endNum) + } + }) + // tagList.value[0].num = String(res.data.startNum) + // tagList.value[1].num = String(res.data.ingNum) + // tagList.value[2].num = String(res.data.endNum) } }) } onMounted(() => { - pageCounts() + if (route.query.type == '1') { + tagList.value = [ + { + id: [0,1], + name: '寰呯敓浜�', + num: '' + }, + { + id: [2,3,7], + name: '鐢熶骇涓�', + num: '' + } + ] + } else { + tagList.value = [ + { + id: [2,3,7], + name: '鐢熶骇涓�', + num: '' + } + ] + } status.value = judgmentPlatform() + pageCounts() }) onActivated(() => { -- Gitblit v1.9.3