This commit is contained in:
2024-03-12 14:11:49 +08:00
parent f0f84cf552
commit b2e451f5de
3 changed files with 125 additions and 21 deletions

View File

@ -345,21 +345,22 @@
</div>
</el-dialog>
<!-- // -->
<el-dialog title="导入患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false">
<el-dialog title="导入预住院患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" :action="action.url" :on-preview="handlePreview"
:headers="action.headers" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false"
:on-success="handleAvatarSuccess">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="line-height:25px">
<div>
1. <span style="color:#1890ff">下载导入模板</span>
1. <span style="color:#1890ff;cursor: pointer;" @click="importTemplate">下载导入模板</span>
</div>
<div>2.最大支持2MB的xls/xlsx文件</div>
<div>3.一次导入患者数量不能超过5000</div>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="uploadcancel"> </el-button>
<el-button type="primary" @click="submitUpload"> </el-button>
<el-button @click="uploadcancel"> </el-button>
</div>
</el-dialog>
@ -370,6 +371,7 @@
import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, updatePatientInfo } from "@/api/manage/patientInfo";
import { getAge } from "@/utils/age";
import { selectAgencyList, getDepartmentList, subordinateAgencyList } from "@/api/manage/selectAgencyList";
import { getToken } from '@/utils/auth'
export default {
name: "preHospitalized",
@ -455,7 +457,13 @@ export default {
appointmentDate: [
{ required: true, message: '请选择患者预约时间', trigger: 'change' }
],
}
},
action: {
headers: {
Authorization: 'Bearer ' + getToken(),
},
url: process.env.VUE_APP_BASE_API + '/manage/preHospital/importInfo'
},
};
},
created() {
@ -617,6 +625,10 @@ export default {
submitUpload() {
this.$refs.upload.submit();
},
handleAvatarSuccess() {
this.uploadcancel();
this.getList();
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
@ -732,6 +744,14 @@ export default {
this.queryParams.wardId = null
}
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/system/importDownload/downloadTemplate?fileType=prehospitalized",
{},
`预住院患者导入模板.xlsx`
);
},
}
};
</script>

View File

@ -351,21 +351,22 @@
</div>
</el-dialog>
<!-- // -->
<el-dialog title="导入患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false">
<el-dialog title="导入在院患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" :action="action.url" :headers="action.headers"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false"
:on-success="handleAvatarSuccess" :data="action.data">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="line-height:25px">
<div>
1. <span style="color:#1890ff">下载导入模板</span>
1. <span style="color:#1890ff;cursor: pointer;" @click="importTemplate">下载导入模板</span>
</div>
<div>2.最大支持2MB的xls/xlsx文件</div>
<div>3.一次导入患者数量不能超过5000</div>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="uploadcancel"> </el-button>
<el-button type="primary" @click="submitUpload"> </el-button>
<el-button @click="uploadcancel"> </el-button>
</div>
</el-dialog>
@ -376,6 +377,7 @@
import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, updatePatientInfo } from "@/api/manage/patientInfo";
import { getAge } from "@/utils/age";
import { selectAgencyList, getDepartmentList, subordinateAgencyList } from "@/api/manage/selectAgencyList";
import { getToken } from '@/utils/auth'
export default {
name: "visitin",
@ -464,7 +466,16 @@ export default {
admissionDate: [
{ required: true, message: '请选择患者入院时间', trigger: 'change' }
],
}
},
action: {
data: {
patientType: 'inhospital',
},
headers: {
Authorization: 'Bearer ' + getToken(),
},
url: process.env.VUE_APP_BASE_API + '/manage/visitRecord/importPatientInfo'
},
};
},
created() {
@ -641,6 +652,10 @@ export default {
submitUpload() {
this.$refs.upload.submit();
},
handleAvatarSuccess() {
this.uploadcancel();
this.getList();
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
@ -756,6 +771,14 @@ export default {
this.queryParams.wardId = null
}
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/system/importDownload/downloadTemplate?fileType=inhospital",
{},
`在院患者导入模板.xlsx`
);
},
}
};
</script>

View File

