feat:移植工程
This commit is contained in:
20
src/views/home/calendar/date.vue
Normal file
20
src/views/home/calendar/date.vue
Normal file
@@ -0,0 +1,20 @@
|
||||
<template>
|
||||
<div class="date-view common-view">
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
})
|
||||
|
||||
const addClick = () => {
|
||||
|
||||
}
|
||||
</script>
|
||||
52
src/views/home/calendar/plan.vue
Normal file
52
src/views/home/calendar/plan.vue
Normal file
@@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<div class="common-view plan-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<plan-stats />
|
||||
|
||||
<plan-calendar />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<plan-query />
|
||||
|
||||
<plan-list />
|
||||
</div>
|
||||
|
||||
<el-button type="primary" :icon="Plus" circle
|
||||
@click="addNewPlanClick" class="add-new" />
|
||||
</div>
|
||||
|
||||
<plan-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import PlanCalendar from '@/components/Home/Plan/PlanCalendar.vue'
|
||||
import PlanStats from '@/components/Home/Plan/PlanStats.vue'
|
||||
import PlanList from '@/components/Home/Plan/PlanList.vue'
|
||||
import PlanQuery from '@/components/Home/Plan/PlanQuery.vue'
|
||||
import PlanDialog from '@/components/Home/Plan/PlanDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { usePlanStore } from '@/store/plan.ts'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const planStore = usePlanStore()
|
||||
|
||||
onMounted(() => {
|
||||
planStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addNewPlanClick = () => {
|
||||
planStore.planApiType = 'ADD'
|
||||
planStore.planDialog = {
|
||||
title: '新增计划',
|
||||
visible: true,
|
||||
data: planStore.getEmptyPlan()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/plan.module.scss";
|
||||
</style>
|
||||
62
src/views/home/life/food.vue
Normal file
62
src/views/home/life/food.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<template>
|
||||
<div class="food-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<food-stats />
|
||||
|
||||
<food-recipe-list />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<food-query />
|
||||
|
||||
<food-daily-list v-if="foodStore.queryDateType === 'year'" />
|
||||
<food-calendar v-if="foodStore.queryDateType === 'month'" />
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addFoodWorkClick" class="add-new" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<food-dialog />
|
||||
<food-material-dialog />
|
||||
<food-step-dialog />
|
||||
<food-record-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import FoodQuery from '@/components/Home/Food/FoodQuery.vue'
|
||||
import FoodStats from '@/components/Home/Food/FoodStats.vue'
|
||||
import FoodRecipeList from '@/components/Home/Food/FoodRecipeList.vue'
|
||||
import FoodCalendar from '@/components/Home/Food/FoodCalendar.vue'
|
||||
import FoodDailyList from '@/components/Home/Food/FoodDailyList.vue'
|
||||
import FoodDialog from '@/components/Home/Food/FoodDialog.vue'
|
||||
import FoodMaterialDialog from '@/components/Home/Food/Form/FoodMaterialDialog.vue'
|
||||
import FoodStepDialog from '@/components/Home/Food/Form/FoodStepDialog.vue'
|
||||
import FoodRecordDialog from '@/components/Home/Food/Form/FoodRecordDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await foodStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addFoodWorkClick = () => {
|
||||
foodStore.foodRecordApiType = 'ADD'
|
||||
foodStore.foodRecordDialog = {
|
||||
title: '新增记录',
|
||||
visible: true,
|
||||
data: foodStore.getEmptyFoodRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/food.module.scss";
|
||||
</style>
|
||||
50
src/views/home/life/food[id].vue
Normal file
50
src/views/home/life/food[id].vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="life-detail">
|
||||
<span class="title">{{ foodStore.currentFoodRecipe.name }}</span>
|
||||
|
||||
<section>
|
||||
<div class="info-container">
|
||||
<food-basic-data/>
|
||||
|
||||
<food-material-data/>
|
||||
|
||||
<food-step-data/>
|
||||
|
||||
<food-others-data/>
|
||||
</div>
|
||||
|
||||
<div class="record-container card-item">
|
||||
<food-record-data/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-button type="primary" class="back-button" @click="backClick">返回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useFoodStore } from '@/store/food.ts'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import FoodBasicData from '@/components/Home/Food/Data/FoodBasicData.vue'
|
||||
import FoodMaterialData from '@/components/Home/Food/Data/FoodMaterialData.vue'
|
||||
import FoodStepData from '@/components/Home/Food/Data/FoodStepData.vue'
|
||||
import FoodOthersData from '@/components/Home/Food/Data/FoodOthersData.vue'
|
||||
import FoodRecordData from '@/components/Home/Food/Data/FoodRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const foodStore = useFoodStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
foodStore.queryFoodRecipe(route.params.id as number)
|
||||
})
|
||||
|
||||
const backClick = () => {
|
||||
router.push({ path: '/home/life/food' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
</style>
|
||||
58
src/views/home/life/travel.vue
Normal file
58
src/views/home/life/travel.vue
Normal file
@@ -0,0 +1,58 @@
|
||||
<template>
|
||||
<div class="travel-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<travel-stats />
|
||||
|
||||
<travel-spot-list />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<travel-query />
|
||||
|
||||
<travel-daily-list v-if="travelStore.queryDateType === 'year'" />
|
||||
<travel-calendar v-if="travelStore.queryDateType === 'month'" />
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addTravelRecordClick" class="add-new" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<travel-dialog />
|
||||
<travel-record-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import TravelQuery from '@/components/Home/Travel/TravelQuery.vue'
|
||||
import TravelStats from '@/components/Home/Travel/TravelStats.vue'
|
||||
import TravelSpotList from '@/components/Home/Travel/TravelSpotList.vue'
|
||||
import TravelCalendar from '@/components/Home/Travel/TravelCalendar.vue'
|
||||
import TravelDailyList from '@/components/Home/Travel/TravelDailyList.vue'
|
||||
import TravelRecordDialog from '@/components/Home/Travel/Form/TravelRecordDialog.vue'
|
||||
import TravelDialog from '@/components/Home/Travel/TravelDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await travelStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addTravelRecordClick = () => {
|
||||
travelStore.travelRecordApiType = 'ADD'
|
||||
travelStore.travelRecordDialog = {
|
||||
title: '新增记录',
|
||||
visible: true,
|
||||
data: travelStore.getEmptyTravelRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/travel.module.scss";
|
||||
</style>
|
||||
44
src/views/home/life/travel[id].vue
Normal file
44
src/views/home/life/travel[id].vue
Normal file
@@ -0,0 +1,44 @@
|
||||
<template>
|
||||
<div class="life-detail">
|
||||
<span class="title">{{ travelStore.currentTravelSpot.name }}</span>
|
||||
|
||||
<section>
|
||||
<div class="info-container">
|
||||
<travel-basic-data/>
|
||||
|
||||
<travel-guide-data/>
|
||||
</div>
|
||||
|
||||
<div class="record-container card-item">
|
||||
<travel-record-data/>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-button type="primary" class="back-button" @click="backClick">返回</el-button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useTravelStore } from '@/store/travel.ts'
|
||||
import { useRouter, useRoute } from 'vue-router'
|
||||
import TravelBasicData from '@/components/Home/Travel/Data/TravelBasicData.vue'
|
||||
import TravelGuideData from '@/components/Home/Travel/Data/TravelGuideData.vue'
|
||||
import TravelRecordData from '@/components/Home/Travel/Data/TravelRecordData.vue'
|
||||
import { onMounted } from 'vue'
|
||||
|
||||
const travelStore = useTravelStore()
|
||||
const router = useRouter()
|
||||
const route = useRoute()
|
||||
|
||||
onMounted(() => {
|
||||
travelStore.queryTravelSpot(route.params.id as number)
|
||||
})
|
||||
|
||||
const backClick = () => {
|
||||
router.push({ path: '/home/life/travel' })
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/life.detail.module.scss";
|
||||
</style>
|
||||
68
src/views/home/meta.ts
Normal file
68
src/views/home/meta.ts
Normal file
@@ -0,0 +1,68 @@
|
||||
import { IRouteMetaConfig } from 'vue3-common/types'
|
||||
|
||||
export const homeMeta: IRouteMetaConfig = {
|
||||
'/home/property': {
|
||||
title: '家庭资产',
|
||||
icon: 'home-property',
|
||||
order: 1,
|
||||
redirect: '/home/property/bill'
|
||||
},
|
||||
'/home/property/bill': {
|
||||
title: '收支记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life': {
|
||||
title: '生活记录',
|
||||
icon: 'home-life',
|
||||
order: 2,
|
||||
redirect: '/home/life/food'
|
||||
},
|
||||
'/home/life/food': {
|
||||
title: '美食记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life/food/:id': {
|
||||
title: '美食展示',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/home/life/travel': {
|
||||
title: '旅行记录',
|
||||
icon: ''
|
||||
},
|
||||
'/home/life/travel/:id': {
|
||||
title: '旅行展示',
|
||||
icon: '',
|
||||
hidden: true
|
||||
},
|
||||
'/home/calendar': {
|
||||
title: '时程印记',
|
||||
icon: 'home-calendar',
|
||||
order: 3,
|
||||
redirect: '/home/calendar/plan'
|
||||
},
|
||||
'/home/calendar/plan': {
|
||||
title: '日程计划',
|
||||
icon: ''
|
||||
},
|
||||
'/home/calendar/date': {
|
||||
title: '纪念日',
|
||||
icon: ''
|
||||
},
|
||||
'/home/others': {
|
||||
title: '友情链接',
|
||||
icon: 'home-link',
|
||||
order: 4,
|
||||
redirect: '/home/others/admin'
|
||||
},
|
||||
'/home/others/admin': {
|
||||
title: '管理系统',
|
||||
icon: '',
|
||||
redirect: '/admin'
|
||||
},
|
||||
'/home/others/blog': {
|
||||
title: '个人博客',
|
||||
icon: '',
|
||||
redirect: '/blog'
|
||||
}
|
||||
}
|
||||
7
src/views/home/others/admin.vue
Normal file
7
src/views/home/others/admin.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
7
src/views/home/others/blog.vue
Normal file
7
src/views/home/others/blog.vue
Normal file
@@ -0,0 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
</script>
|
||||
56
src/views/home/property/bill.vue
Normal file
56
src/views/home/property/bill.vue
Normal file
@@ -0,0 +1,56 @@
|
||||
<template>
|
||||
<div class="bill-view common-view">
|
||||
<div class="body-container">
|
||||
<div class="left-container">
|
||||
<bill-stats />
|
||||
|
||||
<bill-chart />
|
||||
</div>
|
||||
|
||||
<div class="right-container">
|
||||
<bill-query/>
|
||||
|
||||
<bill-daily-list v-if="billStore.billDateType === 'year'"/>
|
||||
<bill-calendar v-if="billStore.billDateType === 'month'" />
|
||||
</div>
|
||||
|
||||
<el-button v-if="isLargeScreen()"
|
||||
type="primary" :icon="Plus" circle
|
||||
@click="addNewBillRecordClick" class="add-new" />
|
||||
</div>
|
||||
|
||||
<bill-dialog />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import BillQuery from '@/components/Home/Bill/BillQuery.vue'
|
||||
import BillStats from '@/components/Home/Bill/BillStats.vue'
|
||||
import BillChart from '@/components/Home/Bill/BillChart.vue'
|
||||
import BillDailyList from '@/components/Home/Bill/BillDailyList.vue'
|
||||
import BillCalendar from '@/components/Home/Bill/BillCalendar.vue'
|
||||
import BillDialog from '@/components/Home/Bill/BillDialog.vue'
|
||||
import { Plus } from '@element-plus/icons-vue'
|
||||
import { onMounted } from 'vue'
|
||||
import { useBillStore } from '@/store/bill.ts'
|
||||
import { isLargeScreen } from '@/utils'
|
||||
|
||||
const billStore = useBillStore()
|
||||
|
||||
onMounted(async () => {
|
||||
await billStore.refreshInfo()
|
||||
})
|
||||
|
||||
const addNewBillRecordClick = () => {
|
||||
billStore.billApiType = 'ADD'
|
||||
billStore.billDialog = {
|
||||
title: '新增账单',
|
||||
visible: true,
|
||||
data: billStore.getEmptyBillRecord()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
@use "@/styles/home/bill.module.scss";
|
||||
</style>
|
||||
Reference in New Issue
Block a user