提交 f00391f7 编写于 作者: 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

# Conflicts:
#	src/utils/fetch.js
<template> <template>
<div> <div>
<v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header> <v-header :userName="userName" :portrait="portrait" :idType="idType"></v-header>
<v-slidebar :authList="authList" :tokenValue="token"></v-slidebar> <v-slidebar :authList="authList" :tokenValue="token" :notCompleteCount="10"></v-slidebar>
<el-container> <el-container>
<div class="content" id="body-content"> <div class="content" id="body-content">
<transition name="router-fade" mode="out-in"> <transition name="router-fade" mode="out-in">
......
...@@ -13,3 +13,11 @@ ...@@ -13,3 +13,11 @@
color: #449284; color: #449284;
border-color: #449284; border-color: #449284;
} }
/*恢复messageBox默认样式*/
.el-message-box {
}
.el-message-box__status+.el-message-box__message{
padding-left: 20px;
padding-right: 20px;
}
...@@ -4,8 +4,21 @@ import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index' ...@@ -4,8 +4,21 @@ import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
const headers = { const headers = {
sysCode: 9 sysCode: 9
} /**/ }
/*工作台*/
/*常量API*/
export const getConstants = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/constants/`),
method: 'get',
params: params,
description: '获取常量',
})
};
/*居民管理*/
export const getDiseasesList = (params) => { export const getDiseasesList = (params) => {
return fetch({ return fetch({
headers, headers,
...@@ -16,6 +29,16 @@ export const getDiseasesList = (params) => { ...@@ -16,6 +29,16 @@ export const getDiseasesList = (params) => {
}) })
}; };
export const getLabelList = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/labels/`),
method: 'get',
params: params,
description: '获取分组列表',
})
}
// 获取七牛上传token // 获取七牛上传token
export const getQiniuToken = (params) => { export const getQiniuToken = (params) => {
return fetch({ return fetch({
...@@ -37,7 +60,6 @@ export const submitFeedback = (data) => { ...@@ -37,7 +60,6 @@ export const submitFeedback = (data) => {
method: 'post', method: 'post',
data: data, data: data,
}) })
}; };
/*资料不全居民*/ /*资料不全居民*/
...@@ -46,7 +68,6 @@ export const getNotCompleteList = (params) => { ...@@ -46,7 +68,6 @@ export const getNotCompleteList = (params) => {
headers, headers,
url: getBaseUrl(`healths/patients/uncomplate/${params.pageNo}/${params.pageSize}`), url: getBaseUrl(`healths/patients/uncomplate/${params.pageNo}/${params.pageSize}`),
method: 'get', method: 'get',
params: params,
description: '获取资料不全居民列表', description: '获取资料不全居民列表',
}) })
}; };
...@@ -68,3 +89,13 @@ export const getNotCompleteCount = (params) => { ...@@ -68,3 +89,13 @@ export const getNotCompleteCount = (params) => {
description: '获取未完善居民人数', description: '获取未完善居民人数',
}) })
}; };
export const getPatientDetail = (patientId) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/${patientId}`),
method: 'get',
// params: params,
description: '获取居民详情',
})
};
...@@ -8,6 +8,14 @@ ...@@ -8,6 +8,14 @@
<el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="'/'+subItem.index"> <el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="'/'+subItem.index">
<i class="sub-icon" :class="subItem.icon"></i> <i class="sub-icon" :class="subItem.icon"></i>
{{subItem.title}} {{subItem.title}}
<p class="redNum"
v-if="subItem.title == '资料不全居民'
&&notCompleteCount
&&$route.path!='/patients-manage/not-complete/not-complete'"
>
<span v-if="notCompleteCount>999">+999</span>
<span v-else>{{notCompleteCount}}</span>
</p>
</el-menu-item> </el-menu-item>
</el-submenu> </el-submenu>
</template> </template>
...@@ -33,6 +41,9 @@ export default { ...@@ -33,6 +41,9 @@ export default {
authList: { authList: {
type: Object, type: Object,
default: () => {} default: () => {}
},
notCompleteCount: {
type: Number,
} }
}, },
data() { data() {
...@@ -158,6 +169,19 @@ export default { ...@@ -158,6 +169,19 @@ export default {
// background: #06232C !important; // background: #06232C !important;
// } // }
} }
.redNum {
display: inline-block;
border-radius: 10px;
margin-left: 15px;
background: #EE263E;
color: #fff;
font-size: 12px;
line-height: 12px;
padding: 5px 10px;
span {
display: block;
}
}
} }
</style> </style>
......
...@@ -53,8 +53,9 @@ ...@@ -53,8 +53,9 @@
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="name" prop="name"
width="120"> width="120"
操作 label="操作"
>
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
......
...@@ -8,23 +8,16 @@ ...@@ -8,23 +8,16 @@
<el-input v-model="labelName" placeholder="请输入分组名称" size="small"></el-input> <el-input v-model="labelName" placeholder="请输入分组名称" size="small"></el-input>
</el-col> </el-col>
<el-col :span="6"> <el-col :span="6">
<el-button type="primary" size="small" class="create-new-label">查询</el-button> <el-button type="primary" size="small" class="create-new-label" @click="getList">查询</el-button>
<el-button type="default" size="small" class="create-new-label">重置</el-button> <el-button type="default" size="small" class="create-new-label" @click="resetLabelName">重置</el-button>
</el-col> </el-col>
<el-col :span="6" class="right"> <el-col :span="6" class="right">
<el-button type="primary" size="small" class="create-new-label">新建分组</el-button> <el-button type="primary" size="small" class="create-new-label" :disabled="labelNameList.length >= 999">新建分组</el-button>
</el-col> </el-col>
</el-row> </el-row>
<p class="total-label">共:75个分组</p> <p class="total-label">共:{{labelNameList.length}}个分组</p>
<div class="label-list"> <div class="label-list" v-if="labelNameList && labelNameList.length>0">
<el-tag class="each-label" @click="goToDetail">高新区(34人)</el-tag> <el-tag class="each-label" @click="goToDetail" v-for="(item, index) in labelNameList" :key="index">{{item.labelName}}({{item.labelPatientNums}}人)</el-tag>
<el-tag class="each-label">高血压(64人)</el-tag>
<el-tag class="each-label">权力的游戏(34人)</el-tag>
<el-tag class="each-label">端到端(34人)</el-tag>
<el-tag class="each-label">高新区(34人)</el-tag>
<el-tag class="each-label">高血压(64人)</el-tag>
<el-tag class="each-label">权力的游戏(34人)</el-tag>
<el-tag class="each-label">端到端(34人)</el-tag>
</div> </div>
</div> </div>
</div> </div>
...@@ -32,6 +25,8 @@ ...@@ -32,6 +25,8 @@
<script> <script>
import BreadCrumb from "@/components/breadcrumb.vue"; import BreadCrumb from "@/components/breadcrumb.vue";
import * as commonUtil from "@/utils/utils"; import * as commonUtil from "@/utils/utils";
import { getLabelList } from '@/utils/patients/patientsapi'
export default { export default {
...@@ -40,22 +35,42 @@ ...@@ -40,22 +35,42 @@
curmbFirst: "居民管理", curmbFirst: "居民管理",
curmbSecond: "分组管理", curmbSecond: "分组管理",
labelName: '', labelName: '',
labelNameList: [],
} }
}, },
components: { components: {
BreadCrumb, BreadCrumb,
}, },
created(){ created(){
// 获取分组列表 this.getList();
this.getLabelList();
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
getLabelList(){ getList(){
console.log('获取分组列表...'); // 获取分组列表
let num = {
type: 1,
token : localStorage.getItem("token"),
};
if(this.labelName){
num.labelName = this.labelName;
}
commonUtil.openLoading(this);
getLabelList(num).then(data => {
commonUtil.closeLoading(this);
// console.log('获取分组列表>> ', data)
if(data.data && data.data.labelNameList){
this.labelNameList = data.data.labelNameList;
}
}).catch(err => {
console.log('error: ', err)
});
},
resetLabelName(){
this.labelName = '';
}, },
goToDetail(){ goToDetail(){
this.$router.push({path: '/patients-manage/labels-manage/labels-detail'}) this.$router.push({path: '/patients-manage/labels-manage/labels-detail'})
...@@ -119,8 +134,9 @@ ...@@ -119,8 +134,9 @@
/*定义滚动条轨道 内阴影+圆角*/ /*定义滚动条轨道 内阴影+圆角*/
&::-webkit-scrollbar-track &::-webkit-scrollbar-track
{ {
border-radius: 10px; // border-radius: 10px;
background-color: rgb(241, 239, 239); // background-color: rgb(241, 239, 239);
// background: #fff;
} }
/*定义滑块 内阴影+圆角*/ /*定义滑块 内阴影+圆角*/
&::-webkit-scrollbar-thumb &::-webkit-scrollbar-thumb
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<div class="f-main-content screenSet"> <div class="f-main-content screenSet">
<div> <div>
<div class="right-btn-group"> <div class="right-btn-group">
<el-button plain size="small" @click.native="deletePatient">删除</el-button> <el-button plain size="small" @click="deletePatient">删除</el-button>
<el-button type="primary" size="small" @click="editPatient">编辑</el-button> <el-button type="primary" size="small" @click="editPatient">编辑</el-button>
</div> </div>
<el-tabs v-model="activeName" @tab-click="tabChangeHandler"> <el-tabs v-model="activeName" @tab-click="tabChangeHandler">
...@@ -17,23 +17,23 @@ ...@@ -17,23 +17,23 @@
<div class="section"> <div class="section">
<div class="has-header"> <div class="has-header">
<p>基本信息</p> <p>基本信息</p>
<p class="right-p"><span>添加时间:2019-03-23 12:30</span><span>最后修改时间:2019-03-28 15:30</span></p> <p class="right-p"><span>添加时间:{{patientInfo.createdTime}}</span><span>最后修改时间:{{patientInfo.modifiedTime}}</span></p>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">居民姓名:</p><p class="info">云晓雀</p></div> <div><p class="title">居民姓名:</p><p class="info">{{patientInfo.nickname | emptyFilter}}</p></div>
<div><p class="title">身份证:</p><p class="info">12849826412648</p></div> <div><p class="title">身份证:</p><p class="info">{{patientInfo.idNo | emptyFilter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">出生年月:</p><p class="info">1965-04-22</p></div> <div><p class="title">出生年月:</p><p class="info">{{patientInfo.birthTime | emptyFilter}}</p></div>
<div><p class="title">性别:</p><p class="info"></p></div> <div><p class="title">性别:</p><p class="info">{{patientInfo.sex | sexFileter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">民族:</p><p class="info">汉族</p></div> <div><p class="title">民族:</p><p class="info">{{patientInfo.nationality | emptyFilter}}</p></div>
<div><p class="title">常驻类型:</p><p class="info">户籍</p></div> <div><p class="title">常驻类型:</p><p class="info">{{patientInfo.permanentResidence | emptyFilter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">健康档案编号:</p><p class="info">-</p></div> <div><p class="title">健康档案编号:</p><p class="info">{{patientInfo.fileLocator | emptyFilter}}</p></div>
<div><p class="title">医保号:</p><p class="info">-</p></div> <div><p class="title">医保号:</p><p class="info">{{patientInfo.socialCard | emptyFilter}}</p></div>
</div> </div>
<div class="has-header">数据记录</div> <div class="has-header">数据记录</div>
<div class="item wrap-p"> <div class="item wrap-p">
...@@ -42,19 +42,19 @@ ...@@ -42,19 +42,19 @@
</div> </div>
<div class="has-header">联系方式</div> <div class="has-header">联系方式</div>
<div class="item"> <div class="item">
<div><p class="title">手机号:</p><p class="info">13293481248</p></div> <div><p class="title">手机号:</p><p class="info">{{patientInfo.mobilePhone | emptyFilter}}</p></div>
<div><p class="title"></p><p class="info"></p></div> <div><p class="title"></p><p class="info"></p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">所在地区:</p><p class="info">上海市 上海市 浦东新区</p></div> <div><p class="title">所在地区:</p><p class="info">上海市 上海市 浦东新区</p></div>
<div><p class="title">详细地址:</p><p class="info">上海市浦东新区兰花路333</p></div> <div><p class="title">详细地址:</p><p class="info">{{patientInfo.patientAddress | emptyFilter}}</p></div>
</div> </div>
<div class="item"> <div class="item">
<div><p class="title">工作单位:</p><p class="info">上海云游科技有限公司</p></div> <div><p class="title">工作单位:</p><p class="info">{{patientInfo.workplace | emptyFilter}}</p></div>
<div> <div>
<p class="title">微信:</p> <p class="title">微信:</p>
<p class="info" v-if="!hasBind">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p> <p class="info" v-if="patientInfo.isWechatBind == '1'">未绑定 <el-button type="text" class="ml10" @click="remindBind">提醒绑定</el-button></p>
<p class="info" v-else>已绑定 <span class="ml10">(微信名:大佬</span></p> <p class="info" v-if="patientInfo.isWechatBind == '2'">已绑定 <span class="ml10">(微信名:{{patientInfo.wechatNickname | emptyFilter}}</span></p>
</div> </div>
</div> </div>
<div class="has-header">其他</div> <div class="has-header">其他</div>
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
type="textarea" type="textarea"
rows="3" rows="3"
placeholder="请输入内容" placeholder="请输入内容"
v-model="remark" v-model="patientInfo.remark"
maxlength="30" maxlength="30"
:show-word-limit="true" :show-word-limit="true"
> >
...@@ -76,9 +76,11 @@ ...@@ -76,9 +76,11 @@
<p class="btn-right"><el-button plain size="small" @click="saveRemark">保存备注</el-button></p> <p class="btn-right"><el-button plain size="small" @click="saveRemark">保存备注</el-button></p>
</div> </div>
</div> </div>
</el-tab-pane>
<el-tab-pane label="健康记录" name="second">
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="健康记录" name="second">健康记录</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</div> </div>
...@@ -87,7 +89,7 @@ ...@@ -87,7 +89,7 @@
<script> <script>
import BreadCrumb from '@/components/breadcrumb' import BreadCrumb from '@/components/breadcrumb'
import { getDiseasesList } from '@/utils/patients/patientsapi' import { getDiseasesList, getPatientDetail } from '@/utils/patients/patientsapi'
export default { export default {
name: "addNewPlan", name: "addNewPlan",
components: { components: {
...@@ -103,12 +105,15 @@ ...@@ -103,12 +105,15 @@
activeName: 'first', activeName: 'first',
hasBind: false, hasBind: false,
remark: '', remark: '',
patientInfo: {},
} }
}, },
created() { created() {
this.init();
// getDiseasesList().then(({data}) => { // getDiseasesList().then(({data}) => {
// console.log('获取所有疾病',data) // console.log('获取所有疾病',data)
// }) // })
}, },
computed: { computed: {
// ...mapState('planManage',{ // ...mapState('planManage',{
...@@ -118,11 +123,40 @@ ...@@ -118,11 +123,40 @@
}, },
methods: { methods: {
// ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']), // ...mapActions('planManage', ['getTimeNodeList','getRemarkOption','getFollowupTemplate']),
init() {
let patientId = '99997747'; //dev中凤尾花的patientId
getPatientDetail(patientId).then(({data}) => {
this.patientInfo = data;
})
},
tabChangeHandler(tab) { tabChangeHandler(tab) {
console.log(tab); console.log(tab);
}, },
deletePatient() { deletePatient() {
console.log('删除') // 把写的提示信心需要换行的地方分成数组 confirmText
const confirmText = ['您确定要删除此居民吗?', '删除后,您将无法对该居民发送患教和进行随访,重新添加该居民依旧可查看历史发送记录及随访记录']
const newDatas = []
const h = this.$createElement
for (const i in confirmText) {
newDatas.push(h('p', null, confirmText[i]))
}
this.$confirm('删除居民', {
title: '删除居民',
message: h('div', null, newDatas),
confirmButtonText: '确认删除',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$message({
type: 'success',
message: '删除成功!'
});
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}, },
editPatient() {}, editPatient() {},
//提醒绑定 //提醒绑定
...@@ -138,6 +172,17 @@ ...@@ -138,6 +172,17 @@
return value; return value;
} }
}, },
sexFileter: function(value) {
if (!value && value != 0) {
return '-';
} else {
let hash = {
1: '男',
2: '女'
};
return hash[value];
}
},
}, },
} }
</script> </script>
...@@ -151,7 +196,7 @@ ...@@ -151,7 +196,7 @@
.right-btn-group{ .right-btn-group{
position: absolute; position: absolute;
right: 60px; right: 60px;
z-index: 5000; z-index: 1800;
} }
.section{ .section{
.item{ .item{
...@@ -185,7 +230,7 @@ ...@@ -185,7 +230,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
padding: 15px 0; padding: 15px 0;
margin-bottom: 10px; margin-bottom: 15px;
border-bottom: 1px dashed #888; border-bottom: 1px dashed #888;
.right-p{ .right-p{
display: inline-block; display: inline-block;
......
<template> <template>
<p>居民管理</p> <section class="not-complete-wrap">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond">
</bread-crumb>
<section class="not-complete-content screenSet">
<h1 class="page-title">我的居民:共800人</h1>
<div class="search-div">
<div class="search-input">
<el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth">
<el-form-item label="性别:" prop="patientName">
<el-input v-model="searchData.patientName" size="small" placeholder="请输入姓名" clearable></el-input>
</el-form-item>
<el-form-item label="年龄段:" prop="mobile">
<el-input v-model="searchData.mobile" size="small" placeholder="请输入手机号" clearable></el-input>
</el-form-item>
<el-form-item label="诊断:" prop="startDate" size="small">
<el-select v-model="searchData.startDate" size="small" clearable :popper-append-to-body="false">
<el-option label="全部" value=""></el-option>
<el-option
v-for="(item, index) in followStartTimeList"
:key="item+index"
:label="item"
:value="item">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="分组:" prop="labelId">
<el-select v-model="searchData.labelId" size="small" clearable :popper-append-to-body="false">
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in groupList"
:key="item.labelId"
:label="item.labelName"
:value="item.labelId">
</el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div class="search-btn">
<el-button class="button-green" type="primary" size="small" @click="searchResidentList">查询</el-button>
<el-button class="button-white" plain size="small" @click="resetSearchData('searchData')">重置</el-button>
</div>
</div>
<el-table
:data="notCompleteList"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
style="width: 100%;">
<el-table-column
type="selection"
width="100">
</el-table-column>
<el-table-column
prop="headimgurl"
label="姓名"
width="100"
lign="center">
<template slot-scope="scope">
<img class="user-photo" :src="scope.row.headimgurl"/>
</template>
</el-table-column>
<el-table-column
prop="wechatUsername"
width="200"
label="性别"
align="center">
</el-table-column>
<el-table-column
prop="country"
label="年龄"
align="center">
</el-table-column>
<el-table-column
prop="wechatCreatedTime"
label="分组"
align="center">
</el-table-column>
<el-table-column
prop="wechatCreatedTime"
label="诊断"
align="center">
</el-table-column>
<el-table-column
label="操作"
align="center">
<template slot-scope="scope">
<!-- <el-button v-if="scope.row.isRemind==1" type="text" @click="sendMessageSingle(scope.row)">提醒完善信息</el-button>
<el-button v-else-if="scope.row.isRemind==2" type="text" style="color: #999">提醒已发送</el-button>-->
</template>
</el-table-column>
</el-table>
<div class="pagination" v-if="notCompleteList.length">
<el-pagination
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="pagination.pageNo"
:page-sizes="[15, 30, 50, 100]"
:page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="pagination.totalRows">
</el-pagination>
</div>
</section>
</section>
</template> </template>
<script> <script>
import BreadCrumb from '../../../components/breadcrumb.vue'
import { getConstants } from '../../../utils/patients/patientsapi'
export default {
name: "not-complete",
components: {
BreadCrumb
},
data() {
return {
curmbFirst: '居民管理',
curmbSecond: '资料不全居民',
notCompleteList: [], //未完善列表
pagination: {
pageNo: 1,
pageSize: 15,
},
searchData: {},
getRowKeys(row) {
return row.patientId;
},
selectList: []
}
},
created() {
//const vm = this;
},
mounted() {
getConstants({
numList: 'P006,P057',
})
},
methods: {
handleSelectionChange(val) {
this.selectList = val;
},
handleSizeChange(val) {
this.pagination.pageSize = val
this.getNotComplete()
},
handleCurrentChange(val) {
this.pagination.pageNo = val
this.getNotComplete()
},
}
}
</script> </script>
<style scoped>
<style lang="scss">
.not-complete-wrap {
.not-complete-content {
padding: 30px;
background: #ffffff;
.tip {
font-size: 12px;
padding: 30px 0;
line-height: 32px;
}
.page-title {
font-size: 20px;
color: #F1E2F3D;
padding-bottom: 20px;
border-bottom: 1px solid #efefef;
}
.search-div {
display: flex;
flex-direction: row;
justify-content: space-between;
padding: 30px 0 10px 0;
border-bottom: 1px solid #efefef;
.search-btn {
min-width: 127px;
}
}
.blank-wrap {
@media screen and (min-width:1240px) and (max-width:1545px){
height: 300px;
}
@media screen and (min-width:1545px) and (max-width:1600px){
height: 500px;
}
@media screen and (min-width:1600px){
height: 600px;
}
.blank-content {
text-align: center;
img {
width: 100px;
}
p {
font-size: 20px;
color: #999;
}
}
}
.user-photo {
border-radius: 50%;
width: 40px;
}
}
/*重置表格选择框*/
.el-checkbox__input.is-checked .el-checkbox__inner, .el-checkbox__input.is-indeterminate .el-checkbox__inner {
border-color: #449284;
background-color: #449284;
}
.el-checkbox__inner {
border-color: #DCDFE6!important;
}
.el-checkbox__input.is-focus,.el-checkbox__inner:hover,.el-checkbox__inner.is-focus {
border-color: #449284!important;
}
.el-button--text {
color: #449284;
}
.fontGreen {
color: #449284;
}
.el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important;
}
}
</style> </style>
...@@ -7,12 +7,14 @@ ...@@ -7,12 +7,14 @@
<section class="not-complete-content screenSet"> <section class="not-complete-content screenSet">
<h1 class="page-title">资料不全居民</h1> <h1 class="page-title">资料不全居民</h1>
<p class="tip" v-if="notCompleteList.length"> <p class="tip" v-if="notCompleteList.length">
<span class="fontGreen">800</span>居民仅通过微信扫码与您绑定,但未完善姓名、手机号等关键信息。提醒居民完善信息后,您将可以对居民进行消息推送和随访计划设置。 <span class="fontGreen">{{pagination.totalRows}}</span>居民仅通过微信扫码与您绑定,但未完善姓名、手机号等关键信息。提醒居民完善信息后,您将可以对居民进行消息推送和随访计划设置。
<el-button type="primary" style="float: right;" size="small" @click="sendCompleteMessages">批量提醒</el-button> <el-button type="primary" style="float: right;" size="small" @click="sendCompleteMessageMultiple">批量提醒</el-button>
</p> </p>
<el-table <el-table
v-if="notCompleteList.length" v-if="notCompleteList.length"
:data="notCompleteList" :data="notCompleteList"
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
style="width: 100%;"> style="width: 100%;">
<el-table-column <el-table-column
type="selection" type="selection"
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
label="操作" label="操作"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-if="scope.row.isRemind==1" type="text" @click="sendCompleteMessage(scope.row)">提醒完善信息</el-button> <el-button v-if="scope.row.isRemind==1" type="text" @click="sendMessageSingle(scope.row)">提醒完善信息</el-button>
<el-button v-else-if="scope.row.isRemind==2" type="text" style="color: #999">提醒已发送</el-button> <el-button v-else-if="scope.row.isRemind==2" type="text" style="color: #999">提醒已发送</el-button>
</template> </template>
</el-table-column> </el-table-column>
...@@ -57,11 +59,11 @@ ...@@ -57,11 +59,11 @@
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="notCompleteList.pageNo" :current-page="pagination.pageNo"
:page-sizes="[15, 30, 50, 100, 200, 500, 700, 1000, 1500, 2000]" :page-sizes="[15, 30, 50, 100]"
:page-size="notCompleteList.pageSize" :page-size="pagination.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="totalRows"> :total="pagination.totalRows">
</el-pagination> </el-pagination>
</div> </div>
<div v-if="!notCompleteList.length" class="blank-wrap"> <div v-if="!notCompleteList.length" class="blank-wrap">
...@@ -76,7 +78,7 @@ ...@@ -76,7 +78,7 @@
<script> <script>
import BreadCrumb from '../../../components/breadcrumb.vue' import BreadCrumb from '../../../components/breadcrumb.vue'
import { getNotCompleteList, sendCompleteMessage, getNotCompleteCount } from '../../../utils/patients/patientsapi'
export default { export default {
name: "not-complete", name: "not-complete",
components: { components: {
...@@ -87,58 +89,95 @@ ...@@ -87,58 +89,95 @@
curmbFirst: '居民管理', curmbFirst: '居民管理',
curmbSecond: '资料不全居民', curmbSecond: '资料不全居民',
notCompleteList: [], //未完善列表 notCompleteList: [], //未完善列表
pagination: {
pageNo: 1,
pageSize: 15,
},
getRowKeys(row) {
return row.patientId;
},
selectList: []
} }
}, },
created() { created() {
//const vm = this; //const vm = this;
}, },
mounted() { mounted() {
this.getNotComplete({ this.getNotComplete()
pageNo: 1, this.getNotCompleteNum()
pageSize: 10
})
}, },
methods: { methods: {
getNotComplete(reqData) { handleSelectionChange(val) {
const { pageNo, pageSize} = reqData this.selectList = val;
this.GET(`/healths/patients/uncomplate/${pageNo}/${pageSize}`).then((res) => { },
console.log(res) handleSizeChange(val) {
if(res.code == "000000") { this.pagination.pageSize = val
this.notCompleteList = res.data this.getNotComplete()
},
handleCurrentChange(val) {
this.pagination.pageNo = val
this.getNotComplete()
},
getNotComplete() { //获取未完善居民列表
const { pageNo, pageSize} = this.pagination
getNotCompleteList({
pageNo,
pageSize,
}).then((data) => {
if(data.code == "000000") {
this.notCompleteList = data.data
console.log('1212',this.notCompleteList)
} }
}).catch(function (error) { }).catch(function (error) {
this.$message.error(error); this.$message({
message: error,
type: 'error'
});
}); });
}, },
sendCompleteMessage(item) { sendMessageSingle(item) { //发送单个提醒
let params = { sendCompleteMessage({
qrcodeType: 1, //saas 云鹊医平台 qrcodeType: 1,
patientId: item.patientId, patientId: item.patientId,
} }).then((data) => {
this.POST('/healths/patients/remind',params).then((res) => { if(data.code == "000000") {
this.$message({
message: '已向居民发送提醒',
type: 'success'
});
}else {
this.$message({ this.$message({
type: 'success', message: data.message,
message: '操作成功!' type: 'error'
}); });
}
}).catch(function (error) { }).catch(function (error) {
this.$message.error(error); this.$message({
message: error,
type: 'error'
});
}); });
}, },
sendCompleteMessages(item) { sendCompleteMessageMultiple(item) {
let params = { if(!this.selectList.length) {
qrcodeType: 1, //saas 云鹊医平台
patientId: item.patientId,
}
this.POST('/healths/patients/remind',params).then((res) => {
this.$message({ this.$message({
type: 'success', message: '请选择居民',
message: '操作成功!' type: 'warning'
}); });
}
},
getNotCompleteNum() {
getNotCompleteCount().then((data) => {
if(data.code == "000000") {
this.pagination.totalRows = data.data;
}
}).catch(function (error) { }).catch(function (error) {
this.$message.error(error); this.$message({
message: error,
type: 'error'
});
}); });
} }
} }
} }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册