info_write.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <template>
  2. <view class="main">
  3. <view class="cu-list menu-avatar">
  4. <view class="cu-item">
  5. <view class="cu-avatar round lg" :style="'background-image:url('+doctor.avatar+');'"></view>
  6. <view class="content">
  7. <view class="text-grey">{{doctor.name}}</view>
  8. <view class="text-gray text-sm flex">
  9. <text class="text-cut">
  10. {{doctor.office.name}} {{doctor.qualification.name}}
  11. </text>
  12. </view>
  13. </view>
  14. <view class="action">
  15. </view>
  16. </view>
  17. </view>
  18. <view class="cu-list menu">
  19. <view class="cu-item arrow" @click="openhuanzhe">
  20. <view class="content">
  21. <text class="text-grey">咨询患者</text>
  22. </view>
  23. <view class="action">
  24. <text class="text-grey text-sm">{{value}}</text>
  25. </view>
  26. </view>
  27. <view class="cu-item arrow" @click="openphone">
  28. <view class="content">
  29. <text class="text-grey">接听号码</text>
  30. </view>
  31. <view class="action">
  32. <text class="text-grey text-sm">{{phonenum}}</text>
  33. </view>
  34. </view>
  35. <view class="cu-item">
  36. <view class="content">
  37. <text class="text-grey">咨询时间</text>
  38. </view>
  39. <view class="action">
  40. <text class="text-grey text-sm">{{doctor.phone_minutes}}分钟</text>
  41. </view>
  42. </view>
  43. <view class="cu-item">
  44. <view class="content">
  45. <text class="text-grey">咨询费用</text>
  46. </view>
  47. <view class="action">
  48. <text class="text-grey text-sm">{{doctor.phone_price}}元</text>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="cu-bar bg-white tabbar" style="position: fixed;bottom: 0;width: 100%;">
  53. <view class="submit" style="background-color: #0B73B9;color: white;" @click="">
  54. 立即咨询
  55. </view>
  56. </view>
  57. <!-- 选择就诊人 -->
  58. <!-- model控制开关 mode控制显示方向-->
  59. <u-popup v-model="showpeople" mode="bottom" border-radius="14" length="50%">
  60. <view class="popup_title">
  61. <view class="popup_title_text">选择就诊人</view>
  62. </view>
  63. <scroll-view style="height: 70%;" scroll-y="true">
  64. <view class="popup_list" v-for="(item, index) in patientList" :key="index" :data-index="index" @click="value=item.name,showpeople=false">
  65. <view class="popup_list_title">
  66. <view class="title">{{item.name}}</view>
  67. <view class="body">
  68. {{item.sex==1?'男':'女'}}
  69. </view>
  70. </view>
  71. <view class="popup_list_button flex align-center">
  72. <u-radio-group v-model="value">
  73. <u-radio @change="peopleRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
  74. </u-radio>
  75. </u-radio-group>
  76. </view>
  77. </view>
  78. </scroll-view>
  79. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  80. <view class="popup_button">
  81. <image style="width: 32rpx;height: 32rpx;margin-right: 15rpx;" src="../../static/img/addjiu.png" mode=""></image>
  82. <view class="" @click="addPeople">
  83. 添加就诊人档案
  84. </view>
  85. </view>
  86. </u-popup>
  87. <!-- 选择手机号 -->
  88. <u-popup v-model="showphone" mode="bottom" border-radius="14" length="50%">
  89. <view class="popup_title">
  90. <view class="popup_title_text">选择接听号码</view>
  91. </view>
  92. <scroll-view style="height: 70%;" scroll-y="true">
  93. <view class="phone" v-for="(item, index) in phoneList">
  94. <view class="list" @click="phoneValue=item.name">
  95. <view class="title">{{item.name}}</view>
  96. <view class="phone">{{item.num}}</view>
  97. <view class="button">
  98. <u-radio-group v-model="phoneValue">
  99. <u-radio @change="peopleRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
  100. </u-radio>
  101. </u-radio-group>
  102. </view>
  103. </view>
  104. </view>
  105. <view style="padding: 0 50rpx;">
  106. <input class="padding-lr-sm" v-model="phonedata" style="border: 2rpx solid #efefef; height:50rpx;" v-if="phoneValue==showinput"
  107. type="number" placeholder="请输入手机号" />
  108. </view>
  109. </scroll-view>
  110. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  111. <view style="padding: 0 10%; height: 100rpx; ">
  112. <u-button type="primary" shape="circle" @click="confirmphone">确认</u-button>
  113. </view>
  114. </u-popup>
  115. </view>
  116. </template>
  117. <script>
  118. export default {
  119. onLoad(options) {
  120. this.phonenum = this.phoneList[0].num
  121. this.doctor = JSON.parse(options.doctor)
  122. console.log(this.doctor)
  123. },
  124. onShow() {
  125. this.getarchives()
  126. },
  127. data() {
  128. return {
  129. /* 就诊人 */
  130. showpeople: false,
  131. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  132. value: '',
  133. /* 接听号码 */
  134. showphone: false,
  135. phoneList: [{
  136. name: '默认手机号',
  137. id: '0',
  138. num: '123123123',
  139. disabled: false
  140. },
  141. {
  142. name: '其他手机号',
  143. id: '1',
  144. num: '',
  145. disabled: false
  146. }
  147. ],
  148. phoneValue: '',
  149. showinput: '其他手机号',
  150. phonenum: "",
  151. phonedata: "",
  152. patientList: [],
  153. doctor: {}
  154. }
  155. },
  156. methods: {
  157. //点击咨询患者
  158. openhuanzhe() {
  159. this.showpeople = true
  160. },
  161. //点击联系号码
  162. openphone() {
  163. this.showphone = true
  164. },
  165. // 选中某个单选框时,由radio时触发
  166. peopleRadioChange(e) {
  167. console.log(e);
  168. },
  169. phoneRadioChange(e) {
  170. console.log(e);
  171. },
  172. phoneListchange(item) {
  173. this.phoneValue = item
  174. console.log(this.phoneValue)
  175. },
  176. peopleListchange(item) {
  177. this.value = item
  178. },
  179. //添加就诊人
  180. addPeople(e) {
  181. },
  182. //添加手机号
  183. addPhone(e) {
  184. },
  185. a(e) {
  186. console.log(this.value);
  187. },
  188. confirmphone() {
  189. this.phonenum = this.phonedata
  190. this.showphone = !this.showphone
  191. },
  192. getarchives: async function() {
  193. let res = await this.$request.post("/api/v1/patient/patientList")
  194. if (res.status == 0) {
  195. this.patientList = res.data.data
  196. }
  197. },
  198. }
  199. };
  200. </script>
  201. <style scoped lang="scss">
  202. .main {}
  203. .popup_title {
  204. height: 15%;
  205. width: 100%;
  206. display: flex;
  207. justify-content: center;
  208. align-items: center;
  209. border-bottom: 1rpx solid #f9f9f9;
  210. }
  211. .popup_title_text {
  212. width: auto;
  213. height: auto;
  214. font-size: 34rpx;
  215. font-weight: 540;
  216. }
  217. .popup_list {
  218. display: flex;
  219. height: 10vh;
  220. width: auto;
  221. border-bottom: 1rpx solid #f9f9f9;
  222. }
  223. .popup_list_title {
  224. height: 100%;
  225. width: 90%;
  226. display: inline-block;
  227. padding: 0 0 0 30rpx;
  228. .title {
  229. height: 50%;
  230. width: auto;
  231. font-size: 32rpx;
  232. font-weight: 500;
  233. padding: 20rpx 0 0 0;
  234. }
  235. .body {
  236. height: 50%;
  237. color: #a1a1a1;
  238. height: auto;
  239. width: auto;
  240. font-size: 30rpx;
  241. padding: 10rpx 0 0 0;
  242. }
  243. }
  244. .popup_button {
  245. height: 80rpx;
  246. width: 100%;
  247. display: flex;
  248. justify-content: center;
  249. align-items: center;
  250. view {
  251. color: #0b73ba;
  252. font-weight: 500;
  253. }
  254. }
  255. /**选择号码的样式和选择患者不同
  256. 需要更改样式*/
  257. .phone {
  258. height: 20%;
  259. width: 100%;
  260. .list {
  261. height: 100%;
  262. width: 100%;
  263. display: flex;
  264. padding: 0 10rpx 0 30rpx;
  265. .title {
  266. height: 100%;
  267. width: 65%;
  268. font-size: 32rpx;
  269. color: #7d7d7d;
  270. display: flex;
  271. align-items: center;
  272. }
  273. .phone {
  274. height: 100%;
  275. width: 30%;
  276. font-size: 32rpx;
  277. font-weight: 500;
  278. display: flex;
  279. justify-content: center;
  280. align-items: center;
  281. }
  282. .button {
  283. height: 100%;
  284. width: 5%;
  285. display: flex;
  286. justify-content: center;
  287. align-items: center;
  288. }
  289. }
  290. }
  291. </style>