|
|
|
@ -1,9 +1,9 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<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"> |
|
|
|
@ -20,17 +20,17 @@ |
|
|
|
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgName" label="单位" width="180" /> |
|
|
|
<el-table-column prop="departmentName" label="部门" width="180" /> |
|
|
|
<el-table-column prop="customerOrgName" label="单位" width="180" /> |
|
|
|
<el-table-column prop="departmentName" label="部门" width="180" /> |
|
|
|
<el-table-column prop="patientName" label="姓名" /> |
|
|
|
<el-table-column prop="sexName" label="性别" align="center" /> |
|
|
|
<el-table-column prop="sexName" label="性别" align="center" /> |
|
|
|
<el-table-column prop="age" label="年龄" align="center" /> |
|
|
|
<el-table-column prop="patientRegisterNo" label="条码号" width="150" /> |
|
|
|
<el-table-column prop="patientNo" label="档案号" /> |
|
|
|
<el-table-column prop="medicalTimes" label="体检次数" align="center" /> |
|
|
|
<el-table-column label="分组/套餐" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
|
|
|
|
|
|
<div v-if="scope.row.medicalPackageName"> |
|
|
|
{{ scope.row.medicalPackageName }} |
|
|
|
</div> |
|
|
|
@ -172,7 +172,7 @@ export default { |
|
|
|
rClickRow: null, //右击的行 |
|
|
|
rClickColumn: null, //右击的列(预留) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dom: null, //用于滚动加载数据 |
|
|
|
lazyLoading: false, //是否懒加载中 |
|
|
|
@ -186,20 +186,18 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
created() { |
|
|
|
created() { |
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts) |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
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 |
|
|
|
@ -258,15 +256,20 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
lmoment(date, forMat) { |
|
|
|
return moment(new Date(date)).format(forMat); |
|
|
|
}, |
|
|
|
|
|
|
|
//查询 |
|
|
|
async btnQuery() { |
|
|
|
this.loadOpts.skipCount = 0 |
|
|
|
this.Query() |
|
|
|
}, |
|
|
|
|
|
|
|
async Query() { |
|
|
|
if (this.fromType == 'report') { |
|
|
|
await this.reportQuery() |
|
|
|
this.reportQuery() |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
@ -314,13 +317,15 @@ export default { |
|
|
|
// this.patientRegister.prList = res.data; |
|
|
|
// } catch (error) { |
|
|
|
// console.log("query error",error); |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
// 报告查询 |
|
|
|
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, |
|
|
|
@ -366,27 +371,27 @@ export default { |
|
|
|
if (res.code > -1) { |
|
|
|
// 刷新最大记录数 |
|
|
|
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++ |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
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(); |
|
|
|
} |
|
|
|
} |
|
|
|
|