info_write.vue 6.9 KB

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