From 1b1e54ca6f01af1c35ae95f8cc53d55e2bbf3032 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Fri, 10 Mar 2023 17:16:03 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/system/hospital/index.vue | 25 +-
src/views/system/hospitalDepartment/index.vue | 82 ++---
src/views/system/hospitalPerson/index.vue | 295 +++---------------
3 files changed, 99 insertions(+), 303 deletions(-)
diff --git a/src/views/system/hospital/index.vue b/src/views/system/hospital/index.vue
index 3052b5f..6f36972 100644
--- a/src/views/system/hospital/index.vue
+++ b/src/views/system/hospital/index.vue
@@ -128,7 +128,8 @@
-
+
@@ -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",
},
diff --git a/src/views/system/hospitalDepartment/index.vue b/src/views/system/hospitalDepartment/index.vue
index be4a38b..67535af 100644
--- a/src/views/system/hospitalDepartment/index.vue
+++ b/src/views/system/hospitalDepartment/index.vue
@@ -8,7 +8,6 @@
v-show="showSearch"
label-width="68px"
>
-
@@ -262,11 +262,11 @@
:prop="`hospitalDepartmentInfoList.${index}.departmentSort`"
>
-
-
+
+
@@ -443,8 +455,8 @@
{
- // 验证手机号的正则表达式
- 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);
})
diff --git a/src/views/system/hospitalPerson/index.vue b/src/views/system/hospitalPerson/index.vue
index 566f08e..72a28ab 100644
--- a/src/views/system/hospitalPerson/index.vue
+++ b/src/views/system/hospitalPerson/index.vue
@@ -32,6 +32,7 @@
v-model="queryParams.personPhone"
placeholder="请输入联系电话"
clearable
+ oninput="value=value.replace(/[^\d]/g,'')"
@keyup.enter.native="handleQuery"
/>
@@ -257,6 +258,7 @@
@@ -309,7 +311,7 @@
@@ -347,7 +349,7 @@
:prop="`hospitalPersonCertificateList.${index}.certificateUrl`"
>
@@ -782,7 +785,7 @@
prop="hospitalPersonCertificateList[0].certificateUrl"
>
取 消
-
-
-
-
-
@@ -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");
},
/** 搜索按钮操作 */