添加账号密码用户类型

This commit is contained in:
闫晓茹 2023-11-15 14:26:13 +08:00
parent 2ccb9373c8
commit eb03f48a48

View File

@ -1,15 +1,21 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch">
<el-form
:model="queryParams"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
>
<el-form-item label="所属医院" prop="hospitalId">
<el-button
type
class="stationbtn"
@click="clickinnerVisible(true)"
>{{ queryParams.hospitalName }}</el-button>
<el-button type class="stationbtn" @click="clickinnerVisible(true)">{{
queryParams.hospitalName
}}</el-button>
</el-form-item>
<el-form-item label="所属科室" prop="departmentId">
<el-button type class="stationbtn" @click="clicklist(true)">{{ queryParams.departmentName }}</el-button>
<el-button type class="stationbtn" @click="clicklist(true)">{{
queryParams.departmentName
}}</el-button>
</el-form-item>
<el-form-item label="人员名称" prop="personName">
<el-input
@ -29,19 +35,33 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<!-- <el-form-item label="身份证号" prop="cardNo">
<el-input
v-model="queryParams.cardNo"
placeholder="请输入身份证号"
<el-form-item label="用户类型" prop="status">
<el-select
v-model="queryParams.status"
placeholder="请选择用户类型"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>-->
style="width: 200px"
>
<el-option
v-for="item in statuslist"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
@ -54,7 +74,8 @@
size="mini"
@click="handleAdd"
v-hasPermi="['system:hospitalPerson:add']"
>新增</el-button>
>新增</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -65,7 +86,8 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:hospitalPerson:edit']"
>修改</el-button>
>修改</el-button
>
</el-col>
<el-col :span="1.5">
<el-button
@ -76,7 +98,8 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:hospitalPerson:remove']"
>删除</el-button>
>删除</el-button
>
</el-col>
<!-- <el-col :span="1.5">
<el-button
@ -89,7 +112,7 @@
>导出</el-button
>
</el-col>-->
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
</el-row>
<el-table
@ -108,12 +131,14 @@
<!-- <el-table-column label="身份证号" align="center" prop="cardNo" /> -->
<el-table-column label="人员职称" align="center" prop="academicTitle">
<template slot-scope="scope">
{{ scope.row.academicTitle == "RESIDENT_PHYSICIAN" ? "住院医师" : "" }}
{{
scope.row.academicTitle == "RESIDENT_PHYSICIAN" ? "住院医师" : ""
}}
{{ scope.row.academicTitle == "CHIEF_PHYSICIAN" ? "主任医师" : "" }}
{{
scope.row.academicTitle == "DEPUTY_CHIEF_PHYSICIAN"
? "副主任医师"
: ""
scope.row.academicTitle == "DEPUTY_CHIEF_PHYSICIAN"
? "副主任医师"
: ""
}}
{{ scope.row.academicTitle == "ATTENDING_DOCTOR" ? "主治医师" : "" }}
{{ scope.row.academicTitle == "PHYSICIAN" ? "医师" : "" }}
@ -122,7 +147,11 @@
</el-table-column>
<el-table-column label="咨询费用" align="center" prop="consultingFee" />
<!-- <el-table-column label="显示顺序" align="center" prop="personSort" /> -->
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column
label="操作"
align="center"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
<el-button
size="mini"
@ -130,14 +159,16 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:hospitalPerson:edit']"
>修改</el-button>
>修改</el-button
>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:hospitalPerson:remove']"
>删除</el-button>
>删除</el-button
>
</template>
</el-table-column>
</el-table>
@ -159,7 +190,13 @@
append-to-body
v-if="addopen"
>
<el-form ref="form" :model="form" :rules="rules" label-width="140px" :inline="true">
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="140px"
:inline="true"
>
<el-form-item label="所属医院" prop="hospitalId">
<el-button
type
@ -173,7 +210,8 @@
color: #c0c4cc;
overflow: hidden;
"
>{{ form.hospitalName }}</el-button>
>{{ form.hospitalName }}</el-button
>
<el-button
@click="clickinnerVisible(false)"
type
@ -185,7 +223,8 @@
padding-left: -10px;
overflow: hidden;
"
>{{ form.hospitalName }}</el-button>
>{{ form.hospitalName }}</el-button
>
</el-form-item>
<el-form-item label="所属科室" prop="departmentId">
<el-button
@ -199,7 +238,8 @@
color: #c0c4cc;
overflow: hidden;
"
>{{ form.departmentName }}</el-button>
>{{ form.departmentName }}</el-button
>
<el-button
@click="clicklist(false)"
type
@ -211,10 +251,15 @@
padding-left: -10px;
overflow: hidden;
"
>{{ form.departmentName }}</el-button>
>{{ form.departmentName }}</el-button
>
</el-form-item>
<el-form-item label="人员名称" prop="personName">
<el-input v-model="form.personName" maxlength="7" placeholder="请输入人员名称" />
<el-input
v-model="form.personName"
maxlength="7"
placeholder="请输入人员名称"
/>
</el-form-item>
<el-form-item label="联系电话" prop="personPhone">
<el-input
@ -225,7 +270,7 @@
/>
</el-form-item>
<el-form-item label="人员地址" prop="personAddress">
<el-form-item label="人员地址" prop="personAddress" >
<el-input
v-model="form.personAddress"
style="width: 210px"
@ -234,10 +279,18 @@
/>
</el-form-item>
<el-form-item label="身份证号">
<el-input maxlength="18" v-model="form.cardNo" placeholder="请输入身份证号" />
<el-input
maxlength="18"
v-model="form.cardNo"
placeholder="请输入身份证号"
/>
</el-form-item>
<el-form-item label="人员职称" prop="academicTitle">
<el-select v-model="form.academicTitle" placeholder="请选择" style="width: 210px">
<el-select
v-model="form.academicTitle"
placeholder="请选择"
style="width: 210px"
>
<el-option
v-for="item in options"
:key="item.value"
@ -262,8 +315,47 @@
placeholder="值越小,排名越靠前"
/>
</el-form-item>
<el-form-item label="账号" prop="personAccount">
<el-input
maxlength="20"
style="width: 210px"
v-model.number="form.personAccount"
placeholder="请输入账号"
/>
</el-form-item>
<el-form-item label="密码" prop="personPassword">
<el-input
show-password
style="width: 210px"
maxlength="20"
oninput="value=value.replace(/[^\d]/g,'')"
v-model.number="form.personPassword"
placeholder="请输入密码"
/>
</el-form-item>
<el-form-item label="用户类型" prop="status">
<el-select
v-model="form.status"
style="width: 210px"
placeholder="请选择用户类型"
clearable
>
<el-option
v-for="item in statuslist"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="人员头像" prop="personPictureUrl">
<stationAcatar @imgUrl="imgUrl2" :img="form.personPictureUrl" :type="'personPictureUrl'" />
<stationAcatar
@imgUrl="imgUrl2"
:img="form.personPictureUrl"
:type="'personPictureUrl'"
/>
</el-form-item>
<el-form-item label="个人简介" prop="personIntroduce">
<el-input
@ -281,7 +373,11 @@
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
>
<el-form-item label="证书名称">
<el-input maxlength="50" v-model="item.certificateName" placeholder="请输入证书名称" />
<el-input
maxlength="50"
v-model="item.certificateName"
placeholder="请输入证书名称"
/>
</el-form-item>
<el-form-item label="证书图片">
@ -341,17 +437,37 @@
:inline="true"
>
<el-form-item label="医院编码" prop="hospitalCode" label-width="120">
<el-input v-model="hospitalqueryParams.hospitalCode" placeholder="请输入科室编码" clearable />
<el-input
v-model="hospitalqueryParams.hospitalCode"
placeholder="请输入科室编码"
clearable
/>
</el-form-item>
<el-form-item label="医院名称" prop="hospitalName" label-width="120">
<el-input v-model="hospitalqueryParams.hospitalName" placeholder="请输入医院名称" clearable />
<el-input
v-model="hospitalqueryParams.hospitalName"
placeholder="请输入医院名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="info">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="info"
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="infolist" @cell-dblclick="nurseclick" v-loading="loading">
<el-table
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
@ -369,15 +485,28 @@
></el-button>
</template>
</el-table-column>
<el-table-column property="hospitalCode" label="医院编码" align="center"></el-table-column>
<el-table-column
property="hospitalCode"
label="医院编码"
align="center"
></el-table-column>
<el-table-column
property="hospitalName"
label="医院名称"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column property="hospitalAddress" label="医院地址" align="center"></el-table-column>
<el-table-column property="phone" label="联系电话" align="center" :show-overflow-tooltip="true"></el-table-column>
<el-table-column
property="hospitalAddress"
label="医院地址"
align="center"
></el-table-column>
<el-table-column
property="phone"
label="联系电话"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
</el-table>
<pagination
v-show="total2 > 0"
@ -403,17 +532,40 @@
:inline="true"
>
<el-form-item label="科室编码" prop="departmentCode" label-width="120">
<el-input v-model="departmentqueryParams.departmentCode" placeholder="请输入科室编码" clearable />
<el-input
v-model="departmentqueryParams.departmentCode"
placeholder="请输入科室编码"
clearable
/>
</el-form-item>
<el-form-item label="科室名称" prop="departmentName" label-width="120">
<el-input v-model="departmentqueryParams.departmentName" placeholder="请输入医院名称" clearable />
<el-input
v-model="departmentqueryParams.departmentName"
placeholder="请输入医院名称"
clearable
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="departmentList">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="departresetQuery">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="mini"
@click="departmentList"
>搜索</el-button
>
<el-button
icon="el-icon-refresh"
size="mini"
@click="departresetQuery"
>重置</el-button
>
</el-form-item>
</el-form>
<el-table :data="hospitalDepartmentList" @cell-dblclick="departmentclick" v-loading="loading">
<el-table
:data="hospitalDepartmentList"
@cell-dblclick="departmentclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
@ -431,7 +583,11 @@
></el-button>
</template>
</el-table-column>
<el-table-column property="departmentCode" label="科室编码" align="center"></el-table-column>
<el-table-column
property="departmentCode"
label="科室编码"
align="center"
></el-table-column>
<el-table-column
property="departmentName"
label="科室名称"
@ -439,7 +595,11 @@
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column property="departmentPhone" label="科室联系电话" align="center"></el-table-column>
<el-table-column
property="departmentPhone"
label="科室联系电话"
align="center"
></el-table-column>
<el-table-column
property="departmentAddress"
label="科室地址"
@ -466,7 +626,7 @@ import {
delHospitalPerson,
addHospitalPerson,
listHospitalDepartment,
updateHospitalPerson
updateHospitalPerson,
} from "@/api/system/hospitalPerson";
import editor from "@/components/Editor";
import stationAcatar from "../stationAvatar/index.vue";
@ -489,6 +649,20 @@ export default {
cb(new Error("请输入正确的联系电话"));
};
return {
statuslist: [
{
value: "1",
label: "家医医生 ",
},
{
value: "2",
label: "泉医医生 ",
},
{
value: "3",
label: "专病医生 ",
},
],
//
loading: true,
idd: 0,
@ -504,28 +678,28 @@ export default {
options: [
{
value: "CHIEF_PHYSICIAN",
label: "主任医师"
label: "主任医师",
},
{
value: "DEPUTY_CHIEF_PHYSICIAN",
label: "副主任医师"
label: "副主任医师",
},
{
value: "ATTENDING_DOCTOR",
label: "主治医师"
label: "主治医师",
},
{
value: "RESIDENT_PHYSICIAN",
label: "住院医师"
label: "住院医师",
},
{
value: "PHYSICIAN",
label: "医师"
label: "医师",
},
{
value: "HEALER",
label: "医士"
}
label: "医士",
},
],
value: "",
//
@ -572,7 +746,7 @@ export default {
personPictureUrl: null,
certificateSort: null,
certificateName: null,
certificateUrl: null
certificateUrl: null,
},
//
form: {
@ -582,14 +756,14 @@ export default {
hospitalqueryParams: {
pageNum: 1,
pageSize: 10,
hospitalCode: ""
hospitalCode: "",
},
departmentqueryParams: {
pageNum: 1,
pageSize: 10,
hospitalId: "",
departmentCode: "",
departmentName: ""
departmentName: "",
},
infolist: [],
deletUploadImages: [],
@ -599,74 +773,74 @@ export default {
{
required: true,
message: "请选择所属医院",
trigger: "blur"
}
trigger: "blur",
},
],
departmentId: [
{
required: true,
message: "请选择所属科室",
trigger: "blur"
}
trigger: "blur",
},
],
personName: [
{
required: true,
message: "请选择科室人员名称",
trigger: "blur"
}
trigger: "blur",
},
],
personAddress: [
{
required: true,
message: "请选择科室人员地址",
trigger: "blur"
}
trigger: "blur",
},
],
academicTitle: [
{
required: true,
message: "请选择人员职称",
trigger: "blur"
}
trigger: "blur",
},
],
personIntroduce: [
{
required: true,
trigger: "blur",
message: "请输入个人简介"
}
message: "请输入个人简介",
},
],
personSort: [
{
required: true,
message: "请选择排序",
trigger: "blur"
}
trigger: "blur",
},
],
consultingFee: [
{
required: true,
message: "请选择咨询费用",
trigger: "blur"
}
trigger: "blur",
},
],
personPictureUrl:[
personPictureUrl: [
{
required: true,
message: "请选择人员头像",
trigger: "blur"
}
trigger: "blur",
},
],
personPhone:[
{
required: true,
validator: checkMobile,
trigger: "blur",
message: "",
}
]
}
personPhone: [
{
required: true,
validator: checkMobile,
trigger: "blur",
message: "",
},
],
},
};
},
created() {
@ -700,7 +874,7 @@ export default {
this.objitem.push(imgUrlData.certificateUrl);
let items = JSON.parse(item);
if (items.idd && !items.id) {
this.form.hospitalPersonCertificateList.forEach(e => {
this.form.hospitalPersonCertificateList.forEach((e) => {
if (e.idd == items.idd) {
e.certificateUrl = items.certificateUrl;
}
@ -764,7 +938,7 @@ export default {
certificateName: null,
certificateSort: null,
certificateUrl: null,
idd: this.idd
idd: this.idd,
};
if (this.form.hospitalPersonCertificateList.length == 5) {
this.$message.error("最多只能5条");
@ -776,7 +950,7 @@ export default {
getList() {
this.loading = true;
// this.queryParams.hospitalId = this.form.hospitalId;
listHospitalPerson(this.queryParams).then(response => {
listHospitalPerson(this.queryParams).then((response) => {
this.hospitalPersonList = response.rows;
this.total = response.total;
this.loading = false;
@ -814,7 +988,7 @@ export default {
//
departmentList() {
this.departmentqueryParams.hospitalId = this.hospitalId;
listHospitalDepartment(this.departmentqueryParams).then(response => {
listHospitalDepartment(this.departmentqueryParams).then((response) => {
this.hospitalDepartmentList = response.rows;
this.total3 = response.total;
this.loading = false;
@ -826,7 +1000,7 @@ export default {
pageNum: 1,
pageSize: 10,
hospitalCode: "",
hospitalName: ""
hospitalName: "",
};
this.info();
},
@ -835,12 +1009,12 @@ export default {
pageNum: 1,
pageSize: 10,
departmentCode: "",
departmentName: ""
departmentName: "",
};
this.departmentList();
},
info() {
list(this.hospitalqueryParams).then(response => {
list(this.hospitalqueryParams).then((response) => {
this.infolist = response.rows;
this.total2 = response.total;
this.loading = false;
@ -850,17 +1024,17 @@ export default {
cancel() {
var obj = { pictureUrlList: [] };
if (this.form.hospitalPersonCertificateList) {
this.form.hospitalPersonCertificateList.forEach(e => {
this.form.hospitalPersonCertificateList.forEach((e) => {
obj.pictureUrlList.push(e.certificateUrl);
});
}
if (this.deletUploadImages.length > 0) {
updatePicture({
pictureUrlList: this.deletUploadImages
}).then(res => {});
pictureUrlList: this.deletUploadImages,
}).then((res) => {});
}
if (this.deletupdata.length > 0) {
updatePicture({ pictureUrlList: this.deletupdata }).then(res => {});
updatePicture({ pictureUrlList: this.deletupdata }).then((res) => {});
}
this.form.hospitalId = null;
this.departmentId = null;
@ -895,9 +1069,9 @@ export default {
certificateName: null,
certificateSort: null,
certificateUrl: null,
idd: 0
}
]
idd: 0,
},
],
};
this.deletUploadImages = [];
this.deletupdata = [];
@ -914,18 +1088,18 @@ export default {
this.hospitalId = "";
this.departmentqueryParams = {
pageNum: 1,
pageSize: 10
pageSize: 10,
};
this.queryParams = {
pageNum: 1,
pageSize: 10
pageSize: 10,
};
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id);
this.ids = selection.map((item) => item.id);
this.single = selection.length !== 1;
this.multiple = !selection.length;
},
@ -937,9 +1111,9 @@ export default {
certificateSort: "",
certificateName: "",
certificateUrl: "",
idd: this.idd
}
]
idd: this.idd,
},
],
};
this.departmentId = "";
this.reset();
@ -950,7 +1124,7 @@ export default {
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getHospitalPerson(id).then(response => {
getHospitalPerson(id).then((response) => {
this.form = response.data;
this.departmentId = response.data.departmentId;
this.hospitalId = response.data.hospitalId;
@ -962,18 +1136,19 @@ export default {
/** 提交按钮 */
submitForm() {
if (this.form.hospitalPersonCertificateList.length > 0) {
this.form.hospitalPersonCertificateList.forEach(e => {
this.form.hospitalPersonCertificateList.forEach((e) => {
if (!e.certificateName && !e.certificateUrl && !e.certificateSort) {
this.form.hospitalPersonCertificateList = this.form.hospitalPersonCertificateList.filter(
el => el.idd != e.idd
);
this.form.hospitalPersonCertificateList =
this.form.hospitalPersonCertificateList.filter(
(el) => el.idd != e.idd
);
}
});
if (this.form.hospitalPersonCertificateList.length == 0) {
var obj = {
certificateSort: null,
certificateName: null,
certificateUrl: null
certificateUrl: null,
};
this.form.hospitalPersonCertificateList.push(obj);
}
@ -981,22 +1156,22 @@ export default {
if (this.form.consultingFee) {
this.form.consultingFee = Number(this.form.consultingFee);
}
this.$refs["form"].validate(valid => {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateHospitalPerson(this.form).then(response => {
updateHospitalPerson(this.form).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("修改成功");
this.addopen = false;
this.getList();
this.$modal.msgSuccess("修改成功");
this.addopen = false;
this.getList();
}
});
} else {
addHospitalPerson(this.form).then(response => {
addHospitalPerson(this.form).then((response) => {
if (response.code == 200) {
this.$modal.msgSuccess("新增成功");
this.addopen = false;
this.getList();
this.$modal.msgSuccess("新增成功");
this.addopen = false;
this.getList();
}
});
}
@ -1008,7 +1183,7 @@ export default {
const ids = row.id || this.ids;
this.$modal
.confirm("是否确认删除此人员信息?")
.then(function() {
.then(function () {
return delHospitalPerson(ids);
})
.then(() => {
@ -1022,12 +1197,12 @@ export default {
this.download(
"system/hospitalPerson/export",
{
...this.queryParams
...this.queryParams,
},
`hospitalPerson_${new Date().getTime()}.xlsx`
);
}
}
},
},
};
</script>
<style lang="scss" scoped>
@ -1038,4 +1213,4 @@ export default {
overflow: hidden;
font-size: 14px;
}
</style>
</style>