修改
This commit is contained in:
parent
42b2a9d693
commit
c7859afa5c
@ -8,11 +8,22 @@
|
||||
v-show="showSearch"
|
||||
label-width="130px"
|
||||
>
|
||||
<el-form-item label="所属医院" prop="hospitalId">
|
||||
<el-button type class="stationbtn" @click="clickinnerVisible(true)">
|
||||
{{ queryParams.hospitalName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属科室" prop="departmentId" label-width="100px">
|
||||
<el-button type class="stationbtn" @click="clicklist(true)">
|
||||
{{ queryParams.departmentName }}
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员名称" prop="personName">
|
||||
<el-input
|
||||
v-model="queryParams.personName"
|
||||
placeholder="请输入科室人员名称"
|
||||
clearable
|
||||
maxlength="7"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -182,18 +193,19 @@
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.hospitalName == '请选择所属医院'"
|
||||
@click="clickinnerVisible()"
|
||||
@click="clickinnerVisible(false)"
|
||||
style="
|
||||
width: 210px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.hospitalName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
@click="clickinnerVisible(false)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
@ -210,7 +222,7 @@
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.departmentName == '请选择所属科室'"
|
||||
@click="clicklist()"
|
||||
@click="clicklist(false)"
|
||||
style="
|
||||
width: 210px;
|
||||
text-align: left;
|
||||
@ -221,7 +233,7 @@
|
||||
>{{ form.departmentName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clicklist()"
|
||||
@click="clicklist(false)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
@ -235,7 +247,11 @@
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员名称" prop="personName">
|
||||
<el-input v-model="form.personName" placeholder="请输入人员名称" />
|
||||
<el-input
|
||||
v-model="form.personName"
|
||||
maxlength="7"
|
||||
placeholder="请输入人员名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="personPhone">
|
||||
<el-input
|
||||
@ -249,6 +265,7 @@
|
||||
<el-input
|
||||
v-model="form.personAddress"
|
||||
style="width: 210px"
|
||||
maxlength="300"
|
||||
placeholder="请输入人员地址"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -277,8 +294,8 @@
|
||||
<el-form-item label="咨询费用" prop="consultingFee">
|
||||
<el-input
|
||||
maxlength="10"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="form.consultingFee"
|
||||
:change="checkPrice()"
|
||||
v-model="form.consultingFee"
|
||||
placeholder="请输入咨询费用"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -302,11 +319,10 @@
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
maxlength="30"
|
||||
style="width: 540px;"
|
||||
style="width: 540px"
|
||||
placeholder="请输入个人简介"
|
||||
v-model="form.personIntroduce"
|
||||
></el-input>
|
||||
|
||||
</el-form-item>
|
||||
<div
|
||||
v-for="(item, index) in form.hospitalPersonCertificateList"
|
||||
@ -427,7 +443,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.hospitalId == scope.row.id"
|
||||
v-if="hospitalId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
@ -539,7 +555,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.departmentId == scope.row.id"
|
||||
v-if="departmentId == scope.row.id"
|
||||
circle
|
||||
@click="departmentclick(scope.row)"
|
||||
></el-button>
|
||||
@ -605,7 +621,7 @@
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.hospitalName == '请选择所属医院'"
|
||||
@click="clickinnerVisiblexg()"
|
||||
@click="clickinnerVisible(false)"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
@ -616,7 +632,7 @@
|
||||
>{{ form.hospitalName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisiblexg()"
|
||||
@click="clickinnerVisible(false)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
@ -633,7 +649,7 @@
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.departmentName == '请选择所属科室'"
|
||||
@click="clickdepartmentlist()"
|
||||
@click="clicklist(false)"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
@ -644,7 +660,7 @@
|
||||
>{{ form.departmentName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickdepartmentlist()"
|
||||
@click="clicklist(false)"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
@ -660,9 +676,9 @@
|
||||
<el-form-item label="人员名称" prop="personName">
|
||||
<el-input
|
||||
v-model="form.personName"
|
||||
maxlength="7"
|
||||
placeholder="请输入人员名称"
|
||||
style="width: 250px"
|
||||
maxlength="15"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="personPhone">
|
||||
@ -678,6 +694,7 @@
|
||||
v-model="form.personAddress"
|
||||
placeholder="请输入科室地址"
|
||||
style="width: 250px"
|
||||
maxlength="300"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
@ -707,10 +724,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="咨询费用" prop="consultingFee">
|
||||
<el-input
|
||||
v-model.number="form.consultingFee"
|
||||
v-model="form.consultingFee"
|
||||
placeholder="请输入咨询费用"
|
||||
maxlength="10"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
:change="checkPrice()"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
@ -735,10 +752,10 @@
|
||||
prop="personIntroduce"
|
||||
style="margin-top: 10px; margin-left: 10px"
|
||||
>
|
||||
<el-input
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
style="width: 540px;"
|
||||
style="width: 540px"
|
||||
placeholder="请输入个人简介"
|
||||
v-model="form.personIntroduce"
|
||||
></el-input>
|
||||
@ -751,8 +768,7 @@
|
||||
>
|
||||
<el-form-item
|
||||
label="证书名称"
|
||||
:rules="hospitalPersonCertificateList.certificateName"
|
||||
:prop="`hospitalPersonCertificateList.${index}.certificateName`"
|
||||
prop="hospitalPersonCertificateList[0].certificateName"
|
||||
>
|
||||
<el-input
|
||||
maxlength="90"
|
||||
@ -763,8 +779,7 @@
|
||||
|
||||
<el-form-item
|
||||
label="证书图片"
|
||||
:rules="hospitalPersonCertificateList.certificateUrl"
|
||||
:prop="`hospitalPersonCertificateList.${index}.certificateUrl`"
|
||||
prop="hospitalPersonCertificateList[0].certificateUrl"
|
||||
>
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@ -776,8 +791,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="证书显示顺序"
|
||||
:rules="hospitalPersonCertificateList.certificateSort"
|
||||
:prop="`hospitalPersonCertificateList.${index}.certificateSort`"
|
||||
prop="hospitalPersonCertificateList[0].certificateSort"
|
||||
>
|
||||
<el-input
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
@ -786,7 +800,7 @@
|
||||
placeholder="请输入证书显示顺序"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
<!-- <el-button
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
@ -801,7 +815,7 @@
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
></el-button> -->
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
@ -810,7 +824,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!--修改 选择医院 -->
|
||||
<el-dialog
|
||||
<!-- <el-dialog
|
||||
title="选择医院"
|
||||
:visible.sync="innerVisiblexg"
|
||||
width="1000px"
|
||||
@ -862,7 +876,7 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.hospitalId == scope.row.id"
|
||||
v-if="hospitalId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclickxg(scope.row)"
|
||||
></el-button>
|
||||
@ -901,7 +915,7 @@
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column> -->
|
||||
<el-table-column
|
||||
<!-- <el-table-column
|
||||
property="phone"
|
||||
label="联系电话"
|
||||
align="center"
|
||||
@ -916,9 +930,9 @@
|
||||
:limit.sync="hospitalqueryParams.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
<!-- 修改科室 -->
|
||||
<el-dialog
|
||||
<!-- <el-dialog
|
||||
title="选择科室"
|
||||
:visible.sync="innerVisibledepartmentxg"
|
||||
width="1000px"
|
||||
@ -973,15 +987,15 @@
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.departmentId == scope.row.id"
|
||||
v-if="departmentId == scope.row.id"
|
||||
circle
|
||||
@click="departmentclickxg(scope.row)"
|
||||
@click="departmentclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="departmentclickxg(scope.row)"
|
||||
@click="departmentclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -1020,7 +1034,7 @@
|
||||
:limit.sync="departmentqueryParams.pageSize"
|
||||
@pagination="departmentList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</el-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -1126,6 +1140,7 @@ export default {
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
addopen: false,
|
||||
homenumber: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
@ -1134,6 +1149,8 @@ export default {
|
||||
departmentId: null,
|
||||
personCode: null,
|
||||
personName: null,
|
||||
departmentName: null,
|
||||
hospitalName: null,
|
||||
personPhone: null,
|
||||
personAddress: null,
|
||||
cardNo: null,
|
||||
@ -1160,11 +1177,12 @@ export default {
|
||||
departmentqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalId: "",
|
||||
departmentCode: "",
|
||||
departmentName: "",
|
||||
},
|
||||
infolist: [],
|
||||
deletUploadImages:[],
|
||||
deletUploadImages: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
hospitalId: [
|
||||
@ -1345,7 +1363,24 @@ export default {
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
|
||||
/**只能输入数字且有小数点最多保留两位*/
|
||||
checkPrice() {
|
||||
let checkPlan = "" + this.form.consultingFee;
|
||||
checkPlan = checkPlan
|
||||
.replace(/[^\d.]/g, "") // 清除“数字”和“.”以外的字符
|
||||
.replace(/\.{2,}/g, ".") // 只保留第一个. 清除多余的
|
||||
.replace(/^\./g, "") // 保证第一个为数字而不是.
|
||||
.replace(".", "$#$")
|
||||
.replace(/\./g, "")
|
||||
.replace("$#$", ".");
|
||||
if (checkPlan.indexOf(".") < 0 && checkPlan !== "") {
|
||||
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
|
||||
checkPlan = parseFloat(checkPlan) + "";
|
||||
} else if (checkPlan.indexOf(".") >= 0) {
|
||||
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, "$1$2.$3"); // 只能输入两个小数
|
||||
}
|
||||
this.form.consultingFee = checkPlan;
|
||||
},
|
||||
//接收图片所属的item
|
||||
imgclassifyItem(item) {
|
||||
let imgUrlData = JSON.parse(item);
|
||||
@ -1366,52 +1401,69 @@ export default {
|
||||
},
|
||||
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl,'新上传');
|
||||
console.log(imgUrl, "新上传");
|
||||
this.form.personPictureUrl = imgUrl;
|
||||
this.deletUploadImages.push(imgUrl)
|
||||
this.deletUploadImages.push(imgUrl);
|
||||
},
|
||||
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.form.hospitalName = row.hospitalName;
|
||||
console.log(this.homenumber);
|
||||
if (this.homenumber) {
|
||||
this.queryParams.hospitalName = row.hospitalName;
|
||||
this.queryParams.hospitalId = row.id;
|
||||
} else {
|
||||
this.hospitalId = row.id;
|
||||
// this.form.hospitalId = row.id;
|
||||
this.form.hospitalName = row.hospitalName;
|
||||
}
|
||||
this.form.hospitalId = row.id;
|
||||
this.innerVisible = false;
|
||||
// this.stationcancel();
|
||||
},
|
||||
nurseclickxg(row) {
|
||||
console.log(row);
|
||||
this.form.hospitalName = row.hospitalName;
|
||||
this.form.hospitalId = row.id;
|
||||
this.innerVisiblexg = false;
|
||||
},
|
||||
// nurseclickxg(row) {
|
||||
// console.log(row);
|
||||
// this.form.hospitalName = row.hospitalName;
|
||||
// this.hospitalId = row.id;
|
||||
// this.innerVisiblexg = false;
|
||||
// },
|
||||
// 科室
|
||||
departmentclick(row) {
|
||||
console.log(row);
|
||||
this.departmentId = row.id;
|
||||
this.form.departmentName = row.departmentName;
|
||||
this.form.departmentId = row.id;
|
||||
// }
|
||||
// this.form.departmentId = row.id;
|
||||
if (this.homenumber) {
|
||||
this.queryParams.departmentName = row.departmentName;
|
||||
this.queryParams.departmentId = row.id;
|
||||
this.form.departmentId = row.id;
|
||||
} else {
|
||||
this.form.departmentId = row.id;
|
||||
this.form.departmentName = row.departmentName;
|
||||
}
|
||||
this.innerVisibledepartment = false;
|
||||
},
|
||||
departmentclickxg(row) {
|
||||
console.log(row);
|
||||
this.form.departmentName = row.departmentName;
|
||||
this.form.departmentId = row.id;
|
||||
// }
|
||||
this.innerVisibledepartmentxg = 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;
|
||||
},
|
||||
// innerVisiblecancelxg() {
|
||||
// this.innerVisiblexg = false;
|
||||
// },
|
||||
//科室关闭
|
||||
innerVisiblecanceldepart() {
|
||||
this.innerVisibledepartment = false;
|
||||
},
|
||||
innerVisiblecanceldepartxg() {
|
||||
this.innerVisibledepartmentxg = false;
|
||||
},
|
||||
// innerVisiblecanceldepartxg() {
|
||||
// this.innerVisibledepartmentxg = false;
|
||||
// },
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.hospitalPersonCertificateList.splice(index, 1);
|
||||
@ -1419,9 +1471,9 @@ export default {
|
||||
adddisease() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
certificateName: "",
|
||||
certificateSort: "",
|
||||
certificateUrl: "",
|
||||
certificateName: null,
|
||||
certificateSort: null,
|
||||
certificateUrl: null,
|
||||
idd: this.idd,
|
||||
};
|
||||
if (this.form.hospitalPersonCertificateList.length == 5) {
|
||||
@ -1433,6 +1485,7 @@ export default {
|
||||
/** 查询健康咨询-科室人员信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
// this.queryParams.hospitalId = this.form.hospitalId;
|
||||
listHospitalPerson(this.queryParams).then((response) => {
|
||||
this.hospitalPersonList = response.rows;
|
||||
this.total = response.total;
|
||||
@ -1440,28 +1493,40 @@ export default {
|
||||
});
|
||||
},
|
||||
// 新增医院按钮
|
||||
clickinnerVisible() {
|
||||
clickinnerVisible(item) {
|
||||
console.log(item);
|
||||
this.info();
|
||||
this.innerVisible = true;
|
||||
this.homenumber = item;
|
||||
if (this.homenumber) {
|
||||
this.hospitalId = this.queryParams.hospitalId;
|
||||
} else {
|
||||
this.hospitalId = this.form.hospitalId;
|
||||
}
|
||||
},
|
||||
// 修改医院按钮
|
||||
clickinnerVisiblexg() {
|
||||
this.addresetQuery();
|
||||
this.innerVisiblexg = true;
|
||||
},
|
||||
// // 修改医院按钮
|
||||
// clickinnerVisiblexg() {
|
||||
// this.addresetQuery();
|
||||
// this.innerVisiblexg = true;
|
||||
// },
|
||||
//新增科室按钮
|
||||
clicklist() {
|
||||
this.departmentList();
|
||||
this.innerVisibledepartment = true;
|
||||
},
|
||||
// 修改科室按钮
|
||||
clickdepartmentlist() {
|
||||
this.departmentList();
|
||||
// this.form.departmentId = item.departmentId;
|
||||
this.innerVisibledepartmentxg = true;
|
||||
clicklist(item) {
|
||||
this.homenumber = item;
|
||||
if (this.homenumber) {
|
||||
// 为查询页面时
|
||||
this.hospitalId = this.queryParams.hospitalId;
|
||||
} else {
|
||||
this.hospitalId = this.form.hospitalId;
|
||||
}
|
||||
if (this.hospitalId) {
|
||||
this.departmentList();
|
||||
this.innerVisibledepartment = true;
|
||||
} else {
|
||||
this.$message.error("请先选择所属医院");
|
||||
}
|
||||
},
|
||||
departmentList() {
|
||||
// this.loading = true;
|
||||
this.departmentqueryParams.hospitalId = this.hospitalId;
|
||||
listHospitalDepartment(this.departmentqueryParams).then((response) => {
|
||||
this.hospitalDepartmentList = response.rows;
|
||||
this.total3 = response.total;
|
||||
@ -1504,10 +1569,12 @@ export default {
|
||||
});
|
||||
}
|
||||
console.log("2222", this.deletNewImgs);
|
||||
if(this.deletUploadImages.length>0){
|
||||
updatePicture({pictureUrlList:this.deletUploadImages}).then((res) => {
|
||||
this.open = false;
|
||||
});
|
||||
if (this.deletUploadImages.length > 0) {
|
||||
updatePicture({ pictureUrlList: this.deletUploadImages }).then(
|
||||
(res) => {
|
||||
this.open = false;
|
||||
}
|
||||
);
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.addopen = false;
|
||||
@ -1532,6 +1599,8 @@ export default {
|
||||
personPictureUrl: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
departmentId: null,
|
||||
hospitalId: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
hospitalName: "请选择所属医院",
|
||||
@ -1544,7 +1613,7 @@ export default {
|
||||
},
|
||||
],
|
||||
};
|
||||
this.deletUploadImages=[]
|
||||
this.deletUploadImages = [];
|
||||
// this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -1554,7 +1623,17 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.form.departmentId = "";
|
||||
this.form.hospitalId = "";
|
||||
this.departmentqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
// this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -1593,6 +1672,10 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (this.form.consultingFee) {
|
||||
this.form.consultingFee = Number(this.form.consultingFee);
|
||||
}
|
||||
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -1615,9 +1698,7 @@ export default {
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm(
|
||||
'是否确认删除此人员信息?'
|
||||
)
|
||||
.confirm("是否确认删除此人员信息?")
|
||||
.then(function () {
|
||||
return delHospitalPerson(ids);
|
||||
})
|
||||
@ -1640,3 +1721,12 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.stationbtn {
|
||||
width: 208px;
|
||||
text-align: left;
|
||||
height: 32px;
|
||||
overflow: hidden;
|
||||
font-size: 14px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue
Block a user