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

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

Merge branch 'dev-followUp-20190312' of http://192.168.110.53/com.pica.cloud.education.frontend/pica.cloud.web-education-admin into dev-followUp-20190312

# Conflicts:
#	src/utils/followup/followapis.js
import planManage from './planManage' import planManage from './planManage'
import reservationManage from './reservationManage' import reservationManage from './reservationManage'
import workbench from './workbench' import workbench from './workbench'
import recordManage from './recordManage'
const followModules = { const followModules = {
planManage, planManage,
reservationManage, reservationManage,
workbench workbench,
recordManage
} }
export default followModules export default followModules
import {getEnteringList, changeEnteringStatus, getEnteringInfo} from '../../utils/followup/followapis'
export default {
namespaced: true,
state: {
recordList: {}, //录入列表
enteringInfo: {}, //单条信息查看
constantsData: {},//获取常量
},
mutations: {
GET_RECORD_LIST(state, payload) {
state.recordList = payload
},
GET_ENTERING_INFO(state, payload) {
state.enteringInfo = payload
},
GET_CONSTANS_DATA(state, payload) {
state.constantsData = payload
},
},
actions: {
async getRecordList(context, payload) {
await getEnteringList({
...payload
}).then(({data}) => {
context.commit('GET_RECORD_LIST', data);
});
},
async getEnteringInfo(context, payload) {
await getEnteringInfo({}, {
...payload
}).then(({data}) => {
context.commit('GET_ENTERING_INFO', data);
});
},
// async getConstantsData(context, payload) {
// await followApi.getBasicData({
// ...payload
// }).then(({data}) => {
// context.commit('GET_CONSTANS_DATA', data)
// })
// },
},
}
import {getReservationList, import {getReservationList,
getCheckReservation, getCheckReservation,
getReservationPatients,} from '../../utils/followup/followapis' getReservationPatients,
getBasicData} from '../../utils/followup/followapis'
export default { export default {
namespaced: true, namespaced: true,
...@@ -12,6 +13,7 @@ export default { ...@@ -12,6 +13,7 @@ export default {
}, },
checkRevervationData: {},//发送预约校验 checkRevervationData: {},//发送预约校验
constantsData: {},//获取常量 constantsData: {},//获取常量
getRevervationNum: null,
}, },
mutations: { mutations: {
GET_RESERVATION_LIST(state, payload) { GET_RESERVATION_LIST(state, payload) {
...@@ -23,11 +25,14 @@ export default { ...@@ -23,11 +25,14 @@ export default {
GET_CONSTANS_DATA(state, payload) { GET_CONSTANS_DATA(state, payload) {
state.constantsData = payload state.constantsData = payload
}, },
GET_REVERVATION_NUM(state, payload) {
state.getRevervationNum = payload
},
}, },
actions: { actions: {
getReservationList(context, payload) { getReservationList(context, payload) {
const { pageSize, pageNum } = context.state.reservationList; const { pageSize, pageNum } = context.state.reservationList;
followApi.getReservationList({ getReservationList({
pageSize, pageSize,
pageNum, pageNum,
...payload ...payload
...@@ -36,21 +41,27 @@ export default { ...@@ -36,21 +41,27 @@ export default {
}); });
}, },
async getCheckReservation(context, payload) { async getCheckReservation(context, payload) {
await followApi.getCheckReservation({ await getCheckReservation({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_CHECK_RESERVATION', data) context.commit('GET_CHECK_RESERVATION', data)
}) })
}, },
async getConstantsData(context, payload) { async getConstantsData(context, payload) {
await followApi.getBasicData({ await getBasicData({
...payload ...payload
}).then(({data}) => { }).then(({data}) => {
context.commit('GET_CONSTANS_DATA', data) context.commit('GET_CONSTANS_DATA', data)
}) })
}, },
getReservationPatients(context, payload) {
getReservationPatients({
...payload
}).then(({data}) => {
context.commit('GET_REVERVATION_NUM', data.number)
// this.reservationForm.hasReservedNumber = data.number;
})
},
// getConstantsData({commit}) { // getConstantsData({commit}) {
// return new Promise(async (resolve, reject)=>{ // return new Promise(async (resolve, reject)=>{
// const res = await followApi.getBasicData({ // const res = await followApi.getBasicData({
......
...@@ -6,10 +6,11 @@ import utils from './followupUtils'; ...@@ -6,10 +6,11 @@ import utils from './followupUtils';
/*工作台*/
const headers = null /*{ const headers = null /*{
sysCode: 45 sysCode: 45
}*/ }*/
/*工作台*/
export const getTodayAppointsList = (params) => { export const getTodayAppointsList = (params) => {
return fetch({ return fetch({
headers, headers,
...@@ -138,6 +139,15 @@ export const getReservationPatients = (params) => { ...@@ -138,6 +139,15 @@ export const getReservationPatients = (params) => {
description: '查看预约人数', description: '查看预约人数',
}) })
}; };
export const changeReservationStatus = (params) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/appoint/status/`),
method: 'post',
params: 'data',
description: '手动变更预约状态',
})
};
/*录入管理*/ /*录入管理*/
export const getEnteringList = (data) => { export const getEnteringList = (data) => {
return fetch({ return fetch({
...@@ -147,7 +157,27 @@ export const getEnteringList = (data) => { ...@@ -147,7 +157,27 @@ export const getEnteringList = (data) => {
data: data, data: data,
description: '录入列表查看', description: '录入列表查看',
}) })
}; }
export const changeEnteringStatus = (data) => {
return fetch({
headers,
url: getFollowUpSC(`/followup/entering/status/change`),
method: 'post',
data: 'data',
description: '变更随访状态',
},)
}
export const getEnteringInfo = (patientId, fuPlanPatientTimesId) => {
return fetch({
headers,
url: getFollowUpSC(`followup/entering/${patientId}/fuInfo/${fuPlanPatientTimesId}`),
method: 'get',
params: 'params',
description: '随访单条信息查看',
},)
}
/*常量*/ /*常量*/
export const getBasicData = (data) => { export const getBasicData = (data) => {
return fetch({ return fetch({
......
<template> <template>
<div> <div>
<p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)" :disabled="activeTab!=='setNewRef'">新增时间节点</el-button><br></p> <p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)">新增时间节点</el-button><br></p>
<div class="add-time-content"> <div class="add-time-content">
<div class="time-line-scroll"> <div class="time-line-scroll">
<!--<el-button type="primary" size="mini" round>设置随访时间 <i class="el-icon-circle-close-outline"></i></el-button>-->
<!--<el-button type="primary" @click="changeTab(item)" size="mini" round v-for="(item, index) in setTimeNodeList" :key="index">开始后{{item.followupTime}}{{item.followupMark}} <i class="el-icon-circle-close-outline"></i></el-button>-->
<el-radio-group v-model="activeTab" @change="changeTab"> <el-radio-group v-model="activeTab" @change="changeTab">
<el-radio-button v-if="setTimeNodeList.length > 0" :key="item.formRef" v-for="(item, index) in setTimeNodeList" :label="index">开始后{{item.followupTime + item.followupMark}} <i class="el-icon-circle-close-outline" @click="deleteTimeNode(item, index)"></i></el-radio-button> <el-radio-button v-if="setTimeNodeList.length > 0" :key="item.formRef" v-for="(item, index) in setTimeNodeList" :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">设置随访时间</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> </el-radio-group>
<!--<el-button type="primary" :class="(activeTab || activeTab==0) ? 'blur-btn' : ''" @click="setTimeForm()">设置随访时间</el-button>--> <!--<el-button type="primary" :class="(activeTab || activeTab==0) ? 'blur-btn' : ''" @click="setTimeForm()">设置随访时间</el-button>-->
</div> </div>
...@@ -125,16 +122,8 @@ ...@@ -125,16 +122,8 @@
activeTab: null, activeTab: null,
setTimeNodeList: [], setTimeNodeList: [],
currentFormRef: 1, currentFormRef: 1,
showSetBtn: true,
timeForm: _.cloneDeep(timeFormInit), timeForm: _.cloneDeep(timeFormInit),
// timeForm: {
// formRef: '',
// followupTime: '',
// followupMark: '',
// followupWay: '',
// pushTime: '',
// remindTime: [],
// followupForm: [],
// },
indexOptions: [ indexOptions: [
{ {
value: '0', value: '0',
...@@ -218,11 +207,11 @@ ...@@ -218,11 +207,11 @@
watch: { watch: {
activeTab(newVal, oldVal) { activeTab(newVal, oldVal) {
console.log('tab变化',newVal,oldVal) console.log('tab变化',newVal,oldVal)
if(oldVal == 'setNewRef') { // if(oldVal == 'setNewRef' || newVal== 'setNewRef') {
return // return
}else { // }else {
this.setTimeNodeList[oldVal] = this.timeForm; this.setTimeNodeList[oldVal] = this.timeForm;
} // }
} }
}, },
methods: { methods: {
...@@ -238,21 +227,24 @@ ...@@ -238,21 +227,24 @@
return formName; return formName;
}, },
addNewNode(formName) { addNewNode(formName) {
this.$refs[formName].validate((valid) => { if(this.activeTab !== 'setNewRef') {
if (valid) { // 显示设置按钮
this.setTimeNodeList.push(this.timeForm); this.showSetBtn = true;
// this.store.commit('SET_TIME_NODE_LIST',this.setTimeNodeList) this.activeTab = 'setNewRef';
// this.timeForm = JSON.parse(JSON.stringify(this.timeFormConst)); this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm.formRef = this.getNowTime();
this.timeForm.formRef = this.getNowTime(); //新增一个form }else {
// this.$refs[formRef].resetFields() this.$refs[formName].validate((valid) => {
console.log('数组',this.setTimeNodeList) if (valid) {
console.log('timeForm新的',this.timeForm); this.setTimeNodeList.push(this.timeForm);
} else { // this.store.commit('SET_TIME_NODE_LIST',this.setTimeNodeList)
return false; this.timeForm = _.cloneDeep(timeFormInit);
} this.timeForm.formRef = this.getNowTime(); //新增一个form
}); } else {
return;
}
});
}
}, },
goSelectCartoon() { goSelectCartoon() {
this.isSelectCartoon = true; this.isSelectCartoon = true;
...@@ -265,7 +257,6 @@ ...@@ -265,7 +257,6 @@
this.timeForm.hasSelected = ''; this.timeForm.hasSelected = '';
}, },
changeTab(val){ changeTab(val){
console.log('tab切换',val)
this.activeTab = val; this.activeTab = val;
if(val == 'setNewRef') { if(val == 'setNewRef') {
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm = _.cloneDeep(timeFormInit);
...@@ -273,22 +264,20 @@ ...@@ -273,22 +264,20 @@
}else { }else {
this.timeForm = _.cloneDeep(this.setTimeNodeList[val]); this.timeForm = _.cloneDeep(this.setTimeNodeList[val]);
} }
// for(let i=0; i<this.setTimeNodeList.length; i++) {
// if(this.setTimeNodeList[i].formRef === val) {
// this.timeForm = this.setTimeNodeList[i];
// console.log('当前tab的form',this.timeForm)
// }
// }
},
setTimeForm() {
this.activeTab = null;
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); //新增一个form
}, },
deleteTimeNode(item, index) { deleteTimeNode(item, index) {
this.setTimeNodeList.splice(index, 1) this.setTimeNodeList.splice(index, 1)
if(this.setTimeNodeList.length == 0) {
this.activeTab = 'setNewRef';
this.timeForm = _.cloneDeep(timeFormInit);
this.timeForm.formRef = this.getNowTime(); //新增一个form
}
}, },
deleteAddNode() {
this.showSetBtn = false;
this.activeTab = 0;
this.timeForm = this.setTimeNodeList[0];
}
}, },
} }
</script> </script>
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<span>{{statusForm.nickname}}</span> <span>{{statusForm.nickname}}</span>
</el-form-item> </el-form-item>
<el-form-item label="变更状态"> <el-form-item label="变更状态">
<span>{{statusForm.status==1 ? '未完成' : '已完成'}}</span> <span>{{statusForm.status==1 ? '已完成' : '未完成'}}</span>
</el-form-item> </el-form-item>
<el-form-item label="变更原因" prop="reason"> <el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="statusForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input> <el-input type="textarea" v-model="statusForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
</div> </div>
</template> </template>
<script> <script>
import followApi from '@/utils/followup/followapis'
export default { export default {
components: {}, components: {},
data(){ data(){
...@@ -66,9 +66,22 @@ ...@@ -66,9 +66,22 @@
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
//后面更改为接口调用 //后面更改为接口调用
// this.$emit('closeChangeStatus',false,this.statusForm); followApi.changeEnteringStatus({
this.$emit('closeChangeStatus',false); info: {
this.$refs['statusForm'].resetFields(); fuPlanPatientTimesId: this.statusForm.fuPlanPatientTimesId,
patientId: this.statusForm.patientId,
status: this.statusForm.status,
reason: this.statusForm.reason,
}
}).then(({data}) => {
if(data == 1) {
this.$message.success('随访状态变更成功!');
this.$emit('closeChangeStatus',false);
this.$refs['statusForm'].resetFields();
}else {
return;
}
})
} else { } else {
return false; return false;
} }
......
...@@ -12,23 +12,23 @@ ...@@ -12,23 +12,23 @@
<div class="base-content"> <div class="base-content">
<div class="content-div"> <div class="content-div">
<div class="c-title">姓名:</div> <div class="c-title">姓名:</div>
<div class="c-content">戴佳康</div> <div class="c-content">{{enteringInfo.nickname}}</div>
</div> </div>
<div class="content-div "> <div class="content-div ">
<div class="c-title">性别:</div> <div class="c-title">性别:</div>
<div class="c-content"></div> <div class="c-content">{{enteringInfo.sex}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">年龄:</div> <div class="c-title">年龄:</div>
<div class="c-content">55</div> <div class="c-content">{{enteringInfo.age}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">身份证号:</div> <div class="c-title">身份证号:</div>
<div class="c-content">3101110196011022419</div> <div class="c-content">{{enteringInfo.idNo}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">联系方式:</div> <div class="c-title">联系方式:</div>
<div class="c-content">13111111111</div> <div class="c-content">{{enteringInfo.mobilePhone}}</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -36,34 +36,34 @@ ...@@ -36,34 +36,34 @@
<div class="base-content"> <div class="base-content">
<div class="content-div"> <div class="content-div">
<div class="c-title">随访计划名称:</div> <div class="c-title">随访计划名称:</div>
<div class="c-content">2018年糖尿病随访</div> <div class="c-content">{{enteringInfo.name}}</div>
</div> </div>
</div> </div>
<div class="group-info base-content"> <div class="group-info base-content">
<div class="content-div"> <div class="content-div">
<div class="c-title">随访时间点:</div> <div class="c-title">随访时间点:</div>
<div class="c-content">3次随访</div> <div class="c-content">{{enteringInfo.timeNo}}次随访</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">随访方式:</div> <div class="c-title">随访方式:</div>
<div class="c-content">门诊随访</div> <div class="c-content">{{enteringInfo.fuPlanType}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">计划随访时间:</div> <div class="c-title">计划随访时间:</div>
<div class="c-content">2019-03-23</div> <div class="c-content">{{enteringInfo.fuPlanTime}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<div class="c-title">随访预约时间:</div> <div class="c-title">随访预约时间:</div>
<div class="c-content">2019-03-23 10:00-11:00</div> <div class="c-content">{{enteringInfo.appointmentTime}}</div>
</div> </div>
</div> </div>
<div class="group-info base-content flex-start"> <div class="group-info base-content flex-start">
<div class="content-div"> <div class="content-div">
<div class="c-title">随访状态:</div> <div class="c-title">随访状态:</div>
<div class="c-content">已过期</div> <div class="c-content">{{enteringInfo.status}}</div>
</div> </div>
<div class="content-div"> <div class="content-div">
<p class="tip">备注:更改随访状态原因</p> <p class="tip">备注:{{enteringInfo.remarks}}</p>
</div> </div>
</div> </div>
</div> </div>
...@@ -71,20 +71,10 @@ ...@@ -71,20 +71,10 @@
<div class="list-item"> <div class="list-item">
<p class="title">预约日志</p> <p class="title">预约日志</p>
</div> </div>
<div class="list-item"> <div class="list-item" v-for="(item, index) in enteringInfo.appointmentLogs" v-if="enteringInfo.appointmentLogs.length>0" :key="index">
<p class="title">2019-3-14,李时珍医生发送微信预约</p> <p class="title">{{item.appointmentDate}},{{item.appointmentInfo}}</p>
<p class="status">居民未响应</p> <p class="status">{{item.appointmentResult}}</p>
<p class="reason"></p> <p class="reason" v-if="item.reason">变更原因:{{item.reason}}</p>
</div>
<div class="list-item">
<p class="title">2019-3-20,李时珍医生发送短信预约</p>
<p class="status">居民已预约</p>
<p class="reason"></p>
</div>
<div class="list-item">
<p class="title">2019-3-20,李时珍医生发送短信预约</p>
<p class="status">居民已拒绝</p>
<p class="reason">变更原因:当天居民临时有事</p>
</div> </div>
</div> </div>
<div class="base-info console-list"> <div class="base-info console-list">
...@@ -92,42 +82,54 @@ ...@@ -92,42 +82,54 @@
<p class="title">患教资料</p> <p class="title">患教资料</p>
</div> </div>
<div class="list-item"> <div class="list-item">
<p class="time">开始前三十天</p> <p class="time">{{enteringInfo.eduData.timeNodeInfo}}</p>
<p class="link-p">患教内容啦啦啦</p> <a class="link-p" :href="enteringInfo.eduData.shortUrl">{{enteringInfo.eduData.eduTitle}}</a>
</div> </div>
</div> </div>
<div class="base-info console-list"> <div class="base-info console-list">
<div class="list-item"> <div class="list-item">
<p class="title">随访登记表</p> <p class="title">随访登记表</p>
</div> </div>
<div class="list-item"> <div class="list-item" v-for="(item, index) in enteringInfo.fuTable" :key="index" v-if="enteringInfo.fuTable.length>0">
<p class="link-p">随访登记表名称1</p> <p class="link-p">{{item.name}}</p>
</div>
<div class="list-item">
<p class="link-p">随访登记表名称2</p>
</div> </div>
</div> </div>
</div> </div>
</el-dialog> </el-dialog>
</template> </template>
<script> <script>
import { mapState, mapActions } from 'vuex';
export default { export default {
data(){ data(){
return{ return{
dialogDetail: true dialogDetail: true,
// eduData: {},
} }
}, },
props: { props: {
dialogFormVisible: { dialogFormVisible: {
type: Boolean, type: Boolean,
default: false default: false
},
enteringInfo: {
type: Object,
default: {}
} }
}, },
computed: { computed: {
// ...mapState('recordManage',{
// enteringInfo: state => state.enteringInfo,
// })
},
created() {
// if(this.dialogFormVisible == true) {
// this.getEnteringInfo({patientId: this.enteringRow.patientId,fuPlanPatientTimesId: this.enteringRow.fuPlanPatientTimesId});
// }
}, },
mounted(){ mounted(){
}, },
methods: { methods: {
// ...mapActions('recordManage', ['getEnteringInfo']),
closeDetail(){ closeDetail(){
this.$emit('closeDetail',false) this.$emit('closeDetail',false)
}, },
......
...@@ -14,28 +14,30 @@ ...@@ -14,28 +14,30 @@
label-suffix=":" label-suffix=":"
label-width="120px"> label-width="120px">
<el-form-item label="变更居民"> <el-form-item label="变更居民">
<span>{{reservationForm.nickname}}</span> <span>{{reservationForm.nickName}}</span>
</el-form-item> </el-form-item>
<el-form-item label="预约状态" required prop="reserveStatus"> <el-form-item label="预约状态" required prop="appointStatus">
<el-radio-group v-model="reservationForm.reserveStatus"> <el-radio-group v-model="reservationForm.appointStatus">
<el-radio label="已接受"></el-radio> <el-radio label="1">已接受</el-radio>
<el-radio label="已拒绝"></el-radio> <el-radio label="2">已拒绝</el-radio>
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
<el-form-item v-if="reservationForm.reserveStatus == '已接受'" label="预约时间" required> <!--appointStatus:1是已接受,2是已拒绝-->
<el-form-item v-if="reservationForm.appointStatus == 1" label="预约时间" required>
<div style="display: flex;"> <div style="display: flex;">
<el-form-item prop="reservationDate"> <el-form-item prop="appointmentDate">
<el-date-picker <el-date-picker
type="date" type="date"
v-model="reservationForm.reservationDate" v-model="reservationForm.appointmentDate"
placeholder="请选择预约日期" placeholder="请选择预约日期"
value-format="yyyy-MM-dd" value-format="timestamp"
value="yyyy-MM-dd" value="yyyy-MM-dd"
:picker-options="pickerOptions"> :picker-options="pickerOptions"
@change="changeHandler">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
<el-form-item prop="timeRange"> <el-form-item prop="appointmentRange">
<el-select v-model="reservationForm.timeRange" placeholder="请选择时间段" clearable style="margin-left:20px;"> <el-select v-model="reservationForm.appointmentRange" placeholder="请选择时间段" clearable style="margin-left:20px;">
<el-option <el-option
v-for="item in timeRangeOptions" v-for="item in timeRangeOptions"
:key="item.value" :key="item.value"
...@@ -45,10 +47,10 @@ ...@@ -45,10 +47,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{reservationForm.hasReservedNumber}}人,请确保能在此时间段完成预约的随访任务</p> <p class="warn-tips" v-if="reservationForm.appointmentDate">该日期已经成功预约{{getRevervationNum}}人,请确保能在此时间段完成预约的随访任务</p>
</el-form-item> </el-form-item>
<el-form-item label="变更原因" prop="reason"> <el-form-item label="变更原因" prop="reason">
<el-input type="textarea" v-model="reservationForm.reason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input> <el-input type="textarea" v-model="reservationForm.changeReason" placeholder="请输入变更原因" maxlength="30" rows="3" style="width:60%;"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
...@@ -59,19 +61,25 @@ ...@@ -59,19 +61,25 @@
</div> </div>
</template> </template>
<script> <script>
import followApi from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex'
export default { export default {
components: {}, components: {},
data(){ data(){
return{ return{
reservationDialog: true, reservationDialog: true,
reservationForm: { // reservationForm: {
nickname: '呆呆', // nickName: row.nickName,
reserveStatus: '', // appointmentDate: '',
reason: '', // appointmentRange: '',
reservationDate: '', // planId: row.planId,
timeRange: '', // patientId: row.patientId,
}, // planName: row.planName,
// patientsTimesId: row.patientsTimesId,
// typeStr: '',
// changeReason: '',
// appointStatus: null
// },
timeRangeOptions: [ timeRangeOptions: [
{ {
value: 1, value: 1,
...@@ -120,9 +128,9 @@ ...@@ -120,9 +128,9 @@
label: '20:00-21:00' label: '20:00-21:00'
}], }],
rules: { rules: {
reserveStatus: [{ required: true, message: '请选择预约状态', trigger: 'change' }], appointStatus: [{ required: true, message: '请选择预约状态', trigger: 'change' }],
reservationDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }], appointmentDate: [{ required: true, message: '请选择预约日期', trigger: 'change' }],
timeRange: [{ required: true, message: '请选择时间段', trigger: 'change' }], appointmentRange: [{ required: true, message: '请选择时间段', trigger: 'change' }],
}, },
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
...@@ -135,13 +143,28 @@ ...@@ -135,13 +143,28 @@
isChangeReservation: { isChangeReservation: {
type: Boolean, type: Boolean,
default: false default: false
},
reservationForm: {
type: Object,
default: function () {
return {}
}
}
},
watch: {
reservationForm(val) {
this.reservationForm = val;
} }
}, },
computed: { computed: {
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
})
}, },
mounted(){ mounted(){
}, },
methods: { methods: {
...mapActions('reservationManage', ['getReservationPatients']),
closeChangeReserve1(){ closeChangeReserve1(){
if (this.$refs['reservationForm']) { if (this.$refs['reservationForm']) {
this.$refs['reservationForm'].resetFields(); this.$refs['reservationForm'].resetFields();
...@@ -151,15 +174,22 @@ ...@@ -151,15 +174,22 @@
closeChangeReserve(formName){ closeChangeReserve(formName){
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
if (this.$refs['reservationForm']) { console.log('保存的内容',this.reservationForm)
followApi.changeReservationStatus({
...this.reservationForm
}).then(({data}) => {
this.$message.success('变更成功!');
this.$emit('closeChangeReserve',false);
this.$refs['reservationForm'].resetFields(); this.$refs['reservationForm'].resetFields();
} })
this.$emit('closeChangeReserve',false)
} else { } else {
return false; return false;
} }
}); });
}, },
changeHandler(val) {
this.getReservationPatients({time: val});
},
} }
} }
</script> </script>
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{reservationForm.hasReservedNumber}}人,请确保能在此时间段完成预约的随访任务</p> <p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{getRevervationNum}}人,请确保能在此时间段完成预约的随访任务</p>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange"> <div class="reservation-content content-list" v-if="reservationForm.reservationDate && reservationForm.timeRange">
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</div> </div>
</template> </template>
<script> <script>
import followApi from '@/utils/followup/followapis' import { mapState, mapActions } from 'vuex'
export default { export default {
components: {}, components: {},
data(){ data(){
...@@ -145,16 +145,16 @@ ...@@ -145,16 +145,16 @@
checkData: {}, checkData: {},
}, },
computed: { computed: {
...mapState('reservationManage',{
getRevervationNum: state => state.getRevervationNum,
})
}, },
mounted(){ mounted(){
}, },
methods: { methods: {
...mapActions('reservationManage', ['getReservationPatients']),
changeHandler(val) { changeHandler(val) {
followApi.getReservationPatients({ this.getReservationPatients({time: val});
time: val
}).then(({data}) => {
this.reservationForm.hasReservedNumber = data.number;
})
}, },
closeSendReserve1(){ closeSendReserve1(){
if (this.$refs['reservationForm']) { if (this.$refs['reservationForm']) {
......
...@@ -70,7 +70,7 @@ ...@@ -70,7 +70,7 @@
label="姓名" label="姓名"
align="center"> align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="goPatientDetail(scope.row.planId, scope.row.nickId)" >{{scope.row.nickName}}</el-button> <el-button type="text" @click="goPatientDetail(scope.row)" >{{scope.row.nickName}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
...@@ -120,7 +120,8 @@ ...@@ -120,7 +120,8 @@
</div> </div>
<send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" @closeSendReserve="closeSendReserve"></send-reservation> <send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" @closeSendReserve="closeSendReserve"></send-reservation>
<no-enough :isNoEnoughShow="isNoEnoughShow" @closeTipsDialog="closeTipsDialog"></no-enough> <no-enough :isNoEnoughShow="isNoEnoughShow" @closeTipsDialog="closeTipsDialog"></no-enough>
<change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve"></change-reservation> <change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve" :reservationForm="needPara"></change-reservation>
<followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail" :enteringInfo="enteringInfo"></followup-detail>
</div> </div>
</template> </template>
...@@ -133,13 +134,15 @@ ...@@ -133,13 +134,15 @@
import SendReservation from './dialog/send-reservation'; import SendReservation from './dialog/send-reservation';
import NoEnough from './dialog/no-enough'; import NoEnough from './dialog/no-enough';
import ChangeReservation from "./dialog/change-reservation"; import ChangeReservation from "./dialog/change-reservation";
import followupDetail from "@/views/followup/record-manage/dialog/followupDetail";
export default { export default {
name: "reservation-list", name: "reservation-list",
components: { components: {
ChangeReservation, ChangeReservation,
BreadCrumb, BreadCrumb,
SendReservation, SendReservation,
NoEnough NoEnough,
followupDetail
}, },
data() { data() {
return { return {
...@@ -174,6 +177,8 @@ ...@@ -174,6 +177,8 @@
isChangeReservation: false, //变更预约状态dialog展示 isChangeReservation: false, //变更预约状态dialog展示
selectionData: [], selectionData: [],
ids: '', ids: '',
needPara: {},
dialogDetailShow: false,
} }
}, },
created() { created() {
...@@ -197,10 +202,14 @@ ...@@ -197,10 +202,14 @@
...mapState('reservationManage',{ ...mapState('reservationManage',{
reservationList: state => state.reservationList, reservationList: state => state.reservationList,
checkRevervationData: state => state.checkRevervationData, checkRevervationData: state => state.checkRevervationData,
}),
...mapState('recordManage',{
enteringInfo: state => state.enteringInfo,
}) })
}, },
methods: { methods: {
...mapActions('reservationManage', ['getReservationList','getCheckReservation']), ...mapActions('reservationManage', ['getReservationList','getCheckReservation']),
...mapActions('recordManage', [ 'getEnteringInfo']),
handleSizeChangePre(pageSize) { handleSizeChangePre(pageSize) {
this.getReservationList({ this.getReservationList({
pageSize, pageSize,
...@@ -224,10 +233,11 @@ ...@@ -224,10 +233,11 @@
resetSearchData(formName) { resetSearchData(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
goPatientDetail(patientId) { //预约详情页 async goPatientDetail(row) { //预约详情页
alert(1+patientId) // alert(1+patientId)
this.$router.push('/followup/plan-manage/resident-detail') // this.$router.push('/followup/plan-manage/resident-detail')
await this.getEnteringInfo({patientId: row.patientId,fuPlanPatientTimesId: row.fuPlanPatientTimesId});
this.dialogDetailShow = true;
}, },
setSearchData() { setSearchData() {
const { planName, mobilePhone, timeStatus, nickName } = this.searchData; const { planName, mobilePhone, timeStatus, nickName } = this.searchData;
...@@ -288,7 +298,20 @@ ...@@ -288,7 +298,20 @@
this.isNoEnoughShow = true; this.isNoEnoughShow = true;
} }
}, },
changeReserveClick(){ changeReserveClick(row){
// this.needPara = row;
this.needPara = {
nickName: row.nickName,
appointmentDate: '',
appointmentRange: '',
planId: row.planId,
patientId: row.patientId,
planName: row.planName,
patientsTimesId: row.patientsTimesId,
typeStr: '',
changeReason: '',
appointStatus: null
};
this.isChangeReservation = true; this.isChangeReservation = true;
}, },
closeSendReserve(val){ closeSendReserve(val){
...@@ -310,6 +333,9 @@ ...@@ -310,6 +333,9 @@
this.ids = idsArray.join(",") this.ids = idsArray.join(",")
} }
}, },
closeDetail(val){
this.dialogDetailShow = val;
},
}, },
watch: { watch: {
status(val) { status(val) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册