提交 23d1ff07 编写于 作者: chengxiang.li's avatar chengxiang.li

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
<template>
<div>
<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="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:{
......@@ -55,7 +57,7 @@ export default {
}
},
mounted() {
vm.getRedData()
},
methods: {
// 解密token
......@@ -111,8 +113,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>
......
......@@ -5,7 +5,7 @@
<el-form-item label="意见反馈:" :label-width="formLabelWidth" prop="opinion">
<el-input type="textarea" :rows="10" :maxlength="maxlength" v-model="form.opinion" autocomplete="off" placeholder="请告诉我们您遇到的问题或者建议"></el-input>
<span class="text-count">{{currentCount}}/2000</span>
<span class="text-count">{{currentCount}}/{{maxlength}}</span>
</el-form-item>
<el-form-item label="上传图片:" :label-width="formLabelWidth" prop="imgs">
......@@ -23,9 +23,10 @@
:on-success="handleSuccess"
:on-error="handleError"
:on-exceed="handleExceed"
:disabled="addImageDisabled"
:file-list="fileList">
<el-button size="small" type="primary" @click="addImage" :disabled="addImageDisabled">添加图片</el-button>
<!--:disabled="addImageDisabled"-->
<!--<el-button size="small" type="primary" @click="addImage" :disabled="addImageDisabled">添加图片</el-button>-->
<el-button size="small" type="primary" v-if="!addImageDisabled" @click="addImage">添加图片</el-button>
<div slot="tip" class="el-upload__tip">最多5张,每张小于5M,支持jpg,png,bmp</div>
</el-upload>
</el-form-item>
......@@ -89,7 +90,7 @@
export default {
data(){
return{
maxlength: 2000,
maxlength: 1000,
form: {
opinion: '',
imgs: '',
......@@ -103,6 +104,7 @@
{ required: true, message: '请输入意见反馈', trigger: 'blur' }
]
},
imgDomin: '',
addImageDisabled: false,
imgLimit: 5,// 最多允许上传的图片个数
action: 'https://upload.qiniup.com/',
......@@ -117,8 +119,8 @@
}
},
created(){
this.token = 'D34A213A354849A0B08A241771F7A675';
// this.token = localStorage.getItem('storageToken');
// this.token = 'C712F412E096492B84E2B1D636565626';
this.token = localStorage.getItem('storageToken');
this.headers.token = this.token
},
computed: {
......@@ -150,6 +152,10 @@
submitFrom(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
this.urlString = '';
this.fileList.forEach((item)=>{
this.urlString += `${this.imgDomin}/${item.response.key};`
})
const data = {
input_text: this.form.opinion,
system_type: 'workStation',
......@@ -185,10 +191,18 @@
this.imgFile.key = `qiniu/image/feedback/${year}/${month}/${file.name}`;
this.imgFile.token = this.imgToken;
},
handleRemove(){},
handleRemove(file, fileList){
this.fileList = fileList
this.addImageDisabled = false;
},
handleSuccess(response, file, fileList){
const imgDomin = uploadImg();
this.urlString += `${imgDomin}/${response.key};`
this.imgDomin = imgDomin;
// this.urlString += `${imgDomin}/${response.key};`
// this.fileList.forEach((item)=>{
// this.urlString += `${imgDomin}/${response.key};`
// })
this.fileList = fileList;
this.$message.success(`上传成功!`);
if(fileList.length>=this.imgLimit){
this.addImageDisabled = true;
......
......@@ -3,6 +3,7 @@ const patientsManage = r => require.ensure([], () => r(require('../views/patient
const myPatientsManage = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/layout.vue')), 'myPatientsManage');
const patientsList = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/patients-list.vue')), 'patientsList');
const patientDetail = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/patient-detail.vue')), 'patientDetail');
const basicInfo = r => require.ensure([], () => r(require('../views/patients/mypatients-manage/basic-info.vue')), 'basicInfo');
/*新增居民*/
const newManage = r => require.ensure([], () => r(require('../views/patients/new-manage/layout.vue')), 'newManage');
......@@ -47,6 +48,15 @@ const patientsRouters = {
keepAlive: false
},
},
{
path: 'basic-info',
component: basicInfo,
name: 'basicInfo',
meta: {
title: '居民详情',
keepAlive: false
},
},
],
meta: {
title: '我的居民',
......@@ -105,10 +115,10 @@ const patientsRouters = {
path: 'not-complete',
component: notCompleteManage,
name: 'notCompleteManage',
redirect: 'not-complete/not-complete',
redirect: 'not-complete/uncompleted-list',
children: [
{
path: 'not-complete',
path: 'uncompleted-list',
component: notCompleteList,
name: 'notCompleteList',
meta: {
......
......@@ -15,9 +15,54 @@
}
/*恢复messageBox默认样式*/
.el-message-box {
width: 360px;
height: 220px;
}
.el-message-box__status+.el-message-box__message{
padding-left: 20px;
padding-right: 20px;
}
/*重置单选按钮样式*/
.el-radio-button__orig-radio:checked+.el-radio-button__inner {
background-color: #449284;
border-color: #449284;
box-shadow: -1px 0 0 0 #449284;
}
.el-radio-button__inner:hover {
color: #449284;
}
/*重置输入框,选择框样式*/
.el-range-editor.is-active, .el-range-editor.is-active:hover, .el-select .el-input.is-focus .el-input__inner,.el-input__inner:focus{
border-color: #449284;
}
.el-select-dropdown__item.selected {
color: #449284;
}
.el-select .el-input__inner:focus {
border-color: #449284;
}
/*重置文字按钮样式*/
.el-button--text{
color: #606266;
}
.el-button--text:focus, .el-button--text:hover{
color: #449284;
}
/*重置表格选择框*/
.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;
}
/*重置textarea聚焦样式*/
.el-textarea__inner:focus {
border-color: #449284!important;
}
import axios from 'axios'
import { Loading } from 'element-ui';
import store from '../store'
// import { getHostnameAndPort } from '../utils'
// axios.defaults.withCredentials = true
......@@ -9,8 +10,41 @@ const service = axios.create({
withCredentials: false
})
/*loading*/
let loadingInstance = () => {
return Loading.service({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
});
}
let loading;
let needLoadingRequestCount = 0;
let showFullScreenLoading = () => {
if (needLoadingRequestCount === 0) {
loadingInstance();
}
needLoadingRequestCount++;
};
let tryHideFullScreenLoading = () => {
if (needLoadingRequestCount > 0) {
needLoadingRequestCount--;
}
if (needLoadingRequestCount === 0) {
loadingInstance().close();
}
};
// request拦截器
service.interceptors.request.use(config => {
if (config.noLoading) {
}else{
showFullScreenLoading();
}
const noSysCode = config.headers.noSysCode;
if(noSysCode){
delete config.headers.sysCode;
......@@ -21,8 +55,8 @@ service.interceptors.request.use(config => {
if( config.headers['sysCode']==undefined) {
config.headers['sysCode'] = 12
}
config.headers['token'] = 'D34A213A354849A0B08A241771F7A675'
// config.headers['token'] = localStorage.getItem('storageToken')
// config.headers['token'] = 'D34A213A354849A0B08A241771F7A675'
config.headers['token'] = localStorage.getItem('storageToken')
config.headers['deviceInfo'] = JSON.stringify({ "app_channel": "", "app_mac": "", "app_uuid": "", "app_version": "", "device_brand": "", "device_ip": "", "device_model": "", "device_net": "", "device_ops": "", "resolution_wh": "", "system_level": "", "device_type": '10' })
}
// if (config.data && config.data.setEntry) {
......@@ -36,12 +70,18 @@ service.interceptors.request.use(config => {
return config
}, error => {
// logger.debug('service.interceptors.request: ', error)
tryHideFullScreenLoading();
Promise.reject(error)
})
// respone拦截器
service.interceptors.response.use(
response => {
if (response.config.noLoading) {
}else{
tryHideFullScreenLoading()
}
const res = response.data
/*
baseUrl时,返回000000为成功
......@@ -55,6 +95,8 @@ service.interceptors.response.use(
},
error => {
// logger.error('err' + error)
tryHideFullScreenLoading();
return Promise.reject(error)
}
)
......
// 检查号码是否符合规范,包括长度,类型
function isCardNo(card){
//身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
// var reg = /(^\d{15}$)|(^\d{17}(\d|X|x)$)/;
let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if(reg.test(card) === false){
return false;
}
return true;
}
// 取身份证前两位,校验省份
function checkProvince(card,vcity){
var province = card.substr(0,2);
if(vcity[province] == undefined){
return false;
}
return true;
}
// 检查生日是否正确
function checkBirthday(card){
var len = card.length;
//身份证15位时,次序为省(3位)市(3位)年(2位)月(2位)日(2位)校验位(3位),皆为数字
if(len == '15'){
var re_fifteen = /^(\d{6})(\d{2})(\d{2})(\d{2})(\d{3})$/;
var arr_data = card.match(re_fifteen);
var year = arr_data[2];
var month = arr_data[3];
var day = arr_data[4];
var birthday = new Date('19'+year+'/'+month+'/'+day);
return verifyBirthday('19'+year,month,day,birthday);
}
//身份证18位时,次序为省(3位)市(3位)年(4位)月(2位)日(2位)校验位(4位),校验位末尾可能为X
if(len == '18'){
var re_eighteen = /^(\d{6})(\d{4})(\d{2})(\d{2})(\d{3})([0-9]|X|x)$/;
var arr_data = card.match(re_eighteen);
var year = arr_data[2];
var month = arr_data[3];
var day = arr_data[4];
var birthday = new Date(year+'/'+month+'/'+day);
return verifyBirthday(year,month,day,birthday);
}
return false;
}
// 校验日期
function verifyBirthday(year,month,day,birthday) {
var now = new Date();
var now_year = now.getFullYear();
//年月日是否合理
if(birthday.getFullYear() == year && (birthday.getMonth() + 1) == month && birthday.getDate() == day)
{
//判断年份的范围(0岁到100岁之间)
var time = now_year - year;
if(time >= 0 && time <= 100)
{
return true;
}
return false;
}
return false;
}
// 校验位的检测
function checkParity(card){
//15位转18位
card = changeFivteenToEighteen(card);
var len = card.length;
if(len == '18'){
var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
var cardTemp = 0, i, valnum;
for(i = 0; i < 17; i ++) {
cardTemp += card.substr(i, 1) * arrInt[i];
}
valnum = arrCh[cardTemp % 11];
if (valnum == card.substr(17, 1).toLocaleUpperCase())
{
return true;
}
return false;
}
return false;
}
// 15位转18位身份证号
function changeFivteenToEighteen(card){
if(card.length == '15')
{
var arrInt = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2);
var arrCh = new Array('1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2');
var cardTemp = 0, i;
card = card.substr(0, 6) + '19' + card.substr(6, card.length - 6);
for(i = 0; i < 17; i ++)
{
cardTemp += card.substr(i, 1) * arrInt[i];
}
card += arrCh[cardTemp % 11];
return card;
}
return card;
}
export const checkCardNum = (rule, value, callback) => {
var vcity={ 11:"北京",12:"天津",13:"河北",14:"山西",15:"内蒙古",
21:"辽宁",22:"吉林",23:"黑龙江",31:"上海",32:"江苏",
33:"浙江",34:"安徽",35:"福建",36:"江西",37:"山东",41:"河南",
42:"湖北",43:"湖南",44:"广东",45:"广西",46:"海南",50:"重庆",
51:"四川",52:"贵州",53:"云南",54:"西藏",61:"陕西",62:"甘肃",
63:"青海",64:"宁夏",65:"新疆",71:"台湾",81:"香港",82:"澳门",91:"国外"
};
//是否为空
// if(value === ''){
// callback(new Error('请输入正确的身份证'))
// }
if(value) {
//校验长度,类型
if(isCardNo(value) === false){
callback(new Error('请输入正确的身份证'))
}
//检查省份
if(checkProvince(value,vcity) === false){
callback(new Error('请输入正确的身份证'))
}
//校验生日
if(checkBirthday(value) === false){
callback(new Error('请输入正确的身份证'))
}
//检验位的检测
if(checkParity(value) === false){
callback(new Error('请输入正确的身份证'))
}
}else {
callback()
}
}
// 校验手机号
export const checkMobile = (rule, value, callback) => {
var reg = /^1[3|4|5|7|8][0-9]{9}$/; //验证规则
const flag = reg.test(value);
if(flag){
callback()
}else{
callback(new Error(`请输入正确的手机号码`))
}
}
......@@ -5,7 +5,29 @@ import { getBaseUrl, getSaasDomain, getSaasApiDomain } from '@/utils/index'
const headers = {
sysCode: 9
}
/*常量API*/
export const getConstants = (params) => {
return fetch({
headers,
url: getBaseUrl(`basic-data/constants/`),
method: 'get',
params: params,
description: '获取常量',
})
};
/*居民管理*/
export const getPatientList = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/infolist`),
method: 'post',
data: data,
description: '获取居民列表',
})
};
export const getDiseasesList = (params) => {
return fetch({
headers,
......@@ -112,25 +134,42 @@ export const getNotCompleteList = (params) => {
description: '获取资料不全居民列表',
})
};
export const sendCompleteMessage = (params) => {
export const sendCompleteMessage = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/remind`),
method: 'post',
data: params,
data: data,
description: '提醒居民完善信息',
})
};
export const sendCompleteMessageList = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/list/remind`),
method: 'post',
data: data,
description: '批量提醒居民完善信息',
})
};
export const getNotCompleteCount = (params) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/uncomplate/counts`),
method: 'get',
data: params,
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,
......@@ -140,3 +179,48 @@ export const getPatientDetail = (patientId) => {
description: '获取居民详情',
})
};
export const deletePatient = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/batch`),
method: 'delete',
data: data,
description: '删除居民',
})
};
export const getRemindPatient = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/remind`),
method: 'post',
data: data,
description: '提醒居民绑定微信',
})
};
export const savePatientInfo = (data) => {
return fetch({
headers,
url: getBaseUrl(`healths/patients/update`),
method: 'post',
data: data,
description: '保存居民信息',
})
};
export const getNationsList = (params) => {
return fetch({
headers,
url: getBaseUrl(`resident/constants/nations`),
method: 'get',
params: params,
description: '获取56个民族列表',
})
};
export const getHealthRecordList = (data) => {
return fetch({
headers,
url: getBaseUrl(`followup/entering/health/records`),
method: 'post',
data: data,
description: '健康档案记录列表',
})
};
......@@ -8,6 +8,14 @@
<el-menu-item v-for="(subItem,i) in item.subs" :key="i" :index="'/'+subItem.index">
<i class="sub-icon" :class="subItem.icon"></i>
{{subItem.title}}
<p class="redNum"
v-if="subItem.title == '资料不全居民'
&&notCompleteCount
&&$route.path!='/patients-manage/not-complete/uncompleted-list'"
>
<span v-if="notCompleteCount>999">+999</span>
<span v-else>{{notCompleteCount}}</span>
</p>
</el-menu-item>
</el-submenu>
</template>
......@@ -33,6 +41,9 @@ export default {
authList: {
type: Object,
default: () => {}
},
notCompleteCount: {
type: Number,
}
},
data() {
......@@ -92,7 +103,7 @@ export default {
{
title: '资料不全居民',
icon: 'el-icon-setting',
index: 'patients-manage/not-complete/not-complete'
index: 'patients-manage/not-complete/uncompleted-list'
}
]
}
......@@ -158,6 +169,19 @@ export default {
// 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>
......
<template>
<div class="resident-list">
<bread-crumb
:curmbFirst="curmbFirst"
:curmbSecond="curmbSecond"
:curmbThird="curmbThird"
:jumPathThird="jumPathThird">
</bread-crumb>
<div class="f-main-content screenSet">
<div class="header-title">
<span>基本信息</span>
<p><el-button plain size="small">取消</el-button><el-button type="primary" size="small" @click="saveEdit">保存</el-button></p>
</div>
<edit-information
:patientInfoObj="patientInfo"
:checkForm="checkForm"
@addListenSave="addListenSave"
:patientId="patientId"></edit-information>
</div>
</div>
</template>
<script>
import BreadCrumb from '@/components/breadcrumb'
import editInformation from './components/edit-information'
import { mapGetters } from 'vuex'
import { getPatientDetail, getRemindPatient, deletePatient,savePatientInfo } from '@/utils/patients/patientsapi'
export default {
name: "basicInfo",
components: {
BreadCrumb,
editInformation
},
data() {
return {
/*面包屑配置*/
curmbFirst: '居民管理',
curmbSecond: '我的居民',
curmbThird: '居民详情',
jumPathThird: '/patients-manage/mypatients-manage/patients-list',
patientId: '',
patientInfo: {},
checkForm: false,
}
},
created() {
this.patientId = String(this.$route.query.patientId);
this.init();
},
computed: {
...mapGetters([
'_token',
])
},
methods: {
init() {
getPatientDetail(this.patientId).then((data) => {
if(data.code == '000000') {
this.patientInfo = data.data;
}
})
},
saveEdit() {
this.checkForm = true;
},
addListenSave(val) {
this.checkForm = false;
if(val.status) {
// 调用保存接口
}else {
this.$message.error('请正确填写信息');
}
},
//提醒绑定
// remindBind() {
// let remindMobileWechatPara = {
// qrcodeType: 1,
// patientId: this.patientId,
// // deviceInfo: window.getDeviceInfo()
// }
// getRemindPatient({
// ...remindMobileWechatPara
// }).then( data => {
// if(data.code == '000000') {
// this.$message.success(data.data.respMsg);
// }else {
// this.$message.error(data.message);
// }
// })
// },
// //保存备注
// saveRemark() {
// savePatientInfo(this.patientInfo).then(data => {
// if(data.code == '000000'){
// this.$message.success('保存备注成功')
// }else {
// this.$message.error(data.message);
// }
// })
// },
},
filters: {
emptyFilter: function(value) {
if (!value) {
return '-';
} else {
return value;
}
},
sexFileter: function(value) {
if (!value && value != 0) {
return '-';
} else {
let hash = {
1: '男',
2: '女'
};
return hash[value];
}
},
},
}
</script>
<style lang="scss" scoped>
@import '../../../style/patients-style/element-reset.css';
.f-main-content{
background: #ffffff;
padding: 30px;
.header-title{
display: flex;
display: -webkit-flex;
align-items: center;
justify-content: space-between;
border-bottom: 2px solid #E4E7ED;
padding-bottom: 10px;
}
.right-btn-group{
position: absolute;
right: 60px;
z-index: 1800;
}
.section{
.item{
display: flex;
font-size: 14px;
div{
display: flex;
flex: 1;
line-height: 36px;
.title{
width: 180px;
text-align: right;
}
.info{
color: #999;
padding-left: 15px;
width: 100%;
}
}
&.wrap-p{
div{
line-height: 28px;
}
}
.btn-right{
width: 35%;
padding-left:10px;
}
}
.has-header{
display: flex;
justify-content: space-between;
padding: 15px 0;
margin-bottom: 15px;
border-bottom: 1px dashed #888;
.right-p{
display: inline-block;
text-align: right;
color: #999;
font-size: 14px;
span:last-child{
margin-left: 15px;
}
}
}
}
.health-record-list{
.item{
width: 100%;
margin-bottom: 15px;
.record-date{
color: #999;
padding-bottom: 10px;
}
.record-content{
width: 100%;
border: 1px solid #E4E7ED;
border-radius: 5px;
padding: 10px 15px 13px;
.record-title{
display: flex;
justify-content: space-between;
padding: 5px 0;
span{
color: #999;
font-size: 14px;
}
}
.list-visit{
line-height: 28px;
padding: 6px 0 2px;
display: flex;
display: -webkit-flex;
align-items: flex-start;
font-size: 14px;
color: #999;
.left-label{
line-height: 28px;
}
.right-item{
flex: 1;
line-height: 28px;
p{
line-height: 28px;
.check-btn{
color: #449284;
cursor: pointer;
margin-left: 15px;
}
}
}
}
}
}
}
.no-record-content{
@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;
}
text-align: center;
padding: 50px 0 60px;
img{
width: 120px;
}
p{
color: #B9B9C6;
font-size: 20px;
}
}
.ml10{
margin-left: 10px;
}
}
</style>
......@@ -78,7 +78,10 @@
<script>
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 {
name: "not-complete",
components: {
......@@ -99,9 +102,6 @@
selectList: []
}
},
created() {
//const vm = this;
},
mounted() {
this.getNotComplete()
this.getNotCompleteNum()
......@@ -125,15 +125,14 @@
pageSize,
}).then((data) => {
if(data.code == "000000") {
this.notCompleteList = data.data
console.log('1212',this.notCompleteList)
this.notCompleteList = data.data;
}
}).catch(function (error) {
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
});
})
},
sendMessageSingle(item) { //发送单个提醒
sendCompleteMessage({
......@@ -145,39 +144,69 @@
message: '已向居民发送提醒',
type: 'success'
});
this.getNotComplete();
this.getNotCompleteNum();
}else {
this.$message({
message: data.message,
type: 'error'
});
}
}).catch(function (error) {
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
});
})
},
sendCompleteMessageMultiple(item) {
if(!this.selectList.length) {
sendCompleteMessageMultiple() {
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({
message: '请选择居民',
type: 'warning'
message: '已向居民发送提醒',
type: 'success'
});
this.getNotComplete();
this.getNotCompleteNum();
}else {
this.$message({
message: data.message,
type: 'error'
});
}
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
})
},
getNotCompleteNum() {
getNotCompleteCount().then((data) => {
if(data.code == "000000") {
this.pagination.totalRows = data.data;
}
}).catch(function (error) {
}).catch((error) => {
this.$message({
message: error,
type: 'error'
});
});
})
}
}
}
......@@ -245,6 +274,7 @@
.el-pagination.is-background .el-pager li:not(.disabled).active {
background: #449284 !important;
}
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册