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

# Conflicts:
#	src/layout/components/Navbar.vue
#	src/main.js
This commit is contained in:
闫晓茹 2022-09-19 13:11:21 +08:00
commit e82e6f6816
6 changed files with 1688 additions and 2 deletions

View File

@ -0,0 +1,44 @@
import request from '@/utils/request'
// 查询居住社区信息列表
export function listCommunityInfo(query) {
return request({
url: '/system/communityInfo/list',
method: 'get',
params: query
})
}
// 查询居住社区信息详细
export function getCommunityInfo(id) {
return request({
url: '/system/communityInfo/' + id,
method: 'get'
})
}
// 新增居住社区信息
export function addCommunityInfo(data) {
return request({
url: '/system/communityInfo/add',
method: 'post',
data: data
})
}
// 修改居住社区信息
export function updateCommunityInfo(data) {
return request({
url: '/system/nurseItemTemplate/edit',
method: 'post',
data: data
})
}
// 删除居住社区信息
export function delCommunityInfo(id) {
return request({
url: '/system/communityInfo/' + id,
method: 'delete'
})
}

60
src/api/system/person.js Normal file
View File

@ -0,0 +1,60 @@
import request from '@/utils/request'
// 查询护理站人员信息列表
export function listPerson(query) {
return request({
url: 'system/person/getNurseStationPersonList',
method: 'get',
params: query
})
}
// 查询护理站名称
export function stationList(query) {
return request({
url: 'system/station/list',
method: 'get',
params: query
})
}
// 查询所属科室
export function StationDepartmentList(query) {
return request({
url: 'system/StationDepartment/list',
method: 'get',
params: query
})
}
// 查询护理站人员信息详细
export function getPerson(id) {
return request({
url: '/system/person/' + id,
method: 'get'
})
}
// 新增护理站人员信息
export function addPerson(data) {
return request({
url: 'system/person/add',
method: 'post',
data: data
})
}
// 修改护理站人员信息
export function updatePerson(data) {
return request({
url: 'system/person/edit',
method: 'post',
data: data
})
}
// 删除护理站人员信息
export function delPerson(id) {
return request({
url: '/system/person/' + id,
method: 'delete'
})
}

View File

@ -1,7 +1,7 @@
<template>
<div class="login">
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">全医通管理系统</h3>
<el-form-item prop="username">
<el-input
v-model="loginForm.username"

View File

@ -1,7 +1,7 @@
<template>
<div class="register">
<el-form ref="registerForm" :model="registerForm" :rules="registerRules" class="register-form">
<h3 class="title">若依后台管理系统</h3>
<h3 class="title">全医通管理系统</h3>
<el-form-item prop="username">
<el-input v-model="registerForm.username" type="text" auto-complete="off" placeholder="账号">
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />

View File

@ -0,0 +1,305 @@
<template>
<div class="app-container">
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="所属区域编码" prop="areaCode">
<el-input
v-model="queryParams.areaCode"
placeholder="请输入所属区域编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="社区编码" prop="communityCode">
<el-input
v-model="queryParams.communityCode"
placeholder="请输入社区编码"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="社区名称" prop="communityName">
<el-input
v-model="queryParams.communityName"
placeholder="请输入社区名称"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="社区经度" prop="communityLongitude">
<el-input
v-model="queryParams.communityLongitude"
placeholder="请输入社区经度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item label="社区纬度" prop="communityLatitude">
<el-input
v-model="queryParams.communityLatitude"
placeholder="请输入社区纬度"
clearable
@keyup.enter.native="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
</el-form-item>
</el-form>
<el-row :gutter="10" class="mb8">
<el-col :span="1.5">
<el-button
type="primary"
plain
icon="el-icon-plus"
size="mini"
@click="handleAdd"
v-hasPermi="['system:communityInfo:add']"
>新增</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="success"
plain
icon="el-icon-edit"
size="mini"
:disabled="single"
@click="handleUpdate"
v-hasPermi="['system:communityInfo:edit']"
>修改</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="danger"
plain
icon="el-icon-delete"
size="mini"
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['system:communityInfo:remove']"
>删除</el-button>
</el-col>
<el-col :span="1.5">
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="handleExport"
v-hasPermi="['system:communityInfo:export']"
>导出</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="communityInfoList" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
<el-table-column label="所属区域编码" align="center" prop="areaCode" />
<el-table-column label="社区编码" align="center" prop="communityCode" />
<el-table-column label="社区名称" align="center" prop="communityName" />
<el-table-column label="社区经度" align="center" prop="communityLongitude" />
<el-table-column label="社区纬度" align="center" prop="communityLatitude" />
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<template slot-scope="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['system:communityInfo:edit']"
>修改</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:communityInfo:remove']"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.pageNum"
:limit.sync="queryParams.pageSize"
@pagination="getList"
/>
<!-- 添加或修改居住社区信息对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="所属区域编码" prop="areaCode">
<el-input v-model="form.areaCode" placeholder="请输入所属区域编码" />
</el-form-item>
<el-form-item label="社区编码" prop="communityCode">
<el-input v-model="form.communityCode" placeholder="请输入社区编码" />
</el-form-item>
<el-form-item label="社区名称" prop="communityName">
<el-input v-model="form.communityName" placeholder="请输入社区名称" />
</el-form-item>
<el-form-item label="社区经度" prop="communityLongitude">
<el-input v-model="form.communityLongitude" placeholder="请输入社区经度" />
</el-form-item>
<el-form-item label="社区纬度" prop="communityLatitude">
<el-input v-model="form.communityLatitude" placeholder="请输入社区纬度" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import { listCommunityInfo, getCommunityInfo, delCommunityInfo, addCommunityInfo, updateCommunityInfo } from "@/api/system/communityInfo";
export default {
name: "CommunityInfo",
data() {
return {
//
loading: true,
//
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
communityInfoList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
areaCode: null,
communityCode: null,
communityName: null,
communityLongitude: null,
communityLatitude: null,
},
//
form: {},
//
rules: {
}
};
},
created() {
this.getList();
},
methods: {
/** 查询居住社区信息列表 */
getList() {
this.loading = true;
listCommunityInfo(this.queryParams).then(response => {
this.communityInfoList = response.rows;
this.total = response.total;
this.loading = false;
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
id: null,
areaCode: null,
communityCode: null,
communityName: null,
communityLongitude: null,
communityLatitude: null,
createBy: null,
createTime: null,
updateBy: null,
updateTime: null
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length!==1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加居住社区信息";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getCommunityInfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改居住社区信息";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
updateCommunityInfo(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCommunityInfo(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal.confirm('是否确认删除居住社区信息编号为"' + ids + '"的数据项?').then(function() {
return delCommunityInfo(ids);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {});
},
/** 导出按钮操作 */
handleExport() {
this.download('system/communityInfo/export', {
...this.queryParams
}, `communityInfo_${new Date().getTime()}.xlsx`)
}
}
};
</script>

File diff suppressed because it is too large Load Diff