feat: 项目填报
This commit is contained in:
parent
a22d9301af
commit
5b628057e3
@ -86,6 +86,11 @@ const routes = [
|
|||||||
name: 'Rebuild',
|
name: 'Rebuild',
|
||||||
component: () => import('../views/Rebuild/Rebuild.vue')
|
component: () => import('../views/Rebuild/Rebuild.vue')
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
path: '/rebuild-add/:data?',
|
||||||
|
name: 'RebuildAdd',
|
||||||
|
component: () => import('../views/Rebuild/RebuildAdd.vue')
|
||||||
|
},
|
||||||
{
|
{
|
||||||
path: '/disasterManagement',
|
path: '/disasterManagement',
|
||||||
name: 'DisasterManagement',
|
name: 'DisasterManagement',
|
||||||
|
|||||||
@ -8,10 +8,10 @@
|
|||||||
<CardItem v-for="(item, index) in list" :key="index" :title="`${item.area} ${item.rNumber} ${item.type}`"
|
<CardItem v-for="(item, index) in list" :key="index" :title="`${item.area} ${item.rNumber} ${item.type}`"
|
||||||
@click="handleClickItem(item)">
|
@click="handleClickItem(item)">
|
||||||
<template #headerExtra>
|
<template #headerExtra>
|
||||||
<van-tag v-if="item.status === '审批通过'" type="success" round size="large">{{ item.status }}</van-tag>
|
<van-tag v-if="item.status === '审批通过'" type="success" plain size="medium">{{ item.status }}</van-tag>
|
||||||
<van-tag v-else-if="item.status === '审批驳回'" type="danger" round size="large">{{ item.status
|
<van-tag v-else-if="item.status === '审批驳回'" type="danger" plain size="medium">{{ item.status
|
||||||
}}</van-tag>
|
}}</van-tag>
|
||||||
<van-tag v-else type="warning" round size="large">{{ item.status }}</van-tag>
|
<van-tag v-else type="warning" plain size="medium">{{ item.status }}</van-tag>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
@ -95,6 +95,12 @@ const handleClickBack = () => {
|
|||||||
|
|
||||||
const handleAddDevice = () => {
|
const handleAddDevice = () => {
|
||||||
router.push('/rebuild-add')
|
router.push('/rebuild-add')
|
||||||
|
// router.push({
|
||||||
|
// name: "RebuildAdd",
|
||||||
|
// params: {
|
||||||
|
// data: encodeURIComponent(JSON.stringify(11)),
|
||||||
|
// },
|
||||||
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
63
packages/mobile/src/views/Rebuild/RebuildAdd.vue
Normal file
63
packages/mobile/src/views/Rebuild/RebuildAdd.vue
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
<template>
|
||||||
|
<PageContainer title="项目填报" @click-back="handleClickBack">
|
||||||
|
<div class="content">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<van-button type="primary" class="add-btn" icon="plus" @click="handleAdd">
|
||||||
|
提交
|
||||||
|
</van-button>
|
||||||
|
</PageContainer>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, onMounted, watch } from 'vue'
|
||||||
|
import { useRouter, useRoute } from 'vue-router'
|
||||||
|
import PageContainer from '@/components/PageContainer.vue'
|
||||||
|
import SearchInput from '@/components/SearchInput.vue'
|
||||||
|
import CurrentSite from '@/components/CurrentSite.vue'
|
||||||
|
import CardItem from '@/components/CardItem.vue'
|
||||||
|
import EmptyBox from '@/components/EmptyBox.vue'
|
||||||
|
|
||||||
|
const router = useRouter()
|
||||||
|
const route = useRoute()
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
if (route.params.data) {
|
||||||
|
const data = JSON.parse(decodeURIComponent(route.params.data));
|
||||||
|
console.log('@@@@data', data);
|
||||||
|
// todo 在有传参的时候 调用接口去获取数据 并且初始化表单
|
||||||
|
} else {
|
||||||
|
console.log('无传入数据');
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
const handleClickBack = () => {
|
||||||
|
if (route.params.data) {
|
||||||
|
|
||||||
|
} else {
|
||||||
|
router.push('/rebuild')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.content {
|
||||||
|
padding: 16px 16px 80px 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.add-btn {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 20px;
|
||||||
|
left: 16px;
|
||||||
|
right: 16px;
|
||||||
|
width: calc(100% - 32px);
|
||||||
|
margin: 0 auto;
|
||||||
|
border-radius: 24px;
|
||||||
|
font-size: 16px;
|
||||||
|
height: 44px;
|
||||||
|
z-index: 999;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
Loading…
x
Reference in New Issue
Block a user