326 lines
15 KiB
Plaintext
326 lines
15 KiB
Plaintext
<!--pages/user/index.wxml-->
|
|
<view class="cu-list menu-avatar user-info">
|
|
<view class="cu-item">
|
|
<view class="cu-avatar round lg" style="background-image:url({{userInfo.avatarUrl}});"></view>
|
|
<view class="content">
|
|
<view class="">
|
|
<text class="text-cut nickname">{{userDetail.realname}}</text>
|
|
</view>
|
|
<view class=" text-sm flex">
|
|
<text class="text-cut">地区: <text>{{userDetail.address}}</text></text>
|
|
</view>
|
|
</view>
|
|
<view class="action" bindtap="switchView">
|
|
<view class="">
|
|
{{showRecord?'基本信息':'自评记录'}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
<!-- 评估数据列表 -->
|
|
<view class="evaluation" wx:if="{{showRecord}}">
|
|
<view class="collapse">
|
|
<view class="item" wx:for="{{dataList}}" wx:key="collapse_item" wx:for-item="item">
|
|
<view class="title" bindtap="toggleCollapse" data-index="{{index}}">
|
|
<view class="row">
|
|
<view class="col">
|
|
<text class="{{collapseTags[index]?'cuIcon-unfold':'cuIcon-right'}} icon"></text>
|
|
<text class="text-strong">自评时间:{{item.create_time}}</text>
|
|
</view>
|
|
<view class="text-right">
|
|
<text class="level-0" wx:if="{{item.level == 0}}">({{item.score}}分)</text>
|
|
<text class="level-1" wx:if="{{item.level == 1}}">轻度 ({{item.score}}分)</text>
|
|
<text class="level-2" wx:if="{{item.level == 2}}">中度 ({{item.score}}分)</text>
|
|
<text class="level-3" wx:if="{{item.level == 3}}">重度 ({{item.score}}分)</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view hidden="{{!collapseTags[index]}}" class="content">
|
|
<view class="table-list">
|
|
<view class="row header">
|
|
<view class="subject">症状</view>
|
|
<view class="col">程度</view>
|
|
<view class="score">得分</view>
|
|
</view>
|
|
<view class="row" wx:for="{{item.options}}" wx:key="op" wx:for-item="op">
|
|
<view class="subject">{{op.subject}}</view>
|
|
<view class="col">{{op.text}}</view>
|
|
<view class="score">{{op.score}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="result">
|
|
|
|
<view class="level-0" wx:if="{{item.level == 0}}">
|
|
<view>自评结果:{{item.result}}</view>
|
|
<view hidden="{{item.level == 0}}">医疗建议:{{item.suggest}}</view>
|
|
</view>
|
|
<view class="level-1" wx:if="{{item.level == 1}}">
|
|
<view>自评结果:{{item.result}}</view>
|
|
<view hidden="{{item.level == 0}}">医疗建议:{{item.suggest}}</view>
|
|
</view>
|
|
<view class="level-2" wx:if="{{item.level == 2}}">
|
|
<view>自评结果:{{item.result}}</view>
|
|
<view hidden="{{item.level == 0}}">医疗建议:{{item.suggest}}</view>
|
|
</view>
|
|
<view class="level-3" wx:if="{{item.level == 3}}">
|
|
<view>自评结果:{{item.result}}</view>
|
|
<view hidden="{{item.level == 0}}">医疗建议:{{item.suggest}}</view>
|
|
</view>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view wx:else>
|
|
<!-- 姓名 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">姓名</view>
|
|
|
|
<view class="action" bindtap="showAlert" data-key="realname" data-title="姓名">
|
|
<view class="">
|
|
{{userDetail.realname}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 性别 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">性别</view>
|
|
|
|
<view class="action" bindtap="showModal" data-target="ChooseModal">
|
|
<view class="">
|
|
{{userDetail.gender==1?'男':'女'}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 年龄 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">年龄</view>
|
|
<view class="action" bindtap="showAlert" data-key="age" data-title="年龄">
|
|
<view class="">
|
|
{{userDetail.age}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 身高 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">身高</view>
|
|
<view class="action" bindtap="showAlert" data-key="height" data-title="身高">
|
|
<view class="">
|
|
{{userDetail.height}}cm
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 体重 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">体重</view>
|
|
<view class="action" bindtap="showAlert" data-key="weight" data-title="体重">
|
|
<view class="">
|
|
{{userDetail.weight}}kg
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 世居地 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">世居地</view>
|
|
<view class="action" bindtap="showModal" data-target="ChooseCityModal">
|
|
<view class="">
|
|
{{userDetail.address}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
<view class="cu-modal actionsheet bottom-modal {{modalName=='ChooseCityModal'?'show':''}}" bindtap="hideModal">
|
|
<view class="cu-dialog" catchtap>
|
|
<view class="row actionsheet-btns">
|
|
<view class="col text-left">
|
|
<text class="" bindtap="hideModal">取消</text>
|
|
</view>
|
|
<view class="col text-right">
|
|
<text class="text-red" bindtap="updateAddress">确定</text>
|
|
</view>
|
|
|
|
</view>
|
|
<picker-view indicator-style="height: 36px;" style="width: 100%; height: 200px;" value="{{value}}" bindchange="bindCityChange">
|
|
<picker-view-column>
|
|
<view wx:for="{{provinces}}" wx:key="item" style="line-height: 36px">{{item.name}}</view>
|
|
</picker-view-column>
|
|
<picker-view-column>
|
|
<view wx:for="{{cities}}" wx:key="item" style="line-height: 36px">{{item.name}}</view>
|
|
</picker-view-column>
|
|
</picker-view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 首次进藏 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">首次进藏</view>
|
|
<view class="action" bindtap="showModal" data-target="ChooseTibetModal">
|
|
<view class="">
|
|
{{userDetail.is_first_to_tibet==1?'是':'否'}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
<view class="cu-modal actionsheet bottom-modal {{modalName=='ChooseTibetModal'?'show':''}}" catchtap="hideModal" >
|
|
<view class="cu-dialog" catchtap="noTap">
|
|
<view class="list-item-se">
|
|
<text class="dialog-head-title">首次进藏</text>
|
|
<radio-group bindchange="bindSelectChange" data-key="is_first_to_tibet">
|
|
<view class="item">
|
|
<label class="radio" c>
|
|
<radio value="1" checked="true" checked="{{userDetail.is_first_to_tibet == 1}}" />是
|
|
</label>
|
|
</view>
|
|
<view class="item">
|
|
<label class="radio">
|
|
<radio value="0" checked="{{userDetail.is_first_to_tibet == 0}}" />否
|
|
</label>
|
|
</view>
|
|
</radio-group>
|
|
</view>
|
|
<view class="btns">
|
|
<view>
|
|
<button class="text-red" bindtap="updateSelectData">确定</button>
|
|
</view>
|
|
<view>
|
|
<button bindtap="hideModal">取消</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 饮酒情况 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">饮酒情况</view>
|
|
<view class="action" bindtap="showModal" data-target="ChooseDrinkModal">
|
|
<view class="">
|
|
{{userDetail.drink==1?'长期饮酒':'不饮酒'}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
<view class="cu-modal actionsheet bottom-modal {{modalName=='ChooseDrinkModal'?'show':''}}" catchtap="hideModal" >
|
|
<view class="cu-dialog" catchtap="noTap">
|
|
<view class="list-item-se">
|
|
<text class="dialog-head-title">饮酒情况</text>
|
|
<radio-group bindchange="bindSelectChange" data-key="drink">
|
|
<view class="item">
|
|
<label class="radio">
|
|
<radio value="1" checked="{{userDetail.drink == 1}}" />长期饮酒
|
|
</label>
|
|
</view>
|
|
<view class="item">
|
|
<label class="radio">
|
|
<radio value="0" checked="{{userDetail.drink == 0}}" />不饮酒
|
|
</label>
|
|
</view>
|
|
</radio-group>
|
|
</view>
|
|
<view class="btns">
|
|
<view>
|
|
<button class="text-red" bindtap="updateSelectData">确定</button>
|
|
</view>
|
|
<view>
|
|
<button bindtap="hideModal">取消</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<!-- 抽烟情况 -->
|
|
<view class="cu-form-group">
|
|
<view class="title">抽烟情况</view>
|
|
<view class="action" bindtap="showModal" data-target="ChooseSmokeModal">
|
|
<view class="">
|
|
{{subjects.smoke[userDetail.smoke].text}}
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
<view class="cu-modal actionsheet bottom-modal {{modalName=='ChooseSmokeModal'?'show':''}}" catchtap="hideModal">
|
|
<view class="cu-dialog" catchtap="noTap">
|
|
<view class="list-item-se">
|
|
<text class="dialog-head-title">抽烟情况</text>
|
|
<radio-group bindchange="bindSelectChange" data-key="smoke">
|
|
<view class="item" wx:for="{{subjects.smoke}}" wx:key="item">
|
|
<label class="radio">
|
|
<radio value="{{index}}" checked="{{item.checked}}" />
|
|
<text>{{item.text}}</text>
|
|
</label>
|
|
</view>
|
|
</radio-group>
|
|
</view>
|
|
<view class="btns">
|
|
<view>
|
|
<button class="text-red" bindtap="updateSelectData">确定</button>
|
|
</view>
|
|
<view>
|
|
<button bindtap="hideModal">取消</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<!-- 既往病史 -->
|
|
<view class="cu-form-group" bindtap="showModal" data-target="ChooseModal">
|
|
<view class="title">既往病史</view>
|
|
|
|
<view class="action">
|
|
<view class="">
|
|
<text class="cuIcon-right"></text>
|
|
</view>
|
|
</view>
|
|
<view class="cu-modal actionsheet bottom-modal {{modalName=='ChooseModal'?'show':''}}" catchtap="hideModal">
|
|
<view class="cu-dialog" catchtap="noTap">
|
|
<view class=" medical-info-select">
|
|
<text class="dialog-head-title">既往疾病(多选)</text>
|
|
<checkbox-group bindchange="bindSelectChange" data-key="medical_history">
|
|
<view class="item" wx:for="{{subjects.medical_histories}}" wx:key="item">
|
|
<label>
|
|
<checkbox value="{{index}}" checked="{{item.checked}}" />
|
|
<text>{{item.text}}</text>
|
|
</label>
|
|
</view>
|
|
</checkbox-group>
|
|
</view>
|
|
<view class="btns">
|
|
<view>
|
|
<button class="text-red" bindtap="updateSelectData">确定</button>
|
|
</view>
|
|
<view>
|
|
<button bindtap="hideModal">取消</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
<view class="toast-box" hidden="{{!dialog.show}}">
|
|
<view class="toastbg"></view>
|
|
<view class="showToast">
|
|
<view class="toast-title" wx:if="{{!!dialog.title}}">
|
|
<text>{{dialog.title}}</text>
|
|
</view>
|
|
<view class="toast-main">
|
|
<view class="toast-input">
|
|
<input placeholder="{{dialog.default}}" value="{{dialog.value}}" bindinput="bindDialogInput" />
|
|
</view>
|
|
</view>
|
|
<view class="toast-button">
|
|
<view class="button1">
|
|
<button bindtap="hideInputDialog">取消</button>
|
|
</view>
|
|
<view class="button2">
|
|
<button bindtap="checkInputDialog">确定</button>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view> |