Sfoglia il codice sorgente

更新工作审批

libushang 6 mesi fa
parent
commit
b100a8cf5d

+ 3 - 0
src/views/workApproval/approvalList.vue

@@ -114,6 +114,7 @@
     return "info_type_" + val
   }
   
+  const emits = defineEmits(['update:modelValue']);
   const info_list = ref([]);
   const total = ref(0);
   const loading = ref(false);
@@ -170,6 +171,8 @@
       .then(res => {
         var items = res.data || [];
         total.value = res.total;
+        emits('update:modelValue', total.value);
+         
         if (queryParams.value.page == 1) {
           info_list.value = [];
         }

+ 10 - 4
src/views/workApproval/index.vue

@@ -1,7 +1,7 @@
 <template>
     <van-tabs v-model:active="active">
-        <van-tab title="待办">
-            <ApprovalList :status="1"></ApprovalList>
+        <van-tab :title=title>
+            <ApprovalList :status="1" v-model="count"></ApprovalList>
         </van-tab>
         <van-tab title="已完成">
             <ApprovalList :status="2"></ApprovalList>
@@ -10,10 +10,16 @@
 </template>
 
 <script lang="ts" setup>
-import { ref } from 'vue';
+import { ref, computed } from 'vue';
 import ApprovalList from "./approvalList.vue";
-
+ 
 const active = ref(0);
+const count = ref(0);
+
+const title = computed(() => {
+    return "待办( "+count.value+ " ) " ;
+});
+
 </script>
 
 <style lang="scss" scoped>