|
|
|
@ -4,83 +4,86 @@ |
|
|
|
<div style="display: flex"> |
|
|
|
<div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu"> |
|
|
|
<div> |
|
|
|
<el-table @body-scrolling="load" :data="tableData" border |
|
|
|
<el-table :data="tableData" border |
|
|
|
:height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3)" |
|
|
|
highlight-current-row @row-click="rowClick" size="small" row-key="id" |
|
|
|
@selection-change="handleSelectionChange" @cell-contextmenu="onCellRightClick" ref="info" id="info" |
|
|
|
:row-class-name="handleRowClassName"> |
|
|
|
<!-- 取消勾选,改为选中 |
|
|
|
<el-table-column type="selection" width="40" show-overflow-tooltip/> |
|
|
|
:height="window.pageHeight < 600 ? 202 : Math.floor(((window.pageHeight - 302) * 2) / 3)" |
|
|
|
--> |
|
|
|
<el-table-column v-for="(item, index) in headerCols" :key="`col_${index}`" |
|
|
|
:min-width="dropCol[index].minWidth" :align="dropCol[index].align" :label="item.label" |
|
|
|
:prop="dropCol[index].prop" :sortable="dropCol[index].prop == 'sn' ? false : true"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div v-if="dropCol[index].prop == 'sn'"> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'completeFlag'" |
|
|
|
:style="`color: ${setColor(scope.row.isAudit, scope.row.completeFlag)}`"> |
|
|
|
{{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag, |
|
|
|
"displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'guidePrintTimes'"> |
|
|
|
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" style="font-size: 20px; color: green" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'isLock'"> |
|
|
|
<i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'isVip' |
|
|
|
|| dropCol[index].prop == 'isUpload' |
|
|
|
|| dropCol[index].prop == 'qztlIsMain' |
|
|
|
|| dropCol[index].prop == 'qztlIsCy' |
|
|
|
|| dropCol[index].prop == 'qztlIsCw' |
|
|
|
|| dropCol[index].prop == 'qztlIsGt' |
|
|
|
|| dropCol[index].prop == 'qztlIsWh' |
|
|
|
|| dropCol[index].prop == 'qztlIsFj' |
|
|
|
"> |
|
|
|
{{ scope.row[dropCol[index].prop] == "Y" ? "是" : "否" }} |
|
|
|
</div> |
|
|
|
<el-table-column type="selection" width="40" align="center"></el-table-column> |
|
|
|
<el-table-column v-for="(item, index) in dragCol" :key="index" :type="dragCol[index].type" |
|
|
|
:min-width="dragCol[index].minWidth" :align="dragCol[index].align" :label="item.label" |
|
|
|
:sortable="dragCol[index].type || dragCol[index].prop == 'sn' ? false : true"> |
|
|
|
<template slot-scope="scope" v-if="!(dragCol[index].type)"> |
|
|
|
<div v-if="!dragCol[index].type"> |
|
|
|
<div v-if="dragCol[index].prop == 'sn'"> |
|
|
|
{{ scope.$index + 1 }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'completeFlag'" |
|
|
|
:style="`color: ${setColor(scope.row.isAudit, scope.row.completeFlag)}`"> |
|
|
|
{{ scope.row.isAudit == 'Y' ? "已审核" : dddw(dict.completeFlag, "id", scope.row.completeFlag, |
|
|
|
"displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'guidePrintTimes'"> |
|
|
|
<i class="el-icon-printer" v-if="scope.row.guidePrintTimes > 0" |
|
|
|
style="font-size: 20px; color: green" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'isLock'"> |
|
|
|
<i class="el-icon-lock" v-if="scope.row.isLock == 'Y'" style="font-size: 20px; color: red" /> |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'isVip' |
|
|
|
|| dragCol[index].prop == 'isUpload' |
|
|
|
|| dragCol[index].prop == 'qztlIsMain' |
|
|
|
|| dragCol[index].prop == 'qztlIsCy' |
|
|
|
|| dragCol[index].prop == 'qztlIsCw' |
|
|
|
|| dragCol[index].prop == 'qztlIsGt' |
|
|
|
|| dragCol[index].prop == 'qztlIsWh' |
|
|
|
|| dragCol[index].prop == 'qztlIsFj' |
|
|
|
"> |
|
|
|
{{ scope.row[dragCol[index].prop] == "Y" ? "是" : "否" }} |
|
|
|
</div> |
|
|
|
|
|
|
|
<div v-else-if="dropCol[index].prop == 'customerOrgParentName'"> |
|
|
|
{{ scope.row.customerOrgParentName |
|
|
|
? scope.row.customerOrgParentName |
|
|
|
: scope.row.customerOrgName }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'sexId'"> |
|
|
|
{{ dddw(dict.sex, "id", scope.row[dropCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'groupPack'"> |
|
|
|
<div |
|
|
|
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId"> |
|
|
|
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
<div v-else-if="dragCol[index].prop == 'customerOrgParentName'"> |
|
|
|
{{ scope.row.customerOrgParentName |
|
|
|
? scope.row.customerOrgParentName |
|
|
|
: scope.row.customerOrgName }} |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
<div v-else-if="dragCol[index].prop == 'sexId'"> |
|
|
|
{{ dddw(dict.sex, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'groupPack'"> |
|
|
|
<div |
|
|
|
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId === dict.personOrgId"> |
|
|
|
{{ dddw(dict.medicalPackage, "id", scope.row.medicalPackageId, "displayName") }} |
|
|
|
</div> |
|
|
|
<div |
|
|
|
v-if="scope.row.medicalPackageId !== dict.personOrgId && scope.row.customerOrgId !== dict.personOrgId"> |
|
|
|
{{ dddw(dict.customerOrgGroupAll, "id", scope.row.customerOrgGroupId, "displayName") }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'nationId'"> |
|
|
|
{{ dddw(dict.nation, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'birthDate'"> |
|
|
|
{{ scope.row[dragCol[index].prop] ? moment(scope.row[dragCol[index].prop]).format('yyyy-MM-DD') : '' |
|
|
|
}} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'maritalStatusId'"> |
|
|
|
{{ dddw(dict.maritalStatus, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'medicalTypeId'"> |
|
|
|
{{ dddw(dict.medicalType, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dragCol[index].prop == 'personnelTypeId'"> |
|
|
|
{{ dddw(dict.personnelType, "id", scope.row[dragCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
{{ scope.row[dragCol[index].prop] }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'nationId'"> |
|
|
|
{{ dddw(dict.nation, "id", scope.row[dropCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'birthDate'"> |
|
|
|
{{ scope.row[dropCol[index].prop] ? moment(scope.row[dropCol[index].prop]).format('yyyy-MM-DD') : '' }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'maritalStatusId'"> |
|
|
|
{{ dddw(dict.maritalStatus, "id", scope.row[dropCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'medicalTypeId'"> |
|
|
|
{{ dddw(dict.medicalType, "id", scope.row[dropCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else-if="dropCol[index].prop == 'personnelTypeId'"> |
|
|
|
{{ dddw(dict.personnelType, "id", scope.row[dropCol[index].prop], "displayName") }} |
|
|
|
</div> |
|
|
|
<div v-else> |
|
|
|
{{ scope.row[dropCol[index].prop] }} |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
|
|
<!-- |
|
|
|
"sexHormoneTermId": "00000000-0000-0000-0000-000000000000", |
|
|
|
"interposeMeasure": null, |
|
|
|
@ -150,7 +153,7 @@ |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="" class="btnClass commonbutton">健康档案</el-button> |
|
|
|
</div> |
|
|
|
--> |
|
|
|
--> |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '批量调整分组')" class="listBtn"> |
|
|
|
<el-button type="" class="commonbutton" @click="btnGroupBatch">批量调整分组</el-button> |
|
|
|
</div> |
|
|
|
@ -166,6 +169,9 @@ |
|
|
|
<div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn"> |
|
|
|
<el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button> |
|
|
|
</div> |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="" class="commonbutton" @click="btnDragColDesign">设计列排序</el-button> |
|
|
|
</div> |
|
|
|
<!-- elProgress.display dialogWin.LocalConfig |
|
|
|
<div class="listBtn"> |
|
|
|
<el-button type="" class="commonbutton" @click="dialogWin.LocalConfig = true">本地设置</el-button> |
|
|
|
@ -180,13 +186,14 @@ |
|
|
|
</div> |
|
|
|
<!--组件弹窗--> |
|
|
|
<div> |
|
|
|
|
|
|
|
<!-- 体检人员登记 :title="patientRegister.patientRegisterRd.id ? '体检人员--编辑' : '体检人员--新增'" --> |
|
|
|
<el-dialog :title="dataTransOpts.tableS.patient_register.id ? '体检人员--编辑' : '体检人员--新增'" |
|
|
|
:visible.sync="dialogWin.PatientRegisterEdit" :close-on-click-modal="false" fullscreen |
|
|
|
@close="close_dialogWin_PatientRegisterEdit"> |
|
|
|
<!-- :formInitData="patientRegister.patientRegisterRd" --> |
|
|
|
<PatientRegisterEdit :isDoctor="'1'" :patientRegisterId="patientRegister.patientRegisterRd.id" |
|
|
|
:editTimes="editTimes" :refreshRegister="refreshRegister" :refFuncSetData="refFuncSetData" /> |
|
|
|
:editTimes="editTimes" :refFuncSetData="refFuncSetData" /> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 拍照 --> |
|
|
|
@ -195,12 +202,24 @@ |
|
|
|
<Camera :id="patientRegister.patientRegisterId" /> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 列排序 --> |
|
|
|
<el-dialog title="列排序" :visible.sync="dialogColSort" width="300px" :append-to-body="true" |
|
|
|
:close-on-click-modal="false"> |
|
|
|
<el-table id="elTable_dragCol" :data="dragColDesign" row-key="prop" border height="600"> |
|
|
|
<el-table-column type="index" label="序号" width="40" align="center"> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="列名" prop="label" min-width="120" align="center"></el-table-column> |
|
|
|
</el-table> |
|
|
|
<span slot="footer" class="dialog-footer"> |
|
|
|
<el-button class="commonbutton" @click="dialogColSort = false">取消</el-button> |
|
|
|
<el-button class="commonbutton" @click="btnDragColDesignOk">确定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 批量调整分组 --> |
|
|
|
<el-dialog title="批量调整分组" :visible.sync="dialogWin.PatientRegisterEditGroupBatch" width="600px" height="800px" |
|
|
|
:append-to-body="true" :close-on-click-modal="false"> |
|
|
|
<PatientRegisterEditGroupBatch :multipleSelection="multipleSelection" /> |
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
<!-- 批量调整项目 --> |
|
|
|
@ -286,10 +305,9 @@ export default { |
|
|
|
rClickRow: null, //右击的行 |
|
|
|
rClickColumn: null, //右击的列(预留) |
|
|
|
|
|
|
|
//动态列 |
|
|
|
headerCols: [], |
|
|
|
dragColDesign: [], // 待调整的排序的序 |
|
|
|
//拖动列 |
|
|
|
dropCol: [ |
|
|
|
dragCol: [ |
|
|
|
{ label: "序号", prop: "sn", minWidth: 40, align: "center" }, |
|
|
|
{ label: "体检进度", prop: "completeFlag", minWidth: 80, align: "center" }, |
|
|
|
{ label: "打印", prop: "guidePrintTimes", minWidth: 55, align: "center" }, |
|
|
|
@ -320,7 +338,8 @@ export default { |
|
|
|
{ label: "介绍人", prop: "salesman", minWidth: 80, align: "center" }, |
|
|
|
{ label: "是否VIP", prop: "isVip", minWidth: 80, align: "center" }, |
|
|
|
{ label: "登记人", prop: "creatorName", minWidth: 80, align: "center" }, |
|
|
|
{ label: "登记日期", prop: "creationTime", minWidth: 130, align: "center" }, |
|
|
|
{ label: "登记日期", prop: "creationTime", minWidth: 140, align: "center" }, |
|
|
|
{ label: "体检日期", prop: "medicalStartDate", minWidth: 140, align: "center" }, |
|
|
|
{ label: "是否上传", prop: "isUpload", minWidth: 80, align: "center" }, |
|
|
|
{ label: "高原/健康", prop: "qztlType", minWidth: 90, align: "center" }, |
|
|
|
{ label: "行车", prop: "qztlIsMain", minWidth: 50, align: "center" }, |
|
|
|
@ -330,6 +349,7 @@ export default { |
|
|
|
{ label: "职害", prop: "qztlIsWh", minWidth: 50, align: "center" }, |
|
|
|
{ label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" }, |
|
|
|
], |
|
|
|
dialogColSort: false, |
|
|
|
|
|
|
|
dom: null, //用于滚动加载数据 |
|
|
|
lazyLoading: false, //是否懒加载中 |
|
|
|
@ -348,6 +368,7 @@ export default { |
|
|
|
if (userPriv) this.pagePriv.privs = deepCopy(getPagePriv(this.pagePriv.routeUrlorPageName)) |
|
|
|
|
|
|
|
this.loadOptsInit = Object.assign({}, this.loadOpts) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//挂载完成 |
|
|
|
@ -356,9 +377,6 @@ export default { |
|
|
|
|
|
|
|
this.peisid = window.sessionStorage.getItem('peisid'); |
|
|
|
|
|
|
|
// 初始化可以拖动的列 |
|
|
|
this.headerCols = deepCopy(this.dropCol) |
|
|
|
this.dropCol = this.columnDrop(this.dropCol); |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.scrollFull() |
|
|
|
@ -446,12 +464,12 @@ export default { |
|
|
|
let lfind = -1; |
|
|
|
|
|
|
|
//选中(取消勾选)start ------------------------- |
|
|
|
this.multipleSelection = [] |
|
|
|
this.tableData.forEach(e => { |
|
|
|
if (e.choosed) { |
|
|
|
this.multipleSelection.push(deepCopy(e)) |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.multipleSelection = [] |
|
|
|
// this.tableData.forEach(e => { |
|
|
|
// if (e.choosed) { |
|
|
|
// this.multipleSelection.push(deepCopy(e)) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
//选中(取消勾选) end ------------------------- |
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
@ -505,24 +523,7 @@ export default { |
|
|
|
|
|
|
|
for (let i = 0; i < this.multipleSelection.length; i++) { |
|
|
|
try { |
|
|
|
/* |
|
|
|
resPrintData = await postapi(`/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[i].id}`) |
|
|
|
if (resPrintData.code == -1) continue |
|
|
|
toOutShell.ReportTable = resPrintData.data |
|
|
|
resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
// console.log('壳返回结果', resPeisAPI) |
|
|
|
if (JSON.parse(resPeisAPI).code < 0) continue |
|
|
|
resPrintTimes = await postapi("/api/app/patientregister/updatepatientregisterguideprinttimesmany", [this.multipleSelection[i].id]); |
|
|
|
if (resPrintTimes.code == -1) continue |
|
|
|
lfind = arrayExistObj(this.tableData, "id", this.multipleSelection[i].id); |
|
|
|
if (lfind > -1) { |
|
|
|
if (this.tableData[lfind].guidePrintTimes) { |
|
|
|
this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1; |
|
|
|
} else { |
|
|
|
this.tableData[lfind].guidePrintTimes = 1; |
|
|
|
} |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
let patientregisterId = this.multipleSelection[i].id |
|
|
|
toOutShell.BusinessCode = patientregisterId |
|
|
|
let resPeisAPI = await this.$peisAPI.print(JSON.stringify(toOutShell)); |
|
|
|
@ -547,7 +548,6 @@ export default { |
|
|
|
((i + 1) * 100) / this.multipleSelection.length |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
this.elProgress.display = false; |
|
|
|
} |
|
|
|
}, |
|
|
|
@ -555,17 +555,16 @@ export default { |
|
|
|
handleSelectionChange(rows) { |
|
|
|
//this.multipleSelection = rows; |
|
|
|
//// console.log('this.multipleSelection',this.multipleSelection) |
|
|
|
|
|
|
|
rows.forEach((item) => { |
|
|
|
item.highLightBg = "selected"; |
|
|
|
}); |
|
|
|
// 取消全选 |
|
|
|
if (!rows.length) { |
|
|
|
this.tableData.forEach((item) => { |
|
|
|
item.highLightBg = ""; |
|
|
|
}); |
|
|
|
} |
|
|
|
this.multipleSelection = JSON.parse(JSON.stringify(rows)); |
|
|
|
// rows.forEach((item) => { |
|
|
|
// item.highLightBg = "selected"; |
|
|
|
// }); |
|
|
|
// // 取消全选 |
|
|
|
// if (!rows.length) { |
|
|
|
// this.tableData.forEach((item) => { |
|
|
|
// item.highLightBg = ""; |
|
|
|
// }); |
|
|
|
// } |
|
|
|
this.multipleSelection = rows; |
|
|
|
}, |
|
|
|
|
|
|
|
//设置新增/编辑的form数据 |
|
|
|
@ -579,63 +578,63 @@ export default { |
|
|
|
//点击体检次数行 |
|
|
|
rowClick(row) { |
|
|
|
// 按住了shift键 |
|
|
|
if (this.window.shift) { |
|
|
|
//清除所有选择 |
|
|
|
this.tableData.forEach((e, index) => { |
|
|
|
e.choosed = false; |
|
|
|
e.index = index; |
|
|
|
}); |
|
|
|
|
|
|
|
if (this.startPoint == -1) { |
|
|
|
this.tableData[row.index].choosed = true; |
|
|
|
this.startPoint = row.index; |
|
|
|
} else { |
|
|
|
if (this.startPoint > row.index) { |
|
|
|
for (let i = row.index; i <= this.startPoint; i++) { |
|
|
|
this.tableData[i].choosed = true; |
|
|
|
} |
|
|
|
} else if (this.startPoint <= row.index) { |
|
|
|
for (let i = this.startPoint; i <= row.index; i++) { |
|
|
|
this.tableData[i].choosed = true; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} else if (this.window.ctrl) { // 按住了ctrl 键 |
|
|
|
this.tableData[row.index].choosed = true; |
|
|
|
if (this.startPoint == -1) { |
|
|
|
this.startPoint = row.index; |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 未按住了ctrl 、shift 键 |
|
|
|
//清除所有选择 |
|
|
|
// console.log("清除所有选择"); |
|
|
|
this.tableData.forEach((e, index) => { |
|
|
|
e.choosed = false; |
|
|
|
e.index = index; |
|
|
|
}); |
|
|
|
// console.log(this.tableData, row.index); |
|
|
|
// console.log(this.tableData[row.index].choosed); |
|
|
|
|
|
|
|
this.tableData[row.index].choosed = true; |
|
|
|
this.startPoint = row.index; |
|
|
|
} |
|
|
|
// if (this.window.shift) { |
|
|
|
// //清除所有选择 |
|
|
|
// this.tableData.forEach((e, index) => { |
|
|
|
// e.choosed = false; |
|
|
|
// e.index = index; |
|
|
|
// }); |
|
|
|
|
|
|
|
// if (this.startPoint == -1) { |
|
|
|
// this.tableData[row.index].choosed = true; |
|
|
|
// this.startPoint = row.index; |
|
|
|
// } else { |
|
|
|
// if (this.startPoint > row.index) { |
|
|
|
// for (let i = row.index; i <= this.startPoint; i++) { |
|
|
|
// this.tableData[i].choosed = true; |
|
|
|
// } |
|
|
|
// } else if (this.startPoint <= row.index) { |
|
|
|
// for (let i = this.startPoint; i <= row.index; i++) { |
|
|
|
// this.tableData[i].choosed = true; |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } |
|
|
|
// } else if (this.window.ctrl) { // 按住了ctrl 键 |
|
|
|
// this.tableData[row.index].choosed = true; |
|
|
|
// if (this.startPoint == -1) { |
|
|
|
// this.startPoint = row.index; |
|
|
|
// } |
|
|
|
// } else { |
|
|
|
// // 未按住了ctrl 、shift 键 |
|
|
|
// //清除所有选择 |
|
|
|
// // console.log("清除所有选择"); |
|
|
|
// this.tableData.forEach((e, index) => { |
|
|
|
// e.choosed = false; |
|
|
|
// e.index = index; |
|
|
|
// }); |
|
|
|
// // console.log(this.tableData, row.index); |
|
|
|
// // console.log(this.tableData[row.index].choosed); |
|
|
|
|
|
|
|
// this.tableData[row.index].choosed = true; |
|
|
|
// this.startPoint = row.index; |
|
|
|
// } |
|
|
|
|
|
|
|
//选中了多个点编辑时,排序最前的作为当前选中的 |
|
|
|
// console.log('row.index <= this.startPoint', row.index, this.startPoint) |
|
|
|
let lfind = -1 |
|
|
|
for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
if (this.tableData[i].choosed) { |
|
|
|
lfind = i |
|
|
|
break |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (lfind > -1) { |
|
|
|
// 弹出编辑框,只有在编辑框显示时,才去触发获取数据 |
|
|
|
this.dataTransOpts.tableS.patient_register = deepCopy(this.tableData[lfind]) |
|
|
|
this.tableDataCurrentRow = deepCopy(this.tableData[lfind]) |
|
|
|
this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新 |
|
|
|
} |
|
|
|
// let lfind = -1 |
|
|
|
// for (let i = 0; i < this.tableData.length; i++) { |
|
|
|
// if (this.tableData[i].choosed) { |
|
|
|
// lfind = i |
|
|
|
// break |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// if (lfind > -1) { |
|
|
|
// 弹出编辑框,只有在编辑框显示时,才去触发获取数据 |
|
|
|
this.dataTransOpts.tableS.patient_register = deepCopy(row) |
|
|
|
this.tableDataCurrentRow = deepCopy(row) |
|
|
|
this.dataTransOpts.refresh.register_check_asbitem.M++ //触发所选组合项目刷新 |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
//体检次数 相关操作 |
|
|
|
@ -668,28 +667,28 @@ export default { |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//刷新或添加列表数据 |
|
|
|
refreshRegister(patientRegister) { |
|
|
|
// console.log('编辑/新增的 form :', patientRegister) |
|
|
|
}, |
|
|
|
|
|
|
|
//批量正式登记 |
|
|
|
btnAddBatch() { |
|
|
|
let patientRegisterIds = [] |
|
|
|
//取消勾选,换成选择的方式 start |
|
|
|
this.multipleSelection = []; |
|
|
|
this.tableData.forEach((e) => { |
|
|
|
if (e.choosed && e.completeFlag == '0') { |
|
|
|
this.multipleSelection.push(e); |
|
|
|
patientRegisterIds.push(e.id) |
|
|
|
} |
|
|
|
}); |
|
|
|
// this.multipleSelection = []; |
|
|
|
// this.tableData.forEach((e) => { |
|
|
|
// if (e.choosed && e.completeFlag == '0') { |
|
|
|
// this.multipleSelection.push(e); |
|
|
|
// patientRegisterIds.push(e.id) |
|
|
|
// } |
|
|
|
// }); |
|
|
|
//取消勾选,换成选择的方式 end |
|
|
|
|
|
|
|
if (patientRegisterIds.length < 1) { |
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
this.$message.info({ showClose: true, message: "请选择状态为预登记的记录!" }); |
|
|
|
return; |
|
|
|
} |
|
|
|
this.multipleSelection.forEach(e => { |
|
|
|
patientRegisterIds.push(e.id) |
|
|
|
}); |
|
|
|
|
|
|
|
let completeFlag = '1' |
|
|
|
let body = { completeFlag, patientRegisterIds } |
|
|
|
postapi('/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate', body) |
|
|
|
@ -771,12 +770,12 @@ export default { |
|
|
|
btnDel() { |
|
|
|
|
|
|
|
//选中(取消勾选)start ------------------------- |
|
|
|
this.multipleSelection = [] |
|
|
|
this.tableData.forEach(e => { |
|
|
|
if (e.choosed) { |
|
|
|
this.multipleSelection.push(deepCopy(e)) |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.multipleSelection = [] |
|
|
|
// this.tableData.forEach(e => { |
|
|
|
// if (e.choosed) { |
|
|
|
// this.multipleSelection.push(deepCopy(e)) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
//选中(取消勾选) end ------------------------- |
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
@ -1029,10 +1028,10 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
//取消勾选,换成选择的方式 start |
|
|
|
this.multipleSelection = []; |
|
|
|
this.tableData.forEach((e) => { |
|
|
|
if (e.choosed) this.multipleSelection.push(e); |
|
|
|
}); |
|
|
|
// this.multipleSelection = []; |
|
|
|
// this.tableData.forEach((e) => { |
|
|
|
// if (e.choosed) this.multipleSelection.push(e); |
|
|
|
// }); |
|
|
|
//取消勾选,换成选择的方式 end |
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
@ -1052,10 +1051,10 @@ export default { |
|
|
|
return; |
|
|
|
} |
|
|
|
//取消勾选,换成选择的方式 start |
|
|
|
this.multipleSelection = []; |
|
|
|
this.tableData.forEach((e) => { |
|
|
|
if (e.choosed) this.multipleSelection.push(e); |
|
|
|
}); |
|
|
|
// this.multipleSelection = []; |
|
|
|
// this.tableData.forEach((e) => { |
|
|
|
// if (e.choosed) this.multipleSelection.push(e); |
|
|
|
// }); |
|
|
|
//取消勾选,换成选择的方式 end |
|
|
|
|
|
|
|
if (this.multipleSelection.length < 1) { |
|
|
|
@ -1078,7 +1077,7 @@ export default { |
|
|
|
} |
|
|
|
|
|
|
|
try { |
|
|
|
res = await postapi(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${prId}`); |
|
|
|
res = await postapi(`/api/app/lisrequest/setlisrequest?PatientRegisterId=${prId}`); |
|
|
|
// console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res); |
|
|
|
} catch (error) { |
|
|
|
return; |
|
|
|
@ -1328,39 +1327,7 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
columnDrop(dropCol) { |
|
|
|
//获取dom节点 |
|
|
|
const wrapperTr = document.querySelector(".el-table__header-wrapper tr"); |
|
|
|
Sortable.create(wrapperTr, { |
|
|
|
animation: 180, |
|
|
|
delay: 0, |
|
|
|
// 元素被选中 |
|
|
|
onChoose: function (/**Event*/ evt) { |
|
|
|
//// console.log('onChoose',evt,evt.oldIndex) |
|
|
|
evt.oldIndex; // element index within parent |
|
|
|
}, |
|
|
|
|
|
|
|
// 元素未被选中的时候(从选中到未选中) |
|
|
|
onUnchoose: function (/**Event*/ evt) { |
|
|
|
// same properties as onEnd |
|
|
|
}, |
|
|
|
|
|
|
|
// 开始拖拽的时候 |
|
|
|
onStart: function (/**Event*/ evt) { |
|
|
|
//// console.log('onStart',evt,evt.oldIndex) |
|
|
|
evt.oldIndex; // element index within parent |
|
|
|
}, |
|
|
|
onEnd: (evt) => { |
|
|
|
const oldItem = dropCol[evt.oldIndex]; // dropCol[evt.oldIndex - 1]; |
|
|
|
if (oldItem) { |
|
|
|
dropCol.splice(evt.oldIndex, 1); |
|
|
|
dropCol.splice(evt.newIndex, 0, oldItem); |
|
|
|
} |
|
|
|
//// console.log(this.headerCols, oldItem, dropCol); |
|
|
|
}, |
|
|
|
}); |
|
|
|
return dropCol; |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//通用导出 |
|
|
|
btnExport(elId) { |
|
|
|
@ -1402,6 +1369,35 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
btnDragColDesign() { |
|
|
|
this.dragColDesign = deepCopy(this.dragCol) |
|
|
|
this.dialogColSort = true |
|
|
|
this.rowDrag() |
|
|
|
}, |
|
|
|
|
|
|
|
btnDragColDesignOk() { |
|
|
|
this.dragCol = deepCopy(this.dragColDesign) |
|
|
|
this.dialogColSort = false |
|
|
|
}, |
|
|
|
//拖拽 |
|
|
|
rowDrag() { |
|
|
|
this.$nextTick(() => { |
|
|
|
const el = document.querySelector("#elTable_dragCol tbody"); |
|
|
|
// console.log('el0', el) |
|
|
|
const that = this; |
|
|
|
Sortable.create(el, { |
|
|
|
animation: 150, // ms, number 单位:ms,定义排序动画的时间 |
|
|
|
//拖拽结束 |
|
|
|
onEnd({ newIndex, oldIndex }) { |
|
|
|
that.isshow = false; |
|
|
|
const currRow = that.dragColDesign.splice(oldIndex, 1)[0]; |
|
|
|
that.dragColDesign.splice(newIndex, 0, currRow); |
|
|
|
// console.log('el', el) |
|
|
|
}, |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
//监听事件 |
|
|
|
|