Merge remote-tracking branch 'origin/sdl_20220916_护理站人员功能' into yan_0916_护理类型信息

# Conflicts:
#	src/api/baseurl.js
#	src/api/system/userlist.js
#	src/views/system/station/index.vue
#	src/views/system/userlist/index.vue
This commit is contained in:
闫晓茹 2022-09-23 17:27:06 +08:00
commit 6459f04081
11 changed files with 570 additions and 157 deletions

View File

@ -6,7 +6,7 @@ ENV = 'development'
# 全医通护理站管理平台/开发环境
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.16.85:8080'
VUE_APP_BASE_API = 'http://192.168.16.85:8081'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,3 +1,3 @@
var baseurl = "http://192.168.16.81:8080";
var baseurl = "http://192.168.16.81:8082";
export default baseurl
export default baseurl

View File

@ -31,6 +31,13 @@ export function SecondaryLevelInfo(id) {
method: 'get',
})
}
//省市区
export function SubordinateRegions(Code) {
return request({
url: `/system/area/getSubordinateRegions?areaCode=${Code}`,
method: 'get'
})
}
// 新增居住社区信息
export function addCommunityInfo(data) {
return request({

View File

@ -1,8 +1,9 @@
import request from '@/utils/request'
export function getListByUser(data) {
export function getListByUser(query) {
return request({
url: '/system/user/getListByUser',
method: 'GET'
method: 'GET',
params: query
})
}
}

View File

@ -237,7 +237,8 @@
<div
v-for="(item, index) in form.communityInfoList"
:key="index"
style="margin-top: 20px"
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
>
<el-form-item
label="所属区域"
@ -361,23 +362,82 @@
</el-dialog>
<!-- 修改居住社区信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<!-- <el-form-item label="所属区域编码" prop="areaCode">
<el-input v-model="form.areaCode" placeholder="请输入所属区域编码" />
</el-form-item> -->
<el-form-item label="所属区域" prop="areaCode">
<el-dialog :title="title" :visible.sync="open" width="1060px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true">
<!-- <el-form-item label="所属区域" prop="areaCode">
<el-input
v-model="form.areaName"
placeholder="请输入所属区域"
maxlength="20"
/>
</el-form-item>
</el-form-item> -->
<el-form-item
label="所属区域"
prop="areaCode"
>
<el-select v-model="form.province" clearable placeholder="请选择省" >
<el-option
v-for="item in arealist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="province3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.city"
clearable
placeholder="请选择市"
style="margin-left: 10px"
>
<el-option
v-for="item in citylist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickcity3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.area"
clearable
placeholder="请选择区"
style="margin-left: 10px"
>
<el-option
v-for="item in arealists"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
@click.native="clickarea3(item)"
>
</el-option>
</el-select>
<el-select
v-model="form.areaCode"
clearable
placeholder="请选择街道"
style="margin-left: 10px"
>
<el-option
v-for="item in streetlist"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="社区名称" prop="communityName">
<el-input
v-model="form.communityName"
placeholder="请输入社区名称"
maxlength="30"
style="width:200px"
/>
</el-form-item>
<el-form-item label="社区经度" prop="communityLongitude">
@ -385,6 +445,7 @@
v-model="form.communityLongitude"
placeholder="请输入社区经度"
maxlength="20"
style="width:200px"
/>
</el-form-item>
<el-form-item label="社区纬度" prop="communityLatitude">
@ -392,6 +453,7 @@
v-model="form.communityLatitude"
placeholder="请输入社区纬度"
maxlength="20"
style="width:200px"
/>
</el-form-item>
</el-form>
@ -412,6 +474,7 @@ import {
updateCommunityInfo,
FirstLevels,
SecondaryLevelInfo,
SubordinateRegions,
} from "@/api/system/communityInfo";
export default {
@ -560,7 +623,7 @@ export default {
this.queryParams.areaCode = "";
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
this.SecondaryLevelInfolist = res.data;
// this.SecondaryLevelInfolist = res.data;
// console.log(this.SecondaryLevelInfolist);
this.citylist = res.data;
});
@ -573,7 +636,21 @@ export default {
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
this.SecondaryLevelInfolist = res.data;
// this.SecondaryLevelInfolist = res.data;
// console.log(this.SecondaryLevelInfolist);
this.citylist = res.data;
});
},
//
province3(item) {
// this.form.xxx[index].code=''
console.log(item);
this.form.city = "";
this.form.area = "";
this.form.areaCode = "";
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
// this.SecondaryLevelInfolist = res.data;
// console.log(this.SecondaryLevelInfolist);
this.citylist = res.data;
});
@ -582,6 +659,8 @@ export default {
clickcity(item) {
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
this.queryParams.area = "";
this.queryParams.areaCode = "";
console.log(res);
this.arealists = res.data;
});
@ -592,14 +671,27 @@ export default {
// this.queryParams.areaCode = "";
// this.value2 = "";
// this.value3 = "";
this.form.communityInfoList[index].area = "";
this.form.communityInfoList[index].areaCode = "";
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
this.arealists = res.data;
});
},
//
clickcity3(item) {
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
this.form.area = "";
this.form.areaCode = "";
console.log(res);
this.arealists = res.data;
});
},
//
clickarea(item) {
this.queryParams.areaCode = "";
// this.queryParams.areaCode = "";
// this.value3 = "";
console.log(item);
@ -612,6 +704,19 @@ export default {
clickarea2(item, index) {
// this.queryParams.areaCode = "";
// this.value3 = "";
this.form.communityInfoList[index].areaCode = "";
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
this.streetlist = res.data;
});
},
clickarea3(item) {
this.form.areaCode = "";
// this.queryParams.areaCode = "";
// this.value3 = "";
console.log(item);
SecondaryLevelInfo(item.id).then((res) => {
console.log(res);
@ -623,6 +728,10 @@ export default {
this.form.areaCode = item.areaCode;
console.log(this.form);
},
// clickstreet3(item) {
// this.form.areaCode = item.areaCode;
// // console.log(this.queryParams);
// },
//
loadMore() {
console.log("1");
@ -716,6 +825,10 @@ export default {
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
// this.arealist="",
this.arealists="",
this.streetlist="",
this.citylist="",
(this.queryParams = {
pageNum: 1,
pageSize: 10,
@ -749,8 +862,22 @@ export default {
const id = row.id || this.ids;
getCommunityInfo(id).then((response) => {
this.form = response.data;
// this.form.province=response.data;
// this.form.city=response.data;
// this.form.area=response.data;
// this.form.areaCode=response.data;
this.open = true;
this.title = "修改居住社区信息";
SubordinateRegions(response.data.areaCode).then((res) => {
console.log(res)
if(res.data!==null){
this.form.province = res.data.provinceCode;
this.form.city = res.data.cityName;
this.form.area = res.data.regionName;
this.form.areaCode = res.data.streetName;
}
});
});
},
/** 提交按钮 */
@ -761,7 +888,7 @@ export default {
updateCommunityInfo(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.open2 = false;
this.getList();
});
} else {

View File

@ -172,7 +172,7 @@
/>
<!-- 添加或修改被护理人基本信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="1018px" append-to-body >
<el-dialog :title="title" :visible.sync="open" width="1040px" append-to-body >
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
<el-form-item label="姓名" prop="patientName">
<el-input v-model="form.patientName" placeholder="请输入姓名" :disabled="true"/>

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");
},
/** 搜索按钮操作 */
@ -1485,12 +1514,12 @@ export default {
this.getList();
},
handleQuery() {
stationList(this.nurseStationqueryParams).then((res) => {
console.log(res);
this.nurseStationlist = res.rows;
this.total4 = res.total;
console.log(this.nurseStationlist);
});
// 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.getList();
// this.nurselist()
@ -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,
@ -1544,11 +1572,15 @@ export default {
phone: null,
address: null,
};
stationList(this.queryParams2).then((res) => {
this.stationLists = res.rows;
this.total2 = res.total;
});
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) {
@ -1672,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>

View File

@ -16,15 +16,42 @@
@keyup.enter.native="handleQuery"
/>
</el-form-item> -->
<el-form-item label="护理站名称" prop="nurseStationName">
<el-input
v-model="queryParams.nurseStationName"
placeholder="请输入护理站名称"
<el-form-item
label="护理站名称"
prop="nurseStationName"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationCode"
clearable
@keyup.enter.native="handleQuery"
/> </el-form-item
><el-form-item label="护理站编号" prop="nurseStationCode">
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.nurseStationCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属护理站" prop="nurseStationName" v-else>
<el-select
v-model="queryParams.nurseStationCode"
placeholder="请选择护理站"
v-loadmore="loadMore"
>
<el-option
v-for="item in nurseStationlist"
:key="item.id"
:label="item.nurseStationName"
:value="item.nurseStationCode"
>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="护理站编号" prop="nurseStationCode">
<el-input
v-model="queryParams.nurseStationCode"
placeholder="请输入护理站编号"
@ -714,7 +741,6 @@
<el-button @click="upload.open = false"> </el-button>
</div>
</el-dialog>
<!-- <userlist /> -->
</div>
</template>
@ -734,11 +760,11 @@ import {
} from "@/api/system/station";
import { getInfoList } from "@/api/system/nurseItem";
import stationAcatar from "../stationAvatar/index.vue";
import { getListByUser } from "@/api/system/userlist.js";
import { getToken } from "@/utils/auth";
import editor from "@/components/Editor";
import userlist from "../userlist/index.vue";
export default {
components: { stationAcatar, editor, userlist },
components: { stationAcatar, editor },
name: "Station",
data() {
//
@ -801,6 +827,7 @@ export default {
showSearch: true,
//
total: 0,
total2: 0,
//
typelooks: [],
//
@ -813,12 +840,18 @@ export default {
],
//
stationList: [],
nurseStationlist: [],
//
title: "",
//
open: false,
typeopen: false,
nurseStationLabelopen: false,
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
queryParams: {
pageNum: 1,
@ -904,6 +937,7 @@ export default {
},
created() {
this.getList();
this.info();
},
methods: {
imgUrl(imgUrl) {
@ -1052,6 +1086,7 @@ export default {
liststationinfo() {
listStation(this.queryParams).then((response) => {
this.stationList = response.rows;
console.log('this.stationList :>> ', this.stationList);
this.total = response.total;
this.loading = false;
});
@ -1062,27 +1097,36 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
pageNum: 1,
pageSize: 10,
areaCode: null,
userId: null,
nurseStationCode: null,
nurseStationName: null,
nurseStationType: null,
agencyIntroduce: null,
nurseStationDescription: null,
longitude: null,
latitude: null,
phone: null,
address: null,
dutyPerson: null,
dutyPhone: null,
stationPictureUrl: null,
sort: null,
};
this.resetForm("queryForm");
this.handleQuery();
if (this.nurseStationlist[0].isAdmin == "1") {
this.queryParams = {
pageNum: 1,
pageSize: 10,
areaCode: null,
userId: null,
nurseStationCode: null,
nurseStationName: null,
nurseStationType: null,
agencyIntroduce: null,
nurseStationDescription: null,
longitude: null,
latitude: null,
phone: null,
address: null,
dutyPerson: null,
dutyPhone: null,
stationPictureUrl: null,
sort: null,
};
this.resetForm("queryForm");
this.handleQuery();
} else {
console.log(1);
// this.queryParams.nurseStationCode = null;
this.queryParams.pageSize = 10;
this.queryParams.pageNum = 1;
this.queryParams.nurseStationType = null;
this.handleQuery();
}
},
//
handleSelectionChange(selection) {
@ -1180,6 +1224,7 @@ export default {
console.log(this.form);
this.$refs["form"].validate((valid) => {
if (valid) {
this.form.areaCode = Number(this.form.areaCode);
this.form.nurseStationType = this.form.nurseStationType2.join(",");
if (this.form.id != null) {
updateStation(this.form).then((response) => {
@ -1260,6 +1305,40 @@ export default {
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
info() {
getListByUser(this.getListByUserquery).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.nurseStationCode = res.rows[0].nurseStationCode;
this.handleQuery();
}
});
},
//
loadMore() {
var a = Math.ceil(this.total2 / 10);
if (this.nurseStationlist.length + 1 >= this.total2) {
} else {
if (this.getListByUserquery.pageNum >= a) {
} else {
this.getListByUserquery.pageNum++;
console.log(this.getListByUserquery.pageNum);
getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
},
};
</script>

View File

@ -8,7 +8,7 @@
v-show="showSearch"
label-width="100px"
>
<el-form-item label="护理站名称" prop="">
<el-form-item label="护理站名称" prop="" v-if="nurseStationlist.find((e) => e.isAdmin == '1')">
<el-select
v-model="queryParams.nurseStationId"
clearable
@ -24,6 +24,35 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item label="所属护理站" prop="" 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="consumableCode">
<el-input
v-model="queryParams.consumableCode"
@ -124,7 +153,6 @@
icon="el-icon-upload2"
size="mini"
@click="handleport"
v-hasPermi="['system:stationConsumable:importData']"
>导入</el-button
>
</el-col>
@ -461,7 +489,7 @@
</el-form>
<el-table
v-loading="loading"
:data="nurseStationlist"
:data="nurseStationlist2"
@cell-dblclick="clicknurseStation"
>
<el-table-column width="60" align="center" label="请选择">
@ -561,6 +589,7 @@ import {
updateStationConsumable,
list,
} from "@/api/system/stationConsumable";
import { getListByUser } from "@/api/system/userlist.js";
import { getToken } from "@/utils/auth";
export default {
name: "StationConsumable",
@ -593,9 +622,11 @@ export default {
//
total: 0,
total2: 0,
total3: 0,
//
stationConsumableList: [],
nurseStationlist: [],
nurseStationlist2: [],
//
title: "",
//
@ -603,6 +634,11 @@ export default {
open2: false,
xgopen: false,
index: "",
//
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
nurseStationqueryParams: {
pageNum: 1,
@ -708,6 +744,7 @@ export default {
},
created() {
this.getList();
this.info();
this.listinfo();
},
methods: {
@ -741,24 +778,6 @@ export default {
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
loadMore() {
console.log("1");
var a = Math.ceil(this.total2 / 10);
console.log(this.nurseStationlist.length);
if (this.nurseStationlist.length + 1 >= this.total2) {
} else {
if (this.nurseStationqueryParams.pageNum >= a) {
} else {
this.nurseStationqueryParams.pageNum++;
list(this.nurseStationqueryParams).then((res) => {
console.log(res);
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
delnurseStationConsumables(index) {
this.form.nurseStationConsumables.splice(index, 1);
console.log(this.form.nurseStationConsumables);
@ -872,7 +891,7 @@ export default {
listinfo() {
list(this.nurseStationqueryParams).then((res) => {
console.log(res);
this.nurseStationlist = res.rows;
this.nurseStationlist2 = res.rows;
this.total2 = res.total;
});
},
@ -884,19 +903,28 @@ export default {
},
/** 重置按钮操作 */
sresetQuery() {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
nurseStationId: "",
userId: null,
consumableCode: null,
consumableDetail: null,
consumableUnit: null,
consumablePrice: null,
sort: null,
};
this.handleQuery();
if (this.nurseStationlist[0].isAdmin == "1") {
this.resetForm("queryForm");
this.queryParams = {
pageNum: 1,
pageSize: 10,
nurseStationId: "",
userId: null,
consumableCode: null,
consumableDetail: null,
consumableUnit: null,
consumablePrice: null,
sort: null,
};
this.handleQuery();
} else {
this.queryParams.pageNum = 1;
this.queryParams.consumableCode = null;
this.queryParams.consumableDetail = null;
this.queryParams.consumableUnit = null;
this.queryParams.consumablePrice = null;
this.handleQuery();
}
},
//
resetQuery() {
@ -977,6 +1005,41 @@ export default {
this.upload.title = "用户导入";
this.upload.open = true;
},
//
info() {
getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
this.nurseStationlist = res.rows;
this.total3 = res.total;
} else {
this.total3 = res.total;
this.nurseStationlist = res.rows;
this.queryParams.nurseStationId = res.rows[0].id;
this.handleQuery();
}
});
},
loadMore() {
console.log(1);
var a = Math.ceil(this.total3 / 10);
if (this.nurseStationlist.length + 1 >= this.total3) {
} else {
if (this.getListByUserquery.pageNum >= a) {
} else {
this.getListByUserquery.pageNum++;
getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
},
};
</script>

View File

@ -9,9 +9,10 @@
label-width="110px"
>
<el-form-item
label="所属护理站"
label="护理站名称"
prop="nurseStationId"
label-width="100px"
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
>
<el-select
v-model="queryParams.nurseStationId"
@ -28,6 +29,27 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item
label="所属护理站"
prop="nurseStationId"
label-width="100px"
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="nurseTypeId" label-width="90px">
<el-select
v-model="queryParams.nurseTypeId"
@ -82,7 +104,7 @@
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:nurseItem:add']"
v-hasPermi="['system:stationItem:add']"
>新增</el-button
>
</el-col>
@ -94,7 +116,7 @@
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:nurseItem:edit']"
v-hasPermi="['system:stationItem:edit']"
>修改</el-button
>
</el-col>
@ -106,7 +128,7 @@
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:nurseItem:remove']"
v-hasPermi="['system:stationItem:remove']"
>删除</el-button
>
</el-col>
@ -117,7 +139,6 @@
icon="el-icon-upload2"
size="mini"
@click="handleExport"
v-hasPermi="['system:nurseItem:importData']"
>导入</el-button
>
</el-col>
@ -292,8 +313,9 @@
<el-form-item label="提前预约时长" prop="advanceAppointDuration">
<el-input
v-model="form.nurseStationItem.advanceAppointDuration"
placeholder="请输入提前预约时长(小时)"
placeholder="提前预约时长(单位小时)"
type="number"
min="0"
/>
</el-form-item>
<el-form-item label="排序" prop="sort">
@ -465,7 +487,6 @@
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
<!-- 护理站 -->
<el-dialog
title="选择护理站"
@ -507,7 +528,7 @@
</el-form>
<el-table
v-loading="loading"
:data="nurseStationlist"
:data="nurseStationlist2"
@cell-dblclick="choicestationid"
>
<el-table-column label="请选择" width="70" align="center">
@ -725,6 +746,7 @@ import {
liststation,
} from "@/api/system/nurseItem";
import { getToken } from "@/utils/auth";
import { getListByUser } from "@/api/system/userlist.js";
export default {
components: { stationAcatar },
@ -761,6 +783,7 @@ export default {
total: 0,
total2: 0,
total3: 0,
total4: 0,
//
stationConsumableList: [],
//
@ -771,6 +794,13 @@ export default {
title: "",
//
open: false,
//
nurseStationlist: [],
nurseStationlist2: [],
getListByUserquery: {
pageNum: 1,
pageSize: 10,
},
//
queryParams: {
pageNum: 1,
@ -795,7 +825,6 @@ export default {
pageNum: 1,
pageSize: 10,
},
nurseStationlist: [],
//
form: {
nurseStationItem: {
@ -833,6 +862,7 @@ export default {
},
created() {
this.getList();
this.info();
this.getInfoListinfo();
this.stationlist();
// this.listStationConsumableinfo();
@ -875,7 +905,6 @@ export default {
handleFileUploadProgress(event, file, fileList) {
this.upload.isUploading = true;
},
//
stationConsumablechoiceok() {
this.form.nurseStationItemConsumables.forEach((e) => {
@ -940,29 +969,13 @@ export default {
};
this.stationlist();
},
//
stationlist() {
liststation(this.nurseStationqueryParams).then((res) => {
this.nurseStationlist = res.rows;
this.nurseStationlist2 = res.rows;
this.total2 = res.total;
});
},
loadMore() {
var a = Math.ceil(this.total2 / 10);
if (this.nurseStationlist.length + 1 >= this.total2) {
} else {
if (this.nurseStationqueryParams.pageNum >= a) {
} else {
this.nurseStationqueryParams.pageNum++;
liststation(this.nurseStationqueryParams).then((res) => {
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
//
getInfoListinfo() {
getInfoList().then((res) => {
@ -978,7 +991,6 @@ export default {
}
);
},
listStationConsumableinfo() {
if (this.form.nurseStationItem.nurseStationId != null) {
listStationConsumable(this.StationConsumablequeryParams).then(
@ -1086,7 +1098,10 @@ export default {
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.queryParams.pageNu = 1;
this.queryParams.nurseTypeId = null;
this.queryParams.nurseItemCode = null;
this.queryParams.nurseItemName = null;
this.handleQuery();
},
//
@ -1181,6 +1196,38 @@ export default {
this.upload.title = "用户导入";
this.upload.open = true;
},
//
info() {
getListByUser(this.getListByUserquery).then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
this.nurseStationlist = res.rows;
this.total4 = res.total;
} else {
this.total4 = 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.total4s) {
} else {
if (this.getListByUserquery.pageNum >= a) {
} else {
this.getListByUserquery.pageNum++;
getListByUser(this.getListByUserquery).then((res) => {
res.rows.forEach((e) => {
this.nurseStationlist.push(e);
});
});
}
}
},
},
};
</script>

View File

@ -8,12 +8,17 @@ export default {
return {};
},
created() {
this.info()
this.info();
},
methods: {
info() {
getListByUser().then((res) => {
console.log(res);
if (res.rows[0].isAdmin == "1") {
console.log(true);
} else {
this.$emit("itemlist", res.rows);
}
});
},
},