add_archives.vue 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. <template>
  2. <view class="main">
  3. <form>
  4. <view class="cu-form-group margin-top">
  5. <view class="title">头像</view>
  6. <image class="cu-avatar radius bg-gray" @click="ChooseImage" :src='imgList[0]' mode='aspectFill'>
  7. </image>
  8. </view>
  9. <view class="cu-form-group">
  10. <view class="title">就诊人姓名:</view>
  11. <input v-model="name" placeholder-style="text-align:right" placeholder="请填写手机号"></input>
  12. </view>
  13. <view class="cu-form-group">
  14. <view class="title">就诊人性别:</view>
  15. <u-radio-group v-model="value" @change="radioGroupChange">
  16. <u-radio v-for="(item, index) in list" :key="index" :name="item.name" :disabled="item.disabled">
  17. {{item.name}}
  18. </u-radio>
  19. </u-radio-group>
  20. </view>
  21. <view class="cu-form-group">
  22. <view class="title">出身年月:</view>
  23. <picker mode="date" :value="date" @change="bindDateChange">
  24. <view class="picker">
  25. {{date}}
  26. </view>
  27. </picker>
  28. </view>
  29. <view class="cu-form-group" @click="show=!show">
  30. <view class="title">与就诊人关系:</view>
  31. <picker :value="guanxi" @change="confirm" :range="guanxilist" range-key="label">
  32. <view class="picker">
  33. {{guanxi}}
  34. </view>
  35. </picker>
  36. </view>
  37. <view class="cu-form-group margin-top">
  38. <view class="title">就诊信息(非必填)</view>
  39. <input v-model="jiuzheninfo" placeholder-style="text-align:right" placeholder="请输入"></input>
  40. </view>
  41. <view class="cu-form-group">
  42. <view class="title">就诊人身份证:</view>
  43. <input v-model="idcrad" placeholder-style="text-align:right" placeholder="请输入就诊人身份证号"></input>
  44. </view>
  45. <view class="padding-sm bg-white" style="color: #C0C0C0;">
  46. 注:就诊人信息用于平台审核和医疗业务使用,不会外传。请正却确填写就诊人信息,如需修改身份信息可电话联系客服修改(13330431369)
  47. </view>
  48. </form>
  49. <view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
  50. <view class="submit" style="background-color: #0B73B9;color: white;" @click="addarchives">
  51. 提交
  52. </view>
  53. </view>
  54. </view>
  55. </template>
  56. <script>
  57. export default {
  58. onLoad(options) {
  59. },
  60. onShow() {
  61. },
  62. data() {
  63. return {
  64. imgList: '',
  65. name: "",
  66. list: [{
  67. name: '男',
  68. disabled: false
  69. },
  70. {
  71. name: '女',
  72. disabled: false
  73. },
  74. ],
  75. value: '男',
  76. date: "请选择出生日期",
  77. show: false,
  78. guanxi: "请选择",
  79. guanxiindex: 0,
  80. guanxilist: [{
  81. value: '1',
  82. label: '父亲'
  83. },
  84. {
  85. value: '2',
  86. label: '母亲'
  87. },
  88. {
  89. value: '3',
  90. label: '祖父'
  91. },
  92. {
  93. value: '4',
  94. label: '祖母'
  95. },
  96. {
  97. value: '5',
  98. label: '外祖父'
  99. },
  100. {
  101. value: '6',
  102. label: '外祖母'
  103. },
  104. {
  105. value: '7',
  106. label: '叔侄'
  107. }
  108. ],
  109. idcrad: ""
  110. }
  111. },
  112. methods: {
  113. ChooseImage() {
  114. uni.chooseImage({
  115. count: 1, //默认9
  116. sizeType: ['compressed'], //可以指定是原图还是压缩图,默认二者都有
  117. sourceType: ['album', 'camera'], //从相册选择
  118. success: (res) => {
  119. this.imgList = res.tempFilePaths
  120. }
  121. });
  122. },
  123. // 选中任一radio时,由radio-group触发
  124. radioGroupChange(e) {
  125. this.value = e
  126. console.log(this.value)
  127. },
  128. bindDateChange({
  129. detail
  130. }) {
  131. this.date = detail.value
  132. console.log(this.date)
  133. },
  134. confirm(e) {
  135. this.guanxiindex = e.detail.value
  136. this.guanxi = this.guanxilist[e.detail.value].label
  137. },
  138. addarchives: async function() {
  139. console.log(this.imgList[0])
  140. console.log(this.name)
  141. console.log(this.value)
  142. console.log(this.date)
  143. console.log(this.guanxiindex)
  144. console.log(this.idcrad)
  145. }
  146. }
  147. };
  148. </script>
  149. <style scoped lang="scss">
  150. .main {}
  151. </style>