add:新增用户表单信息

This commit is contained in:
zlong committed 2024-12-16 15:59:38 +08:00
1 parent fc8900c66e
commit 8b43cdd029
8 files changed
+87 -15

No files matched your search

+9 -4
View File
@@ -1,8 +1,9 @@
<script setup lang="ts">
import type { FeedFormQuestions } from '@/model/pet-manual'
import type { FeedFormQuestions, UserList } from '@/model/pet-manual'
import FeedQuestionnaire from '@/pages/feed-plan/components/FeedQuestionnaire.vue'
import FeedStart from '@/pages/feed-plan/components/FeedStart.vue'
import FeedStep from '@/pages/feed-plan/components/FeedStep.vue'
import avator from '@/static/image/pet-parameters/avator.png'
import cat from '@/static/image/pet-parameters/cat.png'
import dog from '@/static/image/pet-parameters/dog.png'
import emaciatedCat from '@/static/image/pet-parameters/form/emaciated_cat.png'
@@ -40,6 +41,11 @@ const feedFormQuestions = ref<FeedFormQuestions[]>([
{ title: '猫咪是否在哺乳?', question: [{ name: '哺乳中' }, { name: '未哺乳' }], formType: 2 },
{ title: '请选择猫咪的体型', question: [{ image: emaciatedCat, name: '极度消廋' }, { image: skinnyCat, name: '非常廋' }, { image: thinCat, name: '消瘦' }, { image: underWeightCat, name: '体重偏低' }, { image: idealWightCat, name: '理想体重' }, { image: overWeightCat, name: '体重偏重' }], formType: 3 },
])
const userList = ref<UserList>({
image: avator,
username: '子龙',
type: ['年龄', '品种', '体重'],
})
function reset() {
stage.value = 0
controlFormDisplay.value = {
@@ -67,10 +73,9 @@ function handleStep(step: number) {
controlFormDisplay.value.display2 = true
}
else if (step === 7) {
reset()
handleReady()
stage.value = 2
controlFormDisplay.value.display2 = true
controlFormDisplay.value.display3 = false
}
}
</script>
@@ -85,7 +90,7 @@ function handleStep(step: number) {
<FeedStep :list="stepInfo" :stage="stage" />
</view>
<view v-show="controlFormDisplay.display3">
<FeedQuestionnaire :list="feedFormQuestions" :step-info="stepInfo" @back="handleBackFeedStart" @step="handleStep" />
<FeedQuestionnaire :list="feedFormQuestions" :step-info="stepInfo" :user-list="userList" @back="handleBackFeedStart" @step="handleStep" />
</view>
</view>
</template>