提交 0ee1a8bd 编写于 作者: Yuanzhao.dai's avatar Yuanzhao.dai

小红点

上级 beb3034a
<template>
<div>
<v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header>
<v-slidebar :authList="authList" :tokenValue="token" :notCompleteCount="10"></v-slidebar>
<v-slidebar :authList="authList" :tokenValue="token" :notCompleteCount="redNum"></v-slidebar>
<el-container>
<div class="content" id="body-content">
<transition name="router-fade" mode="out-in">
......@@ -25,6 +25,7 @@ import VFooter from './views/layout/footer.vue'
import { base64decode, isNotEmptyUtils, getUrlParamsMap } from "./utils/utils.js"
import { mapActions, mapGetters } from 'vuex'
import { getLoginUrl } from './utils/index.js'
import { getRedNum } from './utils/patients/patientsapi'
let vm = null
export default {
components:{
......@@ -38,7 +39,8 @@ export default {
token: '',
userName: '',
portrait: '',
authList: {}
authList: {},
redNum: 0,
}
},
computed:{
......@@ -51,7 +53,7 @@ export default {
vm.getToken()
},
mounted() {
vm.getRedData()
},
methods: {
// 解密token
......@@ -107,8 +109,29 @@ export default {
vm.$message.info(res.message)
}
})
}
}
},
getRedData() {
getRedNum({
openTime: (new Date()).getTime()
}).then((data) => {
if(data.code == '000000') {
vm.redNum = data.data
}
}).catch(error => {
vm.$message.error(error)
})
}
},
watch: {
$route:{
deep:true,
handler:function(newVal){
if(vm.$route.path == '/patients-manage/not-complete/uncompleted-list'){ //避免重复请求
vm.redNum = 0
}
}
}
}
}
</script>
......
......@@ -98,16 +98,24 @@ export const sendCompleteMessageList = (data) => {
description: '批量提醒居民完善信息',
})
};
export const getNotCompleteCount = (data) => {
export const getNotCompleteCount = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/uncomplate/counts`),
method: 'get',
data: data,
params: params,
description: '获取未完善居民人数',
})
};
export const getRedNum = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/uncompleted/last/counts`),
method: 'get',
params: params,
description: '获取小红点数据',
})
};
export const getPatientDetail = (patientId) => {
return fetch({
headers,
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册