pengjun 2 years ago
parent
commit
da8f313739
  1. 39
      src/components/report/PatientRegisterListNobtn.vue

39
src/components/report/PatientRegisterListNobtn.vue

@ -3,7 +3,7 @@
<div>
<el-table :data="patientRegister.prList" border ref="info" id="info"
:height="(window.pageHeight < 600) ? 240 : (window.pageHeight - 360)" highlight-current-row @row-click="rowClick"
size="small" @selection-change="handleSelectionChange" >
size="small" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="40" align="center" />
<el-table-column prop="completeFlag" label="体检进度">
<template slot-scope="scope">
@ -192,14 +192,12 @@ export default {
//
mounted() {
this.$nextTick(() => {
this.scrollFull()
})
},
computed: {
...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg","report"]),
...mapState(["window", "dict", 'dataTransOpts', "patientRegister", "customerOrg", "report"]),
},
methods: {
dddw,
@ -234,9 +232,9 @@ export default {
},
async load() {
this.loadOpts.skipCount++
await this.btnQuery()
await this.Query()
},
//
scrollFull() {
this.dom = this.$refs['info'].bodyWrapper
@ -265,8 +263,13 @@ export default {
//
async btnQuery() {
this.loadOpts.skipCount = 0
this.Query()
},
async Query() {
if (this.fromType == 'report') {
await this.reportQuery()
this.reportQuery()
return
}
@ -319,8 +322,10 @@ export default {
//
reportQuery() {
if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) return
console.log('reportQuery', this.loadOpts)
if (this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount) {
this.$message.info({ showClose: true, message: "数据已全部拉取!" })
return
}
let body = {
skipCount: this.loadOpts.skipCount,
@ -367,11 +372,11 @@ export default {
//
this.loadOpts.totalCount = res.data.totalCount
if (body.skipCount == 0) { //
this.patientRegister.prList = [];
}
this.patientRegister.prList = this.patientRegister.prList.concat(res.data.items)
if (body.skipCount == 0) { //
this.patientRegister.prList = [];
}
this.patientRegister.prList = this.patientRegister.prList.concat(res.data.items)
this.loadOpts.skipCount++
}
})
},
@ -382,11 +387,11 @@ export default {
//
watch: {
//
"patientRegister.query.times":{
"patientRegister.query.times": {
// immediate:true,
handler(newVal, oldVal) {
console.log('查询触发',newVal, oldVal)
if(newVal != oldVal){
console.log('查询触发', newVal, oldVal)
if (newVal != oldVal) {
this.btnQuery();
}
}

Loading…
Cancel
Save