|
|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|
|