info_write.vue 7.1 KB

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