患者管理
This commit is contained in:
parent
7fae09d0e9
commit
657d09468c
@ -49,48 +49,41 @@
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
<!-- 导入-->
|
||||
<!-- 导入添加-->
|
||||
<el-dialog title="导入" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||
<el-form-item
|
||||
v-for="(item, index) in form.deptAliasVOS"
|
||||
:key="index"
|
||||
:rules="rules.deptAliasVOS.departmentName"
|
||||
:prop="`deptAliasVOS.${index}.departmentName`"
|
||||
>
|
||||
<template slot="label">
|
||||
{{ item.deptAlias }}
|
||||
</template>
|
||||
<el-select
|
||||
v-model="item.departmentName"
|
||||
placeholder="请选择科室"
|
||||
style="width: 208px"
|
||||
@change="changeway($event, index)"
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px">
|
||||
<div v-for="(item, index) in form.deptAliasVOS" :key="index">
|
||||
<el-form-item
|
||||
required
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in form.departments"
|
||||
:key="item.id"
|
||||
:label="item.departmentName"
|
||||
:value="item.id"
|
||||
<template slot="label">
|
||||
{{ item.deptAlias }}
|
||||
</template>
|
||||
<el-select
|
||||
v-model="item.departmentName"
|
||||
placeholder="请选择科室"
|
||||
style="width: 208px"
|
||||
@change="changeway($event, index)"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<!-- <el-button
|
||||
v-if="!form.departments"
|
||||
type="primary"
|
||||
plain
|
||||
style="margin-left: 8px"
|
||||
@click="additem(item, index)"
|
||||
>添加</el-button
|
||||
> -->
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
style="margin-left: 8px"
|
||||
@click="additem(item, index)"
|
||||
>添加</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-option
|
||||
v-for="item in form.departments"
|
||||
:key="item.id"
|
||||
:label="item.departmentName"
|
||||
:value="item.departmentName"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
<el-button
|
||||
v-if="departmentsshow"
|
||||
type="primary"
|
||||
plain
|
||||
style="margin-left: 8px"
|
||||
@click="additem(item, index)"
|
||||
>添加</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
@ -130,7 +123,9 @@
|
||||
</div>
|
||||
<div>2.最大支持2MB的xls/xlsx文件</div>
|
||||
<div>3.一次导入患者数量不能超过5000</div>
|
||||
<el-checkbox v-model="records" style="font-size: 12px;">自动去除当日重复记录</el-checkbox>
|
||||
<el-checkbox v-model="records" style="font-size: 12px"
|
||||
>自动去除当日重复记录</el-checkbox
|
||||
>
|
||||
</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -374,22 +369,28 @@
|
||||
<el-button @click="canceladd">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 手机号 -->
|
||||
<el-dialog
|
||||
title="查看"
|
||||
:visible.sync="openphone"
|
||||
width="900px"
|
||||
append-to-body
|
||||
>
|
||||
<el-table v-loading="loading" :data="patientInfoList">
|
||||
<el-table-column label="科室名称" align="center" prop="patientName" />
|
||||
<el-table-column label="就诊时间" align="center" prop="patientName" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column label="联系电话" align="center" prop="patientPhone" width="120" />
|
||||
<el-table-column label="年龄" align="center" prop="age" />
|
||||
<el-table-column label="诊断" align="center" prop="mainDiagnosis" />
|
||||
</el-table>
|
||||
<el-table v-loading="loading" :data="patientInfoList">
|
||||
<el-table-column label="科室名称" align="center" prop="deptAlias" />
|
||||
<el-table-column label="就诊时间" align="center" prop="visitDate" />
|
||||
<el-table-column label="姓名" align="center" prop="patientName" />
|
||||
<el-table-column
|
||||
label="联系电话"
|
||||
align="center"
|
||||
prop="patientPhone"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column label="年龄" align="center" prop="age" />
|
||||
<el-table-column label="诊断" align="center" prop="mainDiagnosis" />
|
||||
</el-table>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="cancelphone">取 消</el-button>
|
||||
<el-button type="primary" @click="cancelphone">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 遮罩层 -->
|
||||
@ -449,15 +450,16 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading:false,
|
||||
patientInfoList:[],
|
||||
datalist:[],
|
||||
openphone:false,
|
||||
departmentsshow: false,//添加按钮
|
||||
loading: false,
|
||||
patientInfoList: [],
|
||||
datalist: [],
|
||||
openphone: false,
|
||||
form: {},
|
||||
uploadopen: false,
|
||||
fileList: [],
|
||||
records:true,
|
||||
|
||||
records: true,
|
||||
|
||||
action: {
|
||||
data: {
|
||||
records: '',
|
||||
@ -478,7 +480,7 @@ export default {
|
||||
rules: {
|
||||
deptAliasVOS: {
|
||||
departmentName: [
|
||||
{ required: true, message: "科室不能为空", trigger: "blur" }
|
||||
{ required: true, message: "1111111", trigger: "blur", }
|
||||
|
||||
]
|
||||
},
|
||||
@ -495,7 +497,7 @@ export default {
|
||||
departmentoptions: [],
|
||||
nodeTypeoptions: [],
|
||||
isResouceShow: 1,
|
||||
indexadd: "",
|
||||
indexadd: undefined,
|
||||
showMask: false,//遮罩层
|
||||
progress: 0,
|
||||
// 表单校验--添加
|
||||
@ -551,38 +553,48 @@ export default {
|
||||
methods: {
|
||||
handleAvatarSuccess(response, file, fileList) {
|
||||
console.log(response, file, fileList, 'response, file, fileList')
|
||||
if (response.code == 500) {
|
||||
if (response.code == 500 && !response.data) {
|
||||
this.$modal.msgError(response.msg);
|
||||
|
||||
}else if(response.code == 500_2){
|
||||
this.openphone=true;
|
||||
} else if (response.code == 5002) {
|
||||
this.openphone = true;
|
||||
this.patientInfoList=response.data
|
||||
|
||||
} else if (response.code == 500 && response.data) {
|
||||
if (response.data.departments) {
|
||||
this.form = response.data
|
||||
} else {
|
||||
this.form.deptAliasVOS = response.data.deptAliasVOS
|
||||
this.form.departments = []
|
||||
this.departmentsshow = true
|
||||
}
|
||||
this.open = true;
|
||||
|
||||
}
|
||||
else if (response.code == 200 && !response.data) {
|
||||
else if (response.code == 200 && !response.data) {
|
||||
this.$modal.msgSuccess("导入成功");
|
||||
this.$emit('handleRules')
|
||||
} else if (response.code == 200 && response.data) {
|
||||
this.form = response.data
|
||||
this.open = true;
|
||||
|
||||
}
|
||||
this.uploadcancel();
|
||||
|
||||
|
||||
this.fileList = [];
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
},
|
||||
handlePreview(file) {
|
||||
console.log(file, '000000');
|
||||
},
|
||||
//导入相关的方法
|
||||
submitUpload() {
|
||||
console.log(this.action,'action')
|
||||
if(this.records==true){
|
||||
this.action.data.records=1
|
||||
if (this.records == true) {
|
||||
this.action.data.records = 1
|
||||
|
||||
}else{
|
||||
this.action.data.records=0
|
||||
} else {
|
||||
this.action.data.records = 0
|
||||
}
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
@ -599,8 +611,8 @@ export default {
|
||||
);
|
||||
},
|
||||
// 列表取消
|
||||
cancelphone(){
|
||||
this.openphone=false;
|
||||
cancelphone() {
|
||||
this.openphone = false;
|
||||
},
|
||||
// 导入
|
||||
handleUpload() {
|
||||
@ -609,7 +621,7 @@ export default {
|
||||
|
||||
|
||||
this.uploadopen = true;
|
||||
this.records=true;
|
||||
this.records = true;
|
||||
|
||||
this.fileList = [];
|
||||
this.form = {};
|
||||
@ -660,7 +672,9 @@ export default {
|
||||
// 点击事件
|
||||
changeway(e, index) {
|
||||
console.log(e, index, 'e')
|
||||
this.form.deptAliasVOS[index].departmentName = this.form.departments.find(f => f.id == e).departmentName
|
||||
// this.$set(this.form.deptAliasVOS[this.indexadd], 'departmentName', this.formadd.departmentName)
|
||||
|
||||
// this.form.deptAliasVOS[index].departmentName = this.form.departments.find(f => f.id == e).departmentName
|
||||
// this.form.deptAliasVOS[index].departmentId = e
|
||||
|
||||
this.$nextTick(() => {
|
||||
@ -814,6 +828,7 @@ export default {
|
||||
},
|
||||
/** 提交按钮 --添加*/
|
||||
submitFormadd() {
|
||||
console.log(this.form, 'this.forma000000000000000000')
|
||||
let reg = new RegExp("-", "g");
|
||||
if (this.formadd.establishDate && this.formadd.revokeDate && new Date(this.formadd.establishDate.replace(reg, "/")) >
|
||||
new Date(this.formadd.revokeDate.replace(reg, "/"))) {
|
||||
@ -823,18 +838,21 @@ export default {
|
||||
this.$refs["formadd"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (!this.formadd.hospitalAgencyId) {
|
||||
this.formadd.hospitalAgencyId = this.formadd.hospitalAgencyIdtwo
|
||||
}
|
||||
// this.formadd.hospitalAgencyId = this.formadd.hospitalAgencyIdtwo
|
||||
this.formadd.hospitalAgencyId = this.formadd.hospitalAgencyIdtwo
|
||||
}
|
||||
var obj = {
|
||||
departmentName: this.formadd.departmentName,
|
||||
id: ''
|
||||
}
|
||||
this.form.departments.push(obj)
|
||||
this.form.deptAliasVOS[this.indexadd].departmentName = this.formadd.departmentName
|
||||
console.log(this.formadd, 'this.formadd')
|
||||
console.log(this.form, 'this.form')
|
||||
addDepartment(this.formadd).then((response) => {
|
||||
this.$modal.msgSuccess("添加成功");
|
||||
this.form.departments.push(obj)
|
||||
console.log(this.form.deptAliasVOS)
|
||||
// this.form.deptAliasVOS[this.indexadd].departmentName = this.formadd.departmentName
|
||||
this.$set(this.form.deptAliasVOS[this.indexadd], 'departmentName', this.formadd.departmentName)
|
||||
// this.$forceUpdate()
|
||||
this.openadd = false;
|
||||
// this.getList();
|
||||
});
|
||||
@ -844,16 +862,32 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form, 'this.form确定')
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
secondaryUpload(this.form).then(response => {
|
||||
// this.$forceUpdate()
|
||||
var emptyItems = []
|
||||
emptyItems = this.form.deptAliasVOS.filter(f => f.departmentName=="" || f.departmentName==null)
|
||||
console.log(emptyItems, 'this.emptyItems')
|
||||
|
||||
if (emptyItems.length > 0) {
|
||||
this.$modal.msgError("必填项请填写完整,再进行提交");
|
||||
}else{
|
||||
secondaryUpload(this.form).then(response => {
|
||||
this.$modal.msgSuccess("保存成功");
|
||||
this.open = false;
|
||||
this.$emit('handleRules')
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
||||
// this.$refs["form"].validate(valid => {
|
||||
// if (valid) {
|
||||
// secondaryUpload(this.form).then(response => {
|
||||
// this.$modal.msgSuccess("保存成功");
|
||||
// this.open = false;
|
||||
// this.$emit('handleRules')
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
},
|
||||
// 屏幕resize监听
|
||||
screenChange() {
|
||||
@ -905,12 +939,12 @@ export default {
|
||||
height: 28px !important;
|
||||
}
|
||||
}
|
||||
::v-deep .el-checkbox__label{
|
||||
::v-deep .el-checkbox__label {
|
||||
font-size: 12px;
|
||||
}
|
||||
::v-deep .el-checkbox__inner{
|
||||
::v-deep .el-checkbox__inner {
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
height: 12px;
|
||||
}
|
||||
.el-cascader .el-input input::-webkit-input-placeholder {
|
||||
color: black;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user