finance.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <template>
  2. <van-dropdown-menu>
  3. <van-dropdown-item v-model="costValue" :options="costOption" @change="changeDropdown"/>
  4. </van-dropdown-menu>
  5. <router-view/>
  6. </template>
  7. <script setup>
  8. import { useFinanceStore } from "@/pinia/finance/finance"
  9. defineOptions({
  10. name: 'finance',
  11. })
  12. onMounted(() => {
  13. getFinanceInfo()
  14. changeDropdown('/navigation/finance/workHours')
  15. })
  16. const useFinance = useFinanceStore()
  17. const router = useRouter()
  18. const costValue = ref('/navigation/finance/workHours');
  19. const costOption = [
  20. { text: '项目收支——实施工时', value: '/navigation/finance/workHours' },
  21. { text: '项目收支——项目费用', value: '/navigation/finance/projectCost' },
  22. { text: '项目收支——项目收款', value: '/navigation/finance/projectPayment' },
  23. { text: '公司费用——费用详情', value: '/navigation/finance/costDetail' },
  24. { text: '项目收支——人员费用', value: '/navigation/finance/staffCost' },
  25. { text: '项目收支——部门费用', value: '/navigation/finance/departmentCost' },
  26. ];
  27. const getFinanceInfo = () => {
  28. useFinance.getAllInfo()
  29. }
  30. const changeDropdown = (val) => {
  31. router.push({path: val})
  32. }
  33. </script>
  34. <style scoped>
  35. </style>