albumen.vue 3.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <view class="content">
  3. <view class="content_top">
  4. <view class="text_width">24小时尿蛋白</view>
  5. </view>
  6. <view class="">
  7. <view class="value_box" style="">
  8. <view class="box" style="">
  9. <van-cell-group inset>
  10. <van-field v-model="value" label="24小时尿蛋白数值" placeholder="请输入" />
  11. </van-cell-group>
  12. </view>
  13. </view>
  14. <view class="value_box" style="">
  15. <view class="box" style="">
  16. <view class="text" style="">24小时尿蛋白单位</view>
  17. <view class="option" style="">
  18. <van-radio-group v-model="checked" direction="horizontal"
  19. v-for="(item, index) in unitarr" :key="index">
  20. <van-radio class="radio" :name="item.id">{{item.name}}</van-radio>
  21. </van-radio-group>
  22. </view>
  23. </view>
  24. </view>
  25. <view class="value_box" style="">
  26. <view class="time_box" style="" @click="startShow = true">
  27. <view class="time_text" style="">化验时间</view>
  28. <view class="time_value" style="">
  29. <!-- <text v-if="">请选择></text> -->
  30. <text>{{formatDate((currentDate/1000),'yyyy-MM-dd')}}</text>
  31. </view>
  32. </view>
  33. </view>
  34. <view class="value_box" style="">
  35. <view class="box" style="">
  36. <van-cell-group inset>
  37. <van-field v-model="value" label="尿蛋白数值" placeholder="请输入" />
  38. </van-cell-group>
  39. </view>
  40. </view>
  41. <view class="value_box" style="">
  42. <view class="time_box" style="" @click="startShow = true">
  43. <view class="time_text" style="">化验时间</view>
  44. <view class="time_value" style="">
  45. <!-- <text v-if="">请选择></text> -->
  46. <text>{{formatDate((currentDate/1000),'yyyy-MM-dd')}}</text>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. <view class="content_bottom" style="">
  52. <view class="button_box" style="" @click="next_click">
  53. <view class="button" style="">下一步</view>
  54. </view>
  55. </view>
  56. <van-popup :show="startShow"
  57. position="bottom" :style="{ height: '40%' }"
  58. >
  59. <van-datetime-picker
  60. :value="currentDate"
  61. type="date"
  62. :min-date="minDate"
  63. :max-date="maxDate"
  64. @confirm = "confirm"
  65. @cancel = "cancel"
  66. />
  67. </van-popup>
  68. </view>
  69. </template>
  70. <script>
  71. import moment from 'moment'
  72. import {formatDate} from "@/utils/formatDate.js"
  73. export default {
  74. data() {
  75. return {
  76. unitarr:[{id:1,name:'g/24h'},{id:2,name:'mg/24h'}],
  77. startShow:false,
  78. currentDate: new Date().getTime(),
  79. minDate: new Date(1924,0,1).getTime(),
  80. maxDate: new Date().getTime(),
  81. // Test_time:'',
  82. }
  83. },
  84. methods: {
  85. showclick(){
  86. console.log('111111',this.startShow);
  87. this.startShow = true
  88. },
  89. confirm(e){
  90. this.currentDate = e.detail
  91. this.startShow = false
  92. },
  93. cancel(){
  94. this.startShow = false
  95. },
  96. formatDate(value, fmt) {
  97. return formatDate(new Date(value * 1000), fmt)
  98. },
  99. next_click(){
  100. wx.navigateTo({
  101. url:'/pages/Health_record/renal'
  102. })
  103. console.log('跳转尿蛋白');
  104. }
  105. }
  106. }
  107. </script>
  108. <style lang="scss" scoped>
  109. .content{
  110. .content_top{
  111. padding: 40rpx;
  112. .text_width{
  113. font-weight: 900;
  114. }
  115. }
  116. .value_box{
  117. padding: 10rpx 40rpx;
  118. .box{
  119. border-bottom: 1px solid black;
  120. .text{
  121. line-height: 40px;
  122. }
  123. .option{
  124. display: flex;
  125. text-align: center;
  126. padding-bottom: 5px;
  127. .option_text{
  128. width: 130rpx;
  129. line-height: 60rpx;
  130. border: 1px solid;
  131. border-radius: 20rpx;
  132. margin-right: 10px;
  133. }
  134. .radio{
  135. margin-right: 80rpx;
  136. }
  137. }
  138. }
  139. .time_box{
  140. display: flex;
  141. line-height: 80rpx;
  142. .time_text{
  143. text-align: left;
  144. flex: 1;
  145. }
  146. .time_value{
  147. text-align: right;
  148. flex: 1;
  149. }
  150. }
  151. }
  152. .content_bottom{
  153. width: 100%;
  154. position: fixed;
  155. bottom: 30rpx;
  156. .button_box{
  157. margin: 0 auto;
  158. width: 80%;
  159. background:linear-gradient(#4dc691,#66cfa1,#7ad7ae);
  160. border-radius: 100rpx;
  161. display: flex;
  162. .button{
  163. flex: 1;
  164. line-height:90rpx;
  165. color: white;
  166. text-align: center;
  167. }
  168. }
  169. }
  170. }
  171. </style>