|
@@ -3,19 +3,31 @@
|
3
|
3
|
<div class="position">
|
4
|
4
|
<bread-crumb></bread-crumb>
|
5
|
5
|
</div> -->
|
6
|
|
- <div class="patient-container ">
|
|
6
|
+ <div class="patient-container">
|
7
|
7
|
<patient-sidebar :id="patient_id" defaultActive="1-2"></patient-sidebar>
|
8
|
8
|
<!-- <div class="app-container"> -->
|
9
|
|
- <div class="container" v-loading="loading">
|
10
|
|
- <div>
|
|
9
|
+ <div v-loading="loading">
|
|
10
|
+ <div class="patient-app-container advice-container app-container">
|
|
11
|
+
|
|
12
|
+ <div>
|
11
|
13
|
<span style="margin-left: 10px;float:right;">
|
12
|
14
|
<el-button type="primary" icon="el-icon-circle-plus-outline" size="small" @click="show_dialog = true">新增</el-button>
|
13
|
15
|
<el-button size="small" v-show="selectingRows.length > 0" type="danger" @click="deleteAction">删除</el-button>
|
14
|
16
|
</span>
|
15
|
|
- <span class="filter_title">日期查询</span>
|
16
|
|
- <el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestCourseRecords()"></el-date-picker>
|
17
|
|
-
|
|
17
|
+ <!--<span class="filter_title">日期查询</span>-->
|
|
18
|
+ <!--<el-date-picker size="small" v-model="date" type="daterange" range-separator="至" start-placeholde="开始日期" end-placeholde="结束日期" value-format="timestamp" :clearable="false" @change="requestCourseRecords()"></el-date-picker>-->
|
18
|
19
|
</div>
|
|
20
|
+ <!--<div></div>-->
|
|
21
|
+ <div class="cell clearfix">
|
|
22
|
+ <label class="title"><span class="name">日期查询</span> : </label>
|
|
23
|
+ <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
|
|
24
|
+ type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
|
25
|
+ value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
|
|
26
|
+ <span class="">-</span>
|
|
27
|
+ <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
|
|
28
|
+ type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
|
|
29
|
+ value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
|
|
30
|
+ </div>
|
19
|
31
|
<div class="record">
|
20
|
32
|
<el-row :gutter="15">
|
21
|
33
|
<el-col :span="10">
|
|
@@ -66,7 +78,9 @@
|
66
|
78
|
</div>
|
67
|
79
|
</el-dialog>
|
68
|
80
|
</div>
|
69
|
|
-<!-- </div> -->
|
|
81
|
+ </div>
|
|
82
|
+
|
|
83
|
+ <!-- </div> -->
|
70
|
84
|
</template>
|
71
|
85
|
|
72
|
86
|
<script>
|
|
@@ -87,6 +101,8 @@ export default {
|
87
|
101
|
|
88
|
102
|
patient_id: 0,
|
89
|
103
|
date: [],
|
|
104
|
+ start_time: '',
|
|
105
|
+ end_time: '',
|
90
|
106
|
|
91
|
107
|
records: [],
|
92
|
108
|
doctors: [],
|
|
@@ -114,14 +130,43 @@ export default {
|
114
|
130
|
var now = new Date()
|
115
|
131
|
this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
|
116
|
132
|
|
117
|
|
- this.requestCourseRecords()
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+ var year = new Date().getFullYear()
|
|
137
|
+ var month = new Date().getMonth() + 1
|
|
138
|
+ var day = new Date().getDate()
|
|
139
|
+ if (parseInt(month) < 10) {
|
|
140
|
+ month = '0' + month
|
|
141
|
+ }
|
|
142
|
+ if (parseInt(day) < 10) {
|
|
143
|
+ day = '0' + day
|
|
144
|
+ }
|
|
145
|
+ const endTime = year + '-' + month + '-' + day
|
|
146
|
+ this.end_time = endTime
|
|
147
|
+
|
|
148
|
+ var year = new Date().getFullYear()
|
|
149
|
+ var month = new Date().getMonth()
|
|
150
|
+ var day = new Date().getDate()
|
|
151
|
+ if (parseInt(month) < 10) {
|
|
152
|
+ month = '0' + month
|
|
153
|
+ }
|
|
154
|
+ if (parseInt(day) < 10) {
|
|
155
|
+ day = '0' + day
|
|
156
|
+ }
|
|
157
|
+ const startTime = year + '-' + month + '-' + day
|
|
158
|
+ this.start_time = startTime
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+ this.requestCourseRecords()
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
|
118
|
165
|
},
|
119
|
166
|
methods: {
|
120
|
167
|
requestCourseRecords: function() {
|
121
|
|
- var startTime = new Date(this.date[0])
|
122
|
|
- var endTime = new Date(this.date[1])
|
123
|
168
|
this.loading = true
|
124
|
|
- getCourseOfDiseaseRecords(this.patient_id, parseTime(startTime, "{y}-{m}-{d}"), parseTime(endTime, "{y}-{m}-{d}")).then(rs => {
|
|
169
|
+ getCourseOfDiseaseRecords(this.patient_id, this.start_time,this.end_time).then(rs => {
|
125
|
170
|
this.loading = false
|
126
|
171
|
var resp = rs.data
|
127
|
172
|
if (resp.state == 1) {
|
|
@@ -223,7 +268,11 @@ export default {
|
223
|
268
|
this.loading = false
|
224
|
269
|
this.$message.error(err)
|
225
|
270
|
})
|
226
|
|
- },
|
|
271
|
+ },startTimeChange(val) {
|
|
272
|
+ this.requestCourseRecords()
|
|
273
|
+ }, endTimeChange(val) {
|
|
274
|
+ this.requestCourseRecords()
|
|
275
|
+ }
|
227
|
276
|
},
|
228
|
277
|
}
|
229
|
278
|
</script>
|