|
|
<template> <div> <!--组件主体--> <div style="display: flex"> <div :style="'width:' + (window.pageWidth - 200 - 145) + 'px;'" @contextmenu.prevent="onContextmenu"> <div> <u-table :data="tableData" border :height="window.pageHeight < 600 ? 248 : Math.floor(((window.pageHeight - 250) * 2) / 3) " highlight-current-row @row-click="rowClick" @row-dblclick="dblClick" size="small" row-key="id" @selection-change="handleSelectionChange" @row-contextmenu="onCellRightClick" ref="info" id="info" :row-class-name="handleRowClassName" use-virtual :row-height="25" @table-body-scroll="scrollFull" big-data-checkbox :data-changes-scroll-top="false"> <u-table-column type="selection" width="40" align="center"></u-table-column> <u-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" :prop="dragCol[index].prop" :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: ${setPrStatusColor( 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 == 'qztlType'"> {{ dddw(dict.qztlType, "id", scope.row.qztlType, "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' "> <el-checkbox :value="scope.row[dragCol[index].prop] == 'Y'" /> <!-- {{ scope.row[dragCol[index].prop] == "Y" ? "是" : "否" }} --> </div>
<div v-else-if="dragCol[index].prop == 'customerOrgParentName'"> {{ scope.row.customerOrgParentName ? scope.row.customerOrgParentName : scope.row.customerOrgName }} </div> <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 "> {{ scope.row.medicalPackageName }} </div> <div v-else> {{ scope.row.customerOrgGroupName }} </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-if="dragCol[index].prop == 'idNo'"> {{ scope.row[dragCol[index].prop] }} </div> <div v-else-if="dragCol[index].prop == 'customerOrgName'"> {{ scope.row[dragCol[index].prop] == scope.row["customerOrgParentName"] ? "" : scope.row[dragCol[index].prop] }} </div> <div v-else> {{ scope.row[dragCol[index].prop] }} </div> </div> </template> </u-table-column>
<!-- "sexHormoneTermId": "00000000-0000-0000-0000-000000000000", "interposeMeasure": null, "medicalConclusionId": "00000000-0000-0000-0000-000000000000", "reportPrintTimes": 0, "isMedicalStart": "N", "medicalStartDate": "6/28/2023", "isRecoverGuide": "N", "summaryDate": "", "summaryDoctor": null, "isAudit": "N", "auditDoctor": null, "auditDate": "", "isNameHide": "N", "isPhoneFollow": "N", "thirdInfo": null, "guidePrintTimes": null, "remark": null, "medicalCenterId": "00000000-0000-0000-0000-000000000000", "customerOrgRegisterId": "00000000-0000-0000-0000-000000000000", "lastModifierName": "", "lastModificationTime": null, "lastModifierId": null, "creatorId": null, "id": "3a0c196d-a6d0-37fe-5c32-4806bdc4530f" --> </u-table> <div style="display: flex; justify-content: space-between"> <div></div> <div> <span style="font-size: 12px">共:{{ loadOpts.totalCount }} 条记录,当前显示:{{ tableData.length }} 条。</span> </div> </div> </div> <!-- 组合项目 基本信息 --> <el-tabs v-model="tabChoosed" style="margin-top: -22px"> <!-- 组合项目 --> <el-tab-pane label="已选组合项目" name="1"> <PatientRegisterAsbItem /> </el-tab-pane> </el-tabs> </div> <div style="margin-left: 10px"> <div v-show="checkPagePriv(pagePriv.privs, '导入青藏数据')" class="listBtn"> <el-button type="success" class="commonbutton" @click="btnImportOrgData">导入青藏数据</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '人员登记')" class="listBtn"> <el-button type="success" class="commonbutton" @click="btnAdd">人员登记</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '批量正式登记')" class="listBtn"> <el-button type="success" class="commonbutton" @click="btnAddBatch('1')">批量正式登记</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '批量转预登记')" class="listBtn"> <el-button type="success" class="commonbutton" @click="btnAddBatch('0')">批量转预登记</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '编辑')" class="listBtn"> <el-button type="primary" class="commonbutton" @click="btnEdit">编辑</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '删除')" class="listBtn"> <el-button type="danger" class="deleteButton" @click="btnDel">删除</el-button> </div> <!-- <div class="listBtn"> <el-button type="" class="btnClass" @click="openCamera" icon="el-icon-camera" >拍照</el-button > </div> <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> <div v-show="checkPagePriv(pagePriv.privs, '批量调整项目')" class="listBtn"> <el-button type="" class="commonbutton" @click="btnAsbBatch">批量调整项目</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '指引单打印')" class="listBtn"> <el-button type="" class="commonbutton" @click="guidePrint('0001', false)">指引单打印</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '指引单预览')" class="listBtn"> <el-button type="" class="commonbutton" @click="guidePrint('0001', true)">指引单预览</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn"> <el-button type="" class="commonbutton" @click="printPromise()" style="font-size: 12px">人员检验检查条码</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '人员信息导出')" class="listBtn"> <!-- <download-excel :fields="jsonFields" :fetch="btnExport" type="xls" :name="tableName"> <el-button type="" style="width:100%">人员信息导出</el-button> </download-excel> --> <el-button type="" class="commonbutton" @click="btnExport('info')">人员信息导出</el-button> </div> <!-- 弃用 <div class="listBtn"> <el-button type="" class="commonbutton" @click="btnDragColDesign">设计列排序</el-button> </div> --> <div v-show="checkPagePriv(pagePriv.privs, '人员检验检查条码')" class="listBtn"> <el-button type="" class="commonbutton" @click="printPromise2()" style="font-size: 12px">人员+检查条码</el-button> </div> <div v-show="checkPagePriv(pagePriv.privs, '体检表回收')" class="listBtn"> <el-button type="" class="commonbutton" @click="btnScanRecover">体检表回收</el-button> </div>
<!-- elProgress.display dialogWin.LocalConfig <div class="listBtn"> <el-button type="" class="commonbutton" @click="dialogWin.LocalConfig = true">本地设置</el-button> </div> --> <!-- <div class="listBtn"> <el-button type="" class="btnClass commonbutton" @click="rowSelected(tableData)">选中</el-button> </div> --> </div> </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" :refFuncSetData="refFuncSetData" :refQueryCondition="refQueryCondition" /> </el-dialog>
<!-- 修改信息 --> <el-dialog title="修改人员信息" :visible.sync="upBaseInfo.visble" width="800px" :show-close="false" :append-to-body="true" :close-on-click-modal="false"> <div> <div style="display: flex; margin-bottom: 20px"> <el-form ref="form" :model="upBaseInfo" label-width="80px" size="medium"> <el-row> <el-col :span="8"> <el-form-item label="姓名" prop="patientName"> <el-input id="patientName" v-model="upBaseInfo.patientName" size="small" autocomplete="off"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="身份证号" prop="idNo"> <el-input v-model="upBaseInfo.idNo" placeholder="身份证号" @change="changeIdNo('N')" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="出生日期" prop="birthDate"> <el-date-picker v-model="upBaseInfo.birthDate" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" placeholder="出生日期" style="width: 180px" @change="changeBirthDate" size="small" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="性别" prop="sexId"> <el-select v-model="upBaseInfo.sexId" placeholder="请选择" size="small" filterable> <el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="年龄" prop="age"> <el-input v-model="upBaseInfo.age" size="small" @change="changeAge"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="婚姻" prop="maritalStatusId"> <el-select v-model="upBaseInfo.maritalStatusId" placeholder="请选择" size="small" filterable> <el-option v-for="item in dict.maritalStatus" :key="item.id" :label="item.displayName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="手机号" prop="mobileTelephone"> <el-input v-model="upBaseInfo.mobileTelephone" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="电话" prop="telephone"> <el-input v-model="upBaseInfo.telephone" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="籍贯" prop="birthPlaceId"> <el-select v-model="upBaseInfo.birthPlaceId" placeholder="请选择" filterable clearable size="small"> <el-option v-for="item in dict.birthPlace" :key="item.id" :label="item.displayName" :value="item.id" /> </el-select> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="24"> <el-form-item label="地址" prop="address"> <el-input v-model="upBaseInfo.address" size="small"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="邮编" prop="postalCode"> <el-input v-model="upBaseInfo.postalCode" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="邮箱" prop="email"> <el-input v-model="upBaseInfo.email" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="体检卡号" prop="medicalCardNo"> <el-input v-model="upBaseInfo.medicalCardNo" size="small"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="性激素期" prop="sexHormoneTermId"> <el-select v-model="upBaseInfo.sexHormoneTermId" placeholder="请选择" filterable clearable size="small"> <el-option v-for="item in dict.sexHormoneTerm" :key="item.id" :label="item.displayName" :value="item.id"> </el-option> </el-select> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="民族" prop="nationId"> <el-select v-model="upBaseInfo.nationId" placeholder="请选择" filterable clearable default-first-option :filter-method="filterMethod" size="small"> <el-option v-for="item in nation" :key="item.id" :label="item.displayName" :value="item.id" /> </el-select> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="体检类别" prop="medicalTypeId"> <el-select v-model="upBaseInfo.medicalTypeId" placeholder="请选择" filterable clearable size="small"> <el-option v-for="item in dict.medicalType" :key="item.id" :label="item.displayName" :value="item.id" /> </el-select> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="人员类别" prop="personnelTypeId"> <el-select v-model="upBaseInfo.personnelTypeId" placeholder="请选择" filterable clearable size="small"> <el-option v-for="item in dict.personnelType" :key="item.id" :label="item.displayName" :value="item.id" /> </el-select> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="介绍人" prop="salesman"> <el-input v-model="upBaseInfo.salesman" size="small"></el-input> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="工卡号" prop="jobCardNo"> <el-input v-model="upBaseInfo.jobCardNo" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="职务" prop="jobPost"> <el-input v-model="upBaseInfo.jobPost" size="small"></el-input> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="职称" prop="jobTitle"> <el-input v-model="upBaseInfo.jobTitle" size="small" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="门诊号" prop="hisPatientId"> <el-input v-model="upBaseInfo.hisPatientId" size="small" /> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="电话随访" prop="isPhoneFollow"> <el-checkbox v-model="upBaseInfo.isPhoneFollow" true-label="Y" false-label="N" /> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="VIP" prop="isVip"> <el-checkbox v-model="upBaseInfo.isVip" true-label="Y" false-label="N" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="8"> <el-form-item label="隐藏姓名" prop="isNameHide"> <el-checkbox v-model="upBaseInfo.isNameHide" true-label="Y" false-label="N" /> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="锁住" prop="isLock"> <el-checkbox v-model="upBaseInfo.isLock" true-label="Y" false-label="N" /> </el-form-item> </el-col> <el-col :span="8"> <el-form-item label="体检开始" prop="isMedicalStart"> <el-checkbox v-model="upBaseInfo.isMedicalStart" true-label="Y" false-label="N" /> </el-form-item> </el-col> </el-row> <el-row> <el-col :span="24"> <el-form-item label="备注" prop="remark"> <el-input v-model="upBaseInfo.remark" type="textarea" :rows="1" placeholder="请输入备注" size="small"></el-input> </el-form-item> </el-col> </el-row> </el-form> </div>
<div style="display: flex; justify-content: space-between"> <div></div> <div> <el-button class="commonbutton" @click="btnUpBaseInfo">提交</el-button> <el-button class="commonbutton" @click="close_dialogWin_upBaseInfo">关闭</el-button> </div> </div> </div> </el-dialog>
<el-dialog title="修改信息--体检日期" :visible.sync="dialogEditMedicalStartDate" width="400" :show-close="false" :append-to-body="true" :close-on-click-modal="false"> <div> <div style="display: flex; margin-bottom: 20px"> <span style="padding: 5px 0 0 10px; width: 100px">体检日期</span> <el-date-picker v-model="upBaseInfo.medicalStartDate" type="date" placeholder="体检日期" size="small" value-format="yyyy-MM-dd" :picker-options="pickerOptions" /> </div> <div style="display: flex; justify-content: space-between"> <div></div> <div> <el-button class="commonbutton" @click="btnEditMedicalStartDate">提交</el-button> <el-button class="commonbutton" @click="dialogEditMedicalStartDate = false">关闭</el-button> </div> </div> </div> </el-dialog>
<!-- 分诊排队 --> <el-dialog title="分诊排队" :visible.sync="dialogWin.queue" width="800px" :append-to-body="true" :close-on-click-modal="false"> <Queue :refParams="queueParams" /> </el-dialog>
<!-- 拍照 --> <el-dialog title="拍照" :visible.sync="patientRegister.cameraVisble" width="400" height="800" :show-close="false" :append-to-body="true" :close-on-click-modal="false"> <Camera :id="patientRegister.patientRegisterId" /> </el-dialog>
<!-- 导入企业数据 --> <el-dialog title="导入企业数据" :visible.sync="dialogWin.ImportOrgData" width="800px" :append-to-body="true" :close-on-click-modal="false"> <ImportOrgData /> </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>
<!-- 批量调整项目 --> <el-dialog title="批量调整项目" :visible.sync="dialogWin.PatientRegisterEditItemBatch" width="610px" height="800px" :append-to-body="true" :close-on-click-modal="false"> <PatientRegisterEditItemBatch :multipleSelection="multipleSelection" /> </el-dialog>
<!-- 批量调整检查项目医生 --> <el-dialog title="批量调整检查项目医生" :visible.sync="dialogWin.PatientRegisterEditDoctorBatch" width="610px" :append-to-body="true" :close-on-click-modal="false"> <PatientRegisterEditDoctorBatch :multipleSelection="multipleSelection" :doctorType="doctorType" /> </el-dialog>
<!-- 批量调整体检类别 --> <el-dialog title="批量调整体检类别" :visible.sync="dialogWin.PatientRegisterEditMedicalTypeBatch" width="610px" :append-to-body="true" :close-on-click-modal="false"> <PatientRegisterEditMedicalTypeBatch :multipleSelection="multipleSelection" /> </el-dialog>
<!-- 批量调整人员类别 --> <el-dialog title="批量调整人员类别" :visible.sync="dialogWin.PatientRegisterEditPersonnelTypeBatch" width="610px" :append-to-body="true" :close-on-click-modal="false"> <PatientRegisterEditPersonnelTypeBatch :multipleSelection="multipleSelection" /> </el-dialog>
<!-- 批量调整备注 --> <el-dialog title="批量调整备注" :visible.sync="dialogWin.PatientRegisterEditRemarkBatch" width="610px" :append-to-body="true" :close-on-click-modal="false"> <PatientRegisterEditRemarkBatch :multipleSelection="multipleSelection" /> </el-dialog>
<!-- 通用进度条 --> <el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="600px" height="400" :show-close="false" :close-on-click-modal="false" :append-to-body="true"> <ElProgressOCX /> </el-dialog>
<!--通用本地参数设置--> <el-dialog title="本地参数设置" :visible.sync="dialogWin.LocalConfig" :close-on-click-modal="false" :append-to-body="true" width="800px" height="600px"> <LocalConfig /> </el-dialog>
<!--云胶片二维码--> <el-dialog :visible.sync="qrCode.winDisplay" title="云胶片二维码" width="400px" style="text-align: center"> <!--<canvas ref="canvas"></canvas>--> <img width="100%" :src="qrCode.personUrl" /> <div style="font-size: 16px"> {{ qrCode.barcodeNo + " " + qrCode.patientName }} </div> </el-dialog> <!----> <el-dialog title="扫/输入条码回收体检表(指引单)" :visible.sync="recover.dialog" width="400px" :append-to-body="true" :close-on-click-modal="false"> <div style="margin-left: 10px"> <template> <el-radio v-model="recover.recoverType" label="0">条码号</el-radio> <el-radio v-model="recover.recoverType" label="1">档案号</el-radio> </template> <el-input style="margin: 10px 0" ref="tmh" v-model="recover.barcode" @keyup.native.enter="signByPatientRegisterNo"></el-input> </div> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="signByPatientRegisterNo" class="commonbutton">确定</el-button> <el-button @click="recover.dialog = false" class="commonbutton">关闭</el-button> </div> </el-dialog> </div> </div></template><script>import moment from "moment";import QRCode from "qrcode";import { mapState, mapActions } from "vuex";import { getapi, postapi, putapi, deletapi } from "@/api/api";import Sortable from "sortablejs";import FileSaver from "file-saver";import * as XLSX from "xlsx";import html2canvas from "html2canvas";import JsonExcel from "vue-json-excel";import { exportJsonToExcel } from "../../utlis/Export2Excel";
import { getPagePriv, checkPagePriv, dddw, objCopy, arrayReduce, arrayExistObj, deepCopy, birthdayToAge, ageToBirthday, parseID, setPrStatusColor,} from "../../utlis/proFunc";import { savePeoplePhoto } from "../../utlis/proApi";
import PatientRegisterEdit from "../../components/patientRegister/PatientRegisterEdit.vue";import Camera from "../../components/patientRegister/Camera.vue";import PatientRegisterAsbItem from "../../components/patientRegister/patientRegisterAsbItem.vue";
import ElProgressOCX from "../../components/report/ElProgressOCX.vue";import PatientRegisterEditGroupBatch from "./PatientRegisterEditGroupBatch.vue";import PatientRegisterEditItemBatch from "./PatientRegisterEditItemBatch.vue";import PatientRegisterEditDoctorBatch from "./PatientRegisterEditDoctorBatch.vue";import PatientRegisterEditMedicalTypeBatch from "./PatientRegisterEditMedicalTypeBatch.vue";import PatientRegisterEditPersonnelTypeBatch from "./PatientRegisterEditPersonnelTypeBatch.vue";import PatientRegisterEditRemarkBatch from "./PatientRegisterEditRemarkBatch.vue";import ImportOrgData from "./ImportOrgData.vue";import LocalConfig from "../../components/common/LocalConfig.vue";import Queue from "../../components/queue/Queue.vue";import { UTable, UTableColumn } from "umy-ui";
export default { components: { PatientRegisterEdit, Camera, PatientRegisterAsbItem, PatientRegisterEditGroupBatch, // 批量调整分组
PatientRegisterEditItemBatch, // 批量调整项目
PatientRegisterEditDoctorBatch, // 批量调整检查项目医生
PatientRegisterEditMedicalTypeBatch, // 批量调整体检类别
PatientRegisterEditPersonnelTypeBatch, // 批量调整体检类别
PatientRegisterEditRemarkBatch, // 批量调整体检类别
ElProgressOCX, LocalConfig, ImportOrgData, Queue, DownloadExcel: JsonExcel, UTable, UTableColumn, }, props: ["refQueryCondition"], data() { return { pagePriv: { routeUrlorPageName: "patientRegister", //当前页面归属路由或归属页面权限名称
privs: [], // 页面权限
}, patient_register_query_idno: 'Y', // 身份证排他
patient_register_query_name: 'N', // 姓名排他
patient_register_read_idno_upPhoto: 'N', // 读身份证查询 是否更新照片
peisid: null, startPoint: -1, // 多选起点 -1 表示选择
endPoint: -1, // 多选终点 -1 表示未选择
tableData: [], //表格数据
tableDataCurrentRow: {}, // 当前被选中的行
multipleSelection: [], //选中的数据列表
dialogCamera: false, tabChoosed: "1", formInitData: {}, //体检登记初始表单数据
editTimes: 0,
rClickRow: null, //右击的行
rClickColumn: null, //右击的列(预留)
dragColDesign: [], // 待调整的排序的序
//拖动列
dragCol: [ { label: "序号", prop: "sn", minWidth: 40, align: "center" }, { label: "体检进度", prop: "completeFlag", minWidth: 80, align: "center", }, { label: "打印", prop: "guidePrintTimes", minWidth: 55, align: "center", }, { label: "锁住", prop: "isLock", minWidth: 55, align: "center" }, { label: "单位", prop: "customerOrgParentName", minWidth: 180, align: "center", }, { label: "部门", prop: "customerOrgName", minWidth: 120, align: "center", }, { label: "姓名", prop: "patientName", minWidth: 80, align: "center" }, { label: "性别", prop: "sexId", minWidth: 55, align: "center" }, { label: "年龄", prop: "age", minWidth: 55, align: "center" }, { label: "条码号", prop: "patientRegisterNo", minWidth: 110, align: "center", }, { label: "档案号", prop: "patientNo", minWidth: 90, align: "center" }, { label: "体检次数", prop: "medicalTimes", minWidth: 80, align: "center", }, { label: "分组/套餐", prop: "groupPack", minWidth: 150, align: "center", }, { label: "民族", prop: "nationName", minWidth: 55, align: "center" }, //nationId
{ label: "身份证", prop: "idNo", minWidth: 160, align: "center" }, { label: "出生日期", prop: "birthDate", minWidth: 80, align: "center" }, { label: "邮箱", prop: "email", minWidth: 150, align: "center" }, { label: "手机", prop: "mobileTelephone", minWidth: 130, align: "center", }, { label: "电话", prop: "telephone", minWidth: 130, align: "center" }, { label: "地址", prop: "address", minWidth: 400, align: "" }, { label: "备注", prop: "remark", minWidth: 400, align: "" }, { label: "体检卡号", prop: "medicalCardNo", minWidth: 80, align: "center", }, { label: "工卡号", prop: "jobCardNo", minWidth: 80, align: "center" }, { label: "婚姻状况", prop: "maritalStatusName", //maritalStatusId
minWidth: 80, align: "center", }, { label: "体检类别", prop: "medicalTypeId", minWidth: 80, align: "center", }, { label: "人员类别", prop: "personnelTypeName", //personnelTypeId
minWidth: 80, align: "center", }, { label: "职务", prop: "jobPost", minWidth: 200, align: "center" }, { label: "职称", prop: "jobTitle", minWidth: 80, align: "center" }, { 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: 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" }, { label: "从业", prop: "qztlIsCy", minWidth: 50, align: "center" }, { label: "普速", prop: "qztlIsCw", minWidth: 50, align: "center" }, { label: "高铁", prop: "qztlIsGt", minWidth: 50, align: "center" }, { label: "职害", prop: "qztlIsWh", minWidth: 50, align: "center" }, { label: "复检", prop: "qztlIsFj", minWidth: 50, align: "center" }, { label: "标准金额", prop: "standardAmount", minWidth: 80, align: "center", }, { label: "应收金额", prop: "receivableAmount", minWidth: 80, align: "center", }, { label: "实收金额", prop: "chargeAmount", minWidth: 80, align: "center", }, { label: "支付方式", prop: "chargePayMode", minWidth: 80, align: "center", }, ], dialogColSort: false, jsonFields: {}, dom: null, //用于滚动加载数据
// lazyLoading: false, //是否懒加载中
loadOpts: { totalCount: 0, skipCount: 0, maxResultCount: 100, }, loadOptsInit: {},
upBaseInfo: { visble: false, label: "姓名", value: "", colName: "patientName", patientRegisterId: "", medicalStartDate: "", // 体检日期
registerManType: "customer", //登记人员类型,客服:customer 医生:doctor 支持在医生诊台处理登记人员
id: "", //id
photo: "", //照片
patientId: "00000000-0000-0000-0000-000000000000", //档案号ID 选择了档案就传档案号,未选就传00000-0000...
patientNo: "", //档案号
customerOrgId: ["00000000-0000-0000-0000-000000000001"], //单位编号 默认个人
customerOrgParentId: "00000000-0000-0000-0000-000000000001", customerOrgName: "个人体检", customerOrgRegisterId: "00000000-0000-0000-0000-000000000001", //默认单位体检次数
customerOrgGroupId: null, //分组
medicalPackageId: null, //套餐
patientName: "", //姓名
birthDate: null, //日期型
sexId: "U", //性别 默认未知U
age: null, //年龄
jobCardNo: "", //工卡号
medicalCardNo: "", //体检卡号
maritalStatusId: "9", //婚姻状况 默认未知
medicalTypeId: null, //体检类别
personnelTypeId: null, //人员类别
jobPost: "", //职务
jobTitle: "", //职称
salesman: "", //介绍人
sexHormoneTermId: null, //性激素期限
isNameHide: "N", //隐藏姓名
isPhoneFollow: "N", //电话随访
isVip: "N", //vip客户
remark: "", //
isLock: "N", //是否锁住
completeFlag: "1", //完成标志 0:预登记,1:正式登记(未检),2:部份已检,3:已总检 【创建编辑时不操作】
isMedicalStart: "N", //体检开始标志 【创建编辑时不操作】
patientRegisterNo: "", //条码号 【创建编辑时不操作】
medicalTimes: 1, //条码号 【创建编辑时不操作】
medicalCenterId: null, //体检中心
address: "", //地址
email: "", //email
idNo: "", //身份证号
telephone: "", //电话
mobileTelephone: "", //手机号
nationId: null, //民族编号
birthPlaceId: null, //籍惯(出生地)
postalCode: "", //邮编
creatorId: null, creationTime: "", lastModificationTime: "", lastModifierId: null, isMaxMedicalTimes: "N", //medicalStartDate: null,
hisPatientId: "", //对接 hisid
registerCheckAsbitems: [], //所选组合项目明细
// 青藏公司 数据
qztlType: "0", // 高原/健康
qztlIsCw: "N", // 普速
qztlIsCy: "N", // 从业
qztlIsGt: "N", // 高铁
qztlIsMain: "N", // 行车
qztlIsWh: "N", // 职害
qztlIsFj: "N", // 复检
isQztlImport: "N", // 导入
uploadQztlFlag: "N", // 上传
planuserid: "", // 计划人
// 职业病
ocCheckTypeId: null, //检查类别
jobType: "", //工种
poisonIds: [], // 接害因素IDs(主表不保存此项数据)
isPatientOccupationalDisease: "Y", // 是否职业病检查(主表不保存此项数据)
appointPatientRegisterId: "", thirdBookingId: "", occupationalDiseaseNumber: "", }, nation: [], dialogEditMedicalStartDate: false, // 修改体检日期
queueParams: {}, // 分诊排队参数
LocalConfig: { normal: { maxResultCount: 100, //分页时单页记录数
}, }, tableName: "", //导出人员列表表名
doctorType: "check", //check:检查 audit:审核
merge_lis_pacs_label: "0", //默认0 检验检查条码合并 0:不合并,1:合并
qrCode: { winDisplay: false, // 页面显示
url: "https://ccjktj.cn:5081/", //二维码 前辍地址
personUrl: "", // 个人云胶片地址
barcodeNo: "条码号", patientName: "姓 名", },
// 体检表回收
recover: { dialog: false, recoverType: "0", //回收类型 0-条码号 1-档案号
barcode: "", // 条码号或档案号
barcodes: [], // 条码号或档案号集合
isRecoverGuide: "Y", //状态 Y-回收,N-取消回收
},
// 避免单击事件与双击事件冲突
clickTime1: 0, clickTime2: 0, }; },
created() { //获取用户当前页面的权限
let userPriv = window.sessionStorage.getItem("userPriv"); if (userPriv) this.pagePriv.privs = deepCopy( getPagePriv(this.pagePriv.routeUrlorPageName) );
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); // 获取系统参数 -- 合并检验检查条码
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", { sysParmId: "merge_lis_pacs_label", }).then((res) => { if (res.code > -1) { this.merge_lis_pacs_label = res.data || "0"; } });
// 获取系统参数 -- 云胶片二维码网址
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", { sysParmId: "pacs_cloud_url", }).then((res) => { if (res.code > -1) { this.qrCode.url = res.data || "https://ccjktj.cn:5081/"; } });
// 获取系统参数 -- 身份证排他
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", { sysParmId: "patient_register_query_idno" } ).then((res) => { if (res.code > -1) { this.patient_register_query_idno = res.data || "Y"; } });
// 获取系统参数 -- 姓名排他
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", { sysParmId: "patient_register_query_name" } ).then((res) => { if (res.code > -1) { this.patient_register_query_name = res.data || "N"; } });
// 获取系统参数 -- 读身份证 是否更新照片
postapi("/api/app/SysParmValue/GetSysParmValueBySysParmId", { sysParmId: "patient_register_read_idno_upPhoto" } ).then((res) => { if (res.code > -1) { this.patient_register_read_idno_upPhoto = res.data || "N"; } });
},
//挂载完成
mounted() { this.quickAsb = this.dict.asbItemAll;
this.peisid = window.sessionStorage.getItem("peisid"); // if(this.$refs.info){
// this.$nextTick(() => {
// this.scrollFull()
// })
// }
}, computed: { ...mapState([ "pickerOptions", "window", "dataTransOpts", "dialogWin", "dict", "elProgress", "patientRegister", "customerOrg", ]), }, methods: { ...mapActions(["getCustomerOrgGroup", "getPatientRegisterAbs"]), moment, dddw, deepCopy, checkPagePriv, setPrStatusColor,
// 扩展定义表格行样式
handleRowClassName({ row, rowIndex }) { // highLightBg 为 'selected'的高亮
//// console.log(rowIndex, row)
//return row.highLightBg == 'selected' ? 'high-light-bg' : '';
if (row.choosed) { return "current-row"; } else { return ""; } },
// 行选择
rowSelected(rows) { rows.forEach((e) => { this.$refs["info"].toggleRowSelection(e, true); }); },
refFuncSetData(item, v) { setData(this, item, v); },
// 打印指引单(isPreview)
async guidePrint(ReportCode, isPreview) { if (!this.$peisAPI) { this.$message.info({ showClose: true, message: "此功能,需要在壳客户端才可运行!", }); return; } let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); let toOutShell = { ReportCode, token, isBuildImage: "N", IsUploadPdf: "N", preViewCanPrint: "N", Parameters: [ { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, { Name: "pageFooter", Value: "pic/peisQrCode.jpg" }, { Name: "picExtOne", Value: "pic/evaluate.jpg" }, // 客户评价二维码(检后评价)
], }; let lfind = -1;
//选中(取消勾选)start -------------------------
// this.multipleSelection = []
// this.tableData.forEach(e => {
// if (e.choosed) {
// this.multipleSelection.push(deepCopy(e))
// }
// })
//选中(取消勾选) end -------------------------
if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请勾选要打印指引单的人员记录!", }); return; }
if (isPreview) { /* //this.multipleSelection.forEach((item,index) =>{
postapi( `/api/app/printreport/getpatientregisterguidereport?PatientRegisterId=${this.multipleSelection[0].id}` ) .then((res) => { if (res.code != -1) { toOutShell.ReportTable = res.data; // console.log(
"JSON.stringify(toOutShell)", JSON.stringify(toOutShell) ); return this.$peisAPI.printPre(JSON.stringify(toOutShell)); } }) .then(res => { // console.log('this.$peisAPI.printPre', res)
if (JSON.parse(res).code < 0) { this.$message.warning(JSON.parse(res).message); } }) .catch((err) => { // console.log('打印指引单', err)
this.$message.warning({ showClose: true, message: err }); }); */ toOutShell.BusinessCode = this.multipleSelection[0].id; if (this.multipleSelection[0].completeFlag == "0") { this.$message.warning({ showClose: true, message: "预登记人员,不可执行此操作!", }); return; }
this.$peisAPI .printPre(JSON.stringify(toOutShell)) .then((res) => { if (JSON.parse(res).code < 0) { this.$message.warning({ showClose: true, message: JSON.parse(res).message, }); } }) .catch((err) => { // console.log('打印指引单', err)
this.$message.warning({ showClose: true, message: `${err}` }); }); } else { this.elProgress.display = true; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { try { let patientregisterId = this.multipleSelection[i].id; if (this.multipleSelection[i].completeFlag == "0") { this.$message.warning({ showClose: true, message: `${this.multipleSelection[i].patientName} 为预登记人员,不可打印指引单`, }); continue; } toOutShell.BusinessCode = patientregisterId; let resPeisAPI = await this.$peisAPI.print( JSON.stringify(toOutShell) ); if (JSON.parse(resPeisAPI).code < 0) continue; let resPrintTimes = await postapi( "/api/app/patientregister/updatepatientregisterguideprinttimesmany", [patientregisterId] ); if (resPrintTimes.code == -1) continue; lfind = arrayExistObj(this.tableData, "id", patientregisterId); if (lfind > -1) { if (this.tableData[lfind].guidePrintTimes) { this.tableData[lfind].guidePrintTimes = Number(this.tableData[lfind].guidePrintTimes) + 1; } else { this.tableData[lfind].guidePrintTimes = 1; } } } catch (error) { // console.log('打印指引单', error)
this.$message.warning({ showClose: true, message: `${error}` }); }
this.elProgress.percentage = Math.floor( ((i + 1) * 100) / this.multipleSelection.length ); } this.elProgress.display = false; } },
// 指引单新打印方式,promise
guidePrintPromise(ReportCode, isPreview, row) { return new Promise((resolve, reject) => { if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!");
let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); let toOutShell = { ReportCode, token, isBuildImage: "N", IsUploadPdf: "N", preViewCanPrint: "N", Parameters: [ { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, { Name: "pageFooter", Value: "pic/peisQrCode.jpg" }, ], };
if (!row.completeFlag || row.completeFlag == "0") reject("预登记人员,不可执行此操作!"); toOutShell.BusinessCode = row.id; console.log(JSON.stringify(toOutShell)); if (isPreview) { this.$peisAPI .printPre(JSON.stringify(toOutShell)) .then((res) => { let lres = JSON.parse(res); if (lres.code > -1) { resolve(lres); } else { reject(lres.message); } }) .catch((err) => { reject(err); }); } else { this.$peisAPI .print(JSON.stringify(toOutShell)) .then((res) => { let lres = JSON.parse(res); if (lres.code > -1) { return postapi( "/api/app/patientregister/updatepatientregisterguideprinttimesmany", [row.id] ); } else { reject(lres.message); } }) .then((res) => { if (res && res.code > -1) { let lfind = arrayExistObj(this.tableData, "id", row.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; } } } resolve(res); }) .catch((err) => { reject(err); }); } }); },
printGuideLisPacs(row) { return new Promise((resolve, reject) => { // this.merge_lis_pacs_label == '1' 合并检验检查条码
if (this.merge_lis_pacs_label == "1") { this.lisPrint(row, "0002", false) .then((res) => { return this.guidePrintPromise("0008", false, row); }) // .then((res) => {
// return this.pacsPrint(row, "0004", false);
// })
.then((res) => { resolve(res); }) .catch((err) => { reject(err); }); } else { this.lisPrint(row, "0002", false) .then((res) => { return this.pacsPrint(row, "0004", false); }) .then((res) => { return this.guidePrintPromise("0008", false, row); }) .then((res) => { resolve(res); }) .catch((err) => { reject(err); }); } }); },
// 临时加
printGuidePacs(row) { return new Promise((resolve, reject) => { this.pacsPrint(row, "0004", false) .then((res) => { return this.guidePrintPromise("0008", false, row); }) .then((res) => { resolve(res); }) .catch((err) => { reject(err); }); }); },
async printPromise() { if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请勾选要打印人员检验检查条码的记录!", }); return; }
this.elProgress.display = true; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { let row = this.multipleSelection[i]; try { await this.printGuideLisPacs(row); } catch (error) { console.log("printPromise", error); }
this.elProgress.percentage = Math.floor( ((i + 1) * 100) / this.multipleSelection.length ); } this.elProgress.display = false; },
// 临时加
async printPromise2() { if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请勾选要打印人员检验检查条码的记录!", }); return; }
this.elProgress.display = true; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { let row = this.multipleSelection[i]; try { await this.printGuidePacs(row); } catch (error) { console.log("printPromise", error); }
this.elProgress.percentage = Math.floor( ((i + 1) * 100) / this.multipleSelection.length ); } this.elProgress.display = false; },
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 = rows; },
//设置新增/编辑的form数据
setForm(formData) { this.patientRegister.patientRegisterRd = deepCopy(formData); if (!this.patientRegister.patientRegisterRd.id) { this.patientRegister.patientRegisterRd.customerOrgId = this.refQueryCondition.customerOrgId; } },
//点击体检次数行
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;
// }
//选中了多个点编辑时,排序最前的作为当前选中的
// 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.clickTime1 = new Date().getTime();
setTimeout(() => { if (this.clickTime1 > this.clickTime2) { this.dataTransOpts.tableS.patient_register = deepCopy(row); this.tableDataCurrentRow = deepCopy(row); this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
} }, 400);
// }
},
// 双击 调出编辑
dblClick(row) { this.clickTime2 = new Date().getTime(); this.dataTransOpts.tableS.patient_register.id = row.id; this.btnEdit();
//触发单击事件
this.dataTransOpts.tableS.patient_register = deepCopy(row); this.tableDataCurrentRow = deepCopy(row); this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
},
// 导入企业(青藏公司)数据
btnImportOrgData() { //
this.dataTransOpts.plus.ImportOrgData++; this.dialogWin.ImportOrgData = true; },
//体检次数 相关操作
btnAdd() { if (!this.peisid || this.peisid == "null") { this.$message.warning({ showClose: true, message: "该用户未选归属体检中心,不能执行此操作!", }); return; } console.log('btnAdd.this.refQueryCondition', this.refQueryCondition) let customerOrgId = this.refQueryCondition.customerOrgId; if (!customerOrgId) { this.$message.warning({ showClose: true, message: "请选择单位或个人" }); return; }
// this.patientRegister.patientRegisterRdInit.customerOrgId = customerOrgId
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.patientRegister.patientRegisterAbs = [];
// this.patientRegister.patientRegisterRd.id = ''
// this.dialogWin.PatientRegisterEdit = true;
// this.editTimes++; //触发表单窗口,数据更新
// this.getPatientRegisterAbs();
this.dataTransOpts.tableS.patient_register.id = ""; this.dataTransOpts.copyGroup.itemTypeIds = []; //
this.dialogWin.PatientRegisterEdit = true; this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
setTimeout(() => { this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新
}, 10); },
//批量正式登记
btnAddBatch(completeFlag) { let patientRegisterIds = []; //取消勾选,换成选择的方式 start
// this.multipleSelection = [];
// this.tableData.forEach((e) => {
// if (e.choosed && e.completeFlag == '0') {
// this.multipleSelection.push(e);
// patientRegisterIds.push(e.id)
// }
// });
//取消勾选,换成选择的方式 end
if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请勾选要操作的记录!", }); return; } this.multipleSelection.forEach((e) => { switch (completeFlag) { case "0": if (e.completeFlag == "1") patientRegisterIds.push(e.id); break; case "1": if (e.completeFlag == "0") patientRegisterIds.push(e.id); break; } });
if (patientRegisterIds.length == 0) { this.$message.info({ showClose: true, message: "没有可操作的数据!" }); return; } let body = { completeFlag, patientRegisterIds }; postapi( "/api/app/patientregister/updatepatientregistercompleteflagormedicalstartdate", body ) .then((res) => { if (res.code != -1) { // console.log('操作成功!')
patientRegisterIds.forEach((e) => { let lfind = arrayExistObj(this.tableData, "id", e); if (lfind > -1) this.tableData[lfind].completeFlag = completeFlag; }); } }) .catch((err) => { this.$message.error({ showClose: true, message: `操作失败 ${err}` }); }); },
// 单个编辑
btnEdit() { // if (!this.patientRegister.patientRegisterRd.id) {
if (!this.dataTransOpts.tableS.patient_register.id) { this.$message.warning({ showClose: true, message: "请选择要操作的记录", }); return; } //// console.log(this.patientRegister.patientRegisterRd,this.tableData)
// 触发数据刷新
this.dataTransOpts.refresh.patient_register.S++; //触发人员信息刷新(会同时刷新组合项目)
this.dataTransOpts.plus.clearPatientRegisterQuery++; //触发清空人员登记界面的查询条件
this.dataTransOpts.copyGroup.itemTypeIds = []; //
this.dialogWin.PatientRegisterEdit = true; },
//新增或编辑后选中记录
async close_dialogWin_PatientRegisterEdit() { // 如果 dataTransOpts.tableS.patient_register.id 为空(未增加),则不做处理
let id = this.dataTransOpts.tableS.patient_register.id; if (!id) { id = this.tableDataCurrentRow.id; } if (!id) return; this.dataTransOpts.tableS.patient_register.id = id;
let res = await postapi("/api/app/patientregister/getlistinfilter", { patientRegisterNo: this.dataTransOpts.tableS.patient_register.patientRegisterNo, }); if (res.code != 1) return; let currentRow = res.data.items[0];
// this.tableData.forEach(e => {
// e.choosed = false
// });
let lfind = arrayExistObj( this.tableData, "id", this.dataTransOpts.tableS.patient_register.id ); if (lfind > -1) { objCopy(currentRow, this.tableData[lfind]); } else { lfind = this.tableData.length; currentRow.index = lfind; currentRow.choosed = true; this.tableData.push(currentRow); }
// 刷新 register_check_asbitem 表记录
if (lfind > -1) { this.dataTransOpts.refresh.register_check_asbitem.M++; } },
//拍照
openCamera() { if (!this.patientRegister.patientRegisterId) { this.$message.warning({ showClose: true, message: "请选择要操作的记录", }); return; } this.patientRegister.cameraVisble = true; },
//删除(可批量删除)
// /api/app/patient-register/many?PatientRegisterIds=3a0c2cac-f44c-f407-9504-c1fc5e80a159&PatientRegisterIds=3a0c2cb3-d10c-ed70-db6a-b835e75ce641
btnDel() { //选中(取消勾选)start -------------------------
// this.multipleSelection = []
// this.tableData.forEach(e => {
// if (e.choosed) {
// this.multipleSelection.push(deepCopy(e))
// }
// })
//选中(取消勾选) end -------------------------
if (this.multipleSelection.length < 1) { this.$message.warning({ showClose: true, message: "请先勾选要操作的记录", }); return; }
let patientRegisterIds = []; for (let i = 0; i < this.multipleSelection.length; i++) { patientRegisterIds.push(this.multipleSelection[i]["id"]); }
this.$confirm("此操作将永久删除该记录, 是否继续?", "提示", { confirmButtonText: "是", cancelButtonText: "否", type: "warning", }) .then(() => { //// console.log('{patientRegisterIds}',{patientRegisterIds})
return postapi("/api/app/patient-register/delete-many", { patientRegisterIds, }); }) .then((res) => { if (res.code != -1) { // console.log("操作成功");
this.dataTransOpts.tableS.patient_register.id = ""; setTimeout(() => { this.dataTransOpts.refresh.register_check_asbitem.M++; }, 10); arrayReduce(this.tableData, this.multipleSelection, "id=id"); //清除列表记录
// this.setForm(this.patientRegister.patientRegisterRdInit)
// this.getPatientRegisterAbs();
} }) .catch((err) => { if (err == "cancel") { this.$message.info({ showClose: true, message: "已取消操作" }); } }); },
//查询
async Query() { // 查询时,清掉明细数据 (滚动时不清)
this.dataTransOpts.tableS.patient_register.id = ""; this.tableDataCurrentRow = {}; // 清除选择
if ( !( this.refQueryCondition.isSeries == "Y" && this.refQueryCondition.patientRegisterNo ) ) { this.tableData = []; }
setTimeout(() => { this.dataTransOpts.refresh.register_check_asbitem.M++; //触发所选组合项目刷新
}, 10);
this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit); await this.getPrList(); },
//数据量多时,滚动加载
async load() { this.loadOpts.skipCount++; await this.getPrList(); this.lazyLoading = false; },
// 查询获取人员列表数据
async getPrList() { if ( this.loadOpts.skipCount != 0 && this.loadOpts.skipCount * this.loadOpts.maxResultCount >= this.loadOpts.totalCount ) return; // console.log('getPrList', this.loadOpts)
let body = Object.assign({}, this.loadOpts) let queryType = this.refQueryCondition.queryType
console.log('getPrList.this.refQueryCondition', this.refQueryCondition) // 非排他查询条件 ===================== Start ==========================
if (!queryType) {
// 查询条件--日期
if (this.refQueryCondition.startDate && this.refQueryCondition.endDate) { body.dateType = this.refQueryCondition.dateType; body.startDate = this.refQueryCondition.startDate body.endDate = this.refQueryCondition.endDate if (body.startDate > body.endDate) { this.$message.warning({ showClose: true, message: "起始日期不能大于截止日期,数据校验不通过!", }); return; } }
// 查询条件--单位、次数、分组
if (this.refQueryCondition.customerOrgFlag) { if (this.refQueryCondition.customerOrgId) body.customerOrgId = this.refQueryCondition.customerOrgId // 获取单位体检次数与分组
try { if ( this.refQueryCondition.customerOrgId && this.refQueryCondition.customerOrgId != this.dict.personOrgId && this.refQueryCondition.customerOrgRegister.id ) { body.customerOrgRegisterId = this.refQueryCondition.customerOrgRegister.id; if (this.refQueryCondition.customerOrgGroupIds) body.customerOrgGroupIds = this.refQueryCondition.customerOrgGroupIds } } catch (error) { console.error(error); } }
// 电话
if (this.refQueryCondition.phone) body.phone = this.refQueryCondition.phone // 性别
if (this.refQueryCondition.sexId) body.sexId = this.refQueryCondition.sexId // 体检类别
if (this.refQueryCondition.medicalTypeIds) body.medicalTypeIds = this.refQueryCondition.medicalTypeIds // 人员状态
if (this.refQueryCondition.completeFlags) body.completeFlags = this.refQueryCondition.completeFlags // 人员类别
if (this.refQueryCondition.personnelTypeIds) body.personnelTypeIds = this.refQueryCondition.personnelTypeIds // 表格回收状态
if (this.refQueryCondition.isRecoverGuide) body.isRecoverGuide = this.refQueryCondition.isRecoverGuide
// 排他条件有值时
if (this.refQueryCondition.patientRegisterNo) { queryType = "patientRegisterNo" } else if (this.refQueryCondition.pacsNo) { queryType = "pacsNo" } else if (this.refQueryCondition.lisNo) { queryType = "lisNo" } else if (this.refQueryCondition.patientNo) { queryType = "patientNo" } else if (this.refQueryCondition.idCardNo) { queryType = "idCardNo" } else if (this.refQueryCondition.patientName) { queryType = "patientName" }
} // 非排他查询条件 ===================== End ==========================
// 排他查询条件
let photo = '' switch (queryType) { case 'patientName': // 姓名排他判断
if (this.refQueryCondition.patientName) { body.patientName = this.refQueryCondition.patientName; if (this.patient_register_query_name == 'Y') { body = { patientName: this.refQueryCondition.patientName, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; } } break; case 'idCardNo': // 身份证排他判断
if (this.refQueryCondition.idCardNo) { body.idNo = this.refQueryCondition.idCardNo; if (this.patient_register_query_idno == 'Y') { body = { idNo: this.refQueryCondition.idCardNo, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; } } if (this.refQueryCondition.photo) photo = this.refQueryCondition.photo; break; case 'patientNo': // 档案号排他判断
if (this.refQueryCondition.patientNo) body = { patientNo: this.refQueryCondition.patientNo, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; break; case 'patientRegisterNo': // 条码号排他判断
if (this.refQueryCondition.patientRegisterNo) body = { patientRegisterNo: this.refQueryCondition.patientRegisterNo, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; break; case 'pacsNo': // 检查条码排他判断
if (this.refQueryCondition.pacsNo) body = { pacsNo: this.refQueryCondition.pacsNo, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; break; case 'lisNo': // 检验条码排他判断
if (this.refQueryCondition.lisNo) body = { lisNo: this.refQueryCondition.lisNo, skipCount: this.loadOpts.skipCount, maxResultCount: this.loadOpts.maxResultCount, }; break; default: //
break; }
// 带费且合计 /api/app/PatientRegister/GetPatientRegisterWithCharge
// 不带费且合计 /api/app/patientregister/getlistinfilter
postapi( "/api/app/PatientRegister/GetPatientRegisterWithCharge", 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; }
// 2、扫身份证查询时,无照片自动更新照片(参数控制)
if (this.patient_register_read_idno_upPhoto == "Y" && photo) { if (!e.photo) { savePeoplePhoto(e.id, photo); } } });
// 不是连续扫码时,需要判断是否分页查询(连续扫码不清原来的数据)
// console.log("this.refQueryCondition", this.refQueryCondition.isSeries, this.refQueryCondition.patientRegisterNo);
if (this.refQueryCondition.isSeries == "Y" && this.refQueryCondition.patientRegisterNo) { // 如果已经存在列表中,则不在添加
for (let index = curLoad.length - 1; index > -1; index--) { const e = curLoad[index]; if (arrayExistObj(this.tableData, 'id', e.id) > -1) curLoad.splice(index, 1) } } else { 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))
// })
//如果 有选中 记录,则刷新其对应的组合项目
if (this.dataTransOpts.tableS.patient_register.id) { this.dataTransOpts.refresh.register_check_asbitem.M++; } } }); },
//滚动加载数据
async scrollFull(scroll, event) {
if (!scroll.judgeFlse) return;
// 正在加载时阻止重复触发
if (this.lazyLoading) return; if ( (Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount) ) { return; }
this.lazyLoading = true; try { await this.load(); } catch (e) { console.error('scrollFull load error', e); } // this.dom = this.$refs.info.bodyWrapper
// console.log('this.dom', this.dom)
// this.dom.addEventListener('scroll', async () => {
// // // console.log('scrollTop',this.dom.scrollTop,'clientHeight',this.dom.clientHeight,'scrollHeight',this.dom.scrollHeight);
// if (this.dom.scrollTop + this.dom.clientHeight + 20 > this.dom.scrollHeight && !this.lazyLoading) {
// // 获取到的不是全部数据 当滚动到底部
// // console.log('scrollTop', this.dom.scrollTop, 'clientHeight', this.dom.clientHeight, 'scrollHeight', this.dom.scrollHeight);
// if ((Number(this.loadOpts.skipCount) + 1) * Number(this.loadOpts.maxResultCount) >= Number(this.loadOpts.totalCount)) {
// this.lazyLoading = false
// } else {
// this.lazyLoading = true
// await this.load()
// this.lazyLoading = false
// // this.dom.scrollTop = this.dom.scrollTop - 100
// }
// }
// })
},
close_dialogWin_upBaseInfo() { this.upBaseInfo.visble = false; this.close_dialogWin_PatientRegisterEdit(); },
btnUpBaseInfo() { // let body = {
// patientRegisterId: this.upBaseInfo.patientRegisterId,
// };
// {
// "patientRegisterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "patientName": "string",
// "mobileTelephone": "string",
// "idNo": "string",
// "remark": "string",
// "medicalTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "personnelTypeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
// "sexHormoneTermId": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
// }
// body[this.upBaseInfo.colName] = this.upBaseInfo.value;
// 旧版/api/app/PatientRegister/UpdatePatientRegisterBaseInfoByPatientRegisterId
postapi( "/api/app/PatientRegister/UpdatePatientRegisterBySumCheck", this.upBaseInfo ).then((res) => { if (res.code > -1) { this.close_dialogWin_upBaseInfo(); } }); },
//修改出生日期
changeBirthDate() { this.upBaseInfo.age = birthdayToAge(this.upBaseInfo.birthDate); },
//修改出生日期
changeAge() { this.upBaseInfo.birthDate = ageToBirthday(this.upBaseInfo.age); },
//修改身份证,生成年龄、出生、性别
// isNameContinue 身份证号查重后是否姓名查重
changeIdNo(isNameContinue) { if (!this.upBaseInfo.idNo) return; let ret = parseID(this.upBaseInfo.idNo); // console.log('changeIdNo',ret)
if (ret.age != -1) { this.upBaseInfo.birthDate = new Date(ret.birthday); this.upBaseInfo.age = ret.age; this.upBaseInfo.sexId = ret.sex; } },
//快速选择组合项目时,调整可按拼间简码及简称查找
filterMethod(keyWords) { //// console.log('filterMethod',this.asbItemQuick)
if (keyWords) { this.nation = []; this.dict.nation.forEach((item) => { if ( item.displayName.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 || item.simpleCode.toLowerCase().indexOf(keyWords.toLowerCase()) > -1 ) { this.nation.push(item); } }); } else { this.nation = deepCopy(this.dict.nation); } },
// 修改基本信息
fnUpBaseInfo(row) { //婚姻状况
getapi("/api/app/MaritalStatus/GetMaritalStatusList").then((res) => { if (res.code == 1) { this.dict.maritalStatus = res.data; } });
//性激素期
getapi("/api/app/sex-hormone-term/in-filter").then((res) => { if (res.code == 1) { this.dict.sexHormoneTerm = res.data; } });
//民族
getapi("/api/app/nation/in-filter").then((res) => { if (res.code != -1) { this.dict.nation = res.data; this.nation = deepCopy(res.data); } });
//籍惯 ,出生地
getapi("/api/app/birth-place/in-filter").then((res) => { if (res.code == 1) { this.dict.birthPlace = res.data; } });
this.dataTransOpts.tableS.patient_register.id = row.id; this.dataTransOpts.tableS.patient_register.patientRegisterNo = row.patientRegisterNo;
// 获取资料
postapi('/api/app/patientregister/getinfoorpatient', { patientRegisterId: row.id }) .then(res => { if (res.code > -1) { this.upBaseInfo = Object.assign(this.upBaseInfo, row); this.upBaseInfo.patientRegisterId = row.id; this.upBaseInfo.visble = true; } }) },
editMedicalStartDate() { if (this.multipleSelection.length < 1) { this.$message.warning({ showClose: true, message: "请勾选要操作的人员记录!", }); return; } this.upBaseInfo.medicalStartDate = moment( this.multipleSelection[0].medicalStartDate ).format("yyyy-MM-DD"); this.dialogEditMedicalStartDate = true; },
// 批量修改体检日期
btnEditMedicalStartDate() { let body = { //"completeFlag": "string",
medicalStartDate: this.upBaseInfo.medicalStartDate, patientRegisterIds: [], }; this.multipleSelection.forEach((e) => { body.patientRegisterIds.push(e.id); }); postapi( "/api/app/PatientRegister/UpdatePatientRegisterMedicalStartDate", body ).then((res) => { if (res.code > -1) { let lfind = 0; this.multipleSelection.forEach((e) => { e.medicalStartDate = body.medicalStartDate; lfind = arrayExistObj(this.tableData, "id", e.id); if (lfind > -1) this.tableData.medicalStartDate = body.medicalStartDate; }); this.dialogEditMedicalStartDate = false; } }); },
// 分诊排队
fnQueue(row) { this.queueParams = { patientRegisterId: row.id, }; this.dialogWin.queue = true; this.dataTransOpts.plus.queue++; },
//表右击菜单
onCellRightClick(row, column) { // console.log(row)
this.rClickRow = { ...row }; //右击的行记录
this.rClickColumn = { ...column }; //右击的列(预留)
// console.log(row, column.property);
// this.onContextmenu()
}, onContextmenu(event) { // console.log('onContextmenu',event);
if (!this.rClickRow) return false; let row = { ...this.rClickRow }; let items = []; //菜单项
// items.push({
// label: "一级菜单",
// children: [
// { label: "修改姓名", onClick: () => { ; } }
// ]
// })
if (checkPagePriv(this.pagePriv.privs, "修改人员信息")) { items.push({ label: "修改人员信息", onClick: () => { this.fnUpBaseInfo(row); }, }); } if (checkPagePriv(this.pagePriv.privs, "修改体检日期")) items.push({ label: "修改体检日期", onClick: () => { this.editMedicalStartDate(); }, });
if (checkPagePriv(this.pagePriv.privs, "删除照片")) items.push({ label: "删除照片", onClick: () => { postapi(`/api/app/patient-register/update-photo`, { patientRegisterId: row.id, photo: "", }).then((res) => { if (res.code > -1) this.$message.success({ showClose: true, message: "操作成功!", }); }); }, });
if ( checkPagePriv(this.pagePriv.privs, "分诊排队") && row.completeFlag != "0" ) items.push({ label: "分诊排队", onClick: () => { this.fnQueue(row); }, });
if ( checkPagePriv(this.pagePriv.privs, "发送检验申请") && row.completeFlag != "0" ) items.push({ label: "发送检验申请", onClick: () => { this.lisRequest(row); }, }); // 预览条码
let subMenuPre = []; if ( checkPagePriv(this.pagePriv.privs, "预览人员条码") && row.completeFlag != "0" ) subMenuPre.push({ label: "预览人员条码", onClick: () => { this.guidePrintPromise("0008", true, row); }, }); if ( checkPagePriv(this.pagePriv.privs, "预览检验条码") && row.completeFlag != "0" ) subMenuPre.push({ label: "预览检验条码", onClick: () => { this.lisPrint(row, "0002", true); }, }); if ( checkPagePriv(this.pagePriv.privs, "预览Pacs条码") && row.completeFlag != "0" ) subMenuPre.push({ label: "预览Pacs条码", onClick: () => { // console.log('预览Pacs条码 row',row)
this.pacsPrint(row, "0004", true); }, }); if (subMenuPre.length > 0) items.push({ label: "预览条码", children: subMenuPre });
let subMenuPrint = []; if ( checkPagePriv(this.pagePriv.privs, "打印人员条码") && row.completeFlag != "0" ) subMenuPrint.push({ label: "打印人员条码", onClick: () => { this.guidePrintPromise("0008", false, row); }, }); if ( checkPagePriv(this.pagePriv.privs, "打印检验条码") && row.completeFlag != "0" ) subMenuPrint.push({ label: "打印检验条码", onClick: () => { this.lisPrint(row, "0002", false); }, }); if ( checkPagePriv(this.pagePriv.privs, "打印Pacs条码") && row.completeFlag != "0" ) subMenuPrint.push({ label: "打印Pacs条码", onClick: () => { this.pacsPrint(row, "0004", false); }, }); if (subMenuPrint.length > 0) items.push({ label: "打印条码", children: subMenuPrint });
// 导入结果合集 ============ start
let subMenuImp = []; if ( checkPagePriv(this.pagePriv.privs, "导入检查结果") && row.completeFlag != "0" ) subMenuImp.push({ label: "导入检查结果", onClick: () => { this.importResult("pacs", row); }, }); if ( checkPagePriv(this.pagePriv.privs, "导入检验结果") && row.completeFlag != "0" ) subMenuImp.push({ label: "导入检验结果", onClick: () => { this.importResult("lis", row); }, }); if ( checkPagePriv(this.pagePriv.privs, "导入迪安结果") && row.completeFlag != "0" ) subMenuImp.push({ label: "导入迪安结果", onClick: () => { this.importResult("diAn", row); }, }); if (subMenuImp.length > 0) { items.push({ label: "导入结果", children: subMenuImp }); } // 导入结果合集 ============ end
// 批量操作合集 ============ start
let batchMenus = []; if ( checkPagePriv(this.pagePriv.privs, "批量更新组合项目明细") && this.multipleSelection.length > 0 ) batchMenus.push({ label: "批量更新组合项目明细", onClick: () => { this.btnItemBatch(); }, }); if ( checkPagePriv(this.pagePriv.privs, "调整检查项目医生") && this.multipleSelection.length > 0 ) batchMenus.push({ label: "调整检查项目医生", onClick: () => { // this.doctorType = 'check'
this.dataTransOpts.plus.PatientRegisterEditDoctorBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditDoctorBatch = true; }, });
if ( checkPagePriv(this.pagePriv.privs, "批量调整体检类别") && this.multipleSelection.length > 0 ) { batchMenus.push({ label: "批量调整体检类别", onClick: () => { // this.doctorType = 'check'
this.dataTransOpts.plus.PatientRegisterEditMedicalTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditMedicalTypeBatch = true; }, }); }
if ( checkPagePriv(this.pagePriv.privs, "批量调整人员类别") && this.multipleSelection.length > 0 ) { batchMenus.push({ label: "批量调整人员类别", onClick: () => { // this.doctorType = 'check'
this.dataTransOpts.plus.PatientRegisterEditPersonnelTypeBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditPersonnelTypeBatch = true; }, }); }
if ( checkPagePriv(this.pagePriv.privs, "批量调整备注") && this.multipleSelection.length > 0 ) { batchMenus.push({ label: "批量调整备注", onClick: () => { // this.doctorType = 'check'
this.dataTransOpts.plus.PatientRegisterEditRemarkBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditRemarkBatch = true; }, }); } if (batchMenus.length > 0) { items.push({ label: "批量操作", children: batchMenus }); } // 批量操作合集 ============ end
if (checkPagePriv(this.pagePriv.privs, "查看云胶片二维码")) items.push({ label: "查看云胶片二维码", onClick: () => { this.makeQrCode(row); }, });
items.push({ label: "----------------" }); this.$contextmenu({ items, event, x: event.clientX, y: event.clientY, customClass: "custom-class", zIndex: 3, minWidth: 80, });
this.rClickRow = null; return false; },
//批量更新分组按钮
btnGroupBatch() { let customerOrgId = this.refQueryCondition.customerOrgId; if (!customerOrgId) { this.$message.warning({ showClose: true, message: "请选择单位" }); return; } //取消勾选,换成选择的方式 start
// this.multipleSelection = [];
// this.tableData.forEach((e) => {
// if (e.choosed) this.multipleSelection.push(e);
// });
//取消勾选,换成选择的方式 end
if (this.multipleSelection.length < 1) { this.$message.info({ showClose: true, message: "请选择要操作的记录!", }); return; } this.dataTransOpts.plus.PatientRegisterEditGroupBatch++; this.dialogWin.PatientRegisterEditGroupBatch = true; },
//批量更新组合项目
btnAsbBatch() { let customerOrgId = this.refQueryCondition.customerOrgId; if (!customerOrgId) { this.$message.warning({ showClose: true, message: "请选择单位" }); return; } //取消勾选,换成选择的方式 start
// this.multipleSelection = [];
// this.tableData.forEach((e) => {
// if (e.choosed) this.multipleSelection.push(e);
// });
//取消勾选,换成选择的方式 end
if (this.multipleSelection.length < 1) { this.$message.warning({ showClose: true, message: "请选择要操作的记录", }); return; }
this.dataTransOpts.plus.PatientRegisterEditItemBatch++; //如果放在弹窗显示后面,在首次加载子组件时,会触发两次数据处理
this.dialogWin.PatientRegisterEditItemBatch = true; },
//批量更新组合项目
async btnItemBatch() { if (this.multipleSelection.length < 1) { this.$message.warning({ showClose: true, message: "请选择要操作的记录", }); return; }
this.elProgress.display = true; this.elProgress.percentage = 0;
for (let i = 0; i < this.multipleSelection.length; i++) { let patientRegisterId = this.multipleSelection[i].id; try { await postapi("/api/app/RegisterCheckItem/SyncRegisterCheckItem", { patientRegisterId, }); } catch (error) { console.log("printPromise", error); }
this.elProgress.percentage = Math.floor( ((i + 1) * 100) / this.multipleSelection.length ); } this.elProgress.display = false; },
//检验申请
async lisRequest(row) { let isPrintLisRequest = false; let res = null; if (row.completeFlag == "0") { this.$message.info({ showClose: true, message: "预登记人员,不可执行此操作!", }); return; }
try { res = await postapi( `/api/app/lisrequest/setlisrequest?PatientRegisterId=${row.id}` ); // console.log(`/ api / app / lisrequest / setlisrequest ? PatientRegisterId = ${ prId }`,res);
} catch (error) { return; } if (res.code > -1) { isPrintLisRequest = true; }
//重复申请,重打
if (res.code == -1 && res.message.indexOf("已申请") > -1) { isPrintLisRequest = true; }
if (!isPrintLisRequest) return;
try { await this.$confirm("是否打印检验申请单?", "提示", { confirmButtonText: "是", cancelButtonText: "否", type: "info", showClose: false, closeOnClickModal: false, closeOnPressEscape: false, }); } catch (error) { return; } //打印检验申请单
this.lisPrint(row, "0003", false); },
//检验条码打印 改造成 promise
lisPrint(row, ReportCode, isPreview) { return new Promise((resolve, reject) => { if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); if (!row.completeFlag || row.completeFlag == "0") reject("预登记人员,不可执行此操作!");
let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); let toOutShell = { ReportCode, token, IsMoreLabel: "Y", isBuildImage: "N", IsUploadPdf: "N", preViewCanPrint: "N", Parameters: [ { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, ], BusinessCode: row.id, }; console.log("this.$peisAPI.toOutShell", toOutShell); if (isPreview) { this.$peisAPI .printPre(JSON.stringify(toOutShell)) .then((res) => { console.log("this.$peisAPI.printPre", res); let lres = JSON.parse(res); if (lres.code > -1) { resolve(lres); } else { reject(lres.message); } }) .catch((err) => { reject(err); }); } else { this.$peisAPI .print(JSON.stringify(toOutShell)) .then((res) => { console.log("this.$peisAPI.print", res); let lres = JSON.parse(res); if (lres.code < 0) { reject(lres.message); } else { return postapi("/api/app/lisrequest/updatelisrequestisprint", { operateType: 1, patientRegisterId: row.id, }); } }) .then((res) => { if (res && res.code < 0) { reject(res.message); } else { resolve(res); } }) .catch((err) => { reject(err); }); } }); },
//pacs条码打印
pacsPrint(row, ReportCode, isPreview) { return new Promise((resolve, reject) => { if (!this.$peisAPI) reject("此功能,需要在壳客户端才可运行!"); if (!row.completeFlag || row.completeFlag == "0") reject("预登记人员,不可执行此操作!");
let token = window.sessionStorage.getItem("token"); let user = window.sessionStorage.getItem("user"); let toOutShell = { ReportCode, token, IsMoreLabel: "Y", isBuildImage: "N", IsUploadPdf: "N", preViewCanPrint: "N", Parameters: [ { Name: "printer", Value: user }, { Name: "hisLog", Value: "pic/hisLog.jpg" }, ], BusinessCode: row.id, }; console.log("this.$peisAPI.print", toOutShell); if (isPreview) { this.$peisAPI .printPre(JSON.stringify(toOutShell)) .then((res) => { console.log("this.$peisAPI.printPre", res); let lres = JSON.parse(res); if (lres.code > -1) { resolve(lres); } else { reject(lres.message); } }) .catch((err) => { reject(err); }); } else { this.$peisAPI .print(JSON.stringify(toOutShell)) .then((res) => { console.log("this.$peisAPI.print", res); let lres = JSON.parse(res); if (lres.code > -1) { resolve(lres); } else { reject(lres.message); } }) .catch((err) => { reject(err); }); } }); },
// 导入检查检验结果
// checkType:pacs检查/lis检验/diAn迪安
importResult(checkType, row) { let url = "/api/app/ImportLisResult/ImportResultByPatientRegisterId"; switch (checkType) { case "pacs": //常规 pacs 数据导入
url = "/api/app/ImportPacsResult/ImportResultByPatientRegisterId"; postapi(url, { patientRegisterId: row.id }) .then((res) => { if (res.code > -1) { return postapi( "/api/app/ImportElectrocardiogramResult/ImportElectrocardiogramResultByPatientRegisterId", { patientRegisterId: row.id } ); } }) .then((res) => { if (res && res.code > -1) { this.$message.success({ showClose: true, message: "导入成功!", }); this.rowClick(row); } }); break; case "diAn": //迪安数据导入
url = "/api/app/ImportLisResult/ImportDianResultByPatientRegisterId"; postapi(url, { patientRegisterId: row.id }).then((res) => { if (res.code > -1) { this.$message.success({ showClose: true, message: "导入成功!" }); this.rowClick(row); } }); break; default: //常规lis数据导入
postapi(url, { patientRegisterId: row.id }).then((res) => { if (res.code > -1) { this.$message.success({ showClose: true, message: "导入成功!" }); this.rowClick(row); } }); break; } },
//生成云胶片二维码
makeQrCode(row) { //let canvas = this.$refs.canvas;
let url = `${this.qrCode.url}?reportparam=条码号&mrn=条码号`; //`https://ccjktj.cn:5081/?reportparam=条码号&mrn=条码号`
if (row?.patientRegisterNo) { url = `${this.qrCode.url}?reportparam=${row.patientRegisterNo}&mrn=${row.patientRegisterNo}`; this.qrCode.barcodeNo = row.patientRegisterNo; } if (row?.patientName) { this.qrCode.patientName = row.patientName; } this.qrCode.patientName = this.qrCode.patientName.substring(0, 1) + "*" + this.qrCode.patientName.substring(2);
// canvas 方式不可取,有延时
// this.$nextTick(() => {
// QRCode.toCanvas(canvas, url, { errorCorrectionLevel: 'H' })
// .then(() => {
// console.log('success!')
// })
// .catch(err => {
// this.dialogQrCode = false
// this.$message.error({ showClose: true, message: err.message })
// console.log('fail!', err.message)
// })
// .finally(() => {
// console.log('url:', url)
// })
// })
QRCode.toDataURL(url, { errorCorrectionLevel: "H" }) .then((res) => { console.log(res); this.qrCode.personUrl = res; this.qrCode.winDisplay = true; }) .catch((err) => { this.$message.error({ showClose: true, message: err.message }); console.error(err); }) .finally(() => { console.log("url", url); }); }, formatJson(filterVal, jsonData) { return jsonData.map((v) => { return filterVal.map((j) => v[j]); }); }, //通用导出
btnExport(elId) { require.ensure([], () => { const tHeader = []; const filterVal = []; this.dragCol.forEach((e) => { tHeader.push(e.label); filterVal.push(e.prop); }); const list = this.tableData.map((row, index) => { const newRow = { ...row }; // 创建副本,避免修改原数据
// 使用对象映射优化数据转换
newRow.sn = index + 1; if (newRow.completeFlag) newRow.completeFlag = newRow.isAudit == "Y" ? "已审核" : this.dddw( this.dict.completeFlag, "id", newRow.completeFlag, "displayName" ); if (newRow.guidePrintTimes?.toString()) newRow.guidePrintTimes = newRow.guidePrintTimes > 0 ? "打印" : ""; if (newRow.isLock) newRow.isLock = newRow.isLock == "Y" ? "锁住" : ""; if (newRow.sexId) newRow.sexId = this.dddw( this.dict.sex, "id", newRow.sexId, "displayName" ); if (newRow.patientRegisterNo) newRow.patientRegisterNo = "\u200C" + newRow.patientRegisterNo; if (newRow.patientNo) newRow.patientNo = "\u200C" + newRow.patientNo; if ( newRow.medicalPackageId !== this.dict.personOrgId && newRow.customerOrgId === this.dict.personOrgId ) { newRow.groupPack = newRow.medicalPackageName; } else if ( newRow.medicalPackageId !== this.dict.personOrgId && newRow.customerOrgId !== this.dict.personOrgId ) { newRow.groupPack = newRow.customerOrgGroupName; } if (newRow.idNo) newRow.idNo = "\u200C" + newRow.idNo; if (newRow.birthDate) newRow.birthDate = moment(newRow.birthDate).format("yyyy-MM-DD"); if (newRow.medicalTypeId) newRow.medicalTypeId = this.dddw( this.dict.medicalType, "id", newRow.medicalTypeId, "displayName" ); if (newRow.isVip) newRow.isVip = newRow.isVip == "Y" ? "是" : "否"; if (newRow.isUpload) newRow.isUpload = newRow.isUpload == "Y" ? "是" : "否"; if (newRow.qztlType) newRow.qztlType = this.dddw( this.dict.qztlType, "id", newRow.qztlType, "displayName" ); if (newRow.qztlIsMain) newRow.qztlIsMain = newRow.qztlIsMain == "Y" ? "是" : "否"; if (newRow.qztlIsCy) newRow.qztlIsCy = newRow.qztlIsCy == "Y" ? "是" : "否"; if (newRow.qztlIsCw) newRow.qztlIsCw = newRow.qztlIsCw == "Y" ? "是" : "否"; if (newRow.qztlIsGt) newRow.qztlIsGt = newRow.qztlIsGt == "Y" ? "是" : "否"; if (newRow.qztlIsWh) newRow.qztlIsWh = newRow.qztlIsWh == "Y" ? "是" : "否"; if (newRow.qztlIsFj) newRow.qztlIsFj = newRow.qztlIsFj == "Y" ? "是" : "否";
return newRow; }); const data = list.map((v) => filterVal.map((j) => v[j])); exportJsonToExcel(tHeader, data, '人员登记列表' + moment(new Date()).format('yyyyMMDDHHmmss')); //"列表excel" 是下载后的表名 可修改
});
// this.dragCol.forEach((e) => {
// this.jsonFields[e.label] = e.prop;
// });
// let tableDatas = deepCopy(this.tableData)
// tableDatas.forEach((e, index) => {
// if (index) e.sn = index + 1
// if (e.completeFlag) e.completeFlag = e.isAudit == "Y" ? "已审核" : dddw(this.dict.completeFlag, "id", e.completeFlag, "displayName")
// if (e.guidePrintTimes.toString()) e.guidePrintTimes = e.guidePrintTimes > 0 ? '打印' : ''
// if (e.isLock) e.isLock = e.isLock == 'Y' ? '锁住' : ''
// if (e.sexId) e.sexId = dddw(this.dict.sex, "id", e.sexId, "displayName")
// if (e.patientRegisterNo) e.patientRegisterNo = '\u200C' + e.patientRegisterNo
// if (e.patientNo) e.patientNo = '\u200C' + e.patientNo
// if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId === this.dict.personOrgId) {
// e.groupPack = e.medicalPackageName // dddw(this.dict.medicalPackage, "id", e.medicalPackageId, "displayName")
// } else if (e.medicalPackageId !== this.dict.personOrgId && e.customerOrgId !== this.dict.personOrgId) {
// e.groupPack = e.customerOrgGroupName // dddw(this.dict.customerOrgGroupAll, "id", e.customerOrgGroupId, "displayName")
// }
// //if (e.nationId) e.nationId = dddw(this.dict.nation, "id", e.nationId, "displayName")
// if (e.idNo) e.idNo = '\u200C' + e.idNo
// if (e.birthDate) e.birthDate = moment(e.birthDate).format("yyyy-MM-DD")
// //if (e.maritalStatusId) e.maritalStatusId = dddw(this.dict.maritalStatus, "id", e.maritalStatusId, "displayName")
// if (e.medicalTypeId) e.medicalTypeId = dddw(this.dict.medicalType, "id", e.medicalTypeId, "displayName")
// //if (e.personnelTypeId) e.personnelTypeId = dddw(this.dict.personnelType, "id", e.personnelTypeId, "displayName")
// if (e.isVip) e.isVip = e.isVip == "Y" ? "是" : "否"
// if (e.isUpload) e.isUpload = e.isUpload == "Y" ? "是" : "否"
// if (e.qztlType) e.qztlType = dddw(this.dict.qztlType, "id", e.qztlType, "displayName")
// if (e.qztlIsMain) e.qztlIsMain = e.qztlIsMain == "Y" ? "是" : "否"
// if (e.qztlIsCy) e.qztlIsCy = e.qztlIsCy == "Y" ? "是" : "否"
// if (e.qztlIsCw) e.qztlIsCw = e.qztlIsCw == "Y" ? "是" : "否"
// if (e.qztlIsGt) e.qztlIsGt = e.qztlIsGt == "Y" ? "是" : "否"
// if (e.qztlIsWh) e.qztlIsWh = e.qztlIsWh == "Y" ? "是" : "否"
// if (e.qztlIsFj) e.qztlIsFj = e.qztlIsFj == "Y" ? "是" : "否"
// })
// this.tableName = '人员登记列表' + moment(new Date()).format('yyyyMMDDHHmmss') + '.xls'
// return tableDatas;
// const columns = this.$refs.info.getColumns(); // 获取列信息
// const data = this.$refs.info.getData(); // 获取数据
// console.log(columns)
// console.log(columns)
// const exportConf = { columns, data }; // 构建导出配置对象
// const filename = 'my_data.xlsx'; // 设置文件名
// const blob = exportTable(exportConf); // 导出数据为 Blob 对象
// saveAs(blob, filename); // 使用 file-saver 保存文件
// // 获取HTML元素(表格)
// // let table = document.getElementById(elId); //.cloneNode(true)
// this.$nextTick(() => {
// // let refsTable = this.$refs[elId] //.cloneNode(true) true
// let table = document.getElementById(elId)
// // console.log('table,refsTable', table, refsTable)
// let tableData = table.innerHTML
// let fileName = moment(new Date()).format('yyyyMMDDHHmmss')
// let blob = new Blob([tableData], { type: "text/plain;charset=utf-8" });
// FileSaver.saveAs(blob, fileName + '.xls');
// // 导出图片
// // 使用html2canvas将HTML元素转换为画布
// // let cloneTable = table.cloneNode(true) //[elId]
// /*
// html2canvas(table).then(canvas => {
// // 创建一个a元素用于下载
// const link = document.createElement('a');
// link.href = canvas.toDataURL('image/jpeg');
// link.download = fileName + '.jpg';
// document.body.appendChild(link);
// link.click();
// //document.body.removeChild(link);
// // // 创建一个PDF对象
// // var pdf = new jsPDF();
// // // 设置PDF的尺寸
// // pdf.addImage(canvas.toDataURL('image/png'), 'PNG', 0, 0, canvas.width, canvas.height);
// // // 导出PDF
// // pdf.save('员工信息表.pdf');
// });
// */
// })
},
// 点击扫码回收体检表按钮
btnScanRecover() { this.patientRegisterNo = ""; this.recover.dialog = true; this.$nextTick(() => { this.$refs["tmh"].focus(); //打开光标定位到条码栏里
}); },
//按条码号查个人数据
signByPatientRegisterNo() { // let patientRegisterNos = [this.patientRegisterNo]
// let body = {
// patientRegisterNos
// }
// //console.log(`/api/app/patientregister/getpatientregisterorpatient`, body)
// postapi('/api/app/PatientRegister/BatchRecoverGuideByPatientRegisterNo', body)
// .then((res) => {
// if (res.code > -1) {
// this.patientRegisterNo = ''
// this.$message.success({ showClose: true, message: '操作成功!' })
// }
// });
this.recover.barcodes = [this.recover.barcode]; postapi("/api/app/PatientRegister/BatchRecoverGuide", this.recover).then( (res) => { if (res.code > -1) { this.recover.barcode = ""; this.$message.success({ showClose: true, message: "操作成功!" }); } } ); },
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)
}, }); }); },
//合计
getSummaries(param) { console.log("getSummaries param", param); // if(!param){
// param = {
// columns:[{}, {}, {}, {}, {}, {}, {property: 'asbitemMoney'},{property: 'customerOrgGroupDetailMoney'}],
// data:this.customerOrgGroupAsbitems
// }
// }
const { columns, data } = param; const sumCol = [2, 3, 4, 7, 8]; //需合计的列
const sums = []; columns.forEach((column, index) => { //console.log('column, index,data',column, index,data)
//显示合计列
if (index === 1) { sums[index] = "合计"; return; }
//不合计的列
if (sumCol.indexOf(index) == -1) { sums[index] = ""; return; }
sums[index] = 0; data.forEach((e) => { if (!isNaN(e[column.property])) sums[index] += Number(e[column.property]); // * e['amount']
}); sums[index] = sums[index].toFixed(2); //+ ' 元';
}); return sums; }, },
//监听事件
watch: { // "refQueryCondition.customerOrgId": {
// // immediate: true, // 立即执行
// // deep: true, // 深度监听复杂类型内变化
// handler(newVal, oldVal) {
// //// console.log('watch:refQueryCondition.customerOrgId:',newVal,oldVal)
// // 单位变化时,清除当前列表信息
// if (newVal && newVal != oldVal) {
// this.tableData = [];
// this.dataTransOpts.tableM.register_check_asbitem = [];
// }
// },
// },
//触发查询事件
"refQueryCondition.queryConditionTimes"(newVal, oldVal) { if (newVal != oldVal) { console.log('触发查询 refQueryCondition.queryConditionTimes', oldVal, newVal) this.Query(); } },
//新增后,触发赋值
// "patientRegister.patientRegisterRd.id"(newVal, oldVal) {
// if (newVal != oldVal) {
// //// console.log('patientRegister.patientRegisterRd.customerOrgId',this.patientRegister.patientRegisterRd.customerOrgId)
// objCopy(this.patientRegister.patientRegisterRd, this.form);
// }
// },
},};</script><style scoped>@import "../../assets/css/global_input.css";@import "../../assets/css/global_table.css";@import "../../assets/css/global.css";
.box { display: flex;}
.listBtn { margin-top: 5px; text-align: center;}
.btnClass { width: 100px;}</style>
|