personage.vue 3.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. <template>
  2. <view class="cnt_wrapper">
  3. <view class="wrap">
  4. <view class="p_cnt">
  5. <view class="p_cnt_list">
  6. <view>头像</view>
  7. <view class="text">
  8. <image style="width: 100rpx;height: 100rpx;" src="../../static/images/recordhead.png" mode="">
  9. </image>
  10. </view>
  11. </view>
  12. <view class="p_cnt_list">
  13. <view>昵称</view>
  14. <view class="text">
  15. <input type="text" placeholder="请输入" value=''/>
  16. </view>
  17. </view>
  18. <view class="p_cnt_list">
  19. <view>手机号码</view>
  20. <view class="text">
  21. <input type="text" placeholder="请输入" value=''/>
  22. </view>
  23. </view>
  24. <view class="p_cnt_list">
  25. <view>真实姓名</view>
  26. <view class="text">
  27. <input type="text" placeholder="请输入" value=''/>
  28. </view>
  29. </view>
  30. <view class="p_cnt_list">
  31. <view>身份证号</view>
  32. <view class="text">
  33. <input type="text" placeholder="请输入" value=''/>
  34. </view>
  35. </view>
  36. <view class="p_cnt_list">
  37. <view>医院登记的手机号</view>
  38. <view class="text">
  39. <input type="text" placeholder="请输入" value=''/>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. import { getRecord,getOrg } from '@/api/api.js';
  48. export default {
  49. data() {
  50. return {
  51. form:{
  52. sex:'',
  53. birthday:'',
  54. ID:'',
  55. Mobile:'',
  56. address:'',
  57. hospital:''
  58. },
  59. dialysis_no:'',
  60. name:'',
  61. }
  62. },
  63. onLoad(){
  64. this.name = this.$store.state.data.userInfo.name
  65. this.dialysis_no = this.$store.state.data.userInfo.dialysis_no
  66. this.form={
  67. sex: this.$store.state.data.userInfo.gender,
  68. ID: this.$store.state.data.userInfo.id_card_no,
  69. Mobile: this.$store.state.data.userInfo.phone,
  70. address: this.$store.state.data.userInfo.home_address,
  71. }
  72. let hospital = this.$store.state.data.userInfo.id
  73. // this.getOrg(hospital)
  74. // this.getIdInfo(this.form.ID)
  75. },
  76. methods: {
  77. // 删除就诊人
  78. // deleteP() {
  79. // },
  80. async getOrg(patient_id){
  81. let params = {
  82. patient_id:patient_id
  83. }
  84. let res = await getOrg(params)
  85. console.log('zzzzz',res);
  86. this.form.hospital = res.data.data.orgInfo.org_name
  87. console.log(this.form);
  88. // return this.form.hospital
  89. },
  90. getIdInfo(cardNo) {
  91. var reg = /(^\d{15}$)|(^\d{17}([0-9]|X)$)/; //验证身份证号码的正则
  92. if(reg.test(cardNo)){ // 身份证号码是否合法
  93. var birthday = "";
  94. var gender = "";
  95. if (cardNo.length == 15) {
  96. var org_birthday = cardNo.substring(6, 12);
  97. var org_gender = cardNo.substring(14, 15);
  98. birthday = "19" + org_birthday.substring(0, 2) + "-"
  99. + org_birthday.substring(2, 4) + "-"
  100. + org_birthday.substring(4, 6);
  101. } else if (cardNo.length == 18) {
  102. var org_birthday = cardNo.substring(6, 14);
  103. var org_gender = cardNo.substring(16, 17);
  104. birthday = org_birthday.substring(0, 4) + "-"
  105. + org_birthday.substring(4, 6) + "-"
  106. + org_birthday.substring(6, 8);
  107. }
  108. this.form.birthday=birthday
  109. }else{
  110. return false;
  111. }
  112. },
  113. }
  114. }
  115. </script>
  116. <style lang="scss" scoped>
  117. .p_cnt {
  118. width: 93vw;
  119. margin: 20rpx auto;
  120. border-radius: 10rpx;
  121. background: #fff;
  122. .p_cnt_list {
  123. height: 100rpx;
  124. padding: 10rpx 50rpx;
  125. display: flex;
  126. justify-content: space-between;
  127. align-items: center;
  128. font-size: 30rpx;
  129. border-bottom: 1px solid gainsboro;
  130. .text{
  131. text-align: right;
  132. }
  133. // font-weight: bold;
  134. }
  135. }
  136. </style>