Browse Source

impor

master
pengjun 2 years ago
parent
commit
535d5912d8
  1. 8
      src/components/patientRegister/PatientRegisterList.vue
  2. 285
      src/views/customerOrg/patientRegisterImport.vue

8
src/components/patientRegister/PatientRegisterList.vue

@ -759,6 +759,14 @@ export default {
//
async Query() {
//
this.dataTransOpts.tableS.patient_register.id = ''
this.tableDataCurrentRow = {} //
this.tableData = []
setTimeout(() => {
this.dataTransOpts.refresh.register_asbitem.M++ //
}, 10);
this.loadOpts = Object.assign(this.loadOpts, this.loadOptsInit)
await this.getPrList()
},

285
src/views/customerOrg/patientRegisterImport.vue

@ -1,40 +1,33 @@
<template>
<div>
<!--主体-->
<div>
<div class="middlebox">
<div class="contenttitle">
体检登记 /
<span class="contenttitleBold"
>批量预登记</span
>
<span class="contenttitleBold">批量预登记</span>
</div>
</div>
<div style=" display: flex;
margin-bottom: 15px;
justify-content: space-between;
background-color: #fff;
border-radius: 8px;
padding: 15px;
margin-top: 7px;">
<div style="margin-bottom: 15px;display: flex;justify-content: space-between;
background-color: #fff;border-radius: 8px;padding: 15px;margin-top: 7px;">
<div></div>
<div style="display: flex;">
<div v-show="checkPagePriv(pagePriv.privs,'下载导入模版')" >
<a :underline="false" href="/files/单位体检人员名单导入模板.xlsx"><el-button class=" btnClass" size="small">下载导入模版</el-button></a>
<div style="padding: 0 5px;" v-show="checkPagePriv(pagePriv.privs, '下载导入模版')">
<a :underline="false" href="/files/单位体检人员名单导入模板.xlsx"><el-button class="commonbutton"
size="small">下载导入模版</el-button></a>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'导入')" >
<el-button class=" btnClass" @click="seq = 0" size="small">导入</el-button>
<div style="padding: 0 5px;" v-show="checkPagePriv(pagePriv.privs, '导入')">
<el-button class="commonbutton" @click="seq = 0" size="small">导入</el-button>
</div>
<div v-show="checkPagePriv(pagePriv.privs,'导入后结果状态导出')" >
<el-button class=" btnClass" @click="btnExport('tableData')" size="small">导入后结果状态导出</el-button>
<div style="padding: 0 5px;" v-show="checkPagePriv(pagePriv.privs, '导入后结果状态导出')">
<el-button class="commonbutton" @click="btnExport('tableData')" size="small" style="width:140px;">导入后结果状态导出</el-button>
</div>
</div>
</div>
<div id="tableData" style=" padding: 15px;
background-color: #fff;
border-radius: 8px;">
<div id="tableData" style="padding: 15px;background-color: #fff;border-radius: 8px;">
<el-table :data="tableData" v-if="mode == '10'" :row-class-name="importRowClassName"
:height="window.pageHeight < 600 ? 440 : (window.pageHeight - 210)"
highlight-current-row size="small" :summary-method="getSummaries" show-summary>
:height="window.pageHeight < 600 ? 440 : (window.pageHeight - 210)" highlight-current-row size="small"
:summary-method="getSummaries" show-summary>
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column prop="importState" label="导入状态" min-width="80" sortable />
<el-table-column prop="importDes" label="导入描述" min-width="180" sortable />
@ -42,8 +35,7 @@
:label="item.dataLabel || item.dispLabel" min-width="100" />
</el-table>
<el-table :data="tableData" border v-if="mode == '20'" :row-class-name="importRowClassName"
:height="window.pageHeight < 600 ? 440 : (window.pageHeight - 160)"
highlight-current-row size="small" >
:height="window.pageHeight < 600 ? 440 : (window.pageHeight - 160)" highlight-current-row size="small">
<el-table-column type="index" label="序号" width="40" align="center" />
<el-table-column prop="importState" label="导入状态" min-width="80" sortable />
<el-table-column prop="importDes" label="导入描述" min-width="180" sortable />
@ -75,8 +67,10 @@
</div>
</div>
<el-dialog title="请选择导入方式" :visible.sync="dialogGroup.mode" width="700px" :show-close="false"
:append-to-body="true" :close-on-click-modal="false">
<!--弹窗-->
<div>
<el-dialog title="请选择导入方式" :visible.sync="dialogGroup.mode" width="700px" :show-close="false" :append-to-body="true"
:close-on-click-modal="false">
<div style="height:400px;margin-left: 200px;">
<br /><el-radio v-model="mode" label="10">从Excle导入</el-radio>
<br />
@ -101,9 +95,9 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="seq++">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="seq++">下一步</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
@ -111,24 +105,25 @@
:append-to-body="true" :close-on-click-modal="false">
<div style="height:400px;padding: 0 50px; ">
<!-- webkitdirectory 选择文件属性 multiple 多选属性-->
<div><input ref="fileNames" type="file" accept=".xlsx,.xls" @change="changeFileChoose" @focus="fileGetFocus"/></div>
<div><input ref="fileNames" type="file" accept=".xlsx,.xls" @change="changeFileChoose" @focus="fileGetFocus" />
</div>
<div style="margin: 5px 70px;width:240px;">
<el-table :data="sheetNames" border ref="sheetNames"
height="300" row-click="chooseSheetName"
<el-table :data="sheetNames" border ref="sheetNames" height="300" row-click="chooseSheetName"
highlight-current-row size="small">
<el-table-column prop="sheetName" label="Excel表单名" min-width="200" align="center" />
</el-table>
</div>
<div style="display: flex;flex-wrap: wrap;">
<span style="margin-top: 6px;">标题行 </span>
<el-input type="number" id="fileNames" v-model="readDataOpts.titleRow" size="small" style="width:60px;margin: 0 5px;"/>
<el-input type="number" id="fileNames" v-model="readDataOpts.titleRow" size="small"
style="width:60px;margin: 0 5px;" />
<span style="margin-top: 6px;"></span>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="seq++">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="seq++">下一步</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
@ -140,26 +135,32 @@
2身份证号有值且合法时将以身份证号为主自动换算性别出生日期及年龄<br>
</div>
<div style="margin: 5px 0px 0px;" @contextmenu.prevent=""> <!-- -->
<el-table :data="excelData" border ref="excelData" @header-contextmenu="headerContextmenu"
height="360" @row-click="chooseDataImport" row-key="id"
highlight-current-row size="small" :row-class-name="handleRowClassName">
<el-table :data="excelData" border ref="excelData" @header-contextmenu="headerContextmenu" height="360"
@row-click="chooseDataImport" row-key="id" highlight-current-row size="small"
:row-class-name="handleRowClassName">
<el-table-column type="index" align="center" label="序号" min-width="40" />
<!--
<el-table-column prop="choosed" align="center" label="选中" min-width="40"/>
-->
<el-table-column v-for="(item,index) in excelCols" :key="`col_${index}`" :prop="item.dispLabel" align="center"
:label="(item.val ? '√':'') + (item.dataLabel || item.dispLabel)" :min-width="100+index"/>
<el-table-column v-for="(item, index) in excelCols" :key="`col_${index}`" :prop="item.dispLabel"
align="center" :label="(item.val ? '√' : '') + (item.dataLabel || item.dispLabel)"
:min-width="100 + index" />
</el-table>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnChoose('excelData','all')">全选</el-button>
<el-button type="primary" @click="btnChoose('excelData')" style="margin-right: 300px;">取消全选</el-button>
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="seq++">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
<div style="display: flex;justify-content: space-between;">
<div style="display: flex;">
<el-button class="commonbutton" type="primary" @click="btnChoose('excelData', 'all')">全选</el-button>
<el-button class="commonbutton" type="primary" @click="btnChoose('excelData')">取消全选</el-button>
</div>
<div style="display: flex;">
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="seq++">下一步</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</div>
</div>
</span>
</el-dialog>
@ -172,27 +173,18 @@
<div style="display: flex;margin:20px;">
<div>
<span>体检单位</span>
<el-cascader v-model="customerOrgIds" :options="customerOrgTree"
style="width:200px;" @change="changeCustomerOrg" filterable :filter-method="filterMethod"
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" style="width:260px;"
@change="changeCustomerOrg" filterable :filter-method="filterMethod"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:show-all-levels="false" size="small">
:show-all-levels="true" size="small">
</el-cascader>
</div>
<div style="margin-left: 20px">
<span>单位体检次数</span>
<el-select
v-model="customerOrgRegister"
placeholder="次数"
style="width: 60px; margin-left: 10px"
size="small"
value-key="id"
>
<el-option
v-for="item in customerOrgRegisterList"
:key="item.id"
:label="item.medicalTimes"
:value="item"
/>
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px"
size="small" value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
</div>
@ -220,9 +212,11 @@
</div>
<div style="display: flex;" v-if="dataImportOpts.isAutoCreatePatientNo">
<span style="margin-top:6px;">工卡号开始位置</span>
<el-input type="number" v-model="dataImportOpts.cardStartNum" size="small" style="width:60px;margin: 0 10px 0 0;"/>
<el-input type="number" v-model="dataImportOpts.cardStartNum" size="small"
style="width:60px;margin: 0 10px 0 0;" />
<span style="margin-top:6px;">长度</span>
<el-input type="number" v-model="dataImportOpts.cardLength" size="small" style="width:60px;margin: 0 10px 0 0;" />
<el-input type="number" v-model="dataImportOpts.cardLength" size="small"
style="width:60px;margin: 0 10px 0 0;" />
<span style="margin-top:6px;"> 不足长度时前面补0</span>
</div>
</div>
@ -233,17 +227,16 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="btnImport">确定导入</el-button>
<el-button @click="seq = -1">关闭</el-button>
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="btnImport">确定导入</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
<el-dialog title="同名人员信息确认" :visible.sync="dialogSameMan" width="500px" :show-close="false"
:close-on-click-modal="false"> <!--:append-to-body="true" -->
<div style="margin: 5px 0px 0px;"> <!-- -->
<el-table :data="sameMans" border ref="sameMans"
height="260" @row-click="rowClickSameMan" row-key="patientId"
<el-table :data="sameMans" border ref="sameMans" height="260" @row-click="rowClickSameMan" row-key="patientId"
highlight-current-row size="small">
<el-table-column type="index" align="center" label="序号" min-width="40" />
<el-table-column prop="patientNo" align="center" label="档案号" min-width="80" />
@ -256,8 +249,8 @@
</el-table>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnOldMan">按档案人员导入</el-button>
<el-button type="primary" @click="btnNewMan">按新人方式导入</el-button>
<el-button class="commonbutton" type="primary" @click="btnOldMan">按档案人员导入</el-button>
<el-button class="commonbutton" type="primary" @click="btnNewMan">按新人方式导入</el-button>
</span>
</el-dialog>
@ -270,26 +263,17 @@
</div>
<div style="display: flex;margin:20px;">
<span class="spanLeftClass">体检单位</span>
<el-cascader v-model="query.customerOrgIds" :options="customerOrgTree"
style="width:200px;" @change="changeQueryCustomerOrg" filterable :filter-method="filterMethod"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:show-all-levels="false" size="small">
<el-cascader v-model="query.customerOrgIds" :options="customerOrgTree" style="width:260px;"
@change="changeQueryCustomerOrg" filterable :filter-method="filterMethod" popper-class="example"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }" :show-all-levels="true"
size="small">
</el-cascader>
<div style="margin-left: 20px">
<span>单位体检次数</span>
<el-select
v-model="query.customerOrgRegister"
placeholder="次数"
style="width: 60px; margin-left: 10px"
size="small"
value-key="id"
>
<el-option
v-for="item in query.customerOrgRegisterList"
:key="item.id"
:label="item.medicalTimes"
:value="item"
/>
<el-select v-model="query.customerOrgRegister" placeholder="次数" style="width: 60px; margin-left: 10px"
size="small" value-key="id">
<el-option v-for="item in query.customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
</div>
@ -316,21 +300,20 @@
<el-input placeholder="姓名" v-model="query.patientName" size="small" clearable style="width: 130px" />
<span class="spanMidClass">性别</span>
<el-select v-model="query.sexId" placeholder="请选择" style="width: 130px" size="small">
<el-option v-for="item in dict.forSex" :key="item.id" :label="item.displayName" :value="item.id" />
<el-option v-for="item in dict.sex" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
<div style="display: flex;margin:20px;">
<span class="spanLeftClass">状态</span>
<el-select v-model="query.completeFlag" placeholder="请选择" clearable style="width: 130px"
size="small">
<el-select v-model="query.completeFlag" placeholder="请选择" clearable style="width: 130px" size="small">
<el-option v-for="item in dict.completeFlag" :key="item.id" :label="item.displayName" :value="item.id" />
</el-select>
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="seq++">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="seq++">下一步</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
@ -342,9 +325,8 @@
按住 Ctr1 Shift 键可进行多选<br>
</div>
<div style="margin: 5px 0px 0px;"> <!-- -->
<el-table :data="prList" border ref="prList"
height="375" @row-click="rowClickPrList"
highlight-current-row size="small" :row-class-name="handleRowClassName">
<el-table :data="prList" border ref="prList" height="375" @row-click="rowClickPrList" highlight-current-row
size="small" :row-class-name="handleRowClassName">
<el-table-column type="index" align="center" label="序号" min-width="40" />
<el-table-column prop="patientNo" align="center" label="档案号" min-width="80" />
<el-table-column prop="medicalTimes" align="center" label="体检次数" min-width="80" />
@ -367,7 +349,8 @@
<el-table-column prop="creatorName" align="center" label="登记人员" min-width="80" />
<el-table-column prop="creationTime" align="center" label="登记日期" min-width="80">
<template slot-scope="scope">
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.creationTime)).format('yyyy-MM-DD'):'' }}</div>
<div>{{ scope.row.birthDate ? moment(new Date(scope.row.creationTime)).format('yyyy-MM-DD') : '' }}
</div>
</template>
</el-table-column>
@ -440,12 +423,17 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="btnChoose('prList','all')">全选</el-button>
<el-button type="primary" @click="btnChoose('prList')" style="margin-right: 300px;">取消全选</el-button>
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="seq++">下一步</el-button>
<el-button @click="seq = -1">关闭</el-button>
<div style="display: flex;justify-content: space-between;">
<div style="display: flex;">
<el-button class="commonbutton" type="primary" @click="btnChoose('prList', 'all')">全选</el-button>
<el-button class="commonbutton" type="primary" @click="btnChoose('prList')">取消全选</el-button>
</div>
<div style="display: flex;">
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="seq++">下一步</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</div>
</div>
</span>
</el-dialog>
@ -461,37 +449,25 @@
<el-radio v-model="newCustomerOrgFlag" :label="true">新单位或部门</el-radio>
</div>
<div style="margin-left:5px;" v-if="newCustomerOrgFlag">
<el-cascader v-model="customerOrgIds" :options="customerOrgTree"
style="width:200px;" @change="changeCustomerOrg" filterable :filter-method="filterMethod"
<el-cascader v-model="customerOrgIds" :options="customerOrgTree" popper-class="example" style="width:260px;"
@change="changeCustomerOrg" filterable :filter-method="filterMethod"
:props="{ checkStrictly: true, expandTrigger: 'hover', ...customerOrg.treeprops, }"
:show-all-levels="false" size="small">
:show-all-levels="true" size="small">
</el-cascader>
</div>
</div>
<div style="margin-top: 20px;margin-left:20px;">
<span>单位体检次数</span>
<el-select
v-model="customerOrgRegister"
placeholder="次数"
style="width: 80px;"
size="small"
value-key="id"
>
<el-option
v-for="item in customerOrgRegisterList"
:key="item.id"
:label="item.medicalTimes"
:value="item"
/>
<el-select v-model="customerOrgRegister" placeholder="次数" style="width: 80px;" size="small" value-key="id">
<el-option v-for="item in customerOrgRegisterList" :key="item.id" :label="item.medicalTimes"
:value="item" />
</el-select>
</div>
<div style="margin-top: 20px;margin-left:20px;">
<span>单位体检分组</span>
<el-select v-model="curGroup" filterable clearable value-key="id"
style="width:192px;" placeholder="请选择分组" size="small"
>
<el-option v-for="item in groups" :key="item.id" :label="item.displayName"
:value="item" />
<el-select v-model="curGroup" filterable clearable value-key="id" style="width:192px;" placeholder="请选择分组"
size="small">
<el-option v-for="item in groups" :key="item.id" :label="item.displayName" :value="item" />
</el-select>
</div>
<div style="margin-top:20px;margin-left:20px;">
@ -507,27 +483,17 @@
</div>
</div>
<span slot="footer" class="dialog-footer">
<el-button type="primary" @click="seq--">上一步</el-button>
<el-button type="primary" @click="btnImportFromDataBase">确定导入</el-button>
<el-button @click="seq = -1">关闭</el-button>
<el-button class="commonbutton" type="primary" @click="seq--">上一步</el-button>
<el-button class="commonbutton" type="primary" @click="btnImportFromDataBase">确定导入</el-button>
<el-button class="commonbutton" @click="seq = -1">关闭</el-button>
</span>
</el-dialog>
<!-- 通用进度条 -->
<el-dialog
title="数据处理中……"
:visible.sync="elProgress.display"
width="700px"
height="400"
:show-close="false"
:close-on-click-modal="false"
:append-to-body="true"
>
<el-dialog title="数据处理中……" :visible.sync="elProgress.display" width="700px" height="400" :show-close="false"
:close-on-click-modal="false" :append-to-body="true">
<ElProgressOCX />
</el-dialog>
</div>
</div>
</template>
<script>
@ -716,24 +682,9 @@ export default {
dictInit() {
//
getapi("/api/app/customerorg/getbycodeall").then((res) => {
// console.log("res.data", res.data);
if(res.code != -1){
this.customerOrgTree = res.data;
let lfind = arrayExistObj(this.customerOrgTree,'id',this.dict.personOrgId)
if(lfind > -1) this.customerOrgTree.splice(lfind,1)
tcdate(this.customerOrgTree)
}
});
this.getCustomerOrgTree()
//
getapi("/api/app/for-sex").then((res) => {
if (res.code == 1) {
this.dict.forSex = res.data;
}
});
//
//
getapi("/api/app/sex").then((res) => {
if (res.code == 1) {
this.dict.sex = res.data;
@ -762,7 +713,7 @@ export default {
//
getCustomerOrgTree() {
getapi("/api/app/customerorg/getbycodeall").then((res) => {
getapi("/api/app/customerorg/getbycodeall?IsHidePerson=1").then((res) => {
// console.log("res.data", res.data);
if (res.code != -1) {
this.customerOrgTree = res.data;
@ -1687,21 +1638,6 @@ export default {
@import '../../assets/css/global.css';
.btnClass{
margin-right: 10px;
padding: 0 5px;
height: 32px;
font-size: 14px;
font-weight: 500;
font-family: "NotoSansSC-Medium";
background-color: #396FFA;
color: #fff !important;
border: none;
}
.btnClass:hover, .btnClass:focus {
border-color: #c6e2ff;
background-color: #0046FB;
}
.spanLeftClass {
margin-top: 6px;
width: 70px;
@ -1719,5 +1655,4 @@ input[type="number"]::-webkit-outer-spin-button {
-webkit-appearance: button !important;
margin: 0 -12px 0 0 !important;
}
</style>
Loading…
Cancel
Save