vaccines_info.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. <template>
  2. <view class="">
  3. <view class="cu-list menu">
  4. <view class="cu-item arrow" @click="showpeople=true">
  5. <view class="content">
  6. <text class="text-grey">接种用户</text>
  7. </view>
  8. <view class="action">
  9. <text class="text-grey text-sm">{{value}}</text>
  10. </view>
  11. </view>
  12. <view class="cu-item arrow" @click="xuanzefuwu">
  13. <view class="content">
  14. <text class="text-grey">服务机构</text>
  15. </view>
  16. <view class="action">
  17. <text class="text-grey text-sm">请选择服务机构</text>
  18. </view>
  19. </view>
  20. <view class="cu-item arrow" @click="vaccinesList">
  21. <view class="content">
  22. <text class="text-grey">接种疫苗</text>
  23. </view>
  24. <view class="action">
  25. <text class="text-grey text-sm">请选择接种疫苗</text>
  26. </view>
  27. </view>
  28. <view class="cu-item arrow" @click="yuyuetime">
  29. <view class="content">
  30. <text class="text-grey">预约时间</text>
  31. </view>
  32. <view class="action">
  33. <text class="text-grey text-sm">{{yuyuevalue}}</text>
  34. </view>
  35. </view>
  36. </view>
  37. <u-picker mode="multiSelector" @confirm="callbacktime" v-model="show" :default-selector='[0, 1]' range-key="start_time_period"
  38. :range="multiSelector"></u-picker>
  39. <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
  40. <view class="popup_title">
  41. <view class="popup_title_text">选择就诊人</view>
  42. </view>
  43. <scroll-view style="height: 70%;" scroll-y="true">
  44. <view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="xuanzehuanzhe(item)">
  45. <view class="popup_list_title">
  46. <view class="title">{{item.name}}</view>
  47. <view class="body">
  48. {{item.sex==1?'男':'女'}}
  49. </view>
  50. </view>
  51. <view class="popup_list_button flex align-center">
  52. <u-radio-group v-model="value">
  53. <u-radio @change="peopleRadioChange" :key="index" :name="item.name">
  54. </u-radio>
  55. </u-radio-group>
  56. </view>
  57. </view>
  58. </scroll-view>
  59. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  60. <view class="popup_button">
  61. <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="https://zhengda.oss-cn-chengdu.aliyuncs.com/baoma/static/img/addjiu.png"
  62. mode=""></image>
  63. <view class="" @click="addPeople">
  64. 添加就诊人档案
  65. </view>
  66. </view>
  67. </u-popup>
  68. <view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
  69. <view class="submit" style="background-color: #0B73B9;color: white;" @click="">
  70. 提交申请
  71. </view>
  72. </view>
  73. </view>
  74. </template>
  75. <script>
  76. export default {
  77. onLoad() {
  78. this.getarchives()
  79. this.gettime()
  80. },
  81. onShow() {
  82. },
  83. data() {
  84. return {
  85. showpeople: false,
  86. huanzheID: "",
  87. value: "请选择接种用户",
  88. patientList: [],
  89. show: false,
  90. yuyuevalue: "请选择预约时间",
  91. multiSelector: [],
  92. timehour:""
  93. }
  94. },
  95. methods: {
  96. // 选中某个单选框时,由radio时触发
  97. peopleRadioChange(e) {
  98. console.log(e);
  99. },
  100. xuanzehuanzhe(item) {
  101. this.huanzheID = item.id
  102. this.value = item.name
  103. this.showpeople = false
  104. },
  105. getarchives: async function() {
  106. let res = await this.$request.post("/api/v1/patient/patientList")
  107. if (res.status == 0) {
  108. this.patientList = res.data.data
  109. }
  110. },
  111. gettime: async function() {
  112. let res = await this.$request.post("/api/v1/docter/timePeriodList")
  113. console.log(res)
  114. if (res.status == 0) {
  115. res.data.list.forEach(item => {
  116. item.start_time_period = item.start_time_period + '-' + item.end_time_period
  117. })
  118. this.multiSelector.push(res.data.dates)
  119. this.multiSelector.push(res.data.list)
  120. }
  121. },
  122. callbacktime(arr) {
  123. this.timehour = this.multiSelector[1][arr[1]].id
  124. this.yuyuevalue = this.multiSelector[0][arr[0]] + " " + this.multiSelector[1][arr[1]].start_time_period
  125. },
  126. //添加就诊人
  127. addPeople(e) {
  128. uni.navigateTo({
  129. url: "../archives/add_archives"
  130. })
  131. },
  132. xuanzefuwu() {
  133. uni.navigateTo({
  134. url: "mechanism"
  135. })
  136. },
  137. vaccinesList() {
  138. uni.navigateTo({
  139. url: "vaccinesList"
  140. })
  141. },
  142. yuyuetime() {
  143. this.show = true
  144. }
  145. }
  146. }
  147. </script>
  148. <style lang="scss" scoped>
  149. .main {}
  150. .popup_title {
  151. height: 15%;
  152. width: 100%;
  153. display: flex;
  154. justify-content: center;
  155. align-items: center;
  156. border-bottom: 1rpx solid #f9f9f9;
  157. }
  158. .textareasty {
  159. background-color: white;
  160. border: 1px solid #efefef;
  161. border-radius: 16rpx;
  162. padding: 15rpx;
  163. margin: 15rpx auto;
  164. }
  165. .popup_title_text {
  166. width: auto;
  167. height: auto;
  168. font-size: 34rpx;
  169. font-weight: 540;
  170. }
  171. .popup_list {
  172. display: flex;
  173. height: 10vh;
  174. width: auto;
  175. border-bottom: 1rpx solid #f9f9f9;
  176. }
  177. .popup_list_title {
  178. height: 100%;
  179. width: 90%;
  180. display: inline-block;
  181. padding: 0 0 0 30rpx;
  182. .title {
  183. height: 50%;
  184. width: auto;
  185. font-size: 32rpx;
  186. font-weight: 500;
  187. padding: 20rpx 0 0 0;
  188. }
  189. .body {
  190. height: 50%;
  191. color: #a1a1a1;
  192. height: auto;
  193. width: auto;
  194. font-size: 30rpx;
  195. padding: 10rpx 0 0 0;
  196. }
  197. }
  198. .popup_button {
  199. height: 80rpx;
  200. width: 100%;
  201. display: flex;
  202. justify-content: center;
  203. align-items: center;
  204. view {
  205. color: #0b73ba;
  206. font-weight: 500;
  207. }
  208. }
  209. /**选择号码的样式和选择患者不同
  210. 需要更改样式*/
  211. .phone {
  212. height: 20%;
  213. width: 100%;
  214. .list {
  215. height: 100%;
  216. width: 100%;
  217. display: flex;
  218. padding: 0 10rpx 0 30rpx;
  219. .title {
  220. height: 100%;
  221. width: 65%;
  222. font-size: 32rpx;
  223. color: #7d7d7d;
  224. display: flex;
  225. align-items: center;
  226. }
  227. .phone {
  228. height: 100%;
  229. width: 30%;
  230. font-size: 32rpx;
  231. font-weight: 500;
  232. display: flex;
  233. justify-content: center;
  234. align-items: center;
  235. }
  236. .button {
  237. height: 100%;
  238. width: 5%;
  239. display: flex;
  240. justify-content: center;
  241. align-items: center;
  242. }
  243. }
  244. }
  245. </style>