护理站
This commit is contained in:
parent
bd07b0cfd7
commit
7ef4eb0392
@ -11,7 +11,6 @@
|
||||
<el-form-item
|
||||
label="护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
@ -27,21 +26,7 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站" prop="nurseStationId" v-else>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
@keyup.enter.native="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="科室编码" prop="departmentCode">
|
||||
<el-input
|
||||
v-model="queryParams.departmentCode"
|
||||
@ -478,15 +463,6 @@ export default {
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
nurseStationDepartmentList: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
departmentCode: "",
|
||||
departmentName: "",
|
||||
departmentPerson: "",
|
||||
phone: "",
|
||||
},
|
||||
],
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
@ -563,15 +539,12 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
// this.listinfo();
|
||||
this.info();
|
||||
this.infos();
|
||||
},
|
||||
methods: {
|
||||
// add点击护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.stationid = row.id;
|
||||
this.innerVisible = false;
|
||||
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
||||
@ -587,7 +560,6 @@ export default {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.nurseStationDepartmentList.splice(index, 1);
|
||||
console.log(this.form.nurseStationDepartmentList);
|
||||
},
|
||||
adddisease() {
|
||||
var obj = {
|
||||
@ -632,7 +604,8 @@ export default {
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
@ -641,8 +614,7 @@ export default {
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
nurseStationName: null,
|
||||
nurseStationId: null,
|
||||
|
||||
nurseStationDepartmentList: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
@ -667,28 +639,26 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
departmentPerson: null,
|
||||
phone: null,
|
||||
nurseStationName: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
this.queryParams.departmentCode = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
|
||||
// this.queryParams = {
|
||||
// pageNum: 1,
|
||||
// pageSize: 10,
|
||||
|
||||
// departmentCode: null,
|
||||
// departmentName: null,
|
||||
// departmentPerson: null,
|
||||
// phone: null,
|
||||
// nurseStationName: null,
|
||||
// };
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.departmentCode = null;
|
||||
this.queryParams.departmentName = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
},
|
||||
this.handleQuery();
|
||||
},
|
||||
|
||||
addhd() {
|
||||
this.loading = true;
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
@ -707,15 +677,10 @@ export default {
|
||||
//权限列表
|
||||
info() {
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
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();
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
// 多选框选中数据
|
||||
@ -743,7 +708,6 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -782,7 +746,6 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
<el-form-item
|
||||
label="护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
@ -27,21 +26,6 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理站" prop="nurseStationId" v-else>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
placeholder="请选择护理站"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="所属科室"
|
||||
prop="departmentName"
|
||||
@ -917,614 +901,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listPerson,
|
||||
getPerson,
|
||||
delPerson,
|
||||
addPerson,
|
||||
updatePerson,
|
||||
stationList,
|
||||
StationDepartmentList,
|
||||
} from "@/api/system/person";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
import personjs from './personjs'
|
||||
export default personjs
|
||||
|
||||
export default {
|
||||
name: "Person",
|
||||
data() {
|
||||
// 验证手机号的规则
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
return {
|
||||
//男女选择
|
||||
sexs: [
|
||||
{
|
||||
label: "男",
|
||||
value: "MALE",
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: "FEMALE",
|
||||
},
|
||||
],
|
||||
nursePersonTypes: [
|
||||
{
|
||||
label: "护士",
|
||||
value: "NURSE",
|
||||
},
|
||||
{
|
||||
label: "护理师",
|
||||
value: "NURSE_TEACHER",
|
||||
},
|
||||
],
|
||||
|
||||
innerVisible: false,
|
||||
innerVisible2: false,
|
||||
innerVisiblexg: false,
|
||||
innerVisiblexg2: false,
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
"/system/person/insertNurseStationPersonImportList",
|
||||
},
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
departtotal: 0,
|
||||
nursetotal: 0,
|
||||
// 护理站人员信息表格数据
|
||||
nurseStationPersonList: [],
|
||||
// 护理站名称
|
||||
stationLists: [],
|
||||
// 所属科室
|
||||
StationDepartmentLists: [],
|
||||
nurseStationlist: [],
|
||||
handstationlist: [], //页面搜索list
|
||||
stationid: "",
|
||||
stationid2: "",
|
||||
departid: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title2: "",
|
||||
title3: "",
|
||||
// 修改弹出层
|
||||
open: false,
|
||||
// 添加弹出层
|
||||
open2: false,
|
||||
//权限查询
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
userId: null,
|
||||
departmentName: null,
|
||||
nursePersonCode: null,
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
},
|
||||
queryParams2: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationName: null,
|
||||
departmentName: null,
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
},
|
||||
|
||||
queryParams3: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationName: null,
|
||||
id: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
nurseStationId: null,
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
StationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
index: "",
|
||||
// 表单校验
|
||||
rules: {
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
departmentName: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
|
||||
nursePersonName: [
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
nursePersonType: [
|
||||
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
|
||||
],
|
||||
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile2,
|
||||
message: "",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: "居住地址不能为空", trigger: "blur" },
|
||||
],
|
||||
nurseStationPersonList: {
|
||||
nursePersonName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentCode: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
nursePersonName: [
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
nursePersonType: [
|
||||
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
|
||||
],
|
||||
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
message: "",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: "居住地址不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.infos();
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// // 新增所属科室按钮
|
||||
departclick(item, index) {
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
console.log(item);
|
||||
this.departid = item.departmentCode;
|
||||
this.innerVisible2 = true;
|
||||
this.index = index;
|
||||
} else {
|
||||
// this.innerVisible2 = false;
|
||||
this.$message.error("请先选择所属护理站");
|
||||
}
|
||||
},
|
||||
// // 修改所属科室按钮
|
||||
departclick2() {
|
||||
console.log(this.form.nurseStationId);
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
this.departid2 = this.form.departmentCode;
|
||||
this.innerVisiblexg2 = true;
|
||||
} else {
|
||||
// this.innerVisible2 = false;
|
||||
this.$message.error("请先选择所属护理站");
|
||||
}
|
||||
},
|
||||
//修改护理站按钮
|
||||
departclickxg() {
|
||||
this.info();
|
||||
this.stationid2 = this.form.nurseStationId;
|
||||
this.innerVisiblexg = true;
|
||||
// this.index = index;
|
||||
},
|
||||
// 新增护理站按钮
|
||||
clickinnerVisible(item, index) {
|
||||
this.info();
|
||||
this.stationid = item.nurseStationId;
|
||||
this.innerVisible = true;
|
||||
this.index = index;
|
||||
},
|
||||
// 修改护理站
|
||||
nurseclick2(row) {
|
||||
console.log(row);
|
||||
this.nurseStationName = row.nurseStationName;
|
||||
this.stationid2 = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.queryParams3.nurseStationId = row.id;
|
||||
this.innerVisiblexg = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
},
|
||||
|
||||
// 护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.nursename = row.nurseStationName;
|
||||
this.stationid = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.queryParams3.nurseStationId = row.id;
|
||||
console.log(this.form.nurseStationId);
|
||||
console.log(this.form);
|
||||
this.innerVisible = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
this.form.nurseStationPersonList[this.index].nurseStationName =
|
||||
row.nurseStationName;
|
||||
this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
|
||||
},
|
||||
|
||||
// 所属科室
|
||||
StationDepartmentclick(row) {
|
||||
console.log(row);
|
||||
this.departname = row.departmentName;
|
||||
this.departid = row.departmentCode;
|
||||
console.log(this.departid);
|
||||
this.departmentCode = row.departmentCode;
|
||||
// this.form.nurseStationId = row.id;
|
||||
this.innerVisible2 = false;
|
||||
this.form.departname = row.departmentName;
|
||||
this.form.nurseStationPersonList[this.index].departmentName =
|
||||
row.departmentName;
|
||||
this.form.nurseStationPersonList[this.index].departmentCode =
|
||||
row.departmentCode;
|
||||
console.log(this.form);
|
||||
},
|
||||
// 修改科室
|
||||
StationDepartmentclick2(row) {
|
||||
console.log(row);
|
||||
this.departmentName = row.departmentName;
|
||||
this.form.departmentCode = row.departmentCode;
|
||||
this.departid2 = row.departmentCode;
|
||||
this.form.departmentName = row.id;
|
||||
this.innerVisiblexg2 = false;
|
||||
},
|
||||
/** 查询护理站人员信息列表 */
|
||||
getList() {
|
||||
// 护理站名称
|
||||
this.loading = true;
|
||||
listPerson(this.queryParams).then((response) => {
|
||||
this.nurseStationPersonList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getList3() {
|
||||
this.loading = true;
|
||||
StationDepartmentList(this.queryParams3).then((res) => {
|
||||
this.StationDepartmentLists = res.rows;
|
||||
this.departtotal = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
// this.upload.open=false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
userId: null,
|
||||
nursePersonCode: null,
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
nurseStationPersonList: [
|
||||
{
|
||||
id: "",
|
||||
nurseStationId: "",
|
||||
departmentCode: "",
|
||||
nursePersonCode: "",
|
||||
nursePersonName: "",
|
||||
nursePersonType: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
phone: "",
|
||||
address: "",
|
||||
sex: "",
|
||||
departmentName: "请选择所属科室",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery2() {
|
||||
this.nurseStationqueryParams.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
// 修改护理站弹框的搜索
|
||||
handleQuery4() {
|
||||
this.nurseStationqueryParams.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
//修改所属科室
|
||||
handleQuery3() {
|
||||
this.queryParams3.pageNum = 1;
|
||||
this.getList3();
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
addcancel() {
|
||||
this.innerVisible = false;
|
||||
this.innerVisiblexg = false;
|
||||
this.resetQuery2();
|
||||
},
|
||||
departcancel() {
|
||||
this.innerVisible2 = false;
|
||||
this.innerVisiblexg2 = false;
|
||||
// this.resetQuery3();
|
||||
},
|
||||
resetQuery2() {
|
||||
this.resetForm("queryForm");
|
||||
this.nurseStationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.handleQuery2();
|
||||
},
|
||||
resetQuery4() {
|
||||
this.resetForm("queryForm");
|
||||
this.nurseStationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.handleQuery4();
|
||||
},
|
||||
resetQuery3() {
|
||||
this.queryParams3.pageNum = 1;
|
||||
this.queryParams3.pageSize = 10;
|
||||
this.queryParams3.departmentName = null;
|
||||
this.queryParams3.departmentCode = null;
|
||||
this.handleQuery3();
|
||||
},
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.resetForm("queryForm");
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
userId: null,
|
||||
nursePersonCode: null,
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
console.log(1);
|
||||
console.log(this.nurseStationlist);
|
||||
this.queryParams.departmentName = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nursePersonName = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.queryParams3.nurseStationId = null;
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.title = "添加护理站人员信息";
|
||||
this.title2 = "请选择所属护理站";
|
||||
this.title3 = "请选择科室";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
const id = row.id || this.ids;
|
||||
getPerson(id).then((response) => {
|
||||
console.log(response);
|
||||
this.departmentName = response.data.departmentName;
|
||||
this.nurseStationName = response.data.nurseStationName;
|
||||
this.form = response.data;
|
||||
this.queryParams3.nurseStationId = response.data.nurseStationId;
|
||||
this.open = true;
|
||||
this.title = "修改护理站人员信息";
|
||||
if (this.departmentName == null && this.departmentName == undefined) {
|
||||
this.departmentName = "请选择所属科室";
|
||||
} else {
|
||||
this.departmentName = response.data.departmentName;
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePerson(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPerson(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open2 = false;
|
||||
this.getList();
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除护理站人员信息的数据项?")
|
||||
.then(function () {
|
||||
return delPerson(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.open = true;
|
||||
this.upload.title = "护理站人员导入";
|
||||
},
|
||||
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStationPerson",
|
||||
{},
|
||||
`护理站人员基本信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/person/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`person_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
this.loading = true;
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
console.log(res);
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
console.log(true);
|
||||
this.nurseStationlist = res.rows;
|
||||
this.nursetotal = res.total;
|
||||
} else {
|
||||
this.nursetotal = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.queryParams3.nurseStationId = res.rows[0].id;
|
||||
}
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
589
src/views/system/person/personjs.js
Normal file
589
src/views/system/person/personjs.js
Normal file
@ -0,0 +1,589 @@
|
||||
import {
|
||||
listPerson,
|
||||
getPerson,
|
||||
delPerson,
|
||||
addPerson,
|
||||
updatePerson,
|
||||
stationList,
|
||||
StationDepartmentList,
|
||||
} from "@/api/system/person";
|
||||
import { getToken } from "@/utils/auth";
|
||||
import { getListByUser } from "@/api/system/userlist.js";
|
||||
|
||||
export default {
|
||||
name: "Person",
|
||||
data() {
|
||||
// 验证手机号的规则
|
||||
var checkMobile = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
// 验证手机号的规则
|
||||
var checkMobile2 = (rule, value, cb) => {
|
||||
// 验证手机号的正则表达式
|
||||
const regMobile =
|
||||
/^(0|86|17951)?(13[0-9]|15[012356789]|17[678]|18[0-9]|14[57]|19[0-9])[0-9]{8}$/;
|
||||
if (regMobile.test(value)) {
|
||||
return cb();
|
||||
}
|
||||
cb(new Error("请输入正确的联系电话"));
|
||||
};
|
||||
return {
|
||||
//男女选择
|
||||
sexs: [
|
||||
{
|
||||
label: "男",
|
||||
value: "MALE",
|
||||
},
|
||||
{
|
||||
label: "女",
|
||||
value: "FEMALE",
|
||||
},
|
||||
],
|
||||
nursePersonTypes: [
|
||||
{
|
||||
label: "护士",
|
||||
value: "NURSE",
|
||||
},
|
||||
{
|
||||
label: "护理师",
|
||||
value: "NURSE_TEACHER",
|
||||
},
|
||||
],
|
||||
|
||||
innerVisible: false,
|
||||
innerVisible2: false,
|
||||
innerVisiblexg: false,
|
||||
innerVisiblexg2: false,
|
||||
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
open: false,
|
||||
// 弹出层标题(用户导入)
|
||||
title: "",
|
||||
// 是否禁用上传
|
||||
isUploading: false,
|
||||
// 设置上传的请求头部
|
||||
headers: { Authorization: "Bearer " + getToken() },
|
||||
// 上传的地址
|
||||
url:
|
||||
process.env.VUE_APP_BASE_API +
|
||||
"/system/person/insertNurseStationPersonImportList",
|
||||
},
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
departtotal: 0,
|
||||
nursetotal: 0,
|
||||
// 护理站人员信息表格数据
|
||||
nurseStationPersonList: [],
|
||||
// 护理站名称
|
||||
stationLists: [],
|
||||
// 所属科室
|
||||
StationDepartmentLists: [],
|
||||
nurseStationlist: [],
|
||||
handstationlist: [], //页面搜索list
|
||||
stationid: "",
|
||||
stationid2: "",
|
||||
departid: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
title2: "",
|
||||
title3: "",
|
||||
// 修改弹出层
|
||||
open: false,
|
||||
// 添加弹出层
|
||||
open2: false,
|
||||
//权限查询
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
departmentCode: null,
|
||||
userId: null,
|
||||
departmentName: null,
|
||||
nursePersonCode: null,
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
},
|
||||
queryParams2: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationName: null,
|
||||
departmentName: null,
|
||||
id: null,
|
||||
nurseStationId: null,
|
||||
},
|
||||
|
||||
queryParams3: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationName: null,
|
||||
id: null,
|
||||
departmentCode: null,
|
||||
departmentName: null,
|
||||
nurseStationId: null,
|
||||
},
|
||||
nurseStationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
StationqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
|
||||
// 表单参数
|
||||
form: {},
|
||||
index: "",
|
||||
// 表单校验
|
||||
rules: {
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
departmentName: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
|
||||
nursePersonName: [
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
nursePersonType: [
|
||||
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
|
||||
],
|
||||
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile2,
|
||||
message: "",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: "居住地址不能为空", trigger: "blur" },
|
||||
],
|
||||
nurseStationPersonList: {
|
||||
nursePersonName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属护理站",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentCode: [
|
||||
{ required: true, message: "所属科室不能为空", trigger: "blur" },
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" },
|
||||
],
|
||||
nursePersonName: [
|
||||
{ required: true, message: "护理人姓名不能为空", trigger: "blur" },
|
||||
],
|
||||
nursePersonType: [
|
||||
{ required: true, message: "护理人职称不能为空", trigger: "blur" },
|
||||
],
|
||||
sex: [{ required: true, message: "性别不能为空", trigger: "blur" }],
|
||||
phone: [
|
||||
{
|
||||
required: true,
|
||||
validator: checkMobile,
|
||||
message: "",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: "居住地址不能为空", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.infos();
|
||||
this.info();
|
||||
},
|
||||
methods: {
|
||||
// // 新增所属科室按钮
|
||||
departclick(item, index) {
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
console.log(item);
|
||||
this.departid = item.departmentCode;
|
||||
this.innerVisible2 = true;
|
||||
this.index = index;
|
||||
} else {
|
||||
// this.innerVisible2 = false;
|
||||
this.$message.error("请先选择所属护理站");
|
||||
}
|
||||
},
|
||||
// // 修改所属科室按钮
|
||||
departclick2() {
|
||||
console.log(this.form.nurseStationId);
|
||||
if (this.form.nurseStationId != null) {
|
||||
this.getList3();
|
||||
this.departid2 = this.form.departmentCode;
|
||||
this.innerVisiblexg2 = true;
|
||||
} else {
|
||||
// this.innerVisible2 = false;
|
||||
this.$message.error("请先选择所属护理站");
|
||||
}
|
||||
},
|
||||
//修改护理站按钮
|
||||
departclickxg() {
|
||||
this.info();
|
||||
this.stationid2 = this.form.nurseStationId;
|
||||
this.innerVisiblexg = true;
|
||||
// this.index = index;
|
||||
},
|
||||
// 新增护理站按钮
|
||||
clickinnerVisible(item, index) {
|
||||
this.info();
|
||||
this.stationid = item.nurseStationId;
|
||||
this.innerVisible = true;
|
||||
this.index = index;
|
||||
},
|
||||
// 修改护理站
|
||||
nurseclick2(row) {
|
||||
console.log(row);
|
||||
this.nurseStationName = row.nurseStationName;
|
||||
this.stationid2 = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.queryParams3.nurseStationId = row.id;
|
||||
this.innerVisiblexg = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
},
|
||||
|
||||
// 护理站名称
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.nursename = row.nurseStationName;
|
||||
this.stationid = row.id;
|
||||
this.form.nurseStationId = row.id;
|
||||
this.queryParams3.nurseStationId = row.id;
|
||||
console.log(this.form.nurseStationId);
|
||||
console.log(this.form);
|
||||
this.innerVisible = false;
|
||||
this.form.nursename = row.nurseStationName;
|
||||
this.form.nurseStationPersonList[this.index].nurseStationName =
|
||||
row.nurseStationName;
|
||||
this.form.nurseStationPersonList[this.index].nurseStationId = row.id;
|
||||
},
|
||||
|
||||
// 所属科室
|
||||
StationDepartmentclick(row) {
|
||||
console.log(row);
|
||||
this.departname = row.departmentName;
|
||||
this.departid = row.departmentCode;
|
||||
console.log(this.departid);
|
||||
this.departmentCode = row.departmentCode;
|
||||
// this.form.nurseStationId = row.id;
|
||||
this.innerVisible2 = false;
|
||||
this.form.departname = row.departmentName;
|
||||
this.form.nurseStationPersonList[this.index].departmentName =
|
||||
row.departmentName;
|
||||
this.form.nurseStationPersonList[this.index].departmentCode =
|
||||
row.departmentCode;
|
||||
console.log(this.form);
|
||||
},
|
||||
// 修改科室
|
||||
StationDepartmentclick2(row) {
|
||||
console.log(row);
|
||||
this.departmentName = row.departmentName;
|
||||
this.form.departmentCode = row.departmentCode;
|
||||
this.departid2 = row.departmentCode;
|
||||
this.form.departmentName = row.id;
|
||||
this.innerVisiblexg2 = false;
|
||||
},
|
||||
/** 查询护理站人员信息列表 */
|
||||
getList() {
|
||||
// 护理站名称
|
||||
this.loading = true;
|
||||
listPerson(this.queryParams).then((response) => {
|
||||
this.nurseStationPersonList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
|
||||
getList3() {
|
||||
this.loading = true;
|
||||
StationDepartmentList(this.queryParams3).then((res) => {
|
||||
this.StationDepartmentLists = res.rows;
|
||||
this.departtotal = res.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.open2 = false;
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
// this.upload.open=false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
departmentCode: null,
|
||||
userId: null,
|
||||
nursePersonCode: null,
|
||||
nursePersonName: null,
|
||||
nursePersonType: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
departmentName: "请选择所属科室",
|
||||
nurseStationPersonList: [
|
||||
{
|
||||
id: "",
|
||||
nurseStationId: "",
|
||||
departmentCode: "",
|
||||
nursePersonCode: "",
|
||||
nursePersonName: "",
|
||||
nursePersonType: "",
|
||||
nurseStationName: "请选择所属护理站",
|
||||
phone: "",
|
||||
address: "",
|
||||
sex: "",
|
||||
departmentName: "请选择所属科室",
|
||||
},
|
||||
],
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery2() {
|
||||
this.nurseStationqueryParams.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
// 修改护理站弹框的搜索
|
||||
handleQuery4() {
|
||||
this.nurseStationqueryParams.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
//修改所属科室
|
||||
handleQuery3() {
|
||||
this.queryParams3.pageNum = 1;
|
||||
this.getList3();
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
addcancel() {
|
||||
this.innerVisible = false;
|
||||
this.innerVisiblexg = false;
|
||||
this.resetQuery2();
|
||||
},
|
||||
departcancel() {
|
||||
this.innerVisible2 = false;
|
||||
this.innerVisiblexg2 = false;
|
||||
// this.resetQuery3();
|
||||
},
|
||||
resetQuery2() {
|
||||
this.resetForm("queryForm");
|
||||
this.nurseStationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.handleQuery2();
|
||||
},
|
||||
resetQuery4() {
|
||||
this.resetForm("queryForm");
|
||||
this.nurseStationqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.handleQuery4();
|
||||
},
|
||||
resetQuery3() {
|
||||
this.queryParams3.pageNum = 1;
|
||||
this.queryParams3.pageSize = 10;
|
||||
this.queryParams3.departmentName = null;
|
||||
this.queryParams3.departmentCode = null;
|
||||
this.handleQuery3();
|
||||
},
|
||||
resetQuery() {
|
||||
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.departmentName = null;
|
||||
this.queryParams.nursePersonName = null;
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.queryParams3.nurseStationId = null;
|
||||
this.reset();
|
||||
this.open2 = true;
|
||||
this.title = "添加护理站人员信息";
|
||||
this.title2 = "请选择所属护理站";
|
||||
this.title3 = "请选择科室";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
const id = row.id || this.ids;
|
||||
getPerson(id).then((response) => {
|
||||
console.log(response);
|
||||
this.departmentName = response.data.departmentName;
|
||||
this.nurseStationName = response.data.nurseStationName;
|
||||
this.form = response.data;
|
||||
this.queryParams3.nurseStationId = response.data.nurseStationId;
|
||||
this.open = true;
|
||||
this.title = "修改护理站人员信息";
|
||||
if (this.departmentName == null && this.departmentName == undefined) {
|
||||
this.departmentName = "请选择所属科室";
|
||||
} else {
|
||||
this.departmentName = response.data.departmentName;
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePerson(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPerson(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open2 = false;
|
||||
this.getList();
|
||||
this.nurseStationName = "请选择所属护理站";
|
||||
this.departmentName = "请选择所属科室";
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除护理站人员信息的数据项?")
|
||||
.then(function () {
|
||||
return delPerson(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导入按钮操作 */
|
||||
handleImport() {
|
||||
this.upload.open = true;
|
||||
this.upload.title = "护理站人员导入";
|
||||
},
|
||||
|
||||
/** 下载模板操作 */
|
||||
importTemplate() {
|
||||
this.download(
|
||||
"/system/station/downloadTemplate?fileType=nurseStationPerson",
|
||||
{},
|
||||
`护理站人员基本信息导入模板.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
// 提交上传文件
|
||||
submitFileForm() {
|
||||
this.$refs.upload.submit();
|
||||
},
|
||||
// 文件上传成功处理
|
||||
handleFileSuccess(response, file, fileList) {
|
||||
this.upload.open = false;
|
||||
this.upload.isUploading = false;
|
||||
this.$refs.upload.clearFiles();
|
||||
this.$alert(
|
||||
"<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
|
||||
response.msg +
|
||||
"</div>",
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/person/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`person_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
this.loading = true;
|
||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||
this.nursetotal = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.queryParams3.nurseStationId = res.rows[0].id;
|
||||
this.getList();
|
||||
|
||||
});
|
||||
this.loading = false;
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
@ -1,28 +1,16 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
:model="getListByUserquery"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item
|
||||
label="护理站名称"
|
||||
prop="nurseStationName"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationName"
|
||||
placeholder="请输入护理站"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName" v-else>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationName"
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -30,7 +18,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站编号" prop="nurseStationCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseStationCode"
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
@ -90,13 +78,13 @@
|
||||
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
@queryTable="info"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="stationList"
|
||||
:data="nurseStationlist"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
@ -163,11 +151,11 @@
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="liststationinfo"
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
<!-- 新增护理站信息对话框 -->
|
||||
<el-dialog
|
||||
@ -439,19 +427,17 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- station/list -->
|
||||
<script>
|
||||
import {
|
||||
listStation,
|
||||
getStation,
|
||||
delStation,
|
||||
addStation,
|
||||
updateStation,
|
||||
getFirstLevelInfo,
|
||||
getSecondaryLevelInfo,
|
||||
getInfoLists,
|
||||
updatePicture,
|
||||
} 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";
|
||||
@ -558,27 +544,6 @@ export default {
|
||||
pageSize: 10,
|
||||
},
|
||||
// 查询参数
|
||||
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
userId: null,
|
||||
nurseStationCode: null,
|
||||
nurseStationName: null,
|
||||
id: null,
|
||||
nurseStationType: null,
|
||||
agencyIntroduce: null,
|
||||
nurseStationDescription: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
phone: null,
|
||||
address: null,
|
||||
dutyPerson: null,
|
||||
dutyPhone: null,
|
||||
stationPictureUrl: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
ids: 1,
|
||||
@ -638,7 +603,6 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.getaddress();
|
||||
this.info();
|
||||
this.infos();
|
||||
@ -721,10 +685,6 @@ export default {
|
||||
this.provincelist = res.data;
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
this.liststationinfo();
|
||||
this.loading = true;
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
@ -768,21 +728,16 @@ export default {
|
||||
/** 搜索按钮操作 */
|
||||
liststationinfo() {
|
||||
this.loading = true;
|
||||
listStation(this.queryParams).then((response) => {
|
||||
this.stationList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
this.info()
|
||||
},
|
||||
handleQuery() {
|
||||
this.loading = true;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.liststationinfo();
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.queryParams = {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
areaCode: null,
|
||||
@ -803,13 +758,7 @@ export default {
|
||||
};
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
} else {
|
||||
// console.log(1);
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseStationCode = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -869,14 +818,14 @@ export default {
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
});
|
||||
} else {
|
||||
addStation(this.form).then((response) => {
|
||||
if (response.code) {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
this.info();
|
||||
} else {
|
||||
this.form.nurseStationType = obj;
|
||||
}
|
||||
@ -900,7 +849,7 @@ export default {
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.getList();
|
||||
this.info();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
@ -910,7 +859,7 @@ export default {
|
||||
this.download(
|
||||
"system/station/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
...this.getListByUserquery,
|
||||
},
|
||||
`station_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
@ -944,24 +893,21 @@ export default {
|
||||
"导入结果",
|
||||
{ dangerouslyUseHTMLString: true }
|
||||
);
|
||||
this.getList();
|
||||
this.info();
|
||||
},
|
||||
// 文件上传中处理
|
||||
handleFileUploadProgress(event, file, fileList) {
|
||||
this.upload.isUploading = true;
|
||||
},
|
||||
//权限列表
|
||||
//护理站限列表
|
||||
info() {
|
||||
//加个所属区域
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
// 页面
|
||||
// /所属区域
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total2 = res.total;
|
||||
} else {
|
||||
this.total2 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.id = res.rows[0].id;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.loading=false
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
|
||||
@ -847,7 +847,6 @@ export default {
|
||||
},
|
||||
delnurseStationConsumables(index) {
|
||||
this.form.nurseStationConsumables.splice(index, 1);
|
||||
console.log(this.form.nurseStationConsumables);
|
||||
},
|
||||
addnurseStationConsumables() {
|
||||
var obj = {
|
||||
@ -865,7 +864,6 @@ export default {
|
||||
}
|
||||
},
|
||||
choicenurseStation(item, index) {
|
||||
console.log(item);
|
||||
this.index = index;
|
||||
this.open2 = true;
|
||||
},
|
||||
@ -878,9 +876,6 @@ export default {
|
||||
this.reset2();
|
||||
},
|
||||
clicknurseStation(item) {
|
||||
console.log(item);
|
||||
console.log(this.index);
|
||||
console.log(this.form);
|
||||
this.form.nurseStationConsumables[this.index].nurseStationId = item.id;
|
||||
this.form.nurseStationConsumables[this.index].nurseStationName =
|
||||
item.nurseStationName;
|
||||
@ -928,10 +923,11 @@ export default {
|
||||
},
|
||||
reset() {
|
||||
this.form = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id: null,
|
||||
consumablePrice: null,
|
||||
sort: null,
|
||||
nurseStationId: "",
|
||||
nurseStationConsumables: [
|
||||
{
|
||||
nurseStationId: "",
|
||||
@ -959,14 +955,7 @@ export default {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.listStationConsumableinfo();
|
||||
},
|
||||
//护理站分页
|
||||
// listinfo() {
|
||||
// list(this.nurseStationqueryParams).then((res) => {
|
||||
// this.nurseStationlist2 = res.rows;
|
||||
// console.log(this.nurseStationlist2);
|
||||
// this.total2 = res.total;
|
||||
// });
|
||||
// },
|
||||
|
||||
//护理站搜索
|
||||
handleQuery2() {
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
@ -1032,7 +1021,6 @@ export default {
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
console.log(this.form);
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
@ -1082,19 +1070,12 @@ export default {
|
||||
this.upload.open = true;
|
||||
},
|
||||
//权限列表
|
||||
info() {
|
||||
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();
|
||||
}
|
||||
this.getList();
|
||||
});
|
||||
},
|
||||
infos() {
|
||||
@ -1103,7 +1084,6 @@ export default {
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
console.log(res);
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
@ -12,13 +12,11 @@
|
||||
label="护理站名称"
|
||||
prop="nurseStationId"
|
||||
label-width="100px"
|
||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
||||
>
|
||||
<el-select
|
||||
v-model="queryParams.nurseStationId"
|
||||
clearable
|
||||
placeholder="请选择护理站"
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
@ -29,28 +27,6 @@
|
||||
</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="请选择护理站"
|
||||
|
||||
>
|
||||
<el-option
|
||||
v-for="item in handstationlist"
|
||||
:key="item.id"
|
||||
:label="item.nurseStationName"
|
||||
:value="item.id"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="护理项目编号" prop="nurseItemCode">
|
||||
<el-input
|
||||
v-model="queryParams.nurseItemCode"
|
||||
@ -477,7 +453,7 @@
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="stationlist"
|
||||
@click="handleQuery2"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
||||
@ -490,7 +466,7 @@
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="choicestationid"
|
||||
>
|
||||
<el-table-column label="请选择" width="70" align="center" >
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
@ -537,7 +513,7 @@
|
||||
:total="total4"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="stationlist"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 耗材弹框 -->
|
||||
@ -700,8 +676,6 @@ import {
|
||||
delNurseItem,
|
||||
addNurseItem,
|
||||
updateNurseItem,
|
||||
getInfoList,
|
||||
liststation,
|
||||
updatePicture,
|
||||
} from "@/api/system/nurseItem";
|
||||
import { getToken } from "@/utils/auth";
|
||||
@ -714,7 +688,7 @@ export default {
|
||||
return {
|
||||
imageUrl: "",
|
||||
imgone: "",
|
||||
handstationlist:[],
|
||||
handstationlist: [],
|
||||
// 用户导入参数
|
||||
upload: {
|
||||
// 是否显示弹出层(用户导入)
|
||||
@ -740,7 +714,7 @@ export default {
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
// 总条数
|
||||
total: 0,
|
||||
total2: 0,
|
||||
total3: 0,
|
||||
@ -749,8 +723,6 @@ export default {
|
||||
stationConsumableList: [],
|
||||
// 护理站护理项目表格数据
|
||||
nurseItemList: [],
|
||||
//护理站类型表
|
||||
typelist: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
@ -785,7 +757,6 @@ export default {
|
||||
// 表单参数
|
||||
form: {
|
||||
nurseStationItem: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: "",
|
||||
nurseItemContent: "",
|
||||
@ -827,11 +798,9 @@ export default {
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
this.info();
|
||||
this.getInfoListinfo();
|
||||
this.infos();
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
imgUrl(imgUrl) {
|
||||
@ -927,22 +896,13 @@ export default {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
};
|
||||
this.stationlist();
|
||||
this.info();
|
||||
},
|
||||
//下拉框
|
||||
stationlist() {
|
||||
this.loading=true;
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
this.total4 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
});
|
||||
this.loading=false;
|
||||
},
|
||||
//护理类型
|
||||
getInfoListinfo() {
|
||||
getInfoList().then((res) => {
|
||||
this.typelist = res.data;
|
||||
});
|
||||
//护理站搜索
|
||||
handleQuery2() {
|
||||
this.loading = true;
|
||||
this.getListByUserquery.pageNum = 1;
|
||||
this.info();
|
||||
},
|
||||
/** 耗材列表 */
|
||||
listStationConsumable() {
|
||||
@ -970,13 +930,6 @@ export default {
|
||||
getList() {
|
||||
this.loading = true;
|
||||
list(this.queryParams).then((response) => {
|
||||
response.rows.forEach((e) => {
|
||||
this.typelist.forEach((el) => {
|
||||
if (e.nurseTypeId == el.id) {
|
||||
e.nurseTypeName = el.nurseTypeName;
|
||||
}
|
||||
});
|
||||
});
|
||||
this.nurseItemList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
@ -989,8 +942,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
|
||||
this.open = false;
|
||||
@ -1031,8 +983,9 @@ export default {
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationItem: {
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
nurseItemName: null,
|
||||
nurseItemContent: null,
|
||||
@ -1041,23 +994,19 @@ export default {
|
||||
sort: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
},
|
||||
nurseStationItemConsumables: [
|
||||
// {
|
||||
// nurseStationConsumableId: "",
|
||||
// consumableCount: "",
|
||||
// consumablePrice: "",
|
||||
// },
|
||||
],
|
||||
nurseStationItemPrices: [
|
||||
{
|
||||
serveDurationUnit: null,
|
||||
price: null,
|
||||
description: null,
|
||||
ids: this.ids,
|
||||
},
|
||||
],
|
||||
|
||||
// nurseStationItemConsumables: [],
|
||||
// nurseStationItemPrices: [
|
||||
// {
|
||||
// serveDurationUnit: null,
|
||||
// price: null,
|
||||
// description: null,
|
||||
// ids: this.ids,
|
||||
// },
|
||||
// ],
|
||||
};
|
||||
this.resetForm("form");
|
||||
console.log(this.form);
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
@ -1066,27 +1015,13 @@ export default {
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
||||
this.queryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
nurseTypeId: null,
|
||||
userId: null,
|
||||
nurseItemCode: null,
|
||||
nurseItemName: null,
|
||||
nurseItemContent: null,
|
||||
advanceAppointDuration: null,
|
||||
sort: null,
|
||||
};
|
||||
this.handleQuery();
|
||||
} else {
|
||||
if (this.nurseStationlist[0]) {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.queryParams.nurseTypeId = null;
|
||||
this.queryParams.pageSize = 10;
|
||||
this.queryParams.nurseItemCode = null;
|
||||
this.queryParams.nurseItemName = null;
|
||||
this.handleQuery();
|
||||
}
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
@ -1155,9 +1090,7 @@ export default {
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {
|
||||
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
@ -1172,34 +1105,33 @@ export default {
|
||||
});
|
||||
}
|
||||
}
|
||||
});totaln
|
||||
});
|
||||
totaln;
|
||||
},
|
||||
infos() {
|
||||
var queryFor = {
|
||||
pageNum: 1,
|
||||
pageSize:9999,
|
||||
pageSize: 9999,
|
||||
};
|
||||
getListByUser(queryFor).then((res) => {
|
||||
this.handstationlist = res.rows;
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm("是否确认删除此护理站护理项目?")
|
||||
.then(function () {
|
||||
return delNurseItem(ids);
|
||||
return delNurseItem(ids);
|
||||
})
|
||||
.then(() => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||
updatePicture(obj).then((res) => {
|
||||
});
|
||||
updatePicture(obj).then((res) => {});
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
@ -1211,21 +1143,15 @@ export default {
|
||||
|
||||
//权限列表
|
||||
info() {
|
||||
|
||||
//station /list //运维端
|
||||
//getListByUser //不在做if // nurseStationlist 重置 --if
|
||||
getListByUser(this.getListByUserquery).then((res) => {
|
||||
if (res.rows[0].isAdmin == "1") {
|
||||
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();
|
||||
}
|
||||
this.total4 = res.total;
|
||||
this.nurseStationlist = res.rows;
|
||||
this.queryParams.nurseStationId = res.rows[0].id;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user