提交 49ccc596 编写于 作者: tao.wu's avatar tao.wu

Merge branch 'dev-followUp-20190312' of...

Merge branch 'dev-followUp-20190312' of 192.168.110.53:com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312
......@@ -217,7 +217,7 @@ export default {
},
getPlanOptions(context, payload) {
getPlanList({
pageNum: -1
pageNo: -1
}).then(({data}) => {
context.commit('GET_PLAN_OPTION', data);
});
......
......@@ -7,32 +7,32 @@
v-if="showThisPage"
:before-close="clickClose"
center>
<el-form :model="planChangeData" label-width="110px">
<el-form-item label="分组:">
<el-form :model="planChangeData" label-width="110px" :rules="rules" ref="planChangeData">
<el-form-item label="分组:" prop="yLabelList">
<el-select
v-model="planChangeData.yLabelList"
multiple
@change="selectGroup"
placeholder="请选择">
<el-option
v-for="item in groupList"
:key="item.labelId"
v-for="(item, index) in groupList"
:key="index"
:label="item.labelName"
:value="item.labelId">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="随访计划:">
<el-form-item label="随访计划:" prop="planId">
<el-select v-model="planChangeData.planId" size="small">
<el-option
v-for="item in planOption"
:key="item.id"
v-for="(item,index) in planOption"
:key="index"
:label="item.name"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="随访开始时间:">
<el-form-item label="随访开始时间:" prop="startDate">
<el-date-picker
v-model="planChangeData.startDate"
type="date"
......@@ -51,7 +51,7 @@
</template>
<script>
import { mapState, mapActions} from 'vuex';
import { mapState, mapActions } from 'vuex';
import { changePlan } from '../../../../utils/followup/followapis'
export default {
name: "change-plan",
......@@ -84,7 +84,12 @@
data() {
return {
showChangePlan: true,
selectedGroup: []
selectedGroup: [],
rules: {
planId: [
{ required: true, message: '请选择随访计划', trigger: 'change' },
],
},
}
},
mounted() {
......@@ -99,7 +104,7 @@
})
},
methods: {
...mapActions('planManage', ['getPlanOptions','getResidentList']),
...mapActions('planManage', ['getPlanOptions','getResidentList', 'getResidentDetail']),
selectGroup(val) {
const _this = this
_this.selectedGroup = []
......@@ -117,11 +122,11 @@
clickClose() {
this.$emit('closeChangePlan',false);
},
async changePlans() {
// this.clickClose()
const { planPatientsId, planId, patientId, startDate } = this.planChangeData
// params.yLabelList = this.selectedGroup
// console.log('变更数据',params)
changePlans() {
const _this = this
this.$refs['planChangeData'].validate(valid => {
if (valid) {
const { planPatientsId, planId, patientId, startDate } = this.planChangeData;
changePlan({
planPatientsId,
planId,
......@@ -134,10 +139,19 @@
message: '变更计划成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId,
planId: this.planChangeData.planIdOld,
status: this.planChangeData.status
});
} else if(this.$route.name == 'residentDetail') {
this.$router.push({path: '/followup/plan-manage/resident-detail', query: {patientId: patientId, planId: planId}})
this.getResidentDetail({
planId,
patientId
})
}
this.clickClose()
} else {
this.$message({
......@@ -151,12 +165,17 @@
type: 'error'
});
});
} else {
return false;
}
});
},
},
watch: {
planChangeData(val) {
const _this = this
let labelList = val.yLabelList
console.log()
labelList.forEach(function (item, index) {
let nodeItem = _this.groupList.filter(function(item1){
return item1.labelId == item;
......
......@@ -11,7 +11,7 @@
<el-form
:model="finishData"
:rules="rules"
label-width="100px">
label-width="100px" ref="finishData">
<el-form-item label="居民:">
{{finishData.patientName}}
</el-form-item>
......@@ -35,6 +35,7 @@
</template>
<script>
import { mapActions } from 'vuex';
import { finishPlan } from '../../../../utils/followup/followapis'
export default {
name: "finish-followup",
......@@ -64,10 +65,13 @@
}
},
methods: {
...mapActions('planManage', ['getResidentList']),
clickClose() {
this.$emit('closeFinishFollowup',false)
},
finishFollowUp() {
this.$refs['finishData'].validate(valid => {
if (valid) {
const { changeCode, planId, patientIdList } = this.finishData;
finishPlan({
changeCode,
......@@ -79,6 +83,18 @@
message: '操作成功!',
type: 'success'
});
if(this.$route.name == 'residentList') {
this.getResidentList({
planId,
status: changeCode
})
} else if(this.$route.name == 'residentDetail') {
this.getResidentDetail({
planId,
patientId: patientIdList[0]
})
}
this.clickClose()
} else {
this.$message({
......@@ -92,6 +108,10 @@
type: 'error'
});
});
} else {
return false;
}
});
}
}
}
......
......@@ -66,14 +66,14 @@
<div class="content-div">
<div class="c-title">推送患教:</div>
<div class="c-content more-content" v-for="item in nodeContent[0].pushContentList">
<p>{{item.startDaysStr}} <span class="click-text" >{{item.sendContent}}</span></p>
<p>{{item.startDaysStr}} <span class="click-text" @click="goToShort(item.resourceUrl)">{{item.sendContent}}</span></p>
<p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p>
</div>
</div>
<div class="content-div">
<div class="c-title">随访登记表:</div>
<div class="c-content more-content">
<p class="click-text" v-for="item in nodeContent[0].followupList" >{{item.sendContent}}</p>
<p class="click-text" v-for="item in nodeContent[0].followupList" @click="goToShort(item.resourceUrl)">{{item.sendContent}}</p>
</div>
</div>
</div>
......@@ -129,7 +129,7 @@
this.showFollowTime = true
},
goToResidentList() {
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId}})
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId: this.$route.query.planId, planName: this.planDetail.name}})
},
changePlan() {
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId: this.$route.query.planId}})
......@@ -137,6 +137,9 @@
closeFollowTime(isShow) {
this.showFollowTime = isShow
},
goToShort(url) {
window.open(url)
},
},
watch: {
planDetail(val) {
......
......@@ -167,7 +167,7 @@
this.$router.push({path: '/followup/plan-manage/plan-detail', query: {planId:row.id}})
},
visitRow(row){
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id}})
this.$router.push({path: '/followup/plan-manage/resident-list', query: {planId:row.id, planName: row.name}})
},
changeRow(row){
this.$router.push({path: '/followup/plan-manage/plan-modify', query: {planId:row.id}})
......
......@@ -84,14 +84,14 @@
<div class="content-div">
<div class="c-title">推送患教:</div>
<div class="c-content more-content" v-for="item in nodeContent.pushContentList">
<p>{{item.startDaysStr}} <span class="click-text" >{{item.sendContent}}</span></p>
<p>{{item.startDaysStr}} <span class="click-text" @click="goToShort(item.resourceUrl)" >{{item.sendContent}}</span></p>
<p class="reminding">推送规则:优先微信推送,如果居民没关注云鹊医公众号,将短信推送,短信推送会消耗您的额度。推送详情请前往云鹊医app患教中心查询</p>
</div>
</div>
<div class="content-div">
<div class="c-title">随访登记表:</div>
<div class="c-content more-content">
<p class="click-text" v-for="item in nodeContent.followupList">{{item.sendContent}}</p>
<p class="click-text" v-for="item in nodeContent.followupList" @click="goToShort(item.resourceUrl)" >{{item.sendContent}}</p>
</div>
</div>
</div>
......@@ -162,7 +162,8 @@
planId: this.residentDetail.fPlanDto.id,
patientId: this.residentDetail.patientId,
yLabelList: this.residentDetail.labelIdList,
startDate: this.residentDetail.fPlanDto.timeStr
startDate: this.residentDetail.fPlanDto.timeStr,
planIdOld: this.residentDetail.fPlanDto.id,
}
this.showChangePlan = true;
},
......@@ -185,6 +186,9 @@
closeFinishFollowup(isShow) {
this.showFinishFollowup = isShow
},
goToShort(url) {
window.open(url)
},
},
watch: {
timeNodeList(val) {
......
......@@ -7,7 +7,7 @@
:jumPathThird="jumPathThird">
</bread-crumb>
<div class="resident-content f-main-content screenSet">
<p class="page-title">随访计划名称</p>
<p class="page-title">{{planTitle}}</p>
<div class="search-div">
<div class="search-input">
<el-form :model="searchData" ref="searchData" :inline="true" :label-width="labelWidth">
......@@ -117,7 +117,7 @@
:current-page="residentList.pageNum"
:page-sizes="[10, 20, 50, 100]"
:page-size="residentList.pageSize"
:total="residentList.total">
:total="statusTotal">
</el-pagination>
</div>
</div>
......@@ -183,10 +183,12 @@
initialPatientIdList: [], //初始居民
showAddPatientTime: false,//是否展示添加居民选择时间
addPatientData: {}, //选择时间数据
statusTotal: null, //每种状态的总数
planTitle: '', //随访计划名称
}
},
created() {
const vm = this;
},
mounted() {
this.getResidentList({
......@@ -244,7 +246,8 @@
patientId: row.patientId,
yLabelList: row.labelIdList||[],
startDate: row.time,
status: this.status
status: this.status,
planIdOld: this.$route.query.planId,
}
this.showChangePlan = true;
},
......@@ -273,7 +276,7 @@
patientName: patientNames.join('、'),
patientIdList: patientIds,
title: this.status==3?'恢复随访':'结束随访',
reasonName: this.status==3?'恢复原因:':'结束原因:'
reasonName: this.status==3?'恢复原因:':'结束原因:',
};
} else {
let patientIds = [];
......@@ -347,8 +350,27 @@
_this.initialPatientIdList.push(item.patientId)
})
}
if(_this.status == 1) {
_this.statusTotal = val.notCount
} else if (_this.status == 2) {
_this.statusTotal = val.handCount
} else if (_this.status == 3) {
_this.statusTotal = val.yesCount
}
}
},
beforeRouteEnter(to, from, next) {
next(vm=> {
if(from.name === 'planList') {
vm.curmbSecond = '计划管理'
vm.jumPathThird = '/followUp/plan-manage'
} else if(from.name === 'planDetail') {
vm.curmbSecond = '计划详情'
vm.jumPathThird = `/followUp/plan-manage/plan-detail?planId=${vm.$route.query.planId}`
}
vm.planTitle = vm.$route.query.planName
})
}
}
</script>
......
......@@ -66,13 +66,15 @@
<el-button type="primary" @click="closeSendReserve('reservationForm')">立即发送</el-button>
</div>
</el-dialog>
<no-enough :isNoEnoughShow="isNoEnoughShow" @closeTipsDialog="closeTipsDialog"></no-enough>
</div>
</template>
<script>
import {sendReservation} from '@/utils/followup/followapis'
import NoEnough from './no-enough'
import { mapState, mapActions } from 'vuex'
export default {
components: {},
components: {NoEnough},
data(){
return{
reservationDialog: true,
......@@ -127,7 +129,7 @@
value: 15,
label: '20:00-21:00'
}],
doctorName: '云晓雀',
isNoEnoughShow: false, //余额不足dialog展示
rules: {
appointmentDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
appointmentRange: [{ required: true, message: '请选择时间段', trigger: 'change' }],
......@@ -148,6 +150,10 @@
selectList: { //已选择发送人员list
type: Array,
default: [],
},
validContents: {
type: Array,
default: [],
}
},
watch: {
......@@ -159,15 +165,19 @@
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
userName: state => state.userName,
checkRevervationData: state => state.checkRevervationData,
})
},
mounted(){
},
methods: {
...mapActions('reservationManage', ['getReservationPatients']),
...mapActions('reservationManage', ['getReservationPatients', 'getCheckReservation']),
changeHandler(val) {
this.getReservationPatients({makeAnAppointDate: val});
},
closeTipsDialog(val){
this.isNoEnoughShow = val;
},
closeSendReserve1(){
if (this.$refs['reservationForm']) {
this.$refs['reservationForm'].resetFields();
......@@ -177,6 +187,13 @@
closeSendReserve(formName){
this.$refs[formName].validate((valid) => {
if (valid) {
//校验额度是否不够
this.getCheckReservation({
content: '',
validContents: this.validContents
})
const { sendFlag } = this.checkRevervationData;
if(sendFlag){ //额度还可用
sendReservation({
...this.reservationForm,
patientAppointList: this.selectList
......@@ -184,6 +201,10 @@
this.$refs['reservationForm'].resetFields();
this.$emit('closeSendReserve',false);
})
}else {
// 额度不足
this.isNoEnoughShow = true;
}
} else {
return false;
}
......
......@@ -92,9 +92,14 @@
</el-table-column>
<el-table-column
width="160"
prop="appointmentTime"
label="随访预约时间"
align="center">
<template slot-scope="scope">
<span v-if="scope.row.status==1" style="color: #49C688;">未完成</span>
<span v-else-if="scope.row.status==2">待确认</span>
<span v-else-if="scope.row.status==4" style="color: #D5172E;">已拒绝</span>
<span v-else>{{scope.row.appointmentTime}}</span>
</template>
</el-table-column>
<el-table-column
width="180"
......@@ -122,7 +127,7 @@
</div>
</div>
</div>
<send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" :selectList="selectList" @closeSendReserve="closeSendReserve"></send-reservation>
<send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" :selectList="selectList" @closeSendReserve="closeSendReserve" :validContents="validContents"></send-reservation>
<no-enough :isNoEnoughShow="isNoEnoughShow" @closeTipsDialog="closeTipsDialog"></no-enough>
<change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve" :reservationForm="needPara"></change-reservation>
<followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail" :enteringInfo="enteringInfo"></followup-detail>
......@@ -247,14 +252,14 @@
this.dialogDetailShow = true;
},
setSearchData() {
const { planName, mobilePhone, timeStatus, nickName } = this.searchData;
const { planName, mobilePhone, timeStatus, nickname } = this.searchData;
let para = {}
if(this.searchData.planTimes) {
para = {
planName,
mobilePhone,
timeStatus,
nickName,
nickname,
beginTime: this.searchData.planTimes[0],
endTime: this.searchData.planTimes[1],
status: this.status
......@@ -264,16 +269,13 @@
planName,
mobilePhone,
timeStatus,
nickName,
nickname,
status: this.status
}
}
return para;
},
async sendReservation() {
if(this.selectionData.length > 0){
this.selectList = this.selectionData;
//发送预约校验接口
async initCheck() {
await this.getCheckReservation({
// patientIds: this.ids
content: '',
......@@ -286,6 +288,12 @@
}else {
this.isNoEnoughShow = true;
}
},
sendReservation() {
if(this.selectionData.length > 0){
this.selectList = this.selectionData;
// 发送预约校验
this.initCheck();
}else if(this.selectionData.length > 100){
this.$message.warning('每次最多选择100条单条随访进行预约!');
return false;
......@@ -294,7 +302,7 @@
return false;
}
},
async sendReservationRow(row){
sendReservationRow(row){
let newList = [];
newList.push({
planId: row.fuPlanId,
......@@ -304,22 +312,12 @@
type: row.fuPlanType,
});
this.selectList = newList;
//发送预约校验
await this.getCheckReservation({
content: '',
validContents: [{
this.validContents = [{
patientId: row.patientId,
size: 1,
}],
// patientIds: [row.patientId]
})
const { sendFlag } = this.checkRevervationData
//判断短信余额是否不足
if(sendFlag){
this.isDialogShow = true;
}else {
this.isNoEnoughShow = true;
}
}];
// 发送预约校验
this.initCheck();
},
changeReserveClick(row){
this.needPara = {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册