更改护理站人员

This commit is contained in:
闫晓茹 2022-11-14 09:41:47 +08:00
parent 9f6d7cfcd6
commit 65cecc8426

View File

@ -125,17 +125,6 @@
>导入</el-button >导入</el-button
> >
</el-col> </el-col>
<!-- <el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:person:export']"
>导出</el-button
>
</el-col> -->
<right-toolbar <right-toolbar
:showSearch.sync="showSearch" :showSearch.sync="showSearch"
@queryTable="getList" @queryTable="getList"
@ -237,7 +226,7 @@
<el-button <el-button
type="" type=""
@click="clickinnerVisible(item, index)" @click="clickinnerVisible(item, index)"
v-if="item.nurseStationName == '请选择护理站名称'" v-if="item.nurseStationName == '请选择所属护理站'"
style=" style="
width: 200px; width: 200px;
text-align: left; text-align: left;
@ -265,8 +254,8 @@
<el-form-item <el-form-item
label="所属科室" label="所属科室"
label-width="120px" label-width="120px"
:rules="rules.nurseStationPersonList.departmentName" :rules="rules.nurseStationPersonList.departmentCode"
:prop="`nurseStationPersonList.${index}.departmentName`" :prop="`nurseStationPersonList.${index}.departmentCode`"
> >
<el-button <el-button
type="" type=""
@ -397,39 +386,30 @@
<el-button @click="cancel"> </el-button> <el-button @click="cancel"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 新增护理站名称弹框 --> <!-- 新增护理站名称弹框 -->
<el-dialog <el-dialog
:title="title2" :title="title2"
:visible.sync="innerVisible" :visible.sync="innerVisible"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="addcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
:model="queryParams2" :model="nurseStationqueryParams"
:rules="rules" :rules="rules"
label-width="80px" label-width="80px"
:inline="true" :inline="true"
> >
<!-- <el-form
:model="queryParams2"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
> -->
<el-form-item <el-form-item
label="护理站编码" label="护理站编码"
prop="nurseStationCode" prop="nurseStationCode"
label-width="120" label-width="120"
> >
<el-input <el-input
v-model="queryParams2.nurseStationCode" v-model="nurseStationqueryParams.nurseStationCode"
placeholder="请输入护理站编码" placeholder="请输入护理站编码"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -438,10 +418,9 @@
label-width="120" label-width="120"
> >
<el-input <el-input
v-model="queryParams2.nurseStationName" v-model="nurseStationqueryParams.nurseStationName"
placeholder="请输入护理站名称" placeholder="请输入护理站名称"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -457,8 +436,8 @@
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="stationLists" @cell-dblclick="nurseclick"> <el-table :data="nurseStationlist" @cell-dblclick="nurseclick">
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
@ -478,55 +457,33 @@
<el-table-column <el-table-column
property="nurseStationCode" property="nurseStationCode"
label="护理站编码" label="护理站编码"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="nurseStationName" property="nurseStationName"
label="护理站名称" label="护理站名称"
width="150"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
<el-table-column
label="护理站类型"
align="center"
prop="nurseStationType"
>
<template slot-scope="scope">
{{
scope.row.nurseStationType == "LX202209140018" ? "生活护理" : ""
}}
{{
scope.row.nurseStationType == "LX202209140019" ? "医疗护理" : ""
}}
</template>
</el-table-column>
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="address" property="address"
label="护理地址" label="护理站地址"
width="150"
align="center" align="center"
:show-overflow-tooltip="true" :show-overflow-tooltip="true"
> >
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total2 > 0" v-show="nursetotal > 0"
:total="total2" :total="nursetotal"
:page.sync="queryParams2.pageNum" :page.sync="nurseStationqueryParams.pageNum"
:limit.sync="queryParams2.pageSize" :limit.sync="nurseStationqueryParams.pageSize"
@pagination="handleQuery2" @pagination="info"
/> />
</el-dialog> </el-dialog>
<!-- 修改护理站名称弹框 --> <!-- 修改护理站名称弹框 -->
@ -535,32 +492,24 @@
:visible.sync="innerVisiblexg" :visible.sync="innerVisiblexg"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="addcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
:model="queryParams2" :model="nurseStationqueryParams"
:rules="rules" :rules="rules"
label-width="80px" label-width="80px"
:inline="true" :inline="true"
> >
<!-- <el-form
:model="queryParams2"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
> -->
<el-form-item <el-form-item
label="护理站编码" label="护理站编码"
prop="nurseStationCode" prop="nurseStationCode"
label-width="120" label-width="120"
> >
<el-input <el-input
v-model="queryParams2.nurseStationCode" v-model="nurseStationqueryParams.nurseStationCode"
placeholder="请输入护理站编码" placeholder="请输入护理站编码"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item
@ -569,10 +518,9 @@
label-width="120" label-width="120"
> >
<el-input <el-input
v-model="queryParams2.nurseStationName" v-model="nurseStationqueryParams.nurseStationName"
placeholder="请输入护理站名称" placeholder="请输入护理站名称"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -580,16 +528,16 @@
type="primary" type="primary"
icon="el-icon-search" icon="el-icon-search"
size="mini" size="mini"
@click="handleQuery2" @click="handleQuery4"
>搜索</el-button >搜索</el-button
> >
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery2" <el-button icon="el-icon-refresh" size="mini" @click="resetQuery4"
>重置</el-button >重置</el-button
> >
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-table :data="stationLists" @cell-dblclick="nurseclick2"> <el-table :data="nurseStationlist" @cell-dblclick="nurseclick2">
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
@ -609,53 +557,26 @@
<el-table-column <el-table-column
property="nurseStationCode" property="nurseStationCode"
label="护理站编码" label="护理站编码"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="nurseStationName" property="nurseStationName"
label="护理站名称" label="护理站名称"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
label="护理站类型"
align="center"
prop="nurseStationType"
>
<template slot-scope="scope">
{{
scope.row.nurseStationType == "LX202209140018" ? "生活护理" : ""
}}
{{
scope.row.nurseStationType == "LX202209140019" ? "医疗护理" : ""
}}
</template>
</el-table-column> </el-table-column>
<el-table-column property="address" label="护理站地址" align="center">
<el-table-column
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column>
<el-table-column
property="address"
label="护理地址"
width="150"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total2 > 0" v-show="nursetotal > 0"
:total="total2" :total="nursetotal"
:page.sync="queryParams2.pageNum" :page.sync="nurseStationqueryParams.pageNum"
:limit.sync="queryParams2.pageSize" :limit.sync="nurseStationqueryParams.pageSize"
@pagination="handleQuery2" @pagination="info"
/> />
</el-dialog> </el-dialog>
<!-- 所属科室弹框 --> <!-- 所属科室弹框 -->
@ -664,6 +585,7 @@
:visible.sync="innerVisible2" :visible.sync="innerVisible2"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="departcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -677,7 +599,6 @@
v-model="queryParams3.departmentCode" v-model="queryParams3.departmentCode"
placeholder="请输入科室编码" placeholder="请输入科室编码"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="科室名称" prop="" label-width="120"> <el-form-item label="科室名称" prop="" label-width="120">
@ -685,7 +606,6 @@
v-model="queryParams3.departmentName" v-model="queryParams3.departmentName"
placeholder="请输入科室名称" placeholder="请输入科室名称"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -705,7 +625,7 @@
:data="StationDepartmentLists" :data="StationDepartmentLists"
@cell-dblclick="StationDepartmentclick" @cell-dblclick="StationDepartmentclick"
> >
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
@ -721,18 +641,22 @@
@click="StationDepartmentclick(scope.row)" @click="StationDepartmentclick(scope.row)"
></el-button> ></el-button>
</template> </template>
</el-table-column>
<el-table-column
property="nurseStationName"
label="护理站名称"
align="center"
>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="departmentCode" property="departmentCode"
label="科室编码" label="科室编码"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="departmentName" property="departmentName"
label="科室名称" label="科室名称"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
@ -740,24 +664,18 @@
<el-table-column <el-table-column
property="departmentPerson" property="departmentPerson"
label="科室负责人" label="科室负责人"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total3 > 0" v-show="departtotal > 0"
:total="total3" :total="departtotal"
:page.sync="queryParams3.pageNum" :page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize" :limit.sync="queryParams3.pageSize"
@pagination="handleQuery3" @pagination="getList3"
/> />
</el-dialog> </el-dialog>
<!-- 修改所属科室弹框 --> <!-- 修改所属科室弹框 -->
@ -766,6 +684,7 @@
:visible.sync="innerVisiblexg2" :visible.sync="innerVisiblexg2"
width="1000px" width="1000px"
append-to-body append-to-body
:before-close="departcancel"
> >
<el-form <el-form
ref="queryForm" ref="queryForm"
@ -774,20 +693,11 @@
label-width="80px" label-width="80px"
:inline="true" :inline="true"
> >
<!-- <el-form
:model="queryParams2"
ref="queryForm"
size="small"
:inline="true"
v-show="showSearch"
label-width="90px"
> -->
<el-form-item label="科室编码" prop="departmentCode" label-width="120"> <el-form-item label="科室编码" prop="departmentCode" label-width="120">
<el-input <el-input
v-model="queryParams3.departmentCode" v-model="queryParams3.departmentCode"
placeholder="请输入科室编码" placeholder="请输入科室编码"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="科室名称" prop="" label-width="120"> <el-form-item label="科室名称" prop="" label-width="120">
@ -795,7 +705,6 @@
v-model="queryParams3.departmentName" v-model="queryParams3.departmentName"
placeholder="请输入科室名称" placeholder="请输入科室名称"
clearable clearable
@keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -815,7 +724,7 @@
:data="StationDepartmentLists" :data="StationDepartmentLists"
@cell-dblclick="StationDepartmentclick2" @cell-dblclick="StationDepartmentclick2"
> >
<el-table-column label="请选择" width="70" align="center"> <el-table-column label="请选择" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
type="primary" type="primary"
@ -835,14 +744,12 @@
<el-table-column <el-table-column
property="departmentCode" property="departmentCode"
label="科室编码" label="科室编码"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column
property="departmentName" property="departmentName"
label="科室名称" label="科室名称"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
@ -850,27 +757,20 @@
<el-table-column <el-table-column
property="departmentPerson" property="departmentPerson"
label="科室负责人" label="科室负责人"
width="150"
align="center" align="center"
> >
</el-table-column> </el-table-column>
<el-table-column <el-table-column property="phone" label="联系电话" align="center">
property="phone"
label="联系电话"
width="150"
align="center"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
<pagination <pagination
v-show="total3 > 0" v-show="departtotal > 0"
:total="total3" :total="departtotal"
:page.sync="queryParams3.pageNum" :page.sync="queryParams3.pageNum"
:limit.sync="queryParams3.pageSize" :limit.sync="queryParams3.pageSize"
@pagination="handleQuery3" @pagination="getList3"
/> />
</el-dialog> </el-dialog>
<!-- 修改 --> <!-- 修改 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
@ -881,17 +781,15 @@
style="margin-left: -20px" style="margin-left: -20px"
> >
<el-button <el-button
disabled
type="" type=""
@click="clickinnerVisible2" @click="departclickxg"
v-if="nurseStationName == '请选择护理站名称'" v-if="nurseStationName == '请选择所属护理站'"
style="width: 362px; text-align: left; height: 36px; color: #c0c4cc" style="width: 362px; text-align: left; height: 36px; color: #c0c4cc"
>{{ nurseStationName }}</el-button >{{ nurseStationName }}</el-button
> >
<el-button <el-button
disabled
type="" type=""
@click="clickinnerVisible2" @click="departclickxg()"
v-else v-else
style=" style="
width: 362px; width: 362px;
@ -929,19 +827,14 @@
>{{ departmentName }}</el-button >{{ departmentName }}</el-button
> >
</el-form-item> </el-form-item>
<el-form-item label="姓名" prop="nursePersonName" > <el-form-item label="姓名" prop="nursePersonName">
<el-input <el-input
maxlength="15" maxlength="15"
v-model="form.nursePersonName" v-model="form.nursePersonName"
placeholder="请输入姓名" placeholder="请输入姓名"
/> />
</el-form-item> </el-form-item>
<el-form-item <el-form-item label="护理人职称" prop="nursePersonType">
label="护理人职称"
prop="nursePersonType"
label-width="120px"
style="margin-left: -22px"
>
<el-select <el-select
v-model="form.nursePersonType" v-model="form.nursePersonType"
clearable clearable
@ -1124,12 +1017,9 @@ export default {
// //
showSearch: true, showSearch: true,
// //
// total:null,
total: 0, total: 0,
total2: 0, departtotal: 0,
total3: 0, nursetotal: 0,
total4: 0,
total5: 0,
// //
nurseStationPersonList: [], nurseStationPersonList: [],
// //
@ -1140,14 +1030,15 @@ export default {
stationid: "", stationid: "",
stationid2: "", stationid2: "",
departid: "", departid: "",
nurseStationName: "请选择护理站名称", nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室", departmentName: "请选择所属科室",
// //
title: "", title: "",
title2: "", title2: "",
title3: "", title3: "",
// //
open: false, open: false,
//
open2: false, open2: false,
// //
// //
@ -1186,15 +1077,25 @@ export default {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
}, },
StationqueryParams: {
pageNum: 1,
pageSize: 10,
},
// //
form: {}, form: {},
index: "", index: "",
// //
rules: { rules: {
nurseStationId: [
{ required: true, message: "请选择所属护理站", trigger: "blur" },
],
departmentName: [
{ required: true, message: "所属科室不能为空", trigger: "blur" },
],
nursePersonName: [ nursePersonName: [
{ required: true, message: "姓名不能为空", trigger: "blur" }, { required: true, message: "护理人姓名不能为空", trigger: "blur" },
], ],
nursePersonType: [ nursePersonType: [
{ required: true, message: "护理人职称不能为空", trigger: "blur" }, { required: true, message: "护理人职称不能为空", trigger: "blur" },
@ -1215,15 +1116,15 @@ export default {
nursePersonName: [ nursePersonName: [
{ {
required: true, required: true,
message: "护理站人员名称不能为空", message: "请选择所属护理站",
trigger: "blur", trigger: "blur",
}, },
], ],
departmentName: [ departmentCode: [
{ required: true, message: "所属科室不能为空", trigger: "blur" }, { required: true, message: "所属科室不能为空", trigger: "blur" },
], ],
nurseStationId: [ nurseStationId: [
{ required: true, message: "所属护理站不能为空", trigger: "blur" }, { required: true, message: "请选择所属护理站", trigger: "blur" },
], ],
nursePersonName: [ nursePersonName: [
{ required: true, message: "护理人姓名不能为空", trigger: "blur" }, { required: true, message: "护理人姓名不能为空", trigger: "blur" },
@ -1243,90 +1144,61 @@ export default {
address: [ address: [
{ required: true, message: "居住地址不能为空", trigger: "blur" }, { required: true, message: "居住地址不能为空", trigger: "blur" },
], ],
// nurseStationPersonList: {
// nursePersonName: [
// {
// required: true,
// message: "",
// trigger: "blur",
// },
// ],
// },
}, },
}, },
}; };
}, },
created() { created() {
this.getList(); this.getList();
this.getList2();
// this.nurselist();
this.info(); this.info();
}, },
methods: { methods: {
// // // //
departclick(item, index) { departclick(item, index) {
this.form.nurseStationId
if(this.form.nurseStationId == null){
this.innerVisible2 = false;
this.$message.error('请先选择所属护理站');
}else{
this.getList3();
console.log(item); console.log(item);
this.departid = item.departmentCode; this.departid = item.departmentCode;
this.innerVisible2 = true; this.innerVisible2 = true;
this.index = index; this.index = index;
}
}, },
// // // //
departclick2() { departclick2() {
StationDepartmentList(this.queryParams3).then((res) => { this.getList3();
this.StationDepartmentLists = res.rows;
this.total3 = res.total;
this.loading = false;
});
// console.log(item);
this.departid2 = this.form.departmentCode; this.departid2 = this.form.departmentCode;
this.innerVisiblexg2 = true; this.innerVisiblexg2 = true;
// this.index = index; // this.index = index;
}, },
//
departclickxg() {
this.info();
this.stationid2 = this.form.nurseStationId;
this.innerVisiblexg = true;
this.index = index;
},
// //
clickinnerVisible(item, index) { clickinnerVisible(item, index) {
// console.log(item); this.info();
this.stationid = item.nurseStationId; this.stationid = item.nurseStationId;
this.innerVisible = true; this.innerVisible = true;
this.index = index; this.index = index;
}, },
// //
clickinnerVisible2() { nurseclick2(row) {
stationList(this.queryParams2).then((res) => { console.log(row);
this.stationLists = res.rows; this.nurseStationName = row.nurseStationName;
this.total2 = res.total; this.stationid2 = row.id;
this.loading = false; this.form.nurseStationId = row.id;
}); this.innerVisiblexg = false;
// console.log(item); this.form.nursename = row.nurseStationName;
this.stationid2 = this.form.nurseStationId;
this.innerVisiblexg = true;
// this.index = index;
},
//xialakuang
// loadMore() {
// console.log("1");
// var a = Math.ceil(this.total4 / 10);
// console.log(this.nurseStationlist.length);
// if (this.nurseStationlist.length + 1 >= this.total4) {
// } else {
// if (this.nurseStationqueryParams.pageNum >= a) {
// } else {
// this.nurseStationqueryParams.pageNum++;
// stationList(this.nurseStationqueryParams).then((res) => {
// console.log(res);
// res.rows.forEach((e) => {
// this.nurseStationlist.push(e);
// });
// });
// }
// }
// },
nurselist() {
stationList(this.nurseStationqueryParams).then((res) => {
console.log(res);
this.nurseStationlist = res.rows;
this.total4 = res.total;
console.log(this.nurseStationlist);
});
}, },
//deldisease //deldisease
deldisease(index) { deldisease(index) {
@ -1335,8 +1207,6 @@ export default {
}, },
adddisease() { adddisease() {
// this.nurseStationName = "";
// this.departmentName=""
var obj = { var obj = {
nursePersonCode: "", nursePersonCode: "",
nursePersonCode: "", nursePersonCode: "",
@ -1346,7 +1216,6 @@ export default {
address: "", address: "",
sex: "", sex: "",
nurseStationId: "", nurseStationId: "",
departmentName: "请选择所属科室", departmentName: "请选择所属科室",
// departname: "", // departname: "",
nurseStationName: "请选择护理站名称", nurseStationName: "请选择护理站名称",
@ -1363,6 +1232,7 @@ export default {
this.nursename = row.nurseStationName; this.nursename = row.nurseStationName;
this.stationid = row.id; this.stationid = row.id;
this.form.nurseStationId = row.id; this.form.nurseStationId = row.id;
console.log(this.form.nurseStationId);
console.log(this.form); console.log(this.form);
this.innerVisible = false; this.innerVisible = false;
this.form.nursename = row.nurseStationName; this.form.nursename = row.nurseStationName;
@ -1370,16 +1240,7 @@ export default {
row.nurseStationName; row.nurseStationName;
this.form.nurseStationPersonList[this.index].nurseStationId = row.id; this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
}, },
//
nurseclick2(row) {
console.log(row);
this.nurseStationName = row.nurseStationName;
this.stationid2 = row.id;
this.form.nurseStationId = row.id;
console.log(this.form);
this.innerVisiblexg = false;
this.form.nursename = row.nurseStationName;
},
// //
StationDepartmentclick(row) { StationDepartmentclick(row) {
console.log(row); console.log(row);
@ -1415,17 +1276,19 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getList2() { // getList2() {
// // this.loading = true;
// getListByUser(this.StationqueryParams).then((res) => {
// this.nursetotal = res.total;
// this.nurseStationlist = res.rows;
// this.loading = false;
// });
// },
getList3() {
this.loading = true; this.loading = true;
stationList(this.queryParams2).then((res) => {
this.stationLists = res.rows;
this.total2 = res.total;
this.loading = false;
});
StationDepartmentList(this.queryParams3).then((res) => { StationDepartmentList(this.queryParams3).then((res) => {
this.StationDepartmentLists = res.rows; this.StationDepartmentLists = res.rows;
this.total3 = res.total; this.departtotal = res.total;
this.loading = false; this.loading = false;
}); });
}, },
@ -1433,7 +1296,7 @@ export default {
cancel() { cancel() {
this.open = false; this.open = false;
this.open2 = false; this.open2 = false;
this.nurseStationName = "请选择护理站名称"; this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室"; this.departmentName = "请选择所属科室";
// this.upload.open=false; // this.upload.open=false;
this.reset(); this.reset();
@ -1454,7 +1317,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
nurseStationName: "请选择护理站名称", nurseStationName: "请选择所属护理站",
departmentName: "请选择所属科室", departmentName: "请选择所属科室",
nurseStationPersonList: [ nurseStationPersonList: [
{ {
@ -1464,7 +1327,7 @@ export default {
nursePersonCode: "", nursePersonCode: "",
nursePersonName: "", nursePersonName: "",
nursePersonType: "", nursePersonType: "",
nurseStationName: "请选择护理站名称", nurseStationName: "请选择所属护理站",
phone: "", phone: "",
address: "", address: "",
sex: "", sex: "",
@ -1474,54 +1337,51 @@ export default {
}; };
this.resetForm("form"); this.resetForm("form");
}, },
/** 搜索按钮操作 */ /** 搜索按钮操作 */
handleQuery2() { handleQuery2() {
this.queryParams.pageNum = 1; this.nurseStationqueryParams.pageNum = 1;
stationList(this.queryParams2).then((res) => { this.info();
this.stationLists = res.rows;
this.total2 = res.total;
this.loading = false;
});
this.innerVisible = true;
}, },
//
handleQuery4() {
this.nurseStationqueryParams.pageNum = 1;
this.info();
},
//
handleQuery3() { handleQuery3() {
console.log(this.queryParams3); this.queryParams3.pageNum = 1;
StationDepartmentList(this.queryParams3).then((response) => { this.getList3();
this.StationDepartmentLists = response.rows;
this.total3 = response.total;
this.loading = false;
});
this.queryParams.pageNum = 1;
this.getList();
}, },
handleQuery() { handleQuery() {
// stationList(this.nurseStationqueryParams).then((res) => {
// console.log(res);
// this.nurseStationlist = res.rows;
// this.total4 = res.total;
// console.log(this.nurseStationlist);
// });
this.queryParams.pageNum = 1; this.queryParams.pageNum = 1;
this.getList(); this.getList();
// this.nurselist()
// this.stationList();
// this.nurseStationlist()
}, },
/** 重置按钮操作 */ /** 重置按钮操作 */
addcancel() {
this.innerVisible = false;
this.innerVisiblexg = false;
this.resetQuery2();
},
departcancel() {
this.innerVisible2 = false;
this.innerVisiblexg2 = false;
this.resetQuery3();
},
resetQuery2() { resetQuery2() {
this.queryParams2 = { this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
nurseStationName: null,
id: null,
nurseStationId: null,
}; };
stationList(this.queryParams2).then((res) => { this.handleQuery2();
this.stationLists = res.rows; },
this.total2 = res.total; resetQuery4() {
}); this.resetForm("queryForm");
this.nurseStationqueryParams = {
pageNum: 1,
pageSize: 10,
};
this.handleQuery4();
}, },
resetQuery3() { resetQuery3() {
this.queryParams3 = { this.queryParams3 = {
@ -1533,13 +1393,8 @@ export default {
departmentName: null, departmentName: null,
nurseStationId: null, nurseStationId: null,
}; };
StationDepartmentList(this.queryParams3).then((response) => { this.handleQuery3();
this.StationDepartmentLists = response.rows;
this.total3 = response.total;
this.loading = false;
});
}, },
resetQuery() { resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") { if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm"); this.resetForm("queryForm");
@ -1555,7 +1410,6 @@ export default {
phone: null, phone: null,
address: null, address: null,
}; };
this.handleQuery(); this.handleQuery();
} else { } else {
console.log(1); console.log(1);
@ -1578,16 +1432,14 @@ export default {
this.reset(); this.reset();
this.open2 = true; this.open2 = true;
this.title = "添加护理站人员信息"; this.title = "添加护理站人员信息";
this.title2 = "请选择护理站"; this.title2 = "请选择所属护理站";
this.title3 = "请选择科室"; this.title3 = "请选择科室";
}, },
/** 修改按钮操作 */ /** 修改按钮操作 */
handleUpdate(row) { handleUpdate(row) {
// this.reset();
const id = row.id || this.ids; const id = row.id || this.ids;
getPerson(id).then((response) => { getPerson(id).then((response) => {
console.log(response); console.log(response);
// this.departmentName=""
this.departmentName = response.data.departmentName; this.departmentName = response.data.departmentName;
this.nurseStationName = response.data.nurseStationName; this.nurseStationName = response.data.nurseStationName;
this.form = response.data; this.form = response.data;
@ -1604,9 +1456,6 @@ export default {
submitForm() { submitForm() {
console.log(this.form); console.log(this.form);
this.$refs["form"].validate((valid) => { this.$refs["form"].validate((valid) => {
// this.form.nursename = null;
// this.form.nurseStationId = null;
if (valid) { if (valid) {
if (this.form.id != null) { if (this.form.id != null) {
updatePerson(this.form).then((response) => { updatePerson(this.form).then((response) => {
@ -1619,7 +1468,7 @@ export default {
this.$modal.msgSuccess("新增成功"); this.$modal.msgSuccess("新增成功");
this.open2 = false; this.open2 = false;
this.getList(); this.getList();
this.nurseStationName = "请选择护理站名称"; this.nurseStationName = "请选择所属护理站";
this.departmentName = "请选择所属科室"; this.departmentName = "请选择所属科室";
}); });
} }
@ -1695,19 +1544,20 @@ export default {
if (res.rows[0].isAdmin == "1") { if (res.rows[0].isAdmin == "1") {
console.log(true); console.log(true);
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.total5 = res.total; this.nursetotal = res.total;
} else { } else {
this.total5 = res.total; this.nursetotal = res.total;
this.nurseStationlist = res.rows; this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id; this.queryParams.nurseStationId = res.rows[0].id;
this.queryParams3.nurseStationId = res.rows[0].id;
this.handleQuery(); this.handleQuery();
} }
}); });
}, },
// //
loadMore() { loadMore() {
var a = Math.ceil(this.total5 / 10); var a = Math.ceil(this.nursetotal / 10);
if (this.nurseStationlist.length + 1 >= this.total5) { if (this.nurseStationlist.length + 1 >= this.nursetotal) {
} else { } else {
if (this.nurseStationqueryParams.pageNum >= a) { if (this.nurseStationqueryParams.pageNum >= a) {
} else { } else {
@ -1722,24 +1572,6 @@ export default {
} }
} }
}, },
// loadMore() {
// console.log("1");
// var a = Math.ceil(this.total4 / 10);
// console.log(this.nurseStationlist.length);
// if (this.nurseStationlist.length + 1 >= this.total4) {
// } else {
// if (this.nurseStationqueryParams.pageNum >= a) {
// } else {
// this.nurseStationqueryParams.pageNum++;
// stationList(this.nurseStationqueryParams).then((res) => {
// console.log(res);
// res.rows.forEach((e) => {
// this.nurseStationlist.push(e);
// });
// });
// }
// }
// },
}, },
}; };
</script> </script>