123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <title>选择医生</title>
- <link rel="stylesheet" type="text/css" href="../../../css/bootstrap.min.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/style.min.css" />
- <link rel="stylesheet" type="text/css" href="../../../css/cross.css" />
- <link rel="stylesheet" href="../../../plugins/toastr/toastr.min.css" />
- <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
- <link rel="stylesheet" type="text/css" href="../css/date.css" />
- <link rel="stylesheet" href="../css/common.css" />
- <style>
- .container {
- padding: 8px;
- overflow: auto;
- height: 650px;
- font-size: 14px;
- }
- .doctor{
- display: flex;
- align-items: center;
- justify-content: space-between;
- height: 44px;
- border-bottom: 1px solid rgba(0, 0, 0, .1);
- padding: 0 6px;
- cursor: pointer;
- }
- </style>
- </head>
- <body>
- <div id="app" v-cloak>
- <div class="container" v-infinite-scroll="getDoctorList" :infinite-scroll-disabled="disabled">
- <div class="doctor" v-for="item in doctorList" :key="item.doctor" @click="selectDoctor(item)">
- <div>{{item.name}}({{item.jobName}})</div>
- <div :style="`color: #${item.status == 1? '11B7F5': 'FF0000'}`">{{getStatusName(item.status)}}</div>
- </div>
- </div>
- </div>
- <script type="text/javascript" src="../../../js/vue.js"></script>
- <script type="text/javascript" src="../../../js/jquery-2.2.4.js"></script>
- <script type="text/javascript" src="../../../js/es6-promise.js" charset="utf-8"></script>
- <script type="text/javascript" src="../../../plugins/toastr/toastr.min.js"></script>
- <script src="https://unpkg.com/element-ui/lib/index.js"></script>
- <script type="text/javascript" src="../../../api/http-request.js"></script>
- <script type="text/javascript" src="../../../plugins/layer/layer.min.js"></script>
- <script type="text/javascript" src="../../../api/rehabilitation-api.js"></script>
- <script type="text/javascript" src="../../../api/recover_api.js"></script>
- <script type="text/javascript" src="../../../js/underscore-1.9.1.js"></script>
- <script type="text/javascript" src="../../../js/util.js" charset="utf-8"></script>
- <script>
- new Vue({
- el: '#app',
- data() {
- return {
- patient: "",
- doctorList: [],
- disabled: false,
- page: 0
- }
- },
- mounted() {
- this.patient = GetRequest().patient
- this.getDoctorList()
- },
- methods: {
- getDoctorList(){
- const vm = this
- const params = {
- town: JSON.parse(localStorage.getItem("docInfo")).hospital,
- patient: this.patient,
- page: this.page,
- size: 15
- }
- vm.page ++
- if(vm.page == 1){
- vm.doctorList = []
- }
- httpRequest.get('doctor/serviceOrder/queryDoctorList',{data:params}).then(function(res){
- vm.doctorList = vm.doctorList.concat(res.data.detailModelList)
- if(res.data.detailModelList.length < 15){
- vm.disabled = true
- }
- })
- },
- getStatusName(status){
- switch(status){
- case 1:
- return '开始接单'
- case 5:
- return '停止接单'
- }
- },
- selectDoctor(item){
- sessionStorage.setItem("selectDoctor",JSON.stringify(item))
- var index = parent.layer.getFrameIndex(window.name)
- parent.layer.close(index)
-
- }
- },
- })
- </script>
- </body>
- </html>
|