提交 93dfeb56 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-patients-20190513' of...

Merge branch 'dev-patients-20190513' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-patients-20190513
...@@ -105,10 +105,10 @@ const patientsRouters = { ...@@ -105,10 +105,10 @@ const patientsRouters = {
path: 'not-complete', path: 'not-complete',
component: notCompleteManage, component: notCompleteManage,
name: 'notCompleteManage', name: 'notCompleteManage',
redirect: 'not-complete/not-complete', redirect: 'not-complete/uncompleted-list',
children: [ children: [
{ {
path: 'not-complete', path: 'uncompleted-list',
component: notCompleteList, component: notCompleteList,
name: 'notCompleteList', name: 'notCompleteList',
meta: { meta: {
......
...@@ -19,6 +19,15 @@ export const getConstants = (params) => { ...@@ -19,6 +19,15 @@ export const getConstants = (params) => {
/*居民管理*/ /*居民管理*/
export const getPatientList = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/infolist`),
method: 'post',
data: data,
description: '获取居民列表',
})
};
export const getDiseasesList = (params) => { export const getDiseasesList = (params) => {
return fetch({ return fetch({
headers, headers,
...@@ -71,21 +80,30 @@ export const getNotCompleteList = (params) => { ...@@ -71,21 +80,30 @@ export const getNotCompleteList = (params) => {
description: '获取资料不全居民列表', description: '获取资料不全居民列表',
}) })
}; };
export const sendCompleteMessage = (params) => { export const sendCompleteMessage = (data) => {
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/remind`), url: getBaseUrl(`healths/patients/remind`),
method: 'post', method: 'post',
data: params, data: data,
description: '提醒居民完善信息', description: '提醒居民完善信息',
}) })
}; };
export const getNotCompleteCount = (params) => { export const sendCompleteMessageList = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/list/remind`),
method: 'post',
data: data,
description: '批量提醒居民完善信息',
})
};
export const getNotCompleteCount = (data) => {
return fetch({ return fetch({
headers, headers,
url: getBaseUrl(`healths/patients/uncomplate/counts`), url: getBaseUrl(`healths/patients/uncomplate/counts`),
method: 'get', method: 'get',
data: params, data: data,
description: '获取未完善居民人数', description: '获取未完善居民人数',
}) })
}; };
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
<p class="redNum" <p class="redNum"
v-if="subItem.title == '资料不全居民' v-if="subItem.title == '资料不全居民'
&&notCompleteCount &&notCompleteCount
&&$route.path!='/patients-manage/not-complete/not-complete'" &&$route.path!='/patients-manage/not-complete/uncompleted-list'"
> >
<span v-if="notCompleteCount>999">+999</span> <span v-if="notCompleteCount>999">+999</span>
<span v-else>{{notCompleteCount}}</span> <span v-else>{{notCompleteCount}}</span>
...@@ -103,7 +103,7 @@ export default { ...@@ -103,7 +103,7 @@ export default {
{ {
title: '资料不全居民', title: '资料不全居民',
icon: 'el-icon-setting', icon: 'el-icon-setting',
index: 'patients-manage/not-complete/not-complete' index: 'patients-manage/not-complete/uncompleted-list'
} }
] ]
} }
......
...@@ -78,7 +78,10 @@ ...@@ -78,7 +78,10 @@
<script> <script>
import BreadCrumb from '../../../components/breadcrumb.vue' import BreadCrumb from '../../../components/breadcrumb.vue'
import { getNotCompleteList, sendCompleteMessage, getNotCompleteCount } from '../../../utils/patients/patientsapi' import { getNotCompleteList,
sendCompleteMessage,
getNotCompleteCount,
sendCompleteMessageList} from '../../../utils/patients/patientsapi'
export default { export default {
name: "not-complete", name: "not-complete",
components: { components: {
...@@ -99,9 +102,6 @@ ...@@ -99,9 +102,6 @@
selectList: [] selectList: []
} }
}, },
created() {
//const vm = this;
},
mounted() { mounted() {
this.getNotComplete() this.getNotComplete()
this.getNotCompleteNum() this.getNotCompleteNum()
...@@ -125,15 +125,14 @@ ...@@ -125,15 +125,14 @@
pageSize, pageSize,
}).then((data) => { }).then((data) => {
if(data.code == "000000") { if(data.code == "000000") {
this.notCompleteList = data.data this.notCompleteList = data.data;
console.log('1212',this.notCompleteList)
} }
}).catch(function (error) { }).catch((error) => {
this.$message({ this.$message({
message: error, message: error,
type: 'error' type: 'error'
}); });
}); })
}, },
sendMessageSingle(item) { //发送单个提醒 sendMessageSingle(item) { //发送单个提醒
sendCompleteMessage({ sendCompleteMessage({
...@@ -151,33 +150,59 @@ ...@@ -151,33 +150,59 @@
type: 'error' type: 'error'
}); });
} }
}).catch(function (error) { }).catch((error) => {
this.$message({ this.$message({
message: error, message: error,
type: 'error' type: 'error'
}); });
}); })
}, },
sendCompleteMessageMultiple(item) { sendCompleteMessageMultiple() {
if(!this.selectList.length) { if(!this.selectList.length) {
this.$message({
message: '请选择居民',
type: 'warning'
});
return;
}
let patientIdList = []
this.selectList.forEach(item => {
patientIdList.push(item.patientId)
})
sendCompleteMessageList({
qrcodeType: 1,
patientIds: patientIdList,
}).then((data) => {
if(data.code == "000000") {
this.$message({ this.$message({
message: '请选择居民', message: '已向居民发送提醒',
type: 'warning' type: 'success'
});
}else {
this.$message({
message: data.message,
type: 'error'
}); });
} }
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
})
}, },
getNotCompleteNum() { getNotCompleteNum() {
getNotCompleteCount().then((data) => { getNotCompleteCount().then((data) => {
if(data.code == "000000") { if(data.code == "000000") {
this.pagination.totalRows = data.data; this.pagination.totalRows = data.data;
} }
}).catch(function (error) { }).catch((error) => {
this.$message({ this.$message({
message: error, message: error,
type: 'error' type: 'error'
}); });
}); })
} }
} }
} }
...@@ -245,6 +270,7 @@ ...@@ -245,6 +270,7 @@
.el-pagination.is-background .el-pager li:not(.disabled).active { .el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important; background: #449284 !important;
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册