info_write.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  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(https://ossweb-img.qq.com/images/lol/web201310/skin/big10001.jpg);"></view>
  6. <view class="content">
  7. <view class="text-grey">医生姓名</view>
  8. <view class="text-gray text-sm flex">
  9. <text class="text-cut">
  10. 科室名称 医生资质
  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">13756797847</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">10分钟</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">19.9元</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="bg-green submit" @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 list" @click="value=item.name,showpeople=false">
  65. <view class="popup_list_title">
  66. <view class="title">{{item.name}}</view>
  67. <view class="body">
  68. 男 18天
  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. <text class="" @click="addPeople">⊕ 添加就诊人</text>
  82. </view>
  83. </u-popup>
  84. <!-- 选择手机号 -->
  85. <u-popup v-model="showphone" mode="bottom" border-radius="14" length="50%">
  86. <view class="popup_title">
  87. <view class="popup_title_text">选择接听号码</view>
  88. </view>
  89. <scroll-view style="height: 70%;" scroll-y="true">
  90. <view class="phone" v-for="(item, index) in phoneList">
  91. <view class="list" @click="phoneValue=item.name">
  92. <view class="title">{{item.name}}</view>
  93. <view class="phone">{{item.num}}</view>
  94. <view class="button">
  95. <u-radio-group v-model="phoneValue">
  96. <u-radio @change="peopleRadioChange" :key="index" :name="item.name" :disabled="item.disabled">
  97. </u-radio>
  98. </u-radio-group>
  99. </view>
  100. </view>
  101. </view>
  102. <view style="padding: 0 50rpx;">
  103. <input style="border: 2rpx solid #a1a1a1; height:50rpx;" v-if="phoneValue==showinput" type="number" placeholder="请输入手机号" />
  104. </view>
  105. </scroll-view>
  106. <u-gap height="10" bg-color="#f9f9f9"></u-gap>
  107. <view style="padding: 0 10%; height: 100rpx; ">
  108. <u-button type="primary" shape="circle" @click="">确认</u-button>
  109. </view>
  110. </u-popup>
  111. </view>
  112. </template>
  113. <script>
  114. export default {
  115. onLoad(options) {
  116. },
  117. data() {
  118. return {
  119. /* 就诊人 */
  120. showpeople: false,
  121. list: [{
  122. name: '测试1',
  123. disabled: false
  124. },
  125. {
  126. name: '测试2',
  127. disabled: false
  128. },
  129. {
  130. name: '测试3',
  131. disabled: false
  132. },
  133. {
  134. name: '测试4',
  135. disabled: false
  136. },
  137. {
  138. name: '测试5',
  139. disabled: false
  140. }
  141. ],
  142. // u-radio-group的v-model绑定的值如果设置为某个radio的name,就会被默认选中
  143. value: '',
  144. /* 接听号码 */
  145. showphone: false,
  146. phoneList: [{
  147. name: '默认手机号',
  148. id: '0',
  149. num: '123123123',
  150. disabled: false
  151. },
  152. {
  153. name: '其他手机号',
  154. id: '1',
  155. num: '',
  156. disabled: false
  157. }
  158. ],
  159. phoneValue: '',
  160. showinput: '其他手机号',
  161. }
  162. },
  163. methods: {
  164. //点击咨询患者
  165. openhuanzhe() {
  166. this.showpeople = true
  167. },
  168. //点击联系号码
  169. openphone() {
  170. this.showphone = true
  171. },
  172. // 选中某个单选框时,由radio时触发
  173. peopleRadioChange(e) {
  174. console.log(e);
  175. },
  176. phoneRadioChange(e) {
  177. console.log(e);
  178. },
  179. phoneListchange(item) {
  180. this.phoneValue = item
  181. console.log(item)
  182. },
  183. peopleListchange(item) {
  184. this.value = item
  185. },
  186. //添加就诊人
  187. addPeople(e) {
  188. },
  189. //添加手机号
  190. addPhone(e) {
  191. },
  192. a(e) {
  193. console.log(this.value);
  194. }
  195. }
  196. };
  197. </script>
  198. <style scoped lang="scss">
  199. .main {}
  200. .popup_title {
  201. height: 15%;
  202. width: 100%;
  203. display: flex;
  204. justify-content: center;
  205. align-items: center;
  206. border-bottom: 1rpx solid #f9f9f9;
  207. }
  208. .popup_title_text {
  209. width: auto;
  210. height: auto;
  211. font-size: 34rpx;
  212. font-weight: 540;
  213. }
  214. .popup_list {
  215. display: flex;
  216. height: 10vh;
  217. width: auto;
  218. border-bottom: 1rpx solid #f9f9f9;
  219. }
  220. .popup_list_title {
  221. height: 100%;
  222. width: 90%;
  223. display: inline-block;
  224. padding: 0 0 0 30rpx;
  225. .title {
  226. height: 50%;
  227. width: auto;
  228. font-size: 32rpx;
  229. font-weight: 500;
  230. padding: 20rpx 0 0 0;
  231. }
  232. .body {
  233. height: 50%;
  234. color: #a1a1a1;
  235. height: auto;
  236. width: auto;
  237. font-size: 30rpx;
  238. padding: 10rpx 0 0 0;
  239. }
  240. }
  241. .popup_button {
  242. height: 80rpx;
  243. width: 100%;
  244. display: flex;
  245. justify-content: center;
  246. align-items: center;
  247. text {
  248. color: #0b73ba;
  249. font-weight: 500;
  250. }
  251. }
  252. /**选择号码的样式和选择患者不同
  253. 需要更改样式*/
  254. .phone {
  255. height: 20%;
  256. width: 100%;
  257. .list {
  258. height: 100%;
  259. width: 100%;
  260. display: flex;
  261. padding: 0 10rpx 0 30rpx;
  262. .title {
  263. height: 100%;
  264. width: 65%;
  265. font-size: 32rpx;
  266. color: #7d7d7d;
  267. display: flex;
  268. align-items: center;
  269. }
  270. .phone {
  271. height: 100%;
  272. width: 30%;
  273. font-size: 32rpx;
  274. font-weight: 500;
  275. display: flex;
  276. justify-content: center;
  277. align-items: center;
  278. }
  279. .button {
  280. height: 100%;
  281. width: 5%;
  282. display: flex;
  283. justify-content: center;
  284. align-items: center;
  285. }
  286. }
  287. }
  288. </style>