|
|
|
@ -1,10 +1,10 @@ |
|
|
|
<template> |
|
|
|
<div style="display: flex;"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'"> |
|
|
|
<el-table :data="dataList" width="100%" :height="window.pageHeight < 600 ? 350 : window.pageHeight - 220" row-key="id" |
|
|
|
size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" @row-click="rowClick"> |
|
|
|
<el-table :data="tableData" width="100%" border :height="window.pageHeight < 600 ? 330 : window.pageHeight - 240" row-key="id" |
|
|
|
size="small" highlight-current-row ref="dataList" @selection-change="handleSelectionChange" @row-click="rowClick" @table-body-scroll="scrollFull"> |
|
|
|
<el-table-column type="selection" width="40" align="center" /> |
|
|
|
<el-table-column prop="isRecoverGuide" label="回收" align="center" width="50"> |
|
|
|
<el-table-column prop="isRecoverGuide" label="回收1" align="center" width="50"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-checkbox :value="scope.row.isRecoverGuide == 'Y'" /> |
|
|
|
</template> |
|
|
|
@ -16,7 +16,7 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isLock" label="锁住" width="50"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isLock == "Y" ? "是" : "否" }}</div> |
|
|
|
<i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgParentName" label="单位" width="180"> |
|
|
|
@ -27,14 +27,11 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="customerOrgName" label="部门" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.customerOrgParentName ? scope.row.customerOrgName : "" }}</div> |
|
|
|
<div>{{ scope.row.customerOrgParentName == scope.row.customerOrgName ? "" : scope.row.customerOrgName }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="patientName" label="姓名" /> |
|
|
|
<el-table-column prop="sexId" label="性别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ ldddw(dict.sex, "id", scope.row.sexId, "displayName") }}</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="sexName" label="性别"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="age" label="年龄" /> |
|
|
|
<el-table-column prop="patientRegisterNo" label="条码号" width="150" /> |
|
|
|
@ -43,19 +40,14 @@ |
|
|
|
<el-table-column label="分组/套餐" width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId"> |
|
|
|
{{ ldddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
{{ scope.row.medicalPackageName }} |
|
|
|
</div> |
|
|
|
<div v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
<div v-else> |
|
|
|
{{ scope.row.customerOrgGroupName }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="nationId" label="民族"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.nation, "id", scope.row.nationId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="nationName" label="民族"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="idNo" label="身份证" width="150" /> |
|
|
|
<el-table-column prop="birthDate" label="出生日期" width="100"> |
|
|
|
@ -71,33 +63,18 @@ |
|
|
|
<el-table-column prop="address" label="地址" width="300" /> |
|
|
|
<el-table-column prop="medicalCardNo" label="体检卡号" /> |
|
|
|
<el-table-column prop="jobCardNo" label="工卡号" /> |
|
|
|
<el-table-column prop="maritalStatusId" label="婚姻状况"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div> |
|
|
|
{{ ldddw(dict.maritalStatus, "id", scope.row.maritalStatusId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="maritalStatusName" label="婚姻状况"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="medicalTypeId" label="体检类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.medicalTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.medicalType, "id", scope.row.medicalTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="medicalTypeName" label="体检类别"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="personnelTypeId" label="人员类别"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="scope.row.personnelTypeId !== dict.personOrgId"> |
|
|
|
{{ ldddw(dict.personnelType, "id", scope.row.personnelTypeId, "displayName") }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<el-table-column prop="personnelTypeName" label="人员类别"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="jobPost" label="职务" /> |
|
|
|
<el-table-column prop="jobTitle" label="职称" /> |
|
|
|
<el-table-column prop="salesman" label="介绍人" /> |
|
|
|
<el-table-column prop="isVip" label="是否VIP"> |
|
|
|
<el-table-column prop="isVip" label="VIP"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isVip == "Y" ? "是" : "否" }}</div> |
|
|
|
<el-checkbox :value="scope.row.isVip == 'Y'" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="creatorName" label="登记人" /> |
|
|
|
@ -106,13 +83,24 @@ |
|
|
|
<div>{{ lmoment(scope.row.creationTime, "yyyy-MM-DD") }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="isUpload" label="是否上传"> |
|
|
|
<el-table-column prop="isUpload" label="上传"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.isUpload == "Y" ? "是" : "否" }}</div> |
|
|
|
<el-checkbox :value="scope.row.isUpload == 'Y'" /> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
</el-table> |
|
|
|
<div style="display: flex; justify-content: space-between"> |
|
|
|
<div></div> |
|
|
|
<div style="display: flex;"> |
|
|
|
<span style="font-size: 12px">共:{{ loadOpts.totalCount }} 条记录,当前显示:{{ |
|
|
|
tableData.length |
|
|
|
}} |
|
|
|
条。</span> |
|
|
|
<i class="el-icon-bottom" style="font-size: 18px;" @click="load" /> |
|
|
|
|
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div style="margin-left: 10px;"> |
|
|
|
<div class="listBtn"> |
|
|
|
@ -140,6 +128,7 @@ import moment from "moment"; |
|
|
|
import { mapState, mapActions } from "vuex"; |
|
|
|
import { getapi, postapi, putapi, deletapi } from "@/api/api"; |
|
|
|
import { dddw, objCopy, arrayReduce,arrayExistObj } from "@/utlis/proFunc"; |
|
|
|
import { savePeoplePhoto } from "../../utlis/proApi"; |
|
|
|
|
|
|
|
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue"; |
|
|
|
import Camera from "../../components/patientRegister/Camera.vue"; |
|
|
|
@ -151,20 +140,53 @@ export default { |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dataList: [], //列表数据 |
|
|
|
tableData: [], //列表数据 |
|
|
|
multipleSelection: [], //选中的数据列表 |
|
|
|
selectedRow:{}, // 单行选中的行 |
|
|
|
tableDataCurrentRow:{}, // 单行选中的行 |
|
|
|
dialogVisible: false, |
|
|
|
|
|
|
|
patientRegisterNo: '' |
|
|
|
|
|
|
|
patientRegisterNo: '', |
|
|
|
|
|
|
|
LocalConfig: { |
|
|
|
normal: { |
|
|
|
maxResultCount: 100, //分页时单页记录数 |
|
|
|
}, |
|
|
|
}, |
|
|
|
loadOpts: { |
|
|
|
totalCount: 0, |
|
|
|
skipCount: 0, |
|
|
|
maxResultCount: 100, |
|
|
|
}, |
|
|
|
loadOptsInit: {}, |
|
|
|
lazyLoading:false |
|
|
|
}; |
|
|
|
}, |
|
|
|
|
|
|
|
created() { }, |
|
|
|
created() { |
|
|
|
try { |
|
|
|
let LocalConfig = JSON.parse(window.localStorage.getItem("LocalConfig") || null) |
|
|
|
if (LocalConfig?.normal?.maxResultCount){ |
|
|
|
this.LocalConfig.normal.maxResultCount = LocalConfig.normal.maxResultCount |
|
|
|
} |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
console.log('window.localStorage.getItem("LocalConfig")', error); |
|
|
|
} |
|
|
|
|
|
|
|
// console.log('this.LocalConfig',this.LocalConfig) |
|
|
|
this.loadOpts.maxResultCount = Number( |
|
|
|
this.LocalConfig.normal.maxResultCount || 100 |
|
|
|
); |
|
|
|
|
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts); |
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
mounted() { }, |
|
|
|
mounted() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.scrollFull() |
|
|
|
}) |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapState(["window", "dict", "patientRegister", "customerOrg"]), |
|
|
|
}, |
|
|
|
@ -176,7 +198,7 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
rowClick(row){ |
|
|
|
this.selectedRow = row |
|
|
|
this.tableDataCurrentRow = row |
|
|
|
}, |
|
|
|
|
|
|
|
// 回收表提交 |
|
|
|
@ -191,9 +213,9 @@ export default { |
|
|
|
e.isRecoverGuide = 'Y' |
|
|
|
}); |
|
|
|
}else{ |
|
|
|
let lfind = arrayExistObj(this.dataList,'id',body[0].id) |
|
|
|
let lfind = arrayExistObj(this.tableData,'id',body[0].id) |
|
|
|
if(lfind > -1){ |
|
|
|
this.dataList[lfind].isRecoverGuide = 'Y' |
|
|
|
this.tableData[lfind].isRecoverGuide = 'Y' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
@ -206,7 +228,7 @@ export default { |
|
|
|
let selectedRds = [] |
|
|
|
selectedRds = selectedRds.concat(this.multipleSelection) |
|
|
|
if(selectedRds.length == 0){ |
|
|
|
if(this.selectedRow.id) selectedRds.push(this.selectedRow) |
|
|
|
if(this.tableDataCurrentRow.id) selectedRds.push(this.tableDataCurrentRow) |
|
|
|
} |
|
|
|
if (selectedRds.length == 0) { |
|
|
|
this.$message.warning({ showClose: true, message: "请勾选择或选中体检人员,再进行此操作" }); |
|
|
|
@ -254,53 +276,252 @@ export default { |
|
|
|
lmoment(date, forMat) { |
|
|
|
return moment(new Date(date)).format(forMat); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//查询 |
|
|
|
query() { |
|
|
|
let body = {} |
|
|
|
async Query() { |
|
|
|
// 查询时,清掉明细数据 (滚动时不清) |
|
|
|
this.tableDataCurrentRow = {}; // 清除选择 |
|
|
|
if ( |
|
|
|
!( |
|
|
|
this.patientRegister.query.isSeries == "Y" && |
|
|
|
this.patientRegister.query.patientRegisterNo |
|
|
|
) |
|
|
|
) { |
|
|
|
this.tableData = []; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit); |
|
|
|
await this.getPrList(); |
|
|
|
}, |
|
|
|
|
|
|
|
console.log(`this.patientRegister.query`, this.patientRegister.query) |
|
|
|
//数据量多时,滚动加载 |
|
|
|
async load() { |
|
|
|
this.loadOpts.skipCount++; |
|
|
|
await this.getPrList(); |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取列表数据 |
|
|
|
async getPrList() { |
|
|
|
if ( |
|
|
|
this.loadOpts.skipCount != 0 && |
|
|
|
this.loadOpts.skipCount * this.loadOpts.maxResultCount >= |
|
|
|
this.loadOpts.totalCount |
|
|
|
) |
|
|
|
return; |
|
|
|
// console.log('getPrList', this.loadOpts) |
|
|
|
|
|
|
|
let body = { |
|
|
|
skipCount: this.loadOpts.skipCount, |
|
|
|
maxResultCount: this.loadOpts.maxResultCount, |
|
|
|
}; |
|
|
|
|
|
|
|
// console.log(`this.patientRegister.query`, this.patientRegister.query); |
|
|
|
if (this.patientRegister.query.customerOrgFlag) { |
|
|
|
if (this.patientRegister.query.CustomerOrgParentId) { |
|
|
|
body.customerOrgId = this.patientRegister.query.CustomerOrgParentId |
|
|
|
} else { |
|
|
|
if (this.patientRegister.query.customerOrgId) body.customerOrgId = this.patientRegister.query.customerOrgId |
|
|
|
// if (this.patientRegister.query.CustomerOrgParentId) { |
|
|
|
// body.customerOrgId = this.patientRegister.query.CustomerOrgParentId; |
|
|
|
// } else { |
|
|
|
// if (this.patientRegister.query.customerOrgId) |
|
|
|
// body.customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
// } |
|
|
|
if (this.patientRegister.query.customerOrgId) |
|
|
|
body.customerOrgId = this.patientRegister.query.customerOrgId; |
|
|
|
|
|
|
|
// 获取单位体检次数与分组 |
|
|
|
try { |
|
|
|
if ( |
|
|
|
this.patientRegister.query.customerOrgId && |
|
|
|
this.patientRegister.query.customerOrgId != this.dict.personOrgId && |
|
|
|
this.patientRegister.query.customerOrgRegister.id |
|
|
|
) { |
|
|
|
body.customerOrgRegisterId = |
|
|
|
this.patientRegister.query.customerOrgRegister.id; |
|
|
|
body.customerOrgGroupIds = |
|
|
|
this.patientRegister.query.customerOrgGroupIds; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.error(error) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.patientRegister.query.sex) body.sexId = this.patientRegister.query.sex |
|
|
|
if (this.patientRegister.query.sex) |
|
|
|
body.sexId = this.patientRegister.query.sex; |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientName) |
|
|
|
body.patientName = this.patientRegister.query.patientName; |
|
|
|
|
|
|
|
if ( |
|
|
|
this.patientRegister.query.medicalTypeIds && |
|
|
|
this.patientRegister.query.medicalTypeIds.length > 0 |
|
|
|
) |
|
|
|
body.medicalTypeIds = this.patientRegister.query.medicalTypeIds; |
|
|
|
|
|
|
|
if ( |
|
|
|
this.patientRegister.query.completeFlags && |
|
|
|
this.patientRegister.query.completeFlags.length > 0 |
|
|
|
) |
|
|
|
body.completeFlags = this.patientRegister.query.completeFlags; |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientName) body.patientName = this.patientRegister.query.patientName |
|
|
|
if ( |
|
|
|
this.patientRegister.query.personnelTypeIds && |
|
|
|
this.patientRegister.query.personnelTypeIds.length > 0 |
|
|
|
) |
|
|
|
body.personnelTypeIds = this.patientRegister.query.personnelTypeIds; |
|
|
|
|
|
|
|
if (this.patientRegister.query.completeFlag) body.completeFlag = this.patientRegister.query.completeFlag |
|
|
|
if (this.patientRegister.query.isRecoverGuide) |
|
|
|
body.isRecoverGuide = this.patientRegister.query.isRecoverGuide; |
|
|
|
|
|
|
|
//StartDate EndDate |
|
|
|
if (this.patientRegister.query.startDate && this.patientRegister.query.endDate) { |
|
|
|
body.startDate = moment(this.patientRegister.query.startDate).format("yyyy-MM-DD") |
|
|
|
body.endDate = moment(this.patientRegister.query.endDate).format("yyyy-MM-DD") |
|
|
|
if ( |
|
|
|
this.patientRegister.query.startDate && |
|
|
|
this.patientRegister.query.endDate |
|
|
|
) { |
|
|
|
body.dateType = this.patientRegister.query.dateType; |
|
|
|
body.startDate = moment(this.patientRegister.query.startDate).format( |
|
|
|
"yyyy-MM-DD" |
|
|
|
); |
|
|
|
body.endDate = moment(this.patientRegister.query.endDate).format( |
|
|
|
"yyyy-MM-DD" |
|
|
|
); |
|
|
|
if (body.startDate > body.endDate) { |
|
|
|
this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!" }) |
|
|
|
return |
|
|
|
this.$message.warning({ |
|
|
|
showClose: true, |
|
|
|
message: "起始日期不能大于截止日期,数据校验不通过!", |
|
|
|
}); |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.patientRegister.query.phone) |
|
|
|
body.phone = this.patientRegister.query.phone; |
|
|
|
|
|
|
|
if (this.patientRegister.query.idCardNo) { |
|
|
|
body.idNo = this.patientRegister.query.idCardNo; |
|
|
|
|
|
|
|
try { |
|
|
|
let sysParmId = "patient_register_query_idno"; |
|
|
|
let sysParam = await postapi( |
|
|
|
"/api/app/SysParmValue/GetSysParmValueBySysParmId", |
|
|
|
{ sysParmId } |
|
|
|
); |
|
|
|
// console.log('sysParam', sysParam) |
|
|
|
if (sysParam.data != "N") { |
|
|
|
body = { |
|
|
|
idNo: this.patientRegister.query.idCardNo, |
|
|
|
skipCount: this.loadOpts.skipCount, |
|
|
|
maxResultCount: this.loadOpts.maxResultCount, |
|
|
|
}; |
|
|
|
} |
|
|
|
} catch (error) { |
|
|
|
console.log(error); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (this.patientRegister.query.idCardNo) body = { idNo: this.patientRegister.query.idCardNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientNo) body = { patientNo: this.patientRegister.query.patientNo } |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientRegisterNo) body = { patientRegisterNo: this.patientRegister.query.patientRegisterNo } |
|
|
|
|
|
|
|
|
|
|
|
//console.log('/api/app/patientregister/getlistinfilter', body) |
|
|
|
if (this.patientRegister.query.patientNo) |
|
|
|
body = { |
|
|
|
patientNo: this.patientRegister.query.patientNo, |
|
|
|
skipCount: this.loadOpts.skipCount, |
|
|
|
maxResultCount: this.loadOpts.maxResultCount, |
|
|
|
}; |
|
|
|
|
|
|
|
if (this.patientRegister.query.patientRegisterNo) |
|
|
|
body = { |
|
|
|
patientRegisterNo: this.patientRegister.query.patientRegisterNo, |
|
|
|
skipCount: this.loadOpts.skipCount, |
|
|
|
maxResultCount: this.loadOpts.maxResultCount, |
|
|
|
}; |
|
|
|
|
|
|
|
// console.log("/api/app/patientregister/getlistinfilter", body); |
|
|
|
let upPhoto = "patient_register_read_idno_upPhoto"; // 是否读身份证查询更新照片 |
|
|
|
let upPhotoParam = await postapi( |
|
|
|
"/api/app/SysParmValue/GetSysParmValueBySysParmId", |
|
|
|
{ sysParmId: upPhoto } |
|
|
|
); |
|
|
|
let photo = this.patientRegister.photo; |
|
|
|
this.patientRegister.photo = ""; |
|
|
|
|
|
|
|
postapi("/api/app/patientregister/getlistinfilter", body).then( |
|
|
|
async (res) => { |
|
|
|
if (res.code > -1) { |
|
|
|
// 刷新最大记录数 |
|
|
|
this.loadOpts.totalCount = res.data.totalCount; |
|
|
|
let curLoad = res.data.items; |
|
|
|
|
|
|
|
// let oldCount = 0 |
|
|
|
// 处理: |
|
|
|
// 1、分组/套餐 排序混乱的问题 |
|
|
|
// 2、扫身份证查询时,无照片自动更新照片(参数控制) |
|
|
|
curLoad.forEach((e) => { |
|
|
|
// 1、分组/套餐 排序混乱的问题 |
|
|
|
if (e.customerOrgId == this.dict.personOrgId) { |
|
|
|
e.groupPack = e.medicalPackageId; |
|
|
|
} else { |
|
|
|
e.groupPack = e.customerOrgGroupId; |
|
|
|
} |
|
|
|
|
|
|
|
postapi('/api/app/patientregister/getlistinfilter', body) |
|
|
|
.then((res) => { |
|
|
|
if (res.code != - 1) { |
|
|
|
this.dataList = res.data.items; |
|
|
|
// 2、扫身份证查询时,无照片自动更新照片(参数控制) |
|
|
|
if (upPhotoParam != "N" && photo) { |
|
|
|
if (!e.photo) { |
|
|
|
savePeoplePhoto(e.id, photo); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
|
|
|
|
// 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据) |
|
|
|
console.log( |
|
|
|
"this.patientRegister.query", |
|
|
|
this.patientRegister.query.isSeries, |
|
|
|
this.patientRegister.query.patientRegisterNo |
|
|
|
); |
|
|
|
if ( |
|
|
|
!( |
|
|
|
this.patientRegister.query.isSeries == "Y" && |
|
|
|
this.patientRegister.query.patientRegisterNo |
|
|
|
) |
|
|
|
) { |
|
|
|
if (body.skipCount == 0) { |
|
|
|
//查询 |
|
|
|
this.tableData = []; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.tableData = this.tableData.concat(curLoad); |
|
|
|
// else { |
|
|
|
// // 懒加载 ,原数据集不用清空 |
|
|
|
// oldCount = this.tableData.length |
|
|
|
// } |
|
|
|
// curLoad.forEach((e, index) => { |
|
|
|
// this.tableData.push(Object.assign({ index: Number(oldCount) + Number(index), choosed: false }, e)) |
|
|
|
// }) |
|
|
|
|
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
); |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//滚动加载数据 |
|
|
|
scrollFull() { |
|
|
|
let obj = this.$refs['dataList'].bodyWrapper |
|
|
|
console.log('obj', obj) |
|
|
|
|
|
|
|
obj.addEventListener('scroll', async () => { |
|
|
|
// console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight); |
|
|
|
if (obj.scrollTop + obj.clientHeight + 20 > obj.scrollHeight && !this.lazyLoading) { |
|
|
|
// 获取到的不是全部数据 当滚动到底部 |
|
|
|
console.log('scrollTop', obj.scrollTop, 'clientHeight', obj.clientHeight, 'scrollHeight', obj.scrollHeight); |
|
|
|
if (Number(this.loadOpts.skipCount) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) { |
|
|
|
this.lazyLoading = false |
|
|
|
} else { |
|
|
|
this.lazyLoading = true |
|
|
|
this.load() |
|
|
|
// this.dom.scrollTop = this.dom.scrollTop - 100 |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
@ -309,7 +530,7 @@ export default { |
|
|
|
"patientRegister.query.times"(newVal, oldVal) { |
|
|
|
if (newVal != oldVal) { |
|
|
|
//alert('触发查询事件') |
|
|
|
this.query(); |
|
|
|
this.Query(); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|