护理站
This commit is contained in:
parent
bd07b0cfd7
commit
7ef4eb0392
@ -11,7 +11,6 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="护理站"
|
label="护理站"
|
||||||
prop="nurseStationId"
|
prop="nurseStationId"
|
||||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.nurseStationId"
|
v-model="queryParams.nurseStationId"
|
||||||
@ -27,21 +26,7 @@
|
|||||||
</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="请选择护理站"
|
|
||||||
@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-form-item label="科室编码" prop="departmentCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.departmentCode"
|
v-model="queryParams.departmentCode"
|
||||||
@ -478,15 +463,6 @@ export default {
|
|||||||
departmentPerson: null,
|
departmentPerson: null,
|
||||||
phone: null,
|
phone: null,
|
||||||
nurseStationName: null,
|
nurseStationName: null,
|
||||||
nurseStationDepartmentList: [
|
|
||||||
{
|
|
||||||
nurseStationId: "",
|
|
||||||
departmentCode: "",
|
|
||||||
departmentName: "",
|
|
||||||
departmentPerson: "",
|
|
||||||
phone: "",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
nurseStationqueryParams: {
|
nurseStationqueryParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
@ -563,15 +539,12 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
|
||||||
// this.listinfo();
|
|
||||||
this.info();
|
this.info();
|
||||||
this.infos();
|
this.infos();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// add点击护理站名称
|
// add点击护理站名称
|
||||||
nurseclick(row) {
|
nurseclick(row) {
|
||||||
console.log(row);
|
|
||||||
this.stationid = row.id;
|
this.stationid = row.id;
|
||||||
this.innerVisible = false;
|
this.innerVisible = false;
|
||||||
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
this.form.nurseStationDepartmentList[this.index].nurseStationName =
|
||||||
@ -587,7 +560,6 @@ export default {
|
|||||||
//删除deldisease
|
//删除deldisease
|
||||||
deldisease(index) {
|
deldisease(index) {
|
||||||
this.form.nurseStationDepartmentList.splice(index, 1);
|
this.form.nurseStationDepartmentList.splice(index, 1);
|
||||||
console.log(this.form.nurseStationDepartmentList);
|
|
||||||
},
|
},
|
||||||
adddisease() {
|
adddisease() {
|
||||||
var obj = {
|
var obj = {
|
||||||
@ -632,7 +604,8 @@ export default {
|
|||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
id: null,
|
id: null,
|
||||||
nurseStationId: null,
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
departmentCode: null,
|
departmentCode: null,
|
||||||
departmentName: null,
|
departmentName: null,
|
||||||
departmentPerson: null,
|
departmentPerson: null,
|
||||||
@ -641,8 +614,7 @@ export default {
|
|||||||
createTime: null,
|
createTime: null,
|
||||||
updateBy: null,
|
updateBy: null,
|
||||||
updateTime: null,
|
updateTime: null,
|
||||||
nurseStationName: null,
|
|
||||||
nurseStationId: null,
|
|
||||||
nurseStationDepartmentList: [
|
nurseStationDepartmentList: [
|
||||||
{
|
{
|
||||||
nurseStationId: "",
|
nurseStationId: "",
|
||||||
@ -667,28 +639,26 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
|
||||||
this.resetForm("queryForm");
|
// this.queryParams = {
|
||||||
this.queryParams = {
|
// pageNum: 1,
|
||||||
pageNum: 1,
|
// pageSize: 10,
|
||||||
pageSize: 10,
|
|
||||||
nurseStationId: null,
|
// departmentCode: null,
|
||||||
departmentCode: null,
|
// departmentName: null,
|
||||||
departmentName: null,
|
// departmentPerson: null,
|
||||||
departmentPerson: null,
|
// phone: null,
|
||||||
phone: null,
|
// nurseStationName: null,
|
||||||
nurseStationName: null,
|
// };
|
||||||
};
|
if (this.nurseStationlist[0]) {
|
||||||
this.handleQuery();
|
|
||||||
} else {
|
|
||||||
console.log(1);
|
|
||||||
this.queryParams.departmentCode = null;
|
|
||||||
this.queryParams.pageSize = 10;
|
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
|
this.queryParams.pageSize = 10;
|
||||||
|
this.queryParams.departmentCode = null;
|
||||||
this.queryParams.departmentName = null;
|
this.queryParams.departmentName = null;
|
||||||
this.handleQuery();
|
|
||||||
}
|
}
|
||||||
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
|
|
||||||
addhd() {
|
addhd() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
getListByUser(this.nurseStationqueryParams).then((res) => {
|
||||||
@ -707,15 +677,10 @@ export default {
|
|||||||
//权限列表
|
//权限列表
|
||||||
info() {
|
info() {
|
||||||
getListByUser(this.nurseStationqueryParams).then((res) => {
|
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.total2 = res.total;
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.queryParams.nurseStationId = res.rows[0].id;
|
this.queryParams.nurseStationId = res.rows[0].id;
|
||||||
this.handleQuery();
|
this.getList();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
@ -743,7 +708,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form);
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -782,7 +746,6 @@ export default {
|
|||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
};
|
};
|
||||||
getListByUser(queryFor).then((res) => {
|
getListByUser(queryFor).then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.handstationlist = res.rows;
|
this.handstationlist = res.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="护理站"
|
label="护理站"
|
||||||
prop="nurseStationId"
|
prop="nurseStationId"
|
||||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.nurseStationId"
|
v-model="queryParams.nurseStationId"
|
||||||
@ -27,21 +26,6 @@
|
|||||||
</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="请选择护理站"
|
|
||||||
>
|
|
||||||
<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
|
<el-form-item
|
||||||
label="所属科室"
|
label="所属科室"
|
||||||
prop="departmentName"
|
prop="departmentName"
|
||||||
@ -917,614 +901,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import personjs from './personjs'
|
||||||
listPerson,
|
export default personjs
|
||||||
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.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>
|
</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>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-form
|
<el-form
|
||||||
:model="queryParams"
|
:model="getListByUserquery"
|
||||||
ref="queryForm"
|
ref="queryForm"
|
||||||
size="small"
|
size="small"
|
||||||
:inline="true"
|
:inline="true"
|
||||||
v-show="showSearch"
|
v-show="showSearch"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
>
|
>
|
||||||
<el-form-item
|
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||||
label="护理站名称"
|
|
||||||
prop="nurseStationName"
|
|
||||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
|
||||||
>
|
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nurseStationName"
|
v-model="getListByUserquery.nurseStationName"
|
||||||
placeholder="请输入护理站"
|
|
||||||
clearable
|
|
||||||
@keyup.enter.native="handleQuery"
|
|
||||||
/>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="所属护理站" prop="nurseStationName" v-else>
|
|
||||||
<el-input
|
|
||||||
v-model="queryParams.nurseStationName"
|
|
||||||
placeholder="请输入护理站"
|
placeholder="请输入护理站"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
@ -30,7 +18,7 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="护理站编号" prop="nurseStationCode">
|
<el-form-item label="护理站编号" prop="nurseStationCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nurseStationCode"
|
v-model="getListByUserquery.nurseStationCode"
|
||||||
placeholder="请输入护理站编号"
|
placeholder="请输入护理站编号"
|
||||||
clearable
|
clearable
|
||||||
@keyup.enter.native="handleQuery"
|
@keyup.enter.native="handleQuery"
|
||||||
@ -90,13 +78,13 @@
|
|||||||
|
|
||||||
<right-toolbar
|
<right-toolbar
|
||||||
:showSearch.sync="showSearch"
|
:showSearch.sync="showSearch"
|
||||||
@queryTable="getList"
|
@queryTable="info"
|
||||||
></right-toolbar>
|
></right-toolbar>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-table
|
<el-table
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
:data="stationList"
|
:data="nurseStationlist"
|
||||||
@selection-change="handleSelectionChange"
|
@selection-change="handleSelectionChange"
|
||||||
>
|
>
|
||||||
<el-table-column type="selection" width="55" align="center" />
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
@ -163,11 +151,11 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<pagination
|
<pagination
|
||||||
v-show="total > 0"
|
v-show="total2 > 0"
|
||||||
:total="total"
|
:total="total2"
|
||||||
:page.sync="queryParams.pageNum"
|
:page.sync="getListByUserquery.pageNum"
|
||||||
:limit.sync="queryParams.pageSize"
|
:limit.sync="getListByUserquery.pageSize"
|
||||||
@pagination="liststationinfo"
|
@pagination="info"
|
||||||
/>
|
/>
|
||||||
<!-- 新增护理站信息对话框 -->
|
<!-- 新增护理站信息对话框 -->
|
||||||
<el-dialog
|
<el-dialog
|
||||||
@ -439,19 +427,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<!-- station/list -->
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
listStation,
|
|
||||||
getStation,
|
getStation,
|
||||||
delStation,
|
delStation,
|
||||||
addStation,
|
addStation,
|
||||||
updateStation,
|
updateStation,
|
||||||
getFirstLevelInfo,
|
getFirstLevelInfo,
|
||||||
getSecondaryLevelInfo,
|
getSecondaryLevelInfo,
|
||||||
getInfoLists,
|
|
||||||
updatePicture,
|
updatePicture,
|
||||||
} from "@/api/system/station";
|
} from "@/api/system/station";
|
||||||
import { getInfoList } from "@/api/system/nurseItem";
|
|
||||||
import stationAcatar from "../stationAvatar/index.vue";
|
import stationAcatar from "../stationAvatar/index.vue";
|
||||||
import { getListByUser } from "@/api/system/userlist.js";
|
import { getListByUser } from "@/api/system/userlist.js";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
@ -558,27 +544,6 @@ export default {
|
|||||||
pageSize: 10,
|
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: {},
|
form: {},
|
||||||
ids: 1,
|
ids: 1,
|
||||||
@ -638,7 +603,6 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
|
||||||
this.getaddress();
|
this.getaddress();
|
||||||
this.info();
|
this.info();
|
||||||
this.infos();
|
this.infos();
|
||||||
@ -721,10 +685,6 @@ export default {
|
|||||||
this.provincelist = res.data;
|
this.provincelist = res.data;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getList() {
|
|
||||||
this.liststationinfo();
|
|
||||||
this.loading = true;
|
|
||||||
},
|
|
||||||
// 取消按钮
|
// 取消按钮
|
||||||
cancel() {
|
cancel() {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
@ -768,21 +728,16 @@ export default {
|
|||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
liststationinfo() {
|
liststationinfo() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
listStation(this.queryParams).then((response) => {
|
this.info()
|
||||||
this.stationList = response.rows;
|
|
||||||
this.total = response.total;
|
|
||||||
this.loading = false;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.queryParams.pageNum = 1;
|
this.getListByUserquery.pageNum = 1;
|
||||||
this.liststationinfo();
|
this.info();
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
this.getListByUserquery = {
|
||||||
this.queryParams = {
|
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
areaCode: null,
|
areaCode: null,
|
||||||
@ -803,13 +758,7 @@ export default {
|
|||||||
};
|
};
|
||||||
this.resetForm("queryForm");
|
this.resetForm("queryForm");
|
||||||
this.handleQuery();
|
this.handleQuery();
|
||||||
} else {
|
|
||||||
// console.log(1);
|
|
||||||
this.queryParams.pageSize = 10;
|
|
||||||
this.queryParams.pageNum = 1;
|
|
||||||
this.queryParams.nurseStationCode = null;
|
|
||||||
this.handleQuery();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -869,14 +818,14 @@ export default {
|
|||||||
}
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.info();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
addStation(this.form).then((response) => {
|
addStation(this.form).then((response) => {
|
||||||
if (response.code) {
|
if (response.code) {
|
||||||
this.$modal.msgSuccess("新增成功");
|
this.$modal.msgSuccess("新增成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.getList();
|
this.info();
|
||||||
} else {
|
} else {
|
||||||
this.form.nurseStationType = obj;
|
this.form.nurseStationType = obj;
|
||||||
}
|
}
|
||||||
@ -900,7 +849,7 @@ export default {
|
|||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {});
|
updatePicture(obj).then((res) => {});
|
||||||
}
|
}
|
||||||
this.getList();
|
this.info();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
@ -910,7 +859,7 @@ export default {
|
|||||||
this.download(
|
this.download(
|
||||||
"system/station/export",
|
"system/station/export",
|
||||||
{
|
{
|
||||||
...this.queryParams,
|
...this.getListByUserquery,
|
||||||
},
|
},
|
||||||
`station_${new Date().getTime()}.xlsx`
|
`station_${new Date().getTime()}.xlsx`
|
||||||
);
|
);
|
||||||
@ -944,24 +893,21 @@ export default {
|
|||||||
"导入结果",
|
"导入结果",
|
||||||
{ dangerouslyUseHTMLString: true }
|
{ dangerouslyUseHTMLString: true }
|
||||||
);
|
);
|
||||||
this.getList();
|
this.info();
|
||||||
},
|
},
|
||||||
// 文件上传中处理
|
// 文件上传中处理
|
||||||
handleFileUploadProgress(event, file, fileList) {
|
handleFileUploadProgress(event, file, fileList) {
|
||||||
this.upload.isUploading = true;
|
this.upload.isUploading = true;
|
||||||
},
|
},
|
||||||
//权限列表
|
//护理站限列表
|
||||||
info() {
|
info() {
|
||||||
|
//加个所属区域
|
||||||
getListByUser(this.getListByUserquery).then((res) => {
|
getListByUser(this.getListByUserquery).then((res) => {
|
||||||
if (res.rows[0].isAdmin == "1") {
|
// 页面
|
||||||
|
// /所属区域
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.total2 = res.total;
|
this.total2 = res.total;
|
||||||
} else {
|
this.loading=false
|
||||||
this.total2 = res.total;
|
|
||||||
this.nurseStationlist = res.rows;
|
|
||||||
this.queryParams.id = res.rows[0].id;
|
|
||||||
this.handleQuery();
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
infos() {
|
infos() {
|
||||||
|
|||||||
@ -847,7 +847,6 @@ export default {
|
|||||||
},
|
},
|
||||||
delnurseStationConsumables(index) {
|
delnurseStationConsumables(index) {
|
||||||
this.form.nurseStationConsumables.splice(index, 1);
|
this.form.nurseStationConsumables.splice(index, 1);
|
||||||
console.log(this.form.nurseStationConsumables);
|
|
||||||
},
|
},
|
||||||
addnurseStationConsumables() {
|
addnurseStationConsumables() {
|
||||||
var obj = {
|
var obj = {
|
||||||
@ -865,7 +864,6 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
choicenurseStation(item, index) {
|
choicenurseStation(item, index) {
|
||||||
console.log(item);
|
|
||||||
this.index = index;
|
this.index = index;
|
||||||
this.open2 = true;
|
this.open2 = true;
|
||||||
},
|
},
|
||||||
@ -878,9 +876,6 @@ export default {
|
|||||||
this.reset2();
|
this.reset2();
|
||||||
},
|
},
|
||||||
clicknurseStation(item) {
|
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].nurseStationId = item.id;
|
||||||
this.form.nurseStationConsumables[this.index].nurseStationName =
|
this.form.nurseStationConsumables[this.index].nurseStationName =
|
||||||
item.nurseStationName;
|
item.nurseStationName;
|
||||||
@ -928,10 +923,11 @@ export default {
|
|||||||
},
|
},
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
id: null,
|
id: null,
|
||||||
consumablePrice: null,
|
consumablePrice: null,
|
||||||
sort: null,
|
sort: null,
|
||||||
nurseStationId: "",
|
|
||||||
nurseStationConsumables: [
|
nurseStationConsumables: [
|
||||||
{
|
{
|
||||||
nurseStationId: "",
|
nurseStationId: "",
|
||||||
@ -959,14 +955,7 @@ export default {
|
|||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.listStationConsumableinfo();
|
this.listStationConsumableinfo();
|
||||||
},
|
},
|
||||||
//护理站分页
|
|
||||||
// listinfo() {
|
|
||||||
// list(this.nurseStationqueryParams).then((res) => {
|
|
||||||
// this.nurseStationlist2 = res.rows;
|
|
||||||
// console.log(this.nurseStationlist2);
|
|
||||||
// this.total2 = res.total;
|
|
||||||
// });
|
|
||||||
// },
|
|
||||||
//护理站搜索
|
//护理站搜索
|
||||||
handleQuery2() {
|
handleQuery2() {
|
||||||
this.getListByUserquery.pageNum = 1;
|
this.getListByUserquery.pageNum = 1;
|
||||||
@ -1032,7 +1021,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form);
|
|
||||||
this.$refs["form"].validate((valid) => {
|
this.$refs["form"].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
@ -1084,17 +1072,10 @@ export default {
|
|||||||
//权限列表
|
//权限列表
|
||||||
info () {
|
info () {
|
||||||
getListByUser(this.getListByUserquery).then((res) => {
|
getListByUser(this.getListByUserquery).then((res) => {
|
||||||
console.log(res);
|
|
||||||
if (res.rows[0].isAdmin == "1") {
|
|
||||||
console.log(true);
|
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.total3 = res.total;
|
this.total3 = res.total;
|
||||||
} else {
|
|
||||||
this.total3 = res.total;
|
|
||||||
this.nurseStationlist = res.rows;
|
|
||||||
this.queryParams.nurseStationId = res.rows[0].id;
|
this.queryParams.nurseStationId = res.rows[0].id;
|
||||||
this.handleQuery();
|
this.getList();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
infos() {
|
infos() {
|
||||||
@ -1103,7 +1084,6 @@ export default {
|
|||||||
pageSize: 9999,
|
pageSize: 9999,
|
||||||
};
|
};
|
||||||
getListByUser(queryFor).then((res) => {
|
getListByUser(queryFor).then((res) => {
|
||||||
console.log(res);
|
|
||||||
this.handstationlist = res.rows;
|
this.handstationlist = res.rows;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@ -12,13 +12,11 @@
|
|||||||
label="护理站名称"
|
label="护理站名称"
|
||||||
prop="nurseStationId"
|
prop="nurseStationId"
|
||||||
label-width="100px"
|
label-width="100px"
|
||||||
v-if="nurseStationlist.find((e) => e.isAdmin == '1')"
|
|
||||||
>
|
>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="queryParams.nurseStationId"
|
v-model="queryParams.nurseStationId"
|
||||||
clearable
|
clearable
|
||||||
placeholder="请选择护理站"
|
placeholder="请选择护理站"
|
||||||
|
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in handstationlist"
|
v-for="item in handstationlist"
|
||||||
@ -29,28 +27,6 @@
|
|||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</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-form-item label="护理项目编号" prop="nurseItemCode">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="queryParams.nurseItemCode"
|
v-model="queryParams.nurseItemCode"
|
||||||
@ -477,7 +453,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
size="mini"
|
size="mini"
|
||||||
@click="stationlist"
|
@click="handleQuery2"
|
||||||
>搜索</el-button
|
>搜索</el-button
|
||||||
>
|
>
|
||||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
||||||
@ -537,7 +513,7 @@
|
|||||||
:total="total4"
|
:total="total4"
|
||||||
:page.sync="getListByUserquery.pageNum"
|
:page.sync="getListByUserquery.pageNum"
|
||||||
:limit.sync="getListByUserquery.pageSize"
|
:limit.sync="getListByUserquery.pageSize"
|
||||||
@pagination="stationlist"
|
@pagination="getList"
|
||||||
/>
|
/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<!-- 耗材弹框 -->
|
<!-- 耗材弹框 -->
|
||||||
@ -700,8 +676,6 @@ import {
|
|||||||
delNurseItem,
|
delNurseItem,
|
||||||
addNurseItem,
|
addNurseItem,
|
||||||
updateNurseItem,
|
updateNurseItem,
|
||||||
getInfoList,
|
|
||||||
liststation,
|
|
||||||
updatePicture,
|
updatePicture,
|
||||||
} from "@/api/system/nurseItem";
|
} from "@/api/system/nurseItem";
|
||||||
import { getToken } from "@/utils/auth";
|
import { getToken } from "@/utils/auth";
|
||||||
@ -749,8 +723,6 @@ export default {
|
|||||||
stationConsumableList: [],
|
stationConsumableList: [],
|
||||||
// 护理站护理项目表格数据
|
// 护理站护理项目表格数据
|
||||||
nurseItemList: [],
|
nurseItemList: [],
|
||||||
//护理站类型表
|
|
||||||
typelist: [],
|
|
||||||
// 弹出层标题
|
// 弹出层标题
|
||||||
title: "",
|
title: "",
|
||||||
// 是否显示弹出层
|
// 是否显示弹出层
|
||||||
@ -785,7 +757,6 @@ export default {
|
|||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
nurseStationItem: {
|
nurseStationItem: {
|
||||||
nurseStationId: null,
|
|
||||||
nurseTypeId: null,
|
nurseTypeId: null,
|
||||||
nurseItemName: "",
|
nurseItemName: "",
|
||||||
nurseItemContent: "",
|
nurseItemContent: "",
|
||||||
@ -827,11 +798,9 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
|
||||||
this.info();
|
this.info();
|
||||||
this.getInfoListinfo();
|
|
||||||
this.infos();
|
this.infos();
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
imgUrl(imgUrl) {
|
imgUrl(imgUrl) {
|
||||||
@ -927,22 +896,13 @@ export default {
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
};
|
};
|
||||||
this.stationlist();
|
this.info();
|
||||||
},
|
},
|
||||||
//下拉框
|
//护理站搜索
|
||||||
stationlist() {
|
handleQuery2() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
getListByUser(this.getListByUserquery).then((res) => {
|
this.getListByUserquery.pageNum = 1;
|
||||||
this.total4 = res.total;
|
this.info();
|
||||||
this.nurseStationlist = res.rows;
|
|
||||||
});
|
|
||||||
this.loading=false;
|
|
||||||
},
|
|
||||||
//护理类型
|
|
||||||
getInfoListinfo() {
|
|
||||||
getInfoList().then((res) => {
|
|
||||||
this.typelist = res.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
/** 耗材列表 */
|
/** 耗材列表 */
|
||||||
listStationConsumable() {
|
listStationConsumable() {
|
||||||
@ -970,13 +930,6 @@ export default {
|
|||||||
getList() {
|
getList() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
list(this.queryParams).then((response) => {
|
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.nurseItemList = response.rows;
|
||||||
this.total = response.total;
|
this.total = response.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
@ -989,8 +942,7 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
obj.pictureUrlList.push(this.form.nurseStationItem.itemPictureUrl);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -1031,8 +983,9 @@ export default {
|
|||||||
// 表单重置
|
// 表单重置
|
||||||
reset() {
|
reset() {
|
||||||
this.form = {
|
this.form = {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
nurseStationItem: {
|
nurseStationItem: {
|
||||||
nurseStationId: null,
|
|
||||||
nurseTypeId: null,
|
nurseTypeId: null,
|
||||||
nurseItemName: null,
|
nurseItemName: null,
|
||||||
nurseItemContent: null,
|
nurseItemContent: null,
|
||||||
@ -1041,23 +994,19 @@ export default {
|
|||||||
sort: null,
|
sort: null,
|
||||||
nurseStationName: "请选择所属护理站",
|
nurseStationName: "请选择所属护理站",
|
||||||
},
|
},
|
||||||
nurseStationItemConsumables: [
|
|
||||||
|
// nurseStationItemConsumables: [],
|
||||||
|
// nurseStationItemPrices: [
|
||||||
// {
|
// {
|
||||||
// nurseStationConsumableId: "",
|
// serveDurationUnit: null,
|
||||||
// consumableCount: "",
|
// price: null,
|
||||||
// consumablePrice: "",
|
// description: null,
|
||||||
|
// ids: this.ids,
|
||||||
// },
|
// },
|
||||||
],
|
// ],
|
||||||
nurseStationItemPrices: [
|
|
||||||
{
|
|
||||||
serveDurationUnit: null,
|
|
||||||
price: null,
|
|
||||||
description: null,
|
|
||||||
ids: this.ids,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
};
|
||||||
this.resetForm("form");
|
this.resetForm("form");
|
||||||
|
console.log(this.form);
|
||||||
},
|
},
|
||||||
/** 搜索按钮操作 */
|
/** 搜索按钮操作 */
|
||||||
handleQuery() {
|
handleQuery() {
|
||||||
@ -1066,27 +1015,13 @@ export default {
|
|||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
if (this.nurseStationlist[0].isAdmin == "1") {
|
if (this.nurseStationlist[0]) {
|
||||||
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 {
|
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.queryParams.nurseTypeId = null;
|
this.queryParams.pageSize = 10;
|
||||||
this.queryParams.nurseItemCode = null;
|
this.queryParams.nurseItemCode = null;
|
||||||
this.queryParams.nurseItemName = null;
|
this.queryParams.nurseItemName = null;
|
||||||
this.handleQuery();
|
|
||||||
}
|
}
|
||||||
|
this.handleQuery();
|
||||||
},
|
},
|
||||||
// 多选框选中数据
|
// 多选框选中数据
|
||||||
handleSelectionChange(selection) {
|
handleSelectionChange(selection) {
|
||||||
@ -1155,9 +1090,7 @@ export default {
|
|||||||
obj.pictureUrlList.push(this.imgone);
|
obj.pictureUrlList.push(this.imgone);
|
||||||
}
|
}
|
||||||
if (obj.pictureUrlList.length > 0) {
|
if (obj.pictureUrlList.length > 0) {
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@ -1172,7 +1105,8 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});totaln
|
});
|
||||||
|
totaln;
|
||||||
},
|
},
|
||||||
infos() {
|
infos() {
|
||||||
var queryFor = {
|
var queryFor = {
|
||||||
@ -1195,11 +1129,9 @@ export default {
|
|||||||
.then(() => {
|
.then(() => {
|
||||||
var obj = { pictureUrlList: [] };
|
var obj = { pictureUrlList: [] };
|
||||||
obj.pictureUrlList.push(row.itemPictureUrl);
|
obj.pictureUrlList.push(row.itemPictureUrl);
|
||||||
updatePicture(obj).then((res) => {
|
updatePicture(obj).then((res) => {});
|
||||||
});
|
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess("删除成功");
|
this.$modal.msgSuccess("删除成功");
|
||||||
|
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
},
|
},
|
||||||
@ -1211,21 +1143,15 @@ export default {
|
|||||||
|
|
||||||
//权限列表
|
//权限列表
|
||||||
info() {
|
info() {
|
||||||
|
//station /list //运维端
|
||||||
|
//getListByUser //不在做if // nurseStationlist 重置 --if
|
||||||
getListByUser(this.getListByUserquery).then((res) => {
|
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.total4 = res.total;
|
||||||
this.nurseStationlist = res.rows;
|
this.nurseStationlist = res.rows;
|
||||||
this.queryParams.nurseStationId = res.rows[0].id;
|
this.queryParams.nurseStationId = res.rows[0].id;
|
||||||
this.handleQuery();
|
this.getList();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user