护理站人员 用户权限

This commit is contained in:
shidongli 2022-09-23 09:02:16 +08:00
parent f59fd466b6
commit be49874bc6

View File

@ -8,10 +8,10 @@
v-show="showSearch"
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
v-model="queryParams.nurseStationId"
clearable
placeholder="请选择护理站"
v-loadmore="loadMore"
@keyup.enter.native="handleQuery"
@ -25,6 +25,22 @@
</el-option>
</el-select>
</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-input
v-model="queryParams.departmentName"
@ -1030,6 +1046,7 @@ import {
StationDepartmentList,
} from "@/api/system/person";
import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js";
export default {
name: "Person",
@ -1133,6 +1150,7 @@ export default {
//
open: false,
open2: false,
//
//
queryParams: {
pageNum: 1,
@ -1252,16 +1270,14 @@ export default {
},
created() {
this.getList();
this.getList2();
this.nurselist();
this.info();
},
methods: {
// //
departclick(item, index) {
StationDepartmentList(this.queryParams3).then((res) => {
this.StationDepartmentLists = res.rows;
this.total3 = res.total;
this.loading = false;
});
console.log(item);
this.departid = item.departmentCode;
this.innerVisible2 = true;
@ -1281,11 +1297,7 @@ export default {
},
//
clickinnerVisible(item, index) {
stationList(this.queryParams2).then((res) => {
this.stationLists = res.rows;
this.total2 = res.total;
this.loading = false;
});
// console.log(item);
this.stationid = item.nurseStationId;
this.innerVisible = true;
@ -1304,24 +1316,24 @@ export default {
// 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);
});
});
}
}
},
// 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);
@ -1417,6 +1429,21 @@ export default {
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() {
this.open = false;
@ -1428,6 +1455,7 @@ export default {
},
//
reset() {
this.form = {
id: null,
nurseStationId: null,
@ -1461,6 +1489,7 @@ export default {
],
};
this.resetForm("form");
},
/** 搜索按钮操作 */
@ -1506,7 +1535,6 @@ export default {
id: null,
nurseStationId: null,
};
stationList(this.queryParams2).then((res) => {
this.stationLists = res.rows;
this.total2 = res.total;
@ -1522,7 +1550,6 @@ export default {
departmentName: null,
nurseStationId: null,
};
StationDepartmentList(this.queryParams3).then((response) => {
this.StationDepartmentLists = response.rows;
this.total3 = response.total;
@ -1531,6 +1558,7 @@ export default {
},
resetQuery() {
if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
@ -1545,6 +1573,14 @@ export default {
address: null,
};
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) {
@ -1668,6 +1704,58 @@ export default {
`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>