This commit is contained in:
闫晓茹 2023-03-10 17:16:03 +08:00
parent 7373077978
commit 1b1e54ca6f
3 changed files with 99 additions and 303 deletions

View File

@ -128,7 +128,8 @@
<el-input style="width:200px" v-model="form.hospitalAddress" placeholder="请输入医院地址" />
</el-form-item>
<el-form-item label="联系电话" prop="phone">
<el-input v-model="form.phone" maxlength="11" style="width:200px" placeholder="请输入联系电话" />
<el-input v-model="form.phone" maxlength="11"
oninput="value=value.replace(/[^\d]/g,'')" style="width:200px" placeholder="请输入联系电话" />
</el-form-item>
<el-form-item label="显示顺序" prop="hospitalSort">
<el-input v-model.number="form.hospitalSort" maxlength="5" style="width:200px" placeholder="请输入显示顺序" />
@ -161,16 +162,16 @@ export default {
components: { editor },
name: "Hospital",
data() {
//
var checkMobile = (rule, value, cb) => {
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
// //
// var checkMobile = (rule, value, cb) => {
// //
// const regMobile =
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
// if (regMobile.test(value)) {
// return cb();
// }
// cb(new Error(""));
// };
return {
//
loading: true,
@ -223,7 +224,7 @@ export default {
phone: [
{
required: true,
validator: checkMobile,
// validator: checkMobile,
message: "",
trigger: "blur",
},

View File

@ -8,7 +8,6 @@
v-show="showSearch"
label-width="68px"
>
<el-form-item label="医院名称" prop="hospitalName">
<el-input
v-model="queryParams.hospitalName"
@ -228,8 +227,9 @@
:prop="`hospitalDepartmentInfoList.${index}.departmentPhone`"
>
<el-input
maxlength="11"
maxlength="11"
style="width: 250px"
oninput="value=value.replace(/[^\d]/g,'')"
v-model="item.departmentPhone"
placeholder="请输入科室联系电话"
/>
@ -262,11 +262,11 @@
:prop="`hospitalDepartmentInfoList.${index}.departmentSort`"
>
<el-input
maxlength="5"
oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"
oninput="value=value.replace(/[^\d]/g,'')"
v-model.number="item.departmentSort"
placeholder="请输入科室显示顺序"
style="width:250px"
style="width: 250px"
/>
</el-form-item>
<el-button
@ -400,8 +400,19 @@
/>
</el-dialog>
<!-- 修改护理站部门信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1200px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
<el-dialog
:title="title"
:visible.sync="open"
width="1200px"
append-to-body
>
<el-form
ref="form"
:model="form"
:rules="rules"
label-width="110px"
:inline="true"
>
<el-form-item label="所属医院" prop="hospitalName">
<el-input
v-model="form.hospitalName"
@ -430,6 +441,7 @@
<el-input
v-model="form.departmentPhone"
placeholder="请输入联系电话"
oninput="value=value.replace(/[^\d]/g,'')"
maxlength="11"
style="width: 250px"
/>
@ -443,8 +455,8 @@
</el-form-item>
<el-form-item label="科室显示顺序" prop="departmentSort">
<el-input
oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"
oninput="value=value.replace(/[^\d]/g,'')"
maxlength="5"
v-model.number="form.departmentSort"
placeholder="请输入科室显示顺序"
style="width: 250px"
@ -474,15 +486,15 @@ export default {
name: "HospitalDepartment",
data() {
//
var checkMobile = (rule, value, cb) => {
//
const regMobile =
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
// var checkMobile = (rule, value, cb) => {
// //
// const regMobile =
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
// if (regMobile.test(value)) {
// return cb();
// }
// cb(new Error(""));
// };
return {
//
loading: true,
@ -491,8 +503,8 @@ export default {
hospitalqueryParams: {
pageNum: 1,
pageSize: 10,
hospitalCode:"",
hospitalName:"",
hospitalCode: "",
hospitalName: "",
},
infolist: [],
//
@ -570,7 +582,7 @@ export default {
departmentPhone: [
{
required: true,
validator: checkMobile,
// validator: checkMobile,
trigger: "blur",
message: "",
},
@ -601,7 +613,7 @@ export default {
departmentPhone: [
{
required: true,
validator: checkMobile,
// validator: checkMobile,
trigger: "blur",
message: "",
},
@ -621,7 +633,6 @@ export default {
trigger: "blur",
},
],
},
};
},
@ -648,11 +659,10 @@ export default {
// this.form.hospitalName = row.hospitalName;
// this.form.hospitalId = row.id;
// } else {
this.form.hospitalDepartmentInfoList[
this.nnerVisibleindex
].hospitalName = row.hospitalName;
this.form.hospitalDepartmentInfoList[this.nnerVisibleindex].hospitalId =
row.id;
this.form.hospitalDepartmentInfoList[this.nnerVisibleindex].hospitalName =
row.hospitalName;
this.form.hospitalDepartmentInfoList[this.nnerVisibleindex].hospitalId =
row.id;
// }
this.innerVisible = false;
},
@ -695,8 +705,8 @@ export default {
this.hospitalqueryParams = {
pageNum: 1,
pageSize: 10,
hospitalCode:"",
hospitalName:"",
hospitalCode: "",
hospitalName: "",
};
this.info();
},
@ -710,9 +720,9 @@ export default {
});
},
info() {
list(this.hospitalqueryParams,).then((response) => {
list(this.hospitalqueryParams).then((response) => {
this.infolist = response.rows;
console.log(this.infolist)
console.log(this.infolist);
this.total2 = response.total;
this.loading = false;
});
@ -752,9 +762,9 @@ export default {
this.queryParams = {
pageNum: 1,
pageSize: 10,
hospitalName:"",
departmentCode:"",
departmentName:"",
hospitalName: "",
departmentCode: "",
departmentName: "",
};
this.handleQuery();
},
@ -805,7 +815,7 @@ export default {
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除此科室的信息?')
.confirm("是否确认删除此科室的信息?")
.then(function () {
return delHospitalDepartment(ids);
})

View File

@ -32,6 +32,7 @@
v-model="queryParams.personPhone"
placeholder="请输入联系电话"
clearable
oninput="value=value.replace(/[^\d]/g,'')"
@keyup.enter.native="handleQuery"
/>
</el-form-item>
@ -257,6 +258,7 @@
<el-input
maxlength="11"
v-model="form.personPhone"
oninput="value=value.replace(/[^\d]/g,'')"
placeholder="请输入联系电话"
/>
</el-form-item>
@ -309,7 +311,7 @@
</el-form-item>
<el-form-item label="人员头像" prop="personPictureUrl">
<stationAcatar
@imgUrl="imgUrl"
@imgUrl2="imgUrl"
:img="form.personPictureUrl"
:type="'personPictureUrl'"
/>
@ -347,7 +349,7 @@
:prop="`hospitalPersonCertificateList.${index}.certificateUrl`"
>
<stationAcatar
@imgUrl="imgUrl"
@imgUrl="imgUrl"
@item="imgclassifyItem"
:img="item.certificateUrl"
:item="item"
@ -684,6 +686,7 @@
<el-form-item label="联系电话" prop="personPhone">
<el-input
v-model="form.personPhone"
oninput="value=value.replace(/[^\d]/g,'')"
placeholder="请输入身份证号"
maxlength="11"
style="width: 250px"
@ -742,7 +745,7 @@
</el-form-item>
<el-form-item label="人员头像" prop="personPictureUrl">
<stationAcatar
@imgUrl="imgUrl"
@imgUrl2="imgUrl"
:img="form.personPictureUrl"
:type="'personPictureUrl'"
/>
@ -782,7 +785,7 @@
prop="hospitalPersonCertificateList[0].certificateUrl"
>
<stationAcatar
@imgUrl="imgUrl"
@imgUrl="imgUrl"
@item="imgclassifyItem"
:img="item.certificateUrl"
:item="item"
@ -823,218 +826,7 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!--修改 选择医院 -->
<!-- <el-dialog
title="选择医院"
:visible.sync="innerVisiblexg"
width="1000px"
append-to-body
:before-close="innerVisiblecancelxg"
>
<el-form
ref="queryForm"
:model="hospitalqueryParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="医院编码" prop="hospitalCode" label-width="120">
<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-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-form-item>
</el-form>
<el-table
:data="infolist"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="hospitalId == scope.row.id"
circle
@click="nurseclickxg(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="nurseclickxg(scope.row)"
></el-button>
</template>
</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="hospitalIntroduce"
label="医院介绍"
align="center"
:show-overflow-tooltip="true"
>
</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"
:total="total2"
:page.sync="hospitalqueryParams.pageNum"
:limit.sync="hospitalqueryParams.pageSize"
@pagination="info"
/>
</el-dialog> -->
<!-- 修改科室 -->
<!-- <el-dialog
title="选择科室"
:visible.sync="innerVisibledepartmentxg"
width="1000px"
append-to-body
:before-close="innerVisiblecanceldepartxg"
>
<el-form
ref="queryForm"
:model="departmentqueryParams"
:rules="rules"
label-width="80px"
:inline="true"
>
<el-form-item label="科室编码" prop="departmentCode" label-width="120">
<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-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-form-item>
</el-form>
<el-table
:data="hospitalDepartmentList"
@cell-dblclick="nurseclick"
v-loading="loading"
>
<el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope">
<el-button
type="primary"
style="width: 15px; height: 15px"
v-if="departmentId == scope.row.id"
circle
@click="departmentclick(scope.row)"
></el-button>
<el-button
v-else
style="width: 15px; height: 15px"
circle
@click="departmentclick(scope.row)"
></el-button>
</template>
</el-table-column>
<el-table-column
property="departmentCode"
label="科室编码"
align="center"
>
</el-table-column>
<el-table-column
property="departmentName"
label="科室名称"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
<el-table-column
property="departmentPhone"
label="科室联系电话"
align="center"
>
</el-table-column>
<el-table-column
property="departmentAddress"
label="科室地址"
align="center"
:show-overflow-tooltip="true"
>
</el-table-column>
</el-table>
<pagination
v-show="total3 > 0"
:total="total3"
:page.sync="departmentqueryParams.pageNum"
:limit.sync="departmentqueryParams.pageSize"
@pagination="departmentList"
/>
</el-dialog> -->
</div>
</template>
@ -1071,18 +863,18 @@ export default {
}
};
//
// var checkMobile = (rule, value, cb) => {
// //
// const regMobile =
// // /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
// // /^((0\\d{2,3}(-)?\\d{7,8})|((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[2567]{1})(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\\d{8})$/;
// /^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[0-9]|15[0-9]|16[2567]|17[0-9]|18[0-9]|19[0-9])+\d{8})$/;
var checkMobile = (rule, value, cb) => {
//
const regMobile =
// /^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
// /^((0\\d{2,3}(-)?\\d{7,8})|((13[0-9]{1})|(14[0-9]{1})|(15[0-9]{1})|(16[2567]{1})(17[0-9]{1})|(18[0-9]{1})|(19[0-9]{1}))+\\d{8})$/;
/^((0\d{2,3}(-)?\d{7,8})|(13[0-9]|14[0-9]|15[0-9]|16[2567]|17[0-9]|18[0-9]|19[0-9])+\d{8})$/;
// if (regMobile.test(value)) {
// return cb();
// }
// cb(new Error(""));
// };
if (regMobile.test(value)) {
return cb();
}
cb(new Error("请输入正确的联系电话"));
};
return {
//
loading: true,
@ -1141,6 +933,7 @@ export default {
open: false,
addopen: false,
homenumber: false,
deletupdata:[],
//
queryParams: {
pageNum: 1,
@ -1237,7 +1030,7 @@ export default {
personPhone: [
{
required: true,
// validator: checkMobile,
validator: checkMobile,
message: "请输入联系电话",
trigger: "blur",
},
@ -1312,7 +1105,7 @@ export default {
personPhone: [
{
required: true,
// validator: checkMobile,
validator: checkMobile,
message: "11",
trigger: "blur",
},
@ -1399,11 +1192,17 @@ export default {
this.form.certificateUrl = items.certificateUrl;
}
},
imgUrl(imgUrl) {
console.log(imgUrl, "新上传");
this.form.certificateUrl = imgUrl;
this.deletupdata.push(imgUrl);
console.log(this.deletupdata)
},
imgUrl2(imgUrl) {
console.log(imgUrl, "新上传");
this.form.personPictureUrl = imgUrl;
this.deletUploadImages.push(imgUrl);
console.log( this.deletUploadImages)
},
nurseclick(row) {
@ -1420,12 +1219,6 @@ export default {
this.innerVisible = false;
// this.stationcancel();
},
// nurseclickxg(row) {
// console.log(row);
// this.form.hospitalName = row.hospitalName;
// this.hospitalId = row.id;
// this.innerVisiblexg = false;
// },
//
departmentclick(row) {
console.log(row);
@ -1442,28 +1235,16 @@ export default {
}
this.innerVisibledepartment = false;
},
// departmentclickxg(row) {
// console.log(row);
// this.form.departmentName = row.departmentName;
// this.departmentId = row.id;
// // }
// this.innerVisibledepartmentxg = false;
// },
//
innerVisiblecancel() {
this.innerVisible = false;
},
// innerVisiblecancelxg() {
// this.innerVisiblexg = false;
// },
//
innerVisiblecanceldepart() {
this.innerVisibledepartment = false;
},
// innerVisiblecanceldepartxg() {
// this.innerVisibledepartmentxg = false;
// },
//deldisease
deldisease(index) {
this.form.hospitalPersonCertificateList.splice(index, 1);
@ -1504,16 +1285,10 @@ export default {
this.hospitalId = this.form.hospitalId;
}
},
// //
// clickinnerVisiblexg() {
// this.addresetQuery();
// this.innerVisiblexg = true;
// },
//
clicklist(item) {
this.homenumber = item;
if (this.homenumber) {
//
this.hospitalId = this.queryParams.hospitalId;
} else {
this.hospitalId = this.form.hospitalId;
@ -1576,6 +1351,14 @@ export default {
}
);
}
console.log("",this.deletupdata)
if (this.deletupdata.length > 0) {
updatePicture({ pictureUrlList: this.deletupdata }).then(
(res) => {
this.open = false;
}
);
}
this.imgsurl = { pictureUrlList: [] };
this.addopen = false;
this.open = false;
@ -1614,6 +1397,8 @@ export default {
],
};
this.deletUploadImages = [];
this.deletupdata = [];
// this.resetForm("form");
},
/** 搜索按钮操作 */