-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
103 lines (92 loc) · 4.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<!DOCTYPE html>
<html data-theme="dark">
<head>
<meta charset="utf-8">
<title>DYT-HPV</title>
<link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
</head>
<body>
<header class="container">
<h1 style="text-align: center;">DYT</h1>
</header>
<main class="container">
<div id="dyt">
<nav>
<ul>
<li><button @click="show(0)" :class="{ secondary : !tabs[0] }">1.Token 配置</button></li>
</ul>
<ul>
<li><button @click="show(1)" :class="{ secondary : !tabs[1] }">2.选择就诊人</button></li>
</ul>
<ul>
<li><button @click="show(2)" :class="{ secondary : !tabs[2] }">3.选择疫苗</button></li>
</ul>
<ul>
<li><button @click="show(3)" :class="{ secondary : !tabs[3] }">4.查询已选疫苗排班情况</button></li>
</ul>
</nav>
<!-- Token 配置 -->
<article v-show="tabs[0]">
<label>请输入 Token
<input type="text" v-model="tokenIn" :aria-invalid="!isSetToken">
<small role="button" @click="parseToken" :data-tooltip="tokenMsg">确认</small>
</label>
</article>
<!-- -->
<article v-show="tabs[1]">
<label v-if="!isSetToken" style="color: red;">提示:需先配置 Token!</label>
<!-- <button @click="queryPatient(token)" :disabled="!isSetToken">查询就诊人</button> -->
<fieldset>
<label v-for="patientItem in patientList">
<input type="radio" v-model="patient" :value="patientItem"> {{patientItem.patient_name}}
</label>
</fieldset>
</article>
<article v-show="tabs[2]">
<!-- <button @click="refreshCache">刷新医院信息</button> -->
<label v-for="hosItem in hpvHosList">
<figure>
<b> {{hosItem.hos_name}} </b>
<div v-for="doc in hosItem.doctor">
<label v-if="doc.detail">
<ins>
<input type="checkbox" v-model="checkedHpvList" :value="doc.detail">
【{{doc.detail.dep_id}}_{{doc.detail.doc_id}}】{{doc.detail.doc_name}}#{{doc.detail.dep_name}}
</ins>
</label>
</div>
<button @click="querySchedule(), show(3)">查询排班情况</button><br>
</figure>
</label>
</article>
<article v-show="tabs[3]">
<button @click="querySchedule">查询排班情况</button><br>
<label v-if="!isSetToken" style="color: red;">提示:预约需先配置 Token!</label>
<label v-if="patient" style="color: red;">提示:预约需先选择就诊人!</label>
<table role="grid">
<tr>
<td>医院</td>
<td>疫苗名称</td>
<td>接种时间</td>
<td>疫苗总数</td>
<td>剩余总数</td>
<td>操作</td>
</tr>
<tr v-for="schedule in schedules">
<td>{{schedule.hpv.hos_name}}</td>
<td>{{schedule.hpv.doc_name}}</td>
<td>{{schedule.sch_date}} {{schedule.cate_name}}</td>
<td>{{schedule.src_max}}</td>
<td>{{schedule.src_num}}</td>
<td><button :disabled="!(schedule.src_num > 0)"
@click="appoint(schedule.hpv, schedule)">预约</button></td>
</tr>
</table>
</article>
</div>
</main>
</body>
<script src="https://unpkg.com/vue@next"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script src="dyt.js"></script>
</html>