From 5f2a22dd31aaead053bd5dd4f59ca8873b694faa Mon Sep 17 00:00:00 2001 From: shidongli Date: Fri, 16 Sep 2022 18:25:30 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=A4=E7=90=86=E7=AB=99=E4=BA=BA=E5=91=98?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BB=A5=E5=8F=8A=E6=89=80=E5=B1=9E=E5=8C=BA?= =?UTF-8?q?=E5=9F=9F=E5=8A=9F=E8=83=BD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/communityInfo.js | 44 + src/api/system/person.js | 60 + src/directives.js | 14 + src/layout/components/Navbar.vue | 4 +- src/main.js | 3 +- src/views/system/communityInfo/index.vue | 305 ++++++ src/views/system/person/index.vue | 1277 ++++++++++++++++++++++ 7 files changed, 1704 insertions(+), 3 deletions(-) create mode 100644 src/api/system/communityInfo.js create mode 100644 src/api/system/person.js create mode 100644 src/directives.js create mode 100644 src/views/system/communityInfo/index.vue create mode 100644 src/views/system/person/index.vue diff --git a/src/api/system/communityInfo.js b/src/api/system/communityInfo.js new file mode 100644 index 0000000..f9fff17 --- /dev/null +++ b/src/api/system/communityInfo.js @@ -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' + }) +} diff --git a/src/api/system/person.js b/src/api/system/person.js new file mode 100644 index 0000000..c046256 --- /dev/null +++ b/src/api/system/person.js @@ -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' + }) +} diff --git a/src/directives.js b/src/directives.js new file mode 100644 index 0000000..99553b1 --- /dev/null +++ b/src/directives.js @@ -0,0 +1,14 @@ +import Vue from 'vue' + +Vue.directive('loadmore', { + bind(el, binding) { + // 获取element-ui定义好的scroll盒子 + const SELECTWRAP_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap') + SELECTWRAP_DOM.addEventListener('scroll', function() { + const CONDITION = this.scrollHeight - this.scrollTop === this.clientHeight; + if (CONDITION == false) { + binding.value() + } + }) + } +}) \ No newline at end of file diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 2a9b4e3..1a1562b 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -8,14 +8,14 @@