|
@@ -36,6 +36,16 @@
|
36
|
36
|
</template>
|
37
|
37
|
</el-table-column>
|
38
|
38
|
</el-table>
|
|
39
|
+ <el-pagination
|
|
40
|
+ @size-change="handleSizeChange"
|
|
41
|
+ @current-change="handleCurrentChange"
|
|
42
|
+ :page-sizes="[10,20,50,100]"
|
|
43
|
+ :page-size="10"
|
|
44
|
+ background
|
|
45
|
+ style="margin-top:20px;"
|
|
46
|
+ align="right"
|
|
47
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
48
|
+ :total="total"></el-pagination>
|
39
|
49
|
|
40
|
50
|
<el-dialog
|
41
|
51
|
title="调整干体重"
|
|
@@ -105,7 +115,10 @@
|
105
|
115
|
remarks: ''
|
106
|
116
|
},
|
107
|
117
|
addShow: true,
|
108
|
|
- adjustShow: false
|
|
118
|
+ adjustShow: false,
|
|
119
|
+ page: 1,
|
|
120
|
+ limit: 10,
|
|
121
|
+ total: 0
|
109
|
122
|
}
|
110
|
123
|
},
|
111
|
124
|
methods: {
|
|
@@ -153,19 +166,32 @@
|
153
|
166
|
var patientDryweight = response.data.data.patientDryweight
|
154
|
167
|
console.log('patientdryweight', patientDryweight)
|
155
|
168
|
this.dialogVisible = false
|
156
|
|
- this.getAllData()
|
157
|
169
|
const id = this.$route.params && this.$route.params.id
|
|
170
|
+ this.getAllData(id)
|
158
|
171
|
this.getDryWeightData(id)
|
159
|
172
|
}
|
160
|
173
|
})
|
161
|
174
|
}
|
162
|
175
|
})
|
163
|
176
|
},
|
164
|
|
- getAllData() {
|
165
|
|
- getAllData().then(response => {
|
|
177
|
+ getAllData(id, page, limit) {
|
|
178
|
+ getAllData(id, this.page, this.limit).then(response => {
|
166
|
179
|
if (response.data.state === 1) {
|
167
|
180
|
var dry = response.data.data.dry
|
|
181
|
+ var total = response.data.data.total
|
|
182
|
+ this.total = total
|
|
183
|
+ console.log('total', total)
|
168
|
184
|
this.tableData = dry
|
|
185
|
+ const usertype = this.$store.getters.xt_user.user.user_type
|
|
186
|
+
|
|
187
|
+ if (usertype === 1 || usertype === 2) {
|
|
188
|
+ this.addShow = true
|
|
189
|
+ this.adjustShow = false
|
|
190
|
+ } else {
|
|
191
|
+ this.addShow = false
|
|
192
|
+ this.adjustShow = false
|
|
193
|
+ return
|
|
194
|
+ }
|
169
|
195
|
if (dry.length === 0) {
|
170
|
196
|
this.addShow = true
|
171
|
197
|
this.adjustShow = false
|
|
@@ -176,6 +202,16 @@
|
176
|
202
|
console.log('dry', dry)
|
177
|
203
|
}
|
178
|
204
|
})
|
|
205
|
+ },
|
|
206
|
+ handleSizeChange(limit) {
|
|
207
|
+ this.limit = limit
|
|
208
|
+ const id = this.$route.params && this.$route.params.id
|
|
209
|
+ this.getAllData(id, this.page, this.limit)
|
|
210
|
+ },
|
|
211
|
+ handleCurrentChange(page) {
|
|
212
|
+ this.page = page
|
|
213
|
+ const id = this.$route.params && this.$route.params.id
|
|
214
|
+ this.getAllData(id, this.page, this.limit)
|
179
|
215
|
}
|
180
|
216
|
},
|
181
|
217
|
created() {
|
|
@@ -184,7 +220,17 @@
|
184
|
220
|
this.patientID = parseInt(id)
|
185
|
221
|
this.getDryWeightData(id)
|
186
|
222
|
this.getAllDoctor()
|
187
|
|
- this.getAllData()
|
|
223
|
+ this.getAllData(id)
|
|
224
|
+ const usertype = this.$store.getters.xt_user.user.user_type
|
|
225
|
+ // if (usertype === 2) {
|
|
226
|
+ // this.addShow = true
|
|
227
|
+ // this.adjustShow = false
|
|
228
|
+ // } else {
|
|
229
|
+ // this.addShow = false
|
|
230
|
+ // this.addjustShow = false
|
|
231
|
+ // }
|
|
232
|
+
|
|
233
|
+ console.log('usertype', usertype)
|
188
|
234
|
}
|
189
|
235
|
}
|
190
|
236
|
</script>
|