护理站人员 用户权限
This commit is contained in:
parent
f59fd466b6
commit
be49874bc6
@ -8,10 +8,10 @@
|
|||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="68px"
|
label-width="68px"
|
||||||
>
|
>
|
||||||
<el-form-item label="护理站" prop="nurseStationId">
|
<el-form-item label="护理站" prop="nurseStationId" v-if="nurseStationlist.find((e) => e.isAdmin == '1')">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.nurseStationId"
|
v-model="queryParams.nurseStationId"
|
||||||
clearable
|
|
||||||
placeholder="请选择护理站"
|
placeholder="请选择护理站"
|
||||||
v-loadmore="loadMore"
|
v-loadmore="loadMore"
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
@ -25,6 +25,22 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
<el-form-item label="护理站" prop="nurseStationId" v-else>
|
||||||
|
<el-select
|
||||||
|
v-model="queryParams.nurseStationId"
|
||||||
|
placeholder="请选择护理站"
|
||||||
|
v-loadmore="loadMore"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in nurseStationlist"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.nurseStationName"
|
||||||
|
:value="item.id"
|
||||||
|
>
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
<el-form-item label="所属科室" prop="departmentName">
|
<el-form-item label="所属科室" prop="departmentName">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.departmentName"
|
v-model="queryParams.departmentName"
|
||||||
@ -1030,6 +1046,7 @@ import {
|
|||||||
StationDepartmentList,
|
StationDepartmentList,
|
||||||
} from "@/api/system/person";
|
} from "@/api/system/person";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
|
import { getListByUser } from "@/api/system/userlist.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Person",
|
name: "Person",
|
||||||
@ -1133,6 +1150,7 @@ export default {
|
|||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
open: false,
|
open: false,
|
||||||
open2: false,
|
open2: false,
|
||||||
|
//权限查询
|
||||||
// 查询参数
|
// 查询参数
|
||||||
queryParams: {
|
queryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -1252,16 +1270,14 @@ export default {
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
this.getList2();
|
||||||
this.nurselist();
|
this.nurselist();
|
||||||
|
this.info();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// // 新增所属科室按钮
|
// // 新增所属科室按钮
|
||||||
departclick(item, index) {
|
departclick(item, index) {
|
||||||
StationDepartmentList(this.queryParams3).then((res) => {
|
|
||||||
this.StationDepartmentLists = res.rows;
|
|
||||||
this.total3 = res.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
console.log(item);
|
console.log(item);
|
||||||
this.departid = item.departmentCode;
|
this.departid = item.departmentCode;
|
||||||
this.innerVisible2 = true;
|
this.innerVisible2 = true;
|
||||||
@ -1281,11 +1297,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 新增护理站按钮
|
// 新增护理站按钮
|
||||||
clickinnerVisible(item, index) {
|
clickinnerVisible(item, index) {
|
||||||
stationList(this.queryParams2).then((res) => {
|
|
||||||
this.stationLists = res.rows;
|
|
||||||
this.total2 = res.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
// console.log(item);
|
// console.log(item);
|
||||||
this.stationid = item.nurseStationId;
|
this.stationid = item.nurseStationId;
|
||||||
this.innerVisible = true;
|
this.innerVisible = true;
|
||||||
@ -1304,24 +1316,24 @@ export default {
|
|||||||
// this.index = index;
|
// this.index = index;
|
||||||
},
|
},
|
||||||
//xialakuang
|
//xialakuang
|
||||||
loadMore() {
|
// loadMore() {
|
||||||
console.log("1");
|
// console.log("1");
|
||||||
var a = Math.ceil(this.total4 / 10);
|
// var a = Math.ceil(this.total4 / 10);
|
||||||
console.log(this.nurseStationlist.length);
|
// console.log(this.nurseStationlist.length);
|
||||||
if (this.nurseStationlist.length + 1 >= this.total4) {
|
// if (this.nurseStationlist.length + 1 >= this.total4) {
|
||||||
} else {
|
// } else {
|
||||||
if (this.nurseStationqueryParams.pageNum >= a) {
|
// if (this.nurseStationqueryParams.pageNum >= a) {
|
||||||
} else {
|
// } else {
|
||||||
this.nurseStationqueryParams.pageNum++;
|
// this.nurseStationqueryParams.pageNum++;
|
||||||
stationList(this.nurseStationqueryParams).then((res) => {
|
// stationList(this.nurseStationqueryParams).then((res) => {
|
||||||
console.log(res);
|
// console.log(res);
|
||||||
res.rows.forEach((e) => {
|
// res.rows.forEach((e) => {
|
||||||
this.nurseStationlist.push(e);
|
// this.nurseStationlist.push(e);
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
nurselist() {
|
nurselist() {
|
||||||
stationList(this.nurseStationqueryParams).then((res) => {
|
stationList(this.nurseStationqueryParams).then((res) => {
|
||||||
console.log(res);
|
console.log(res);
|
||||||
@ -1417,6 +1429,21 @@ export default {
|
|||||||
this.loading = false;
|
this.loading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getList2() {
|
||||||
|
// 护理站名称
|
||||||
|
this.loading = true;
|
||||||
|
stationList(this.queryParams2).then((res) => {
|
||||||
|
this.stationLists = res.rows;
|
||||||
|
this.total2 = res.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
StationDepartmentList(this.queryParams3).then((res) => {
|
||||||
|
this.StationDepartmentLists = res.rows;
|
||||||
|
this.total3 = res.total;
|
||||||
|
this.loading = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
},
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -1428,6 +1455,7 @@ export default {
|
|||||||
},
|
},
|
||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
|
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
nurseStationId: null,
|
nurseStationId: null,
|
||||||
@ -1461,6 +1489,7 @@ export default {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
@ -1506,7 +1535,6 @@ export default {
|
|||||||
id: null,
|
id: null,
|
||||||
nurseStationId: null,
|
nurseStationId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
stationList(this.queryParams2).then((res) => {
|
stationList(this.queryParams2).then((res) => {
|
||||||
this.stationLists = res.rows;
|
this.stationLists = res.rows;
|
||||||
this.total2 = res.total;
|
this.total2 = res.total;
|
||||||
@ -1522,7 +1550,6 @@ export default {
|
|||||||
departmentName: null,
|
departmentName: null,
|
||||||
nurseStationId: null,
|
nurseStationId: null,
|
||||||
};
|
};
|
||||||
|
|
||||||
StationDepartmentList(this.queryParams3).then((response) => {
|
StationDepartmentList(this.queryParams3).then((response) => {
|
||||||
this.StationDepartmentLists = response.rows;
|
this.StationDepartmentLists = response.rows;
|
||||||
this.total3 = response.total;
|
this.total3 = response.total;
|
||||||
@ -1531,6 +1558,7 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
|
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -1545,6 +1573,14 @@ export default {
|
|||||||
address: null,
|
address: null,
|
||||||
};
|
};
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
|
} else {
|
||||||
|
console.log(1);
|
||||||
|
this.queryParams.departmentName = null;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.nursePersonName = null;
|
||||||
|
this.handleQuery();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -1668,6 +1704,58 @@ export default {
|
|||||||
`person_${new Date().getTime()}.xlsx`
|
`person_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
//权限列表
|
||||||
|
info() {
|
||||||
|
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
if (res.rows[0].isAdmin == "1") {
|
||||||
|
console.log(true);
|
||||||
|
this.nurseStationlist = res.rows;
|
||||||
|
this.total2 = res.total;
|
||||||
|
} else {
|
||||||
|
this.total2 = res.total;
|
||||||
|
this.nurseStationlist = res.rows;
|
||||||
|
this.queryParams.nurseStationId = res.rows[0].id;
|
||||||
|
this.handleQuery();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
//滑动下拉框
|
||||||
|
loadMore() {
|
||||||
|
var a = Math.ceil(this.total4 / 10);
|
||||||
|
if (this.nurseStationlist.length + 1 >= this.total4) {
|
||||||
|
} else {
|
||||||
|
if (this.nurseStationqueryParams.pageNum >= a) {
|
||||||
|
} else {
|
||||||
|
this.nurseStationqueryParams.pageNum++;
|
||||||
|
console.log(this.nurseStationqueryParams.pageNum);
|
||||||
|
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||||
|
console.log(res);
|
||||||
|
res.rows.forEach((e) => {
|
||||||
|
this.nurseStationlist.push(e);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 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>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user