|
|
@ -2,13 +2,13 @@ |
|
|
|
<view> |
|
|
|
<view v-for="(item, index) in infoList" :key="index"> |
|
|
|
<template v-for="(colItem, itemIndex) in item"> |
|
|
|
<view v-if="colItem.showType === 1" :key="itemIndex" class="flex flex-col text-sm ml-4 border-b"> |
|
|
|
<view class="my-3 flex justify-between items-center" @click="changeShow(index, itemIndex)"> |
|
|
|
<view v-if="colItem.showType === 1" :key="itemIndex" class="flex flex-col mx-4 border-b"> |
|
|
|
<view class="my-3 flex justify-between items-center text-base" @click="changeShow(index, itemIndex)"> |
|
|
|
{{ colItem.name }} |
|
|
|
<u-icon name="arrow-up" class="mx-2" color="#909399" v-if="colItem.show"></u-icon> |
|
|
|
<u-icon name="arrow-down" class="mx-2" color="#909399" v-else></u-icon> |
|
|
|
<u-icon name="arrow-up" class="ml-2" color="#909399" v-if="colItem.show"></u-icon> |
|
|
|
<u-icon name="arrow-down" class="ml-2" color="#909399" v-else></u-icon> |
|
|
|
</view> |
|
|
|
<view v-if="colItem.show"> |
|
|
|
<view v-if="colItem.show" class="pb-2"> |
|
|
|
<!-- 单选 --> |
|
|
|
<view v-if="colItem.type === 1"> |
|
|
|
<u-radio-group v-model="colItem.value"> |
|
|
@ -18,7 +18,7 @@ |
|
|
|
:key="radioIndex" |
|
|
|
:name="radioItem" |
|
|
|
> |
|
|
|
{{ radioItem }} |
|
|
|
<view class="py-1 text-base">{{ radioItem }}</view> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
<u-input |
|
|
@ -33,13 +33,13 @@ |
|
|
|
<view v-if="colItem.type === 5"> |
|
|
|
<u-checkbox-group> |
|
|
|
<u-checkbox |
|
|
|
class="mb-2" |
|
|
|
@change="change($event, index, itemIndex, colItem.type)" |
|
|
|
v-model="checkboxItem.checked" |
|
|
|
v-for="(checkboxItem, checkboxIndex) in colItem.checkList" |
|
|
|
:key="checkboxIndex" |
|
|
|
:name="checkboxItem.name" |
|
|
|
>{{ checkboxItem.name }} |
|
|
|
> |
|
|
|
<view class="py-1 text-base">{{ checkboxItem.name }}</view> |
|
|
|
</u-checkbox> |
|
|
|
</u-checkbox-group> |
|
|
|
<u-input |
|
|
@ -53,9 +53,9 @@ |
|
|
|
<!-- 失眠 --> |
|
|
|
<view v-if="colItem.type === 10"> |
|
|
|
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)"> |
|
|
|
<u-radio class="flex mb-1" :name="0">否</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="0"><text class="py-1 text-base">否</text></u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="1"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
是,每天能睡 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -73,9 +73,9 @@ |
|
|
|
<!-- 吸烟 --> |
|
|
|
<view v-if="colItem.type === 11"> |
|
|
|
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)"> |
|
|
|
<u-radio class="flex mb-1 w-full" :name="0">否</u-radio> |
|
|
|
<u-radio class="flex mb-1 w-full" :name="0"><text class="py-1 text-base">否</text></u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="1"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
曾经是,但已经戒烟,已戒 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -89,7 +89,7 @@ |
|
|
|
</view> |
|
|
|
</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="2"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
是,烟龄 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -115,9 +115,9 @@ |
|
|
|
<!-- 饮酒 --> |
|
|
|
<view v-if="colItem.type === 12"> |
|
|
|
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)"> |
|
|
|
<u-radio class="flex mb-1" :name="0">否</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="0"><text class="py-1 text-base">否</text></u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="1"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
曾经是,但已经戒酒,已戒 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -130,7 +130,7 @@ |
|
|
|
年 |
|
|
|
</view> |
|
|
|
</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="2">是</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="2"><text class="py-1 text-base">是</text></u-radio> |
|
|
|
</u-radio-group> |
|
|
|
<!-- 饮酒种类 --> |
|
|
|
<view class="mt-2 flex flex-col" v-if="colItem.showClasses"> |
|
|
@ -142,7 +142,7 @@ |
|
|
|
:key="classRadioIndex" |
|
|
|
:name="radioItem" |
|
|
|
> |
|
|
|
{{ radioItem }} |
|
|
|
<text class="py-1 text-base">{{ radioItem }}</text> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
<u-input |
|
|
@ -157,9 +157,9 @@ |
|
|
|
<!-- 饮茶 --> |
|
|
|
<view v-if="colItem.type === 13"> |
|
|
|
<u-radio-group v-model="colItem.value" class="flex flex-col" @change="change($event, index, itemIndex, colItem.type)"> |
|
|
|
<u-radio class="flex mb-1" :name="0">否</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="0"><text class="py-1 text-base">否</text></u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="1"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
曾经是,但已经不喝,已不喝 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -173,7 +173,7 @@ |
|
|
|
</view> |
|
|
|
</u-radio> |
|
|
|
<u-radio class="flex mb-1" :name="2"> |
|
|
|
<view class="flex flex-nowrap items-center"> |
|
|
|
<view class="flex flex-nowrap items-center py-1 text-base"> |
|
|
|
是,已持续 |
|
|
|
<input |
|
|
|
class="mx-1 w-12 h-6 text-center border-b" |
|
|
@ -197,7 +197,7 @@ |
|
|
|
:key="classIndex" |
|
|
|
:name="radioItem" |
|
|
|
> |
|
|
|
{{ radioItem }} |
|
|
|
<text class="py-1 text-base">{{ radioItem }}</text> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
<view>饮茶频率</view> |
|
|
@ -208,7 +208,7 @@ |
|
|
|
:key="frequencyIndex" |
|
|
|
:name="radioItem" |
|
|
|
> |
|
|
|
{{ radioItem }} |
|
|
|
<text class="py-1 text-base">{{ radioItem }}</text> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
</view> |
|
|
@ -222,19 +222,19 @@ |
|
|
|
:key="radioIndex" |
|
|
|
:name="radioItem.id" |
|
|
|
> |
|
|
|
{{ radioItem.value }} |
|
|
|
<view class="py-1 text-base">{{ radioItem.value }}</view> |
|
|
|
</u-radio> |
|
|
|
</u-radio-group> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view v-else :key="itemIndex" class="flex justify-between items-center text-sm border-b"> |
|
|
|
<view class="ml-4 my-3">{{ colItem.name }}</view> |
|
|
|
<view v-else :key="itemIndex" class="mx-4 flex justify-between items-center border-b"> |
|
|
|
<view class="my-3 text-base">{{ colItem.name }}</view> |
|
|
|
<!-- 日期: 年月日 --> |
|
|
|
<view v-if="colItem.type === 2"> |
|
|
|
<view @click="changeShow(index, itemIndex)"> |
|
|
|
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text> |
|
|
|
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon> |
|
|
|
<u-icon name="arrow-right" class="ml-2" color="#909399"></u-icon> |
|
|
|
</view> |
|
|
|
<u-picker |
|
|
|
@confirm="change($event, index, itemIndex, colItem.type)" |
|
|
@ -248,7 +248,7 @@ |
|
|
|
></u-picker> |
|
|
|
</view> |
|
|
|
<!-- 数字输入框 --> |
|
|
|
<view v-if="colItem.type === 3" class="pr-7"> |
|
|
|
<view v-if="colItem.type === 3" class="pr-5"> |
|
|
|
<u-input |
|
|
|
placeholder="请输入" |
|
|
|
v-model="colItem.value" |
|
|
@ -277,7 +277,7 @@ |
|
|
|
<view v-if="colItem.type === 7"> |
|
|
|
<view @click="changeShow(index, itemIndex)"> |
|
|
|
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text> |
|
|
|
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon> |
|
|
|
<u-icon name="arrow-right" class="ml-2" color="#909399"></u-icon> |
|
|
|
</view> |
|
|
|
<u-select |
|
|
|
v-model="colItem.show" |
|
|
@ -289,7 +289,7 @@ |
|
|
|
></u-select> |
|
|
|
</view> |
|
|
|
<!-- input 文本输入框 --> |
|
|
|
<view v-if="colItem.type === 8" class="pr-7"> |
|
|
|
<view v-if="colItem.type === 8" class="pr-5"> |
|
|
|
<u-input |
|
|
|
placeholder="请输入" |
|
|
|
v-model="colItem.value" |
|
|
@ -302,7 +302,7 @@ |
|
|
|
<view v-if="colItem.type === 9"> |
|
|
|
<view @click="changeShow(index, itemIndex)"> |
|
|
|
<text :class="colItem.value ? '' : 'text-gray-350'">{{ colItem.value || '请选择' }} </text> |
|
|
|
<u-icon name="arrow-right" class="mx-2" color="#909399"></u-icon> |
|
|
|
<u-icon name="arrow-right" class="ml-2" color="#909399"></u-icon> |
|
|
|
</view> |
|
|
|
<u-picker |
|
|
|
@confirm="change($event, index, itemIndex, colItem.type)" |
|
|
|