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

发送预约与计划列表接口

上级 1de09918
...@@ -16,7 +16,7 @@ export default { ...@@ -16,7 +16,7 @@ export default {
planOption: [], //随访计划select planOption: [], //随访计划select
timeNodeList: [], timeNodeList: [],
setTimeNodeList: [], //新建计划设置时间节点 setTimeNodeList: [], //新建计划设置时间节点
planList: {}, //随访计划列表
}, },
mutations: { mutations: {
GET_RESIDENT_LIST(state, payload) { GET_RESIDENT_LIST(state, payload) {
...@@ -43,7 +43,10 @@ export default { ...@@ -43,7 +43,10 @@ export default {
}, },
SET_TIME_NODE_LIST(state, payload) { SET_TIME_NODE_LIST(state, payload) {
state.setTimeNodeList = payload; state.setTimeNodeList = payload;
} },
GET_PLAN_LIST(state, payload) {
state.planList = payload
},
}, },
actions: { actions: {
getResidentList(context, payload) { getResidentList(context, payload) {
...@@ -103,5 +106,12 @@ export default { ...@@ -103,5 +106,12 @@ export default {
// context.commit('GET_PLAN_OPTION', data); // context.commit('GET_PLAN_OPTION', data);
}); });
}, },
async getPlanList(context, payload) {
await followApi.getPlanList({
...payload
}).then(({data}) => {
context.commit('GET_PLAN_LIST', data);
});
},
}, },
} }
...@@ -95,6 +95,13 @@ const reservationManageApi = [ ...@@ -95,6 +95,13 @@ const reservationManageApi = [
name: 'changeReservationStatus', name: 'changeReservationStatus',
description: '手动变更预约状态', description: '手动变更预约状态',
}, },
{
url: '/appoint',
method: 'post',
params: 'data',
name: 'sendReservation',
description: '发送预约',
},
] ]
/*工作台*/ /*工作台*/
......
...@@ -3,6 +3,9 @@ ...@@ -3,6 +3,9 @@
<p><el-button plain icon="el-icon-plus" round @click="addNewNode(timeForm.formRef)">新增时间节点</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" v-if="showSetBtn">设置随访时间 <i class="el-icon-circle-close-outline" @click="deleteAddNode" v-if="setTimeNodeList.length>0"></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>
...@@ -207,11 +210,11 @@ ...@@ -207,11 +210,11 @@
watch: { watch: {
activeTab(newVal, oldVal) { activeTab(newVal, oldVal) {
console.log('tab变化',newVal,oldVal) console.log('tab变化',newVal,oldVal)
// if(oldVal == 'setNewRef' || newVal== 'setNewRef') { if(oldVal == 'setNewRef' || newVal== 'setNewRef') {
// return return
// }else { }else {
this.setTimeNodeList[oldVal] = this.timeForm; this.setTimeNodeList[oldVal] = this.timeForm;
// } }
} }
}, },
methods: { methods: {
...@@ -267,6 +270,7 @@ ...@@ -267,6 +270,7 @@
}, },
deleteTimeNode(item, index) { deleteTimeNode(item, index) {
this.setTimeNodeList.splice(index, 1) this.setTimeNodeList.splice(index, 1)
this.activeTab = 0;
if(this.setTimeNodeList.length == 0) { if(this.setTimeNodeList.length == 0) {
this.activeTab = 'setNewRef'; this.activeTab = 'setNewRef';
this.timeForm = _.cloneDeep(timeFormInit); this.timeForm = _.cloneDeep(timeFormInit);
...@@ -275,7 +279,7 @@ ...@@ -275,7 +279,7 @@
}, },
deleteAddNode() { deleteAddNode() {
this.showSetBtn = false; this.showSetBtn = false;
this.activeTab = 0; this.activeTab = '';
this.timeForm = this.setTimeNodeList[0]; this.timeForm = this.setTimeNodeList[0];
} }
}, },
......
...@@ -203,21 +203,23 @@ ...@@ -203,21 +203,23 @@
}); });
}, },
nextClick(formName) { nextClick(formName) {
// this.activeTab = 'second'; //为方便调试,不做校验
if(!this.baseInfo.hasSelectedNum) { this.activeTab = 'second';
this.noChoice = true //用作校验
return; // if(!this.baseInfo.hasSelectedNum) {
}else { // this.noChoice = true
this.noChoice = false // return;
} // }else {
this.$refs[formName].validate((valid) => { // this.noChoice = false
if (valid) { // }
// this.$refs['statusForm'].resetFields(); // this.$refs[formName].validate((valid) => {
this.activeTab = 'second'; // if (valid) {
} else { // // this.$refs['statusForm'].resetFields();
return false; // this.activeTab = 'second';
} // } else {
}); // return false;
// }
// });
}, },
preClick() { preClick() {
this.activeTab = 'first'; this.activeTab = 'first';
......
...@@ -10,33 +10,34 @@ ...@@ -10,33 +10,34 @@
<el-input v-model="searchData.name" placeholder="请输入关键词" maxlength="20" style="width: 250px" clearable></el-input> <el-input v-model="searchData.name" placeholder="请输入关键词" maxlength="20" style="width: 250px" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item label="开始年份"> <el-form-item label="开始年份">
<el-select v-model="searchData.timeRange" placeholder="请选择时间范围" style="width: 250px" clearable> <el-select v-model="searchData.startYear" placeholder="请选择时间范围" style="width: 250px">
<el-option label="全部" value="0"></el-option>
<el-option <el-option
v-for="(item,index) in timeRangeList" v-for="(item,index) in timeRangeList"
:key="index" :key="item.value"
:label="item.label" :label="item.label"
:value="item.value"> :value="item.label">
</el-option> </el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
<div class="search-btn"> <div class="search-btn">
<el-button class="button-green" type="primary" @click="search">查询</el-button> <el-button class="button-green" type="primary" @click="search(1)">查询</el-button>
<el-button class="button-white" plain @click="reseat">重置</el-button> <el-button class="button-white" plain @click="reseat">重置</el-button>
</div> </div>
</div> </div>
<div class="table-content"> <div class="table-content">
<div class="content-group-btn"><el-button type="primary" @click="addNewPlan">新建随访计划</el-button></div> <div class="content-group-btn"><el-button type="primary" @click="addNewPlan">新建随访计划</el-button></div>
<div> <div>
<el-table :data="planListData" style="width: 100%;margin-top: 20px;"> <el-table :data="planList.fPlanDtoList" style="width: 100%;margin-top: 20px;">
<el-table-column prop="name" label="随访计划名称" min-width="100" align="center" :show-overflow-tooltip="true"> <el-table-column prop="name" label="随访计划名称" min-width="100" align="center" :show-overflow-tooltip="true">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="visitDetail(scope.row)">{{scope.row.name}}</el-button> <el-button class="btn-right-class" type="text" @click="visitDetail(scope.row)">{{scope.row.name}}</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="startYear" label="开始年份" min-width="100" align="center"></el-table-column> <el-table-column prop="startYear" label="开始年份" min-width="100" align="center"></el-table-column>
<el-table-column prop="totalNum" label="总人数" min-width="150" align="center"></el-table-column> <el-table-column prop="num" label="总人数" min-width="150" align="center"></el-table-column>
<el-table-column label="操作" fixed="right" align="center" min-width="240"> <el-table-column label="操作" fixed="right" align="center" min-width="240">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button class="btn-right-class" type="text" @click="visitRow(scope.row)">查看居民</el-button>| <el-button class="btn-right-class" type="text" @click="visitRow(scope.row)">查看居民</el-button>|
...@@ -48,11 +49,11 @@ ...@@ -48,11 +49,11 @@
<el-row type="flex" justify="end" class="margin-top20"> <el-row type="flex" justify="end" class="margin-top20">
<el-pagination <el-pagination
background background
v-if="planListData.length" v-if="planList.fPlanDtoList"
@size-change="handleSizeChangePre" @size-change="handleSizeChangePre"
@current-change="handleCurrentChangePre" @current-change="handleCurrentChangePre"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:current-page="paginationSet.pageNum" :current-page="paginationSet.pageNo"
:page-sizes="paginationSet.pageSizes" :page-sizes="paginationSet.pageSizes"
:page-size="paginationSet.pageSize" :page-size="paginationSet.pageSize"
:total="paginationSet.total"> :total="paginationSet.total">
...@@ -66,6 +67,7 @@ ...@@ -66,6 +67,7 @@
<script> <script>
import BreadCrumb from "@/components/breadcrumb"; import BreadCrumb from "@/components/breadcrumb";
import { mapState, mapActions} from 'vuex'
export default { export default {
components:{ components:{
BreadCrumb, BreadCrumb,
...@@ -76,37 +78,51 @@ ...@@ -76,37 +78,51 @@
curmbSecond: '计划管理', curmbSecond: '计划管理',
searchData: { searchData: {
name: '', name: '',
timeRange: '', startYear: '0',
}, },
timeRangeList:[{ timeRangeList:[{
label: '10:00~11:00', label: '2019年',
value: 1 value: 1
},{ },{
label: '11:00~12:00', label: '2018年',
value: 2 value: 2
}], }],
planListData: [
{
name: '糖尿病高危随访',
startYear: '2018',
totalNum: '39',
}
],
paginationSet: { paginationSet: {
pageNum: 1, pageNo: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
pageSizes: [10,20,50,100] pageSizes: [10,20,50,100]
}, },
} }
}, },
computed: {
...mapState('planManage', {
planList: state => state.planList,
})
},
created() {
this.search(1);
},
methods: { methods: {
search(){ ...mapActions('planManage', ['getPlanList']),
console.log('搜索') async search(currentPage){
await this.getPlanList({
...this.searchData,
pageNo: currentPage || this.paginationSet.pageNo,
pageSize: this.paginationSet.pageSize,
});
const {pageNum, pageSize, totalRow} = this.planList;
this.paginationSet.total = totalRow;
this.paginationSet = {
...this.paginationSet,
pageNo: pageNum,
pageSize: pageSize,
}
}, },
reseat(){ reseat(){
this.searchData.name = ''; this.searchData.name = '';
this.searchData.timeRange = ''; this.searchData.startYear = '0';
this.search(1);
}, },
addNewPlan(){ addNewPlan(){
this.$router.push({path: '/followup/plan-manage/new-plan'}) this.$router.push({path: '/followup/plan-manage/new-plan'})
...@@ -124,10 +140,12 @@ ...@@ -124,10 +140,12 @@
handleSizeChangePre(pageSize){ handleSizeChangePre(pageSize){
this.paginationSet['pageSize'] = pageSize; this.paginationSet['pageSize'] = pageSize;
this.paginationSet['pageNum'] = 1; this.paginationSet['pageNo'] = 1;
this.search()
}, },
handleCurrentChangePre(pageNum){ handleCurrentChangePre(pageNo){
this.paginationSet['pageNum'] = pageNum this.paginationSet['pageNo'] = pageNo
this.search()
}, },
}, },
filters: {}, filters: {},
......
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
</el-form-item> </el-form-item>
<el-form-item label="预约时间" required> <el-form-item 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="yyyy-MM-dd"
value="yyyy-MM-dd" value="yyyy-MM-dd"
:picker-options="pickerOptions" @change="changeHandler"> :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"
...@@ -40,13 +40,13 @@ ...@@ -40,13 +40,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</div> </div>
<p class="warn-tips" v-if="reservationForm.reservationDate">该日期已经成功预约{{getRevervationNum}}人,请确保能在此时间段完成预约的随访任务</p> <p class="warn-tips" v-if="reservationForm.appointmentDate">该日期已经成功预约{{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.appointmentDate && reservationForm.appointmentRange">
<div class="item"> <div class="item">
<span class="title">发送内容:</span> <span class="title">发送内容:</span>
<p>{{doctorName}}医生邀请您在{{reservationForm.reservationDate}}{{reservationForm.timeRange}}进行随访,请确认是否参加。</p> <p>{{doctorName}}医生邀请您在{{reservationForm.appointmentDate}}{{reservationForm.appointmentRange}}进行随访,请确认是否参加。</p>
</div> </div>
<div class="item"> <div class="item">
<span class="title">本次推送:</span> <span class="title">本次推送:</span>
...@@ -66,6 +66,7 @@ ...@@ -66,6 +66,7 @@
</div> </div>
</template> </template>
<script> <script>
import followApi from '@/utils/followup/followapis'
import { mapState, mapActions } from 'vuex' import { mapState, mapActions } from 'vuex'
export default { export default {
components: {}, components: {},
...@@ -73,9 +74,9 @@ ...@@ -73,9 +74,9 @@
return{ return{
reservationDialog: true, reservationDialog: true,
reservationForm: { reservationForm: {
reservationDate: '', appointmentDate: '',
timeRange: '', appointmentRange: '',
hasReservedNumber: null patientAppointList: [],
}, },
timeRangeOptions: [ timeRangeOptions: [
{ {
...@@ -125,10 +126,9 @@ ...@@ -125,10 +126,9 @@
label: '20:00-21:00' label: '20:00-21:00'
}], }],
doctorName: '云晓雀', doctorName: '云晓雀',
smsBalanceNumber: '-20',
rules: { rules: {
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) {
...@@ -143,6 +143,15 @@ ...@@ -143,6 +143,15 @@
default: false default: false
}, },
checkData: {}, checkData: {},
selectList: { //已选择发送人员list
type: Array,
default: {},
}
},
watch: {
selectList(val) {
this.selectList = val;
}
}, },
computed: { computed: {
...mapState('reservationManage',{ ...mapState('reservationManage',{
...@@ -165,11 +174,13 @@ ...@@ -165,11 +174,13 @@
closeSendReserve(formName){ closeSendReserve(formName){
this.$refs[formName].validate((valid) => { this.$refs[formName].validate((valid) => {
if (valid) { if (valid) {
alert('submit!'); followApi.sendReservation({
if (this.$refs['reservationForm']) { ...this.reservationForm,
patientAppointList: this.selectList
}).then(({data}) => {
this.$refs['reservationForm'].resetFields(); this.$refs['reservationForm'].resetFields();
} this.$emit('closeSendReserve',false);
this.$emit('closeSendReserve',false) })
} else { } else {
return false; return false;
} }
......
...@@ -118,7 +118,7 @@ ...@@ -118,7 +118,7 @@
</div> </div>
</div> </div>
</div> </div>
<send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" @closeSendReserve="closeSendReserve"></send-reservation> <send-reservation :isDialogShow="isDialogShow" :checkData="checkRevervationData" :selectList="selectList" @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" :reservationForm="needPara"></change-reservation> <change-reservation :isChangeReservation="isChangeReservation" @closeChangeReserve="closeChangeReserve" :reservationForm="needPara"></change-reservation>
<followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail" :enteringInfo="enteringInfo"></followup-detail> <followup-detail :dialogFormVisible="dialogDetailShow" @closeDetail="closeDetail" :enteringInfo="enteringInfo"></followup-detail>
...@@ -176,6 +176,7 @@ ...@@ -176,6 +176,7 @@
isNoEnoughShow: false, //余额不足dialog展示 isNoEnoughShow: false, //余额不足dialog展示
isChangeReservation: false, //变更预约状态dialog展示 isChangeReservation: false, //变更预约状态dialog展示
selectionData: [], selectionData: [],
selectList: [],
ids: '', ids: '',
needPara: {}, needPara: {},
dialogDetailShow: false, dialogDetailShow: false,
...@@ -265,6 +266,7 @@ ...@@ -265,6 +266,7 @@
}, },
async sendReservation() { async sendReservation() {
if(this.selectionData.length > 0){ if(this.selectionData.length > 0){
this.selectList = this.selectionData;
await this.getCheckReservation({ await this.getCheckReservation({
patientIds: this.ids patientIds: this.ids
}) })
...@@ -286,6 +288,9 @@ ...@@ -286,6 +288,9 @@
} }
}, },
async sendReservationRow(row){ async sendReservationRow(row){
let newList = [];
newList.push(row);
this.selectList = newList;
await this.getCheckReservation({ await this.getCheckReservation({
patientIds: row.nickId patientIds: row.nickId
}) })
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册