提交 65840761 编写于 作者: yi.li's avatar yi.li

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
......@@ -185,6 +185,32 @@ export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
},)
}
//新增随访计划
export const createFollowPlan = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/plans`),
method: 'post',
data: data,
description: '新增随访计划',
},)
}
//获取新建计划居民列表
export const getPlanPatientsList = (data) =>{
data = data || {}
return fetch({
headers:{
sysCode: 9
},
url: getFollowUpSC(`/healths/patients/infolist`),
method: 'post',
data: data,
description: '获取新建计划居民列表',
},)
}
/*常量*/
export const getBasicData = (params) => {
......
<template>
<div class="finish-followup" v-if="showThisPage">
<el-dialog
title="恢复随访"
:visible.sync="showFinishFollowup"
v-if="showThisPage"
:before-close="clickClose"
width="30%"
center>
<div class="finish-content">
<el-form
:model="recoverData"
:rules="rules"
label-width="100px">
<el-form-item label="居民:">
{{recoverData.patientName}}
</el-form-item>
<el-form-item label="恢复原因:" prop="finishReason">
<el-input
type="textarea"
v-model="recoverData.finishReason"
placeholder="请输入原因"
maxlength="30"
rows="3"
resize="none"></el-input>
</el-form-item>
</el-form>
</div>
<span slot="footer" class="dialog-footer">
<el-button class="button-green" @click="clickClose" size="small" type="primary">取 消</el-button>
<el-button class="button-white" @click="clickClose" size="small" plain>确 定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
export default {
name: "recover-followup",
props: {
showThisPage: { //是否显示model
type: Boolean,
default: function () {
return false;
}
},
recoverData: {
type: Object,
default: function () {
return {};
}
}
},
data() {
return {
showFinishFollowup: true,
rules: {
recoverData: [
{ required: true, message: '请输入恢复原因', trigger: 'blur' },
{ min: 1, max: 30, message: '长度在30个字符内', trigger: 'blur' }
],
}
}
},
methods: {
clickClose() {
this.$emit('closeRecoverFollowup',false)
},
}
}
</script>
<style scoped>
.el-input__inner:disabled {
background-color: #ffffff!important;
}
</style>
<style lang="scss" scoped>
@import '../../../../style/followup/followup-common';
@import '../../../../style/followup/element-reset.css';
</style>
......@@ -66,7 +66,7 @@
align="center">
</el-table-column>
<el-table-column
prop="name"
prop="nickname"
label="姓名"
align="center">
</el-table-column>
......@@ -122,6 +122,7 @@
<script>
import {getPlanPatientsList} from '@/utils/followup/followapis'
export default {
components: {},
name: "select-patient",
......@@ -129,14 +130,17 @@
return {
showSelectPatient: true,
selectedPatients: [],
patientsData: [{
name: '买了',
sex: '女',
age: 30,
mobilePhone: '13298073647',
diseaseId: '高血压',
labelId: '高危筛查项目-非高危'
}],
patientIdList: [],
patientsData: [
// {
// name: '买了',
// sex: '女',
// age: 30,
// mobilePhone: '13298073647',
// diseaseId: '高血压',
// labelId: '高危筛查项目-非高危'
// }
],
searchData: {
sex: 'all',
ageRange: '0',
......@@ -214,6 +218,18 @@
// }
// }
},
watch: {
isShowSelectPatient(val){
if(val){
getPlanPatientsList({
"pageSize":15,
"pageNo":1
}).then(res=>{
this.patientsData = res.data.patientList
})
}
}
},
mounted() {
// if(this.planId) {
//
......@@ -233,7 +249,11 @@
handleSizeChangePre() {},
handleCurrentChangePre() {},
sureClick() {
this.$emit('sureSelectPatient',false,this.selectedPatients)
this.selectedPatients.forEach((item)=>{
this.patientIdList.push(item.patientId)
})
this.$emit('sureSelectPatient',false,this.patientIdList)
},
}
}
......
......@@ -3,8 +3,8 @@
<el-form :ref="timeForm.formRef" :model="timeForm" :rules="timeFormRules" label-suffix=":" label-width="140px" :inline-message="true" size="small">
<el-form-item label="本次随访时间" required>
<div style="display: flex;">
<el-form-item prop="followupTime">
<el-select v-model="timeForm.followupTime" placeholder="请选择">
<el-form-item prop="timeNo">
<el-select v-model="timeForm.timeNo" placeholder="请选择">
<el-option
v-for="item in indexOptions"
:key="item.value"
......@@ -13,20 +13,20 @@
</el-option>
</el-select>
</el-form-item>
<el-form-item prop="followupMark" class="ml20">
<el-select v-model="timeForm.followupMark" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-form-item prop="timeUnit" class="ml20">
<el-select v-model="timeForm.timeUnit" placeholder="请选择" :disabled="timeForm.isDisabled">
<el-option
v-for="item in markOptions"
:key="item.value"
:label="item.label"
:value="item.label">
:key="item.no"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
</el-form-item>
</div>
</el-form-item>
<el-form-item label="随访方式" prop="followupWay">
<el-radio-group v-model="timeForm.followupWay" size="small">
<el-form-item label="随访方式" prop="type">
<el-radio-group v-model="timeForm.type" size="small">
<el-radio :label="1">门诊随访</el-radio>
<el-radio :label="2">上门随访</el-radio>
<el-radio :label="3">电话随访</el-radio>
......@@ -34,7 +34,7 @@
</el-form-item>
<el-form-item label="提醒医生预约居民">
<el-select
v-model="timeForm.remindTime"
v-model="timeForm.remindList[0].startDays"
multiple
:multiple-limit=3
placeholder="请选择">
......@@ -48,7 +48,7 @@
</el-form-item>
<el-form-item label="推送患教">
<div style="display: flex">
<el-select v-model="timeForm.pushTime" placeholder="选择推送时间" clearable>
<el-select v-model="timeForm.pushContentList[0].startDays" placeholder="选择推送时间" clearable>
<el-option
v-for="item in pushTimeOptions"
:key="item.value"
......@@ -70,7 +70,7 @@
</div>
<el-form-item label="随访登记表">
<el-select
v-model="timeForm.followupForm"
v-model="timeForm.followupList[0].resourceId"
multiple
:multiple-limit=2
placeholder="请选择">
......@@ -90,16 +90,17 @@
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
const timeFormInit = {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
hasSelected: '',
};
// const timeFormInit = {
// formRef: '',
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
// hasSelected: '',
// };
export default {
components: {
......@@ -122,22 +123,7 @@
label: '3'
},
],
markOptions: [
{
value: '0',
label: '天'
}, {
value: '1',
label: '周'
},
{
value: '2',
label: '月'
}, {
value: '3',
label: '年'
}
],
remindOptions: [
{
value: '0',
......@@ -178,9 +164,9 @@
},
],
timeFormRules: {
followupTime: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupMark: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupWay: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
},
}
},
......@@ -189,6 +175,7 @@
type: Object,
},
valBegin: Boolean,
markOptions:Array
},
watch: {
valBegin(val){
......@@ -201,6 +188,9 @@
});
}
}
},
created(){
},
methods: {
getNowTime() {
......
......@@ -5,19 +5,40 @@
<div class="time-line-scroll">
<el-radio-group v-model="activeTab" @change="changeTab" size="small">
<el-radio-button v-if="setTimeNodeList.length > 0" :key="item.formRef" v-for="(item, index) in setTimeNodeList1" :label="index">开始后{{item.followupTime + item.followupMark}} <i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i></el-radio-button>
<el-radio-button label="setNewRef" v-if="showSetBtn">设置随访时间 <i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i></el-radio-button>
<el-radio-button
v-if="setTimeNodeList.length > 0"
:key="item.formRef"
v-for="(item, index) in setTimeNodeList1"
:label="index">开始后{{item.timeNo + item.timeUnitStr}}
<i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i>
</el-radio-button>
<el-radio-button
label="setNewRef"
v-if="showSetBtn">设置随访时间
<i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></i>
</el-radio-button>
</el-radio-group>
</div>
<div class="form-div" v-if="activeTab != 'setNewRef'">
<div :key="timeFormHas.formRef" v-for="(timeFormHas, index) in setTimeNodeList1" :label="index">
<set-time-form v-if="index == activeTab" :timeForm="timeFormHas" :valBegin="valBegin" @checkValid="checkValid" />
<set-time-form
v-if="index == activeTab"
:timeForm="timeFormHas"
:valBegin="valBegin"
:markOptions="markOptions"
@checkValid="checkValid"
/>
</div>
</div>
<div class="form-div" v-if="activeTab == 'setNewRef'">
<set-time-form :timeForm="timeForm" :valBegin="valBegin" @checkValid="checkValid" />
<set-time-form
:timeForm="timeForm"
:valBegin="valBegin"
@checkValid="checkValid"
:markOptions="markOptions"
/>
</div>
</div>
......@@ -29,15 +50,37 @@
import _ from 'lodash';
import SelectCartoon from '@/views/followup/plan-manage/dialog/select-cartoon';
import SetTimeForm from '@/views/followup/plan-manage/dialog/set-time-form';
import {getBasicData} from '@/utils/followup/followapis'
import { mapState } from 'vuex'
const timeFormInit = {
formRef: '',
followupTime: '',
followupMark: '',
followupWay: '',
pushTime: '',
remindTime: [],
followupForm: [],
type: '',//随访方式
timeNo: '',//随访时间
timeUnit: '',//随访时间单位
remindList: [ //提醒医生预约提前天数
{
startDays:''
}
],
pushContentList: [
{
resourceId: "",//漫画id
startDays: ""//推送患教提前天数
}
],
followupList: [//随访量表id
{
resourceId: "",//随访量表id
}
],
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
hasSelected: '',
isDisabled: false,
......@@ -72,20 +115,6 @@
},
],
markOptions: [
{
value: '0',
label: '天'
}, {
value: '1',
label: '周'
},
{
value: '2',
label: '月'
}, {
value: '3',
label: '年'
}
],
remindOptions: [
{
......@@ -127,9 +156,9 @@
},
],
timeFormRules: {
followupTime: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupMark: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
followupWay: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
timeNo: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
timeUnit: [{ required: true, message: '请添加随访时间', trigger: 'change' }],
type: [{ required: true, message: '请选择随访方式', trigger: 'change' }],
},
}
},
......@@ -141,13 +170,13 @@
// setTimeNodeList: state => state.setTimeNodeList,
// }),
setTimeNodeList1(){
return this.sortKey(this.setTimeNodeList,'followupTime')
return this.sortKey(this.setTimeNodeList,'timeNo')
},
followupMarkOne() {
if(this.setTimeNodeList.length == 0) {
return;
}else {
return this.setTimeNodeList1[0].followupMark;
return this.setTimeNodeList1[0].timeUnit;
}
},
},
......@@ -157,8 +186,15 @@
this.timeForm.formRef = this.getNowTime();
if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true;
this.timeForm.followupMark = this.setTimeNodeList[0].followupMark;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
// 随访时间节点单位
getBasicData({
numList: 'P017'
}).then(res=>{
console.log(res)
this.markOptions = res.data['P017']
})
},
watch: {
valBegin(val){
......@@ -167,20 +203,25 @@
timeForm(newVal, oldVal) {
if(this.setTimeNodeList.length>0) {
this.timeForm.isDisabled = true;
this.timeForm.followupMark = this.setTimeNodeList[0].followupMark;
this.timeForm.timeUnit = this.setTimeNodeList[0].timeUnit;
}
},
setTimeNodeList1(newVal, oldVal) {
this.setTimeNodeList1.map(item=>{
item.isDisabled = true;
item.followupMark = this.setTimeNodeList1[0].followupMark
item.timeUnit = this.setTimeNodeList1[0].timeUnit
this.markOptions.forEach((ob)=>{
if(item.timeUnit==ob.no){
item.timeUnitStr = ob.value
}
})
});
this.setTimeNodeList1[0].isDisabled = false;
},
followupMarkOne(newVal, oldVal){
if(newVal != oldVal){
this.setTimeNodeList1.map(item=>{
item.followupMark = this.setTimeNodeList1[0].followupMark
item.timeUnit = this.setTimeNodeList1[0].timeUnit
});
}
}
......@@ -223,6 +264,7 @@
this.timeForm.hasSelected = '';
},
changeTab(val){
console.log(val)
this.activeTab = val;
if(val == 'setNewRef') {
this.timeForm = _.cloneDeep(timeFormInit);
......
......@@ -37,9 +37,9 @@
<p class="err-tips" v-if="noChoice">请添加随访居民</p>
</div>
</el-form-item>
<el-form-item label="随访模板" prop="followupTemplate">
<el-form-item label="随访模板" prop="resourceId">
<el-select
v-model="baseInfo.followupTemplate"
v-model="baseInfo.resourceId"
placeholder="请选择随访模板"
clearable>
<el-option
......@@ -51,9 +51,9 @@
</el-select>
</el-form-item>
<p class="tips">随访计划创建成功后,模板不可更换,请谨慎选择。</p>
<el-form-item label="随访开始时间" prop="startTime">
<el-form-item label="随访开始时间" prop="time">
<el-date-picker
v-model="baseInfo.startTime"
v-model="baseInfo.time"
type="date"
placeholder="请选择随访开始时间"
clearable
......@@ -62,14 +62,14 @@
</el-form-item>
<el-form-item label="备注">
<el-select
v-model="baseInfo.followupKind"
v-model="baseInfo.remarksStatus"
placeholder="请选择随访种类"
clearable>
<el-option
v-for="item in kindOptions"
:key="item.value"
:label="item.label"
:value="item.value">
:key="item.no"
:label="item.value"
:value="item.no">
</el-option>
</el-select>
</el-form-item>
......@@ -91,6 +91,7 @@
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
import HasSelectedPatient from '@/views/followup/plan-manage/dialog/has-selected-patient';
import SetTimeNode from '@/views/followup/plan-manage/dialog/set-time-node';
import {createFollowPlan,getBasicData} from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default {
......@@ -113,10 +114,16 @@
noChoice: false,
baseInfo: {
name: '',
followupTemplate: '',
startTime: '',
followupKind: '',
name: '',//随访计划名称
patientIdList: [],//随访居民列表
resourceId:'',//随访模板ID
time:'',//随访开始时间
remarksStatus: '',
fPlanTimeReqList: [],//时间节点列表
// followupTemplate: '',
// startTime: '',
// followupKind: '',
hasSelectedNum: 0,
},
isShowSelectPatient: false,
......@@ -135,23 +142,30 @@
}
],
kindOptions: [
{
value: '0',
label: '上门随访'
}, {
value: '1',
label: '术后随访'
}
// {
// value: '0',
// label: '上门随访'
// }, {
// value: '1',
// label: '术后随访'
// }
],
rules: {
name: [{ required: true, message: '请输入随访计划名称', trigger: 'blur' }],
hasSelectedNum: [{ required: true, message: '请添加随访居民', trigger: 'change' }],
followupTemplate: [{ required: true, message: '请选择随访模板', trigger: 'change' }],
startTime: [{ required: true, message: '请选择随访开始时间', trigger: 'change' }],
resourceId: [{ required: true, message: '请选择随访模板', trigger: 'change' }],
time: [{ required: true, message: '请选择随访开始时间', trigger: 'change' }],
},
}
},
created() {
// 获取备注
getBasicData({
numList: 'P211'
}).then(res=>{
console.log(res)
this.kindOptions = res.data['P211']
})
},
mounted() {
//清理store中存的数据setTimeNodeList
......@@ -183,6 +197,7 @@
let getArguments = arguments[0];
this.isShowSelectPatient = getArguments[0];
this.hasSelectedList = getArguments[1];
this.baseInfo.patientIdList = getArguments[1];
this.baseInfo.hasSelectedNum = getArguments[1].length;
},
continueAdd(val) {
......@@ -224,8 +239,11 @@
this.activeTab = 'first';
},
saveEdit() {
this.baseInfo.fPlanTimeReqList = this.setTimeNodeList
console.log(this.baseInfo)
createFollowPlan(this.baseInfo)
// console.log('保存setTimeNodeList1',this.$refs.getTimeNodeList.setTimeNodeList1)
// console.log('store中的setTimeNodeList数据为=>',JSON.stringify(this.setTimeNodeList))
// console.log('保存timeForm',this.$refs.getTimeNodeList.timeForm)
// 各种校验通过后,提交编辑内容,toast提示
......
......@@ -51,7 +51,8 @@
<el-radio-button label="2">已结束({{residentList.yesCount}})</el-radio-button>
</el-radio-group>
<div class="btn-left">
<el-button class="button-green" type="primary" size="small" @click="finishFollowup('all')">结束随访</el-button>
<el-button class="button-green" type="primary" size="small" v-if="status==2" @click="recoverFollowup('all')">恢复随访</el-button>
<el-button class="button-green" type="primary" size="small" v-else @click="finishFollowup('all')">结束随访</el-button>
<el-button class="button-white" plain size="small" @click="selectPatientHandler">添加居民</el-button>
</div>
</div>
......@@ -100,7 +101,8 @@
align="center">
<template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="changePlan(scope.row)" >变更计划</el-button>|
<el-button class="btn-right-class" type="text" @click="finishFollowup(scope.row)" >结束随访</el-button>
<el-button class="btn-right-class" type="text" v-if="status==2" @click="recoverFollowup(scope.row)" >恢复随访</el-button>
<el-button class="btn-right-class" type="text" v-else @click="finishFollowup(scope.row)" >结束随访</el-button>
</template>
</el-table-column>
</el-table>
......@@ -121,6 +123,7 @@
</div>
<change-plan :showThisPage="showChangePlan" :planChangeData="planChangeData" @closeChangePlan="closeChangePlan"></change-plan>
<finish-followup :showThisPage="showFinishFollowup" :finishData="finishData" @closeFinishFollowup="closeFinishFollowup"></finish-followup>
<recover-followup :showThisPage="showRecoverFollowup" :finishData="recoverData" @closeFinishFollowup="closeRecoverFollowup"></recover-followup>
<select-patient
:isShowSelectPatient="isShowSelectPatient"
@closeSelectPatient="closeSelectPatient"
......@@ -135,6 +138,8 @@
import ChangePlan from '@/views/followup/plan-manage/dialog/change-plan';
//结束随访dialog
import FinishFollowup from '@/views/followup/plan-manage/dialog/finish-followup';
//恢复随访dialog
import RecoverFollowup from '@/views/followup/plan-manage/dialog/finish-followup';
//添加居民
import SelectPatient from '@/views/followup/plan-manage/dialog/select-patient';
......@@ -145,7 +150,8 @@
BreadCrumb,
ChangePlan,
FinishFollowup,
SelectPatient
SelectPatient,
RecoverFollowup
},
data() {
return {
......@@ -166,6 +172,8 @@
planChangeData: {}, //变更计划数据
showFinishFollowup: false, //是否展示结束随访
finishData: {}, //结束数据
showRecoverFollowup: false, //是否展示恢复随访
recoverData: {}, //恢复数据
isShowSelectPatient: false, //显示居民选择框
hasSelectedList: [], //已选居民
finishPatientList: [], //结束随访居民(多选)
......@@ -254,6 +262,29 @@
closeFinishFollowup(isShow) {
this.showFinishFollowup = isShow
},
recoverFollowup(row) {
if(row=='all') {
if(this.finishPatientList.length<=0) {
this.$message({
message: '请选择居民!',
type: 'warning'
});
return;
}
this.finishData = {
patientName: row.patientName,
};
} else {
this.finishData = {
patientName: row.patientName,
};
}
this.showFinishFollowup = true;
},
closeRecoverFollowup(isShow) {
this.showRecoverFollowup = isShow
},
selectPatientHandler() {
this.isShowSelectPatient = true;
},
......
......@@ -50,7 +50,7 @@
</div>
<div class="reservation-table table-content">
<el-radio-group v-model="status" size="small">
<el-radio-button label="0">全部({{reservationList.count}})</el-radio-button>
<el-radio-button label="">全部({{reservationList.count}})</el-radio-button>
<el-radio-button label="1">未发送({{reservationList.unSendCount}})</el-radio-button>
<el-radio-button label="2">待确认({{reservationList.waitAcceptCount}})</el-radio-button>
<el-radio-button label="3">已接受({{reservationList.acceptedCount}})</el-radio-button>
......@@ -159,7 +159,7 @@
planName: '',
planTimes: ''
}, //查询数据
status: 0, //列表筛选条件
status: '', //列表筛选条件
statusOptions: [
{
value: 1,
......
......@@ -179,6 +179,8 @@ export default {
},
changeFollowStatus(row) {
this.statusForm = {
fuPlanPatientTimesId: row.fuPlanPatientTimesId,
patientId: row.patientId,
nickname: row.patientName,
status: row.status,
}
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册