selectDoctor.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>选择医生</title>
  7. <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
  8. <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
  9. <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
  10. <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
  11. <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
  12. <link rel="stylesheet" type="text/css" href="../css/date.css" />
  13. <link rel="stylesheet" href="../css/common.css" />
  14. <style>
  15. .container {
  16. padding: 8px;
  17. overflow: auto;
  18. height: 650px;
  19. font-size: 14px;
  20. }
  21. .doctor{
  22. display: flex;
  23. align-items: center;
  24. justify-content: space-between;
  25. height: 44px;
  26. border-bottom: 1px solid rgba(0, 0, 0, .1);
  27. padding: 0 6px;
  28. cursor: pointer;
  29. }
  30. </style>
  31. </head>
  32. <body>
  33. <div id="app" v-cloak>
  34. <div class="container" v-infinite-scroll="getDoctorList" :infinite-scroll-disabled="disabled">
  35. <div class="doctor" v-for="item in doctorList" :key="item.doctor" @click="selectDoctor(item)">
  36. <div>{{item.name}}({{item.jobName}})</div>
  37. <div :style="`color: #${item.status == 1? '11B7F5': 'FF0000'}`">{{getStatusName(item.status)}}</div>
  38. </div>
  39. </div>
  40. </div>
  41. <script type="text/javascript" src="../../../js/vue.js"></script>
  42. <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
  43. <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
  44. <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
  45. <script src="https://unpkg.com/element-ui/lib/index.js"></script>
  46. <script type="text/javascript" src="../../../api/http-request.js"></script>
  47. <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
  48. <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
  49. <script type="text/javascript" src="../../../api/recover_api.js"></script>
  50. <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
  51. <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
  52. <script>
  53. new Vue({
  54. el: '#app',
  55. data() {
  56. return {
  57. patient: "",
  58. doctorList: [],
  59. disabled: false,
  60. page: 0
  61. }
  62. },
  63. mounted() {
  64. this.patient = GetRequest().patient
  65. this.getDoctorList()
  66. },
  67. methods: {
  68. getDoctorList(){
  69. const vm = this
  70. const params = {
  71. town: JSON.parse(localStorage.getItem("docInfo")).hospital,
  72. patient: this.patient,
  73. page: this.page,
  74. size: 15
  75. }
  76. vm.page ++
  77. if(vm.page == 1){
  78. vm.doctorList = []
  79. }
  80. httpRequest.get('doctor/serviceOrder/queryDoctorList',{data:params}).then(function(res){
  81. vm.doctorList = vm.doctorList.concat(res.data.detailModelList)
  82. if(res.data.detailModelList.length < 15){
  83. vm.disabled = true
  84. }
  85. })
  86. },
  87. getStatusName(status){
  88. switch(status){
  89. case 1:
  90. return '开始接单'
  91. case 5:
  92. return '停止接单'
  93. }
  94. },
  95. selectDoctor(item){
  96. sessionStorage.setItem("selectDoctor",JSON.stringify(item))
  97. var index = parent.layer.getFrameIndex(window.name)
  98. parent.layer.close(index)
  99. }
  100. },
  101. })
  102. </script>
  103. </body>
  104. </html>