@ -116,7 +116,10 @@
v-hasPermi="['manage:preHospitalized:remove']">删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-upload2" size="mini" @click="handleUpload">导入</el-button>
<el-button type="warning" plain icon="el-icon-upload2" size="mini" @click="handleUpload">导入门诊患者</el-button>
</el-col>
<el-col :span="1.5">
<el-button type="warning" plain icon="el-icon-upload2" size="mini" @click="handleUploadtwo">导入出院患者</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
@ -283,8 +286,8 @@
</el-date-picker>
</el-form-item>
<el-form-item label="入院时间" prop="admissionDate" v-if="form.visitMethod == 'BE_IN_HOSPITAL'">
<el-date-picker clearable v-model="form.admissionDate" type="date" value-format="yyyy-MM-dd" style="width:200px"
placeholder="请选择入院时间">
<el-date-picker clearable v-model="form.admissionDate" type="date" value-format="yyyy-MM-dd"
style="width:200px" placeholder="请选择入院时间">
</el-date-picker>
</el-form-item>
<el-form-item label="病历内容">
@ -355,21 +358,41 @@
</el-dialog>
<!-- // -->
<el-dialog title="导入患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" action="https://jsonplaceholder.typicode.com/posts/"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false">
<el-dialog title="导入门诊患者信息" :visible.sync="uploadopen" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" :action="action.url" :headers="action.headers"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false"
:on-success="handleAvatarSuccess" :data="action.data">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="line-height:25px">
<div>
1. <span style="color:#1890ff">下载导入模板</span>
1. <span style="color:#1890ff;cursor: pointer;" @click="importTemplate">下载导入模板</span>
</div>
<div>2.最大支持2MB的xls/xlsx文件</div>
<div>3.一次导入患者数量不能超过5000</div>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="uploadcancel"> </el-button>
<el-button type="primary" @click="submitUpload"> </el-button>
<el-button @click="uploadcancel"> </el-button>
</div>
</el-dialog>
<el-dialog title="导入出院患者信息" :visible.sync="uploadopentwo" width="400px" append-to-body>
<el-upload drag class="upload-demo" ref="upload" :action="action.url" :headers="action.headers"
:on-preview="handlePreview" :on-remove="handleRemove" :file-list="fileList" :auto-upload="false"
:on-success="handleAvatarSuccess" :data="action.datatwo">
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip" slot="tip" style="line-height:25px">
<div>
1. <span style="color:#1890ff;cursor: pointer;" @click="importTemplatetwo">下载导入模板</span>
</div>
<div>2.最大支持2MB的xls/xlsx文件</div>
<div>3.一次导入患者数量不能超过5000</div>
</div>
</el-upload>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitUpload"> </el-button>
<el-button @click="uploadcancel"> </el-button>
</div>
</el-dialog>
@ -380,6 +403,7 @@
import { listPatientInfo, getPatientInfo, delPatientInfo, addPatientInfo, updatePatientInfo } from "@/api/manage/patientInfo";
import { getAge } from "@/utils/age";
import { selectAgencyList, getDepartmentList, subordinateAgencyList } from "@/api/manage/selectAgencyList";
import { getToken } from '@/utils/auth'
export default {
name: "visitout",
@ -423,6 +447,7 @@ export default {
//
open: false,
uploadopen: false,
uploadopentwo: false,
//
dischargeDate: [],
queryParams: {
@ -471,7 +496,19 @@ export default {
visitTime: [
{ required: true, message: '请选择患者就诊时间', trigger: 'change' }
],
}
},
action: {
data: {
patientType: 'outpatient',
},
datatwo: {
patientType: 'discharged',
},
headers: {
Authorization: 'Bearer ' + getToken(),
},
url: process.env.VUE_APP_BASE_API + '/manage/visitRecord/importPatientInfo'
},
};
},
created() {
@ -653,6 +690,10 @@ export default {
submitUpload() {
this.$refs.upload.submit();
},
handleAvatarSuccess() {
this.uploadcancel();
this.getList();
},
handleRemove(file, fileList) {
console.log(file, fileList);
},
@ -663,9 +704,13 @@ export default {
handleUpload() {
this.uploadopen = true
},
handleUploadtwo() {
this.uploadopentwo = true
},
//
uploadcancel() {
this.uploadopen = false
this.uploadopentwo = false
},
//list
selectAgencyinfo() {
@ -768,6 +813,22 @@ export default {
this.queryParams.wardId = null
}
},
/** 下载模板操作 */
importTemplate() {
this.download(
"/system/importDownload/downloadTemplate?fileType=outpatient",
{},
`门诊患者导入模板.xlsx`
);
},
/** 下载模板操作 */
importTemplatetwo() {
this.download(
"/system/importDownload/downloadTemplate?fileType=discharged",
{},
`出院患者导入模板.xlsx`
);
},
}
};
</script